From 4acc9b881a3776fb1d082f259dd353157b71ef0c Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 21 Apr 2026 16:01:00 +0000 Subject: [PATCH 1/5] v1.6.0: Settings-Seite (Katalog, Standardwerte, REST API, Deinstallation) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Neue Admin-Seite unter Datensätze → Einstellungen mit vier Sektionen. Standardwerte werden via set_default_value() direkt in Carbon Fields vorausgefüllt; Cache-TTL ist nun konfigurierbar statt hardcodiert (300 s). - class-settings.php: WordPress Settings API; ODW_Settings::get() als zentrale Zugriffs-API; filter_catalog_title() koppelt odw_catalog_title an gespeicherten Wert; handle_recalculate_quality() iteriert alle Datensätze und ruft ODW_Quality::calculate/store auf - class-fields.php: set_default_value() für odw_publisher, odw_license, odw_language liest aus ODW_Settings::get() - class-rest-api.php: delete_catalog_transients_public() als öffentlicher Alias — wird nach Einstellungsänderungen aufgerufen - uninstall.php: liest odw_settings[delete_on_uninstall]; löscht alle Plugin-Optionen (odw_settings, odw_demo_post_id, odw_show_welcome) - open-data-wizard.php: class-settings.php vor class-fields.php laden https://claude.ai/code/session_013ma6QYffgnE2eKgDfh1Qgn --- CHANGELOG.md | 17 ++ includes/class-fields.php | 3 + includes/class-rest-api.php | 5 + includes/class-settings.php | 359 ++++++++++++++++++++++++++++++++++++ open-data-wizard.php | 6 +- uninstall.php | 7 +- 6 files changed, 393 insertions(+), 4 deletions(-) create mode 100644 includes/class-settings.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c0295d..cfe2b45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,23 @@ Versionierung folgt [Semantic Versioning](https://semver.org/). --- +## [1.6.0] — 2026-04-21 + +### Hinzugefügt +- **Settings-Seite** unter *Datensätze → Einstellungen* mit vier Sektionen: + - **Katalog**: Katalog-Titel (überschreibt den Standardwert im REST API), Herausgebende Organisation + - **Standardwerte**: Standard-Lizenz und Standard-Sprache — werden bei neuen Datensätzen automatisch vorausgefüllt (via `set_default_value()` in Carbon Fields) + - **REST API**: Cache-Laufzeit konfigurierbar (60–86400 s, Standard 300 s) + - **Deinstallation**: Checkbox für opt-in Datenlöschung (ersetzt separate Option) +- **„Alle Qualitätsscores neu berechnen"**-Button auf der Settings-Seite (nonce-gesichert, zeigt Anzahl aktualisierter Datensätze) +- **`ODW_Settings::get()`** — zentrale API für Einstellungszugriff in anderen Klassen +- **`ODW_Rest_API::delete_catalog_transients_public()`** — öffentlicher Alias für Cache-Invalidierung nach Einstellungsänderungen + +### Geändert +- `uninstall.php`: liest jetzt `odw_settings[delete_on_uninstall]` statt separater Option; löscht auch `odw_settings`, `odw_demo_post_id`, `odw_show_welcome` + +--- + ## [1.5.0] — 2026-04-21 ### Hinzugefügt diff --git a/includes/class-fields.php b/includes/class-fields.php index 5d455c7..a7c7e1e 100644 --- a/includes/class-fields.php +++ b/includes/class-fields.php @@ -39,6 +39,7 @@ private static function register_required_fields(): void { Field::make( 'text', 'odw_publisher', __( 'Herausgebende Organisation (dct:publisher)', 'open-data-wizard' ) ) ->set_required( true ) + ->set_default_value( class_exists( 'ODW_Settings' ) ? (string) ODW_Settings::get( 'default_publisher' ) : '' ) ->set_attribute( 'placeholder', __( 'z.B. Musterorganisation e.V.', 'open-data-wizard' ) ), Field::make( 'textarea', 'odw_description', __( 'Beschreibung (dct:description)', 'open-data-wizard' ) ) @@ -48,6 +49,7 @@ private static function register_required_fields(): void { Field::make( 'select', 'odw_license', __( 'Lizenz (dct:license)', 'open-data-wizard' ) ) ->set_required( true ) + ->set_default_value( class_exists( 'ODW_Settings' ) ? (string) ODW_Settings::get( 'default_license' ) : '' ) ->add_options( self::get_license_options() ), ] ) @@ -55,6 +57,7 @@ private static function register_required_fields(): void { __( '2 — Optionale Angaben', 'open-data-wizard' ), [ Field::make( 'select', 'odw_language', __( 'Sprache (dct:language)', 'open-data-wizard' ) ) + ->set_default_value( class_exists( 'ODW_Settings' ) ? (string) ODW_Settings::get( 'default_language' ) : '' ) ->add_options( [ '' => __( '— Bitte wählen —', 'open-data-wizard' ), 'de' => __( 'Deutsch (DE)', 'open-data-wizard' ), diff --git a/includes/class-rest-api.php b/includes/class-rest-api.php index 9a14489..acec1c4 100644 --- a/includes/class-rest-api.php +++ b/includes/class-rest-api.php @@ -291,7 +291,12 @@ public static function invalidate_cache_on_trash( int $post_id ): void { /** * Delete all catalog transients using a direct DB query (no viable alternative for pattern delete). + * Public alias used by ODW_Settings when cache TTL changes. */ + public static function delete_catalog_transients_public(): void { + self::delete_catalog_transients(); + } + private static function delete_catalog_transients(): void { global $wpdb; diff --git a/includes/class-settings.php b/includes/class-settings.php new file mode 100644 index 0000000..6660ecf --- /dev/null +++ b/includes/class-settings.php @@ -0,0 +1,359 @@ + +
+

+ + +
+

+ +

+
+ + +
+ +
+ +
+ +

+

+ +

+
+ + + +
+
+ [ self::class, 'sanitize' ], + 'default' => self::get_defaults(), + ] + ); + + // --- Katalog --- + add_settings_section( + 'odw_section_catalog', + __( 'Katalog', 'open-data-wizard' ), + static function (): void { + echo '

' . esc_html__( 'Metadaten des Datenkatalogs — erscheinen in der REST-API-Antwort von /wp-json/datenatlas/v1/catalog.', 'open-data-wizard' ) . '

'; + }, + 'odw-settings' + ); + + add_settings_field( 'catalog_title', __( 'Katalog-Titel', 'open-data-wizard' ), [ self::class, 'field_catalog_title' ], 'odw-settings', 'odw_section_catalog' ); + add_settings_field( 'default_publisher', __( 'Herausgebende Organisation', 'open-data-wizard' ), [ self::class, 'field_default_publisher' ], 'odw-settings', 'odw_section_catalog' ); + + // --- Standardwerte --- + add_settings_section( + 'odw_section_defaults', + __( 'Standardwerte für neue Datensätze', 'open-data-wizard' ), + static function (): void { + echo '

' . esc_html__( 'Diese Werte werden beim Anlegen eines neuen Datensatzes automatisch vorausgefüllt.', 'open-data-wizard' ) . '

'; + }, + 'odw-settings' + ); + + add_settings_field( 'default_license', __( 'Standard-Lizenz', 'open-data-wizard' ), [ self::class, 'field_default_license' ], 'odw-settings', 'odw_section_defaults' ); + add_settings_field( 'default_language', __( 'Standard-Sprache', 'open-data-wizard' ), [ self::class, 'field_default_language' ], 'odw-settings', 'odw_section_defaults' ); + + // --- API --- + add_settings_section( + 'odw_section_api', + __( 'REST API', 'open-data-wizard' ), + null, + 'odw-settings' + ); + + add_settings_field( 'cache_ttl', __( 'Cache-Laufzeit (Sekunden)', 'open-data-wizard' ), [ self::class, 'field_cache_ttl' ], 'odw-settings', 'odw_section_api' ); + + // --- Deinstallation --- + add_settings_section( + 'odw_section_uninstall', + __( 'Deinstallation', 'open-data-wizard' ), + null, + 'odw-settings' + ); + + add_settings_field( 'delete_on_uninstall', __( 'Daten löschen', 'open-data-wizard' ), [ self::class, 'field_delete_on_uninstall' ], 'odw-settings', 'odw_section_uninstall' ); + } + + // ------------------------------------------------------------------------- + // Feld-Callbacks + // ------------------------------------------------------------------------- + + public static function field_catalog_title(): void { + $value = self::get( 'catalog_title' ); + $placeholder = get_bloginfo( 'name' ) . ' — Datenkatalog'; + ?> + +

+ + +

+ + +

+ __( '— Kein Standard —', 'open-data-wizard' ), + 'de' => __( 'Deutsch (DE)', 'open-data-wizard' ), + 'en' => __( 'Englisch (EN)', 'open-data-wizard' ), + ]; + ?> + + + +

+ +

+ + + 'odw_dataset', + 'post_status' => [ 'publish', 'draft' ], + 'posts_per_page' => -1, + 'fields' => 'ids', + ] ); + + $count = 0; + foreach ( $posts as $post_id ) { + ODW_Quality::store( (int) $post_id, ODW_Quality::calculate( (int) $post_id ) ); + $count++; + } + + wp_safe_redirect( + add_query_arg( + [ + 'page' => 'odw-settings', + 'odw_recalculated' => $count, + ], + admin_url( 'edit.php?post_type=odw_dataset' ) + ) + ); + exit; + } + + // ------------------------------------------------------------------------- + // Filter + // ------------------------------------------------------------------------- + + public static function filter_catalog_title( string $default ): string { + $custom = trim( self::get( 'catalog_title' ) ); + return '' !== $custom ? $custom : $default; + } + + // ------------------------------------------------------------------------- + // Datenzugriff + // ------------------------------------------------------------------------- + + /** + * Gibt alle Einstellungen oder einen einzelnen Wert zurück. + * + * @return mixed + */ + public static function get( string $key = '' ) { + $settings = (array) get_option( self::OPTION_KEY, [] ); + $settings = array_merge( self::get_defaults(), $settings ); + + if ( '' === $key ) { + return $settings; + } + + return $settings[ $key ] ?? null; + } + + private static function get_defaults(): array { + return [ + 'catalog_title' => '', + 'default_publisher' => '', + 'default_license' => '', + 'default_language' => '', + 'cache_ttl' => 300, + 'delete_on_uninstall' => '0', + ]; + } +} diff --git a/open-data-wizard.php b/open-data-wizard.php index 88d9dac..9708322 100644 --- a/open-data-wizard.php +++ b/open-data-wizard.php @@ -3,7 +3,7 @@ * Plugin Name: Open Data Wizard * Plugin URI: https://github.com/daimpad/OpenDataWizard * Description: DCAT-AP 3.0 konforme Open Data Metadatenverwaltung für zivilgesellschaftliche Organisationen. Bereitstellung als maschinenlesbarer Endpoint für Civora/Piveau-Harvesting. - * Version: 1.5.0 + * Version: 1.6.0 * Requires at least: 6.4 * Requires PHP: 8.1 * Author: Datenatlas Zivilgesellschaft @@ -19,7 +19,7 @@ exit; } -define( 'ODW_VERSION', '1.5.0' ); +define( 'ODW_VERSION', '1.6.0' ); define( 'ODW_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); define( 'ODW_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); define( 'ODW_PLUGIN_FILE', __FILE__ ); @@ -109,6 +109,7 @@ function odw_bootstrap(): void { return; } + require_once ODW_PLUGIN_DIR . 'includes/class-settings.php'; require_once ODW_PLUGIN_DIR . 'includes/class-post-types.php'; require_once ODW_PLUGIN_DIR . 'includes/class-fields.php'; require_once ODW_PLUGIN_DIR . 'includes/class-rest-api.php'; @@ -117,6 +118,7 @@ function odw_bootstrap(): void { require_once ODW_PLUGIN_DIR . 'includes/class-admin.php'; require_once ODW_PLUGIN_DIR . 'includes/class-shortcode.php'; + ODW_Settings::init(); ODW_Post_Types::init(); ODW_Fields::init(); ODW_Rest_API::init(); diff --git a/uninstall.php b/uninstall.php index 406912d..9bfee42 100644 --- a/uninstall.php +++ b/uninstall.php @@ -13,7 +13,8 @@ } // Nur löschen wenn die Option gesetzt ist (Opt-in Datenlöschung). -if ( ! get_option( 'odw_delete_data_on_uninstall', false ) ) { +$odw_settings = (array) get_option( 'odw_settings', [] ); +if ( empty( $odw_settings['delete_on_uninstall'] ) ) { return; } @@ -39,7 +40,9 @@ } // Plugin-Optionen löschen. -delete_option( 'odw_delete_data_on_uninstall' ); +delete_option( 'odw_settings' ); +delete_option( 'odw_demo_post_id' ); +delete_option( 'odw_show_welcome' ); // Transients bereinigen. global $wpdb; From 37541a5f11b6105f39e324b87b496d58e8b0b919 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 21 Apr 2026 16:06:34 +0000 Subject: [PATCH 2/5] =?UTF-8?q?v1.7.0:=20DCAT-AP=20Feldtiefe=20=E2=80=94?= =?UTF-8?q?=20Tab=204=20Erweiterte=20Angaben?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 8 neue DCAT-AP 3.0 Felder in neuem Tab 4 (Vorschau → Tab 5 verschoben). JSON-LD Context um vcard und skos Namespaces erweitert. - class-fields.php: Tab "4 — Erweiterte Angaben" mit Projektseite (dcat:landingPage), Aktualisierungsfrequenz (dct:accrualPeriodicity, EU Publications Office Vokabular), geographischer Abdeckung (dct:spatial → skos:prefLabel), zeitlichem Bezug (dct:PeriodOfTime mit dcat:startDate/endDate) und Kontaktpunkt (vcard:Organization mit vcard:fn, vcard:hasEmail, vcard:hasURL); get_periodicity_options() für EU-Frequenz-Vokabular; odw_build_dataset_jsonld() um alle neuen Felder erweitert - class-rest-api.php: vcard + skos Namespace in JSONLD_CONTEXT - class-admin.php: Help Tab Text auf Tab 5 (Vorschau) aktualisiert https://claude.ai/code/session_013ma6QYffgnE2eKgDfh1Qgn --- CHANGELOG.md | 18 ++++++ includes/class-admin.php | 4 +- includes/class-fields.php | 116 +++++++++++++++++++++++++++++++++++- includes/class-rest-api.php | 12 ++-- open-data-wizard.php | 4 +- 5 files changed, 145 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfe2b45..7b81dea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,24 @@ Versionierung folgt [Semantic Versioning](https://semver.org/). --- +## [1.7.0] — 2026-04-21 + +### Hinzugefügt +- **Tab 4 — Erweiterte Angaben** im Datensatz-Formular mit 8 neuen DCAT-AP 3.0 Feldern: + - `dcat:landingPage` — URL der Projektwebsite + - `dct:accrualPeriodicity` — Aktualisierungsfrequenz (EU Publications Office Vokabular: täglich bis zweijährlich) + - `dct:spatial` — Geographische Abdeckung (Freitext oder URI, z.B. GeoNames) + - `dct:temporal` — Zeitlicher Bezug mit Start- und Enddatum (`dcat:startDate`, `dcat:endDate`) + - `dcat:contactPoint` — Kontaktpunkt mit Name, E-Mail (`mailto:`-Prefix) und Website (`vcard:Organization`) +- **`vcard` und `skos` Namespaces** im JSON-LD `@context` der REST API +- **`ODW_Fields::get_periodicity_options()`** — Kontrolliertes Vokabular für Aktualisierungsfrequenzen + +### Geändert +- Vorschau-Tab umbenannt von „4" auf „5" (Erweiterte Angaben ist jetzt Tab 4) +- Help Tab Beschreibung aktualisiert + +--- + ## [1.6.0] — 2026-04-21 ### Hinzugefügt diff --git a/includes/class-admin.php b/includes/class-admin.php index a495e2a..4d03673 100644 --- a/includes/class-admin.php +++ b/includes/class-admin.php @@ -262,8 +262,10 @@ private static function help_content_fields(): string {

+

+

-

+

add_tab( - __( '4 — Vorschau', 'open-data-wizard' ), + __( '4 — Erweiterte Angaben', 'open-data-wizard' ), + [ + // --- Projektseite & Aktualität --- + Field::make( 'html', 'odw_ext_hint_landing' ) + ->set_html( '

' . esc_html__( 'Projektseite & Aktualität', 'open-data-wizard' ) . '

' ), + + Field::make( 'text', 'odw_landing_page', __( 'Projektseite (dcat:landingPage)', 'open-data-wizard' ) ) + ->set_attribute( 'type', 'url' ) + ->set_attribute( 'placeholder', 'https://beispiel.de/projekt' ) + ->set_help_text( __( 'URL der Projektwebsite oder des Datenportals, auf der weitere Informationen zum Datensatz zu finden sind.', 'open-data-wizard' ) ), + + Field::make( 'select', 'odw_accrual_periodicity', __( 'Aktualisierungsfrequenz (dct:accrualPeriodicity)', 'open-data-wizard' ) ) + ->add_options( self::get_periodicity_options() ), + + // --- Abdeckung --- + Field::make( 'html', 'odw_ext_hint_coverage' ) + ->set_html( '

' . esc_html__( 'Abdeckung', 'open-data-wizard' ) . '

' ), + + Field::make( 'text', 'odw_spatial', __( 'Geographische Abdeckung (dct:spatial)', 'open-data-wizard' ) ) + ->set_attribute( 'placeholder', __( 'z.B. Deutschland, Berlin oder GeoNames-URI', 'open-data-wizard' ) ) + ->set_help_text( __( 'Freitext oder URI (z.B. https://sws.geonames.org/2950159/).', 'open-data-wizard' ) ), + + Field::make( 'date', 'odw_temporal_start', __( 'Zeitlicher Bezug — Start (dct:temporal)', 'open-data-wizard' ) ) + ->set_storage_format( 'Y-m-d' ) + ->set_picker_options( [ 'dateFormat' => 'Y-m-d' ] ), + + Field::make( 'date', 'odw_temporal_end', __( 'Zeitlicher Bezug — Ende (dct:temporal)', 'open-data-wizard' ) ) + ->set_storage_format( 'Y-m-d' ) + ->set_picker_options( [ 'dateFormat' => 'Y-m-d' ] ), + + // --- Kontaktpunkt --- + Field::make( 'html', 'odw_ext_hint_contact' ) + ->set_html( '

' . esc_html__( 'Kontaktpunkt (dcat:contactPoint)', 'open-data-wizard' ) . '

' ), + + Field::make( 'text', 'odw_contact_name', __( 'Name / Organisation', 'open-data-wizard' ) ) + ->set_attribute( 'placeholder', __( 'z.B. Open Data Team', 'open-data-wizard' ) ), + + Field::make( 'text', 'odw_contact_email', __( 'E-Mail-Adresse', 'open-data-wizard' ) ) + ->set_attribute( 'type', 'email' ) + ->set_attribute( 'placeholder', 'opendata@beispiel.de' ), + + Field::make( 'text', 'odw_contact_url', __( 'Website', 'open-data-wizard' ) ) + ->set_attribute( 'type', 'url' ) + ->set_attribute( 'placeholder', 'https://beispiel.de/kontakt' ), + ] + ) + ->add_tab( + __( '5 — Vorschau', 'open-data-wizard' ), [ Field::make( 'html', 'odw_preview_html' ) ->set_html( self::get_preview_html() ), @@ -204,6 +251,21 @@ public static function get_theme_options(): array { return (array) apply_filters( 'odw_theme_options', $options ); } + public static function get_periodicity_options(): array { + $base = 'http://publications.europa.eu/resource/authority/frequency/'; + return [ + '' => __( '— Bitte wählen —', 'open-data-wizard' ), + $base . 'DAILY' => __( 'Täglich', 'open-data-wizard' ), + $base . 'WEEKLY' => __( 'Wöchentlich', 'open-data-wizard' ), + $base . 'MONTHLY' => __( 'Monatlich', 'open-data-wizard' ), + $base . 'QUARTERLY' => __( 'Vierteljährlich', 'open-data-wizard' ), + $base . 'ANNUAL' => __( 'Jährlich', 'open-data-wizard' ), + $base . 'BIENNIAL' => __( 'Zweijährlich', 'open-data-wizard' ), + $base . 'IRREG' => __( 'Unregelmäßig', 'open-data-wizard' ), + $base . 'UNKNOWN' => __( 'Unbekannt', 'open-data-wizard' ), + ]; + } + public static function get_format_options(): array { return [ '' => __( '— Bitte wählen —', 'open-data-wizard' ), @@ -291,6 +353,16 @@ function odw_build_dataset_jsonld( int $post_id ): ?array { $modified = get_post_meta( $post_id, '_odw_modified', true ); $distributions = carbon_get_post_meta( $post_id, 'odw_distributions' ); + // Erweiterte DCAT-AP Felder (Tab 4) + $landing_page = (string) carbon_get_post_meta( $post_id, 'odw_landing_page' ); + $accrual_periodicity = (string) carbon_get_post_meta( $post_id, 'odw_accrual_periodicity' ); + $spatial = (string) carbon_get_post_meta( $post_id, 'odw_spatial' ); + $temporal_start = (string) carbon_get_post_meta( $post_id, 'odw_temporal_start' ); + $temporal_end = (string) carbon_get_post_meta( $post_id, 'odw_temporal_end' ); + $contact_name = (string) carbon_get_post_meta( $post_id, 'odw_contact_name' ); + $contact_email = (string) carbon_get_post_meta( $post_id, 'odw_contact_email' ); + $contact_url = (string) carbon_get_post_meta( $post_id, 'odw_contact_url' ); + $dataset = [ '@type' => 'dcat:Dataset', '@id' => rest_url( 'datenatlas/v1/datasets/' . $post_id ), @@ -360,6 +432,48 @@ function odw_build_dataset_jsonld( int $post_id ): ?array { } } + // --- Erweiterte Felder --- + + if ( ! empty( $landing_page ) ) { + $dataset['dcat:landingPage'] = [ '@id' => $landing_page ]; + } + + if ( ! empty( $accrual_periodicity ) ) { + $dataset['dct:accrualPeriodicity'] = [ '@id' => $accrual_periodicity ]; + } + + if ( ! empty( $spatial ) ) { + $dataset['dct:spatial'] = [ + '@type' => 'dct:Location', + 'skos:prefLabel' => $spatial, + ]; + } + + if ( ! empty( $temporal_start ) || ! empty( $temporal_end ) ) { + $period = [ '@type' => 'dct:PeriodOfTime' ]; + if ( ! empty( $temporal_start ) ) { + $period['dcat:startDate'] = [ '@type' => 'xsd:date', '@value' => $temporal_start ]; + } + if ( ! empty( $temporal_end ) ) { + $period['dcat:endDate'] = [ '@type' => 'xsd:date', '@value' => $temporal_end ]; + } + $dataset['dct:temporal'] = $period; + } + + if ( ! empty( $contact_name ) || ! empty( $contact_email ) ) { + $contact = [ '@type' => 'vcard:Organization' ]; + if ( ! empty( $contact_name ) ) { + $contact['vcard:fn'] = $contact_name; + } + if ( ! empty( $contact_email ) ) { + $contact['vcard:hasEmail'] = 'mailto:' . $contact_email; + } + if ( ! empty( $contact_url ) ) { + $contact['vcard:hasURL'] = [ '@id' => $contact_url ]; + } + $dataset['dcat:contactPoint'] = $contact; + } + /** * Filters the complete DCAT-AP JSON-LD array before output. * diff --git a/includes/class-rest-api.php b/includes/class-rest-api.php index acec1c4..0171853 100644 --- a/includes/class-rest-api.php +++ b/includes/class-rest-api.php @@ -25,11 +25,13 @@ class ODW_Rest_API { * DCAT-AP 3.0 JSON-LD @context inkl. Plugin-eigenem odw:-Namespace für Qualitätsdaten. */ private const JSONLD_CONTEXT = [ - 'dcat' => 'https://www.w3.org/ns/dcat#', - 'dct' => 'http://purl.org/dc/terms/', - 'foaf' => 'http://xmlns.com/foaf/0.1/', - 'xsd' => 'http://www.w3.org/2001/XMLSchema#', - 'odw' => 'https://github.com/daimpad/OpenDataWizard/ns#', + 'dcat' => 'https://www.w3.org/ns/dcat#', + 'dct' => 'http://purl.org/dc/terms/', + 'foaf' => 'http://xmlns.com/foaf/0.1/', + 'xsd' => 'http://www.w3.org/2001/XMLSchema#', + 'vcard' => 'http://www.w3.org/2006/vcard/ns#', + 'skos' => 'http://www.w3.org/2004/02/skos/core#', + 'odw' => 'https://github.com/daimpad/OpenDataWizard/ns#', ]; public static function init(): void { diff --git a/open-data-wizard.php b/open-data-wizard.php index 9708322..85be778 100644 --- a/open-data-wizard.php +++ b/open-data-wizard.php @@ -3,7 +3,7 @@ * Plugin Name: Open Data Wizard * Plugin URI: https://github.com/daimpad/OpenDataWizard * Description: DCAT-AP 3.0 konforme Open Data Metadatenverwaltung für zivilgesellschaftliche Organisationen. Bereitstellung als maschinenlesbarer Endpoint für Civora/Piveau-Harvesting. - * Version: 1.6.0 + * Version: 1.7.0 * Requires at least: 6.4 * Requires PHP: 8.1 * Author: Datenatlas Zivilgesellschaft @@ -19,7 +19,7 @@ exit; } -define( 'ODW_VERSION', '1.6.0' ); +define( 'ODW_VERSION', '1.7.0' ); define( 'ODW_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); define( 'ODW_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); define( 'ODW_PLUGIN_FILE', __FILE__ ); From 93edf34313bce1572886c8e1dc1e35c483df3e02 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 21 Apr 2026 16:16:18 +0000 Subject: [PATCH 3/5] Add test suite for Settings, Quality, Shortcode and v1.7.0 Fields (56 tests) - tests/test-settings.php: 7 tests covering ODW_Settings::get() defaults, merging, single-key access and filter_catalog_title() with whitespace handling - tests/test-quality.php: 17 tests covering get_level() thresholds, get_level_label(), get_indicators() total (100 pts), get()/store() meta round-trip, append_to_jsonld() - tests/test-shortcode.php: 10 tests covering format_bytes() byte/KB/MB/GB ranges and render() early-return edge cases (zero ID, missing post, wrong type, non-published) - tests/test-fields-extended.php: 22 tests covering get_periodicity_options() EU URIs and odw_build_dataset_jsonld() for all v1.7.0 fields (landingPage, accrualPeriodicity, spatial, temporal start/end, contactPoint with mailto: prefix and @id URL) - composer.json: downgraded phpunit to ^9.6 and wp_mock to ^1.0 (PHP 8.4 compat) - phpunit.xml: migrated from PHPUnit 10 schema; added suffix=".php" for test discovery - vendor: added PHPUnit 9.6, WP_Mock 1.1, Mockery and related dev dependencies https://claude.ai/code/session_013ma6QYffgnE2eKgDfh1Qgn --- composer.json | 4 +- composer.lock | 2621 +- phpunit.xml | 36 +- tests/test-fields-extended.php | 297 + tests/test-quality.php | 245 + tests/test-settings.php | 115 + tests/test-shortcode.php | 167 + vendor/10up/wp_mock/.gitattributes | 12 + vendor/10up/wp_mock/.gitignore | 32 + vendor/10up/wp_mock/CHANGELOG.md | 92 + vendor/10up/wp_mock/CODE_OF_CONDUCT.md | 76 + vendor/10up/wp_mock/CONTRIBUTING.md | 29 + vendor/10up/wp_mock/CREDITS.md | 13 + vendor/10up/wp_mock/LICENSE.md | 13 + vendor/10up/wp_mock/README.md | 48 + vendor/10up/wp_mock/bootstrap.php.dist | 5 + vendor/10up/wp_mock/composer.json | 65 + vendor/10up/wp_mock/composer.lock | 5518 + vendor/10up/wp_mock/php/WP_Mock.php | 549 + .../php/WP_Mock/API/constant-mocks.php | 72 + .../themes/vip/plugins/vip-init.php | 1 + .../dummy-files/wp-includes/class-http.php | 1 + .../php/WP_Mock/API/function-mocks.php | 271 + vendor/10up/wp_mock/php/WP_Mock/Action.php | 81 + .../php/WP_Mock/DeprecatedMethodListener.php | 218 + .../10up/wp_mock/php/WP_Mock/EventManager.php | 169 + vendor/10up/wp_mock/php/WP_Mock/Filter.php | 100 + vendor/10up/wp_mock/php/WP_Mock/Functions.php | 421 + .../wp_mock/php/WP_Mock/Functions/Handler.php | 135 + .../php/WP_Mock/Functions/ReturnSequence.php | 49 + vendor/10up/wp_mock/php/WP_Mock/Hook.php | 142 + .../wp_mock/php/WP_Mock/HookedCallback.php | 115 + .../php/WP_Mock/InvokedFilterValue.php | 26 + .../php/WP_Mock/Matcher/AnyInstance.php | 83 + .../php/WP_Mock/Matcher/FuzzyObject.php | 119 + .../Tools/Constraints/ExpectationsMet.php | 69 + .../WP_Mock/Tools/Constraints/IsEqualHtml.php | 94 + .../wp_mock/php/WP_Mock/Tools/TestCase.php | 396 + .../AccessInaccessibleClassMembersTrait.php | 118 + .../Traits/MockWordPressObjectsTrait.php | 74 + vendor/antecedent/patchwork/LICENSE | 21 + vendor/antecedent/patchwork/Patchwork.php | 144 + vendor/antecedent/patchwork/README.md | 41 + vendor/antecedent/patchwork/box.json | 17 + vendor/antecedent/patchwork/composer.json | 20 + .../patchwork/src/CallRerouting.php | 611 + .../patchwork/src/CallRerouting/Decorator.php | 62 + .../patchwork/src/CallRerouting/Handle.php | 65 + .../patchwork/src/CodeManipulation.php | 187 + .../CodeManipulation/Actions/Arguments.php | 49 + .../Actions/CallRerouting.php | 88 + .../Actions/CodeManipulation.php | 33 + .../Actions/ConflictPrevention.php | 33 + .../src/CodeManipulation/Actions/Generic.php | 190 + .../CodeManipulation/Actions/Namespaces.php | 185 + .../Actions/RedefinitionOfInternals.php | 142 + .../RedefinitionOfLanguageConstructs.php | 131 + .../Actions/RedefinitionOfNew.php | 201 + .../patchwork/src/CodeManipulation/Source.php | 318 + .../patchwork/src/CodeManipulation/Stream.php | 362 + vendor/antecedent/patchwork/src/Config.php | 233 + vendor/antecedent/patchwork/src/Console.php | 57 + .../antecedent/patchwork/src/Exceptions.php | 129 + .../src/Redefinitions/LanguageConstructs.php | 76 + vendor/antecedent/patchwork/src/Stack.php | 95 + vendor/antecedent/patchwork/src/Utils.php | 388 + vendor/bin/php-parse | 119 + vendor/bin/phpcbf | 119 + vendor/bin/phpcs | 119 + vendor/bin/phpstan | 119 + vendor/bin/phpstan.phar | 119 + vendor/bin/phpunit | 122 + vendor/composer/autoload_classmap.php | 1174 + vendor/composer/autoload_files.php | 14 + vendor/composer/autoload_psr4.php | 7 + vendor/composer/autoload_real.php | 12 + vendor/composer/autoload_static.php | 1232 + vendor/composer/installed.json | 2779 +- vendor/composer/installed.php | 390 +- .../CHANGELOG.md | 587 + .../LICENSE.md | 22 + .../README.md | 278 + .../composer.json | 74 + .../src/Plugin.php | 635 + vendor/doctrine/instantiator/LICENSE | 19 + vendor/doctrine/instantiator/README.md | 38 + vendor/doctrine/instantiator/composer.json | 47 + .../Exception/ExceptionInterface.php | 14 + .../Exception/InvalidArgumentException.php | 52 + .../Exception/UnexpectedValueException.php | 61 + .../Doctrine/Instantiator/Instantiator.php | 253 + .../Instantiator/InstantiatorInterface.php | 24 + vendor/hamcrest/hamcrest-php/.gitattributes | 6 + vendor/hamcrest/hamcrest-php/.gitignore | 3 + vendor/hamcrest/hamcrest-php/CHANGES.txt | 181 + vendor/hamcrest/hamcrest-php/CONTRIBUTING.md | 32 + vendor/hamcrest/hamcrest-php/LICENSE.txt | 27 + vendor/hamcrest/hamcrest-php/README.md | 488 + vendor/hamcrest/hamcrest-php/composer.json | 37 + .../hamcrest-php/generator/FactoryCall.php | 41 + .../hamcrest-php/generator/FactoryClass.php | 71 + .../hamcrest-php/generator/FactoryFile.php | 121 + .../generator/FactoryGenerator.php | 124 + .../hamcrest-php/generator/FactoryMethod.php | 231 + .../generator/FactoryParameter.php | 131 + .../generator/GlobalFunctionFile.php | 42 + .../generator/StaticMethodFile.php | 38 + .../generator/parts/file_header.txt | 7 + .../generator/parts/functions_footer.txt | 0 .../generator/parts/functions_header.txt | 24 + .../generator/parts/functions_imports.txt | 0 .../generator/parts/matchers_footer.txt | 1 + .../generator/parts/matchers_header.txt | 7 + .../generator/parts/matchers_imports.txt | 2 + .../hamcrest/hamcrest-php/generator/run.php | 37 + .../hamcrest-php/hamcrest/Hamcrest.php | 882 + .../hamcrest/Hamcrest/Arrays/IsArray.php | 118 + .../Hamcrest/Arrays/IsArrayContaining.php | 63 + .../Arrays/IsArrayContainingInAnyOrder.php | 59 + .../Arrays/IsArrayContainingInOrder.php | 57 + .../Hamcrest/Arrays/IsArrayContainingKey.php | 75 + .../Arrays/IsArrayContainingKeyValuePair.php | 80 + .../Hamcrest/Arrays/IsArrayWithSize.php | 73 + .../hamcrest/Hamcrest/Arrays/MatchingOnce.php | 69 + .../Hamcrest/Arrays/SeriesMatchingOnce.php | 75 + .../hamcrest/Hamcrest/AssertionError.php | 10 + .../hamcrest/Hamcrest/BaseDescription.php | 132 + .../hamcrest/Hamcrest/BaseMatcher.php | 30 + .../Collection/IsEmptyTraversable.php | 71 + .../Collection/IsTraversableWithSize.php | 47 + .../hamcrest/Hamcrest/Core/AllOf.php | 59 + .../hamcrest/Hamcrest/Core/AnyOf.php | 58 + .../Hamcrest/Core/CombinableMatcher.php | 78 + .../hamcrest/Hamcrest/Core/DescribedAs.php | 68 + .../hamcrest/Hamcrest/Core/Every.php | 56 + .../hamcrest/Hamcrest/Core/HasToString.php | 56 + .../hamcrest/Hamcrest/Core/Is.php | 57 + .../hamcrest/Hamcrest/Core/IsAnything.php | 45 + .../Hamcrest/Core/IsCollectionContaining.php | 93 + .../hamcrest/Hamcrest/Core/IsEqual.php | 44 + .../hamcrest/Hamcrest/Core/IsIdentical.php | 38 + .../hamcrest/Hamcrest/Core/IsInstanceOf.php | 67 + .../hamcrest/Hamcrest/Core/IsNot.php | 44 + .../hamcrest/Hamcrest/Core/IsNull.php | 56 + .../hamcrest/Hamcrest/Core/IsSame.php | 51 + .../hamcrest/Hamcrest/Core/IsTypeOf.php | 71 + .../hamcrest/Hamcrest/Core/Set.php | 95 + .../Hamcrest/Core/ShortcutCombination.php | 43 + .../hamcrest/Hamcrest/Description.php | 70 + .../hamcrest/Hamcrest/DiagnosingMatcher.php | 25 + .../hamcrest/Hamcrest/FeatureMatcher.php | 67 + .../Hamcrest/Internal/SelfDescribingValue.php | 27 + .../hamcrest/Hamcrest/Matcher.php | 50 + .../hamcrest/Hamcrest/MatcherAssert.php | 118 + .../hamcrest/Hamcrest/Matchers.php | 713 + .../hamcrest/Hamcrest/NullDescription.php | 43 + .../hamcrest/Hamcrest/Number/IsCloseTo.php | 67 + .../Hamcrest/Number/OrderingComparison.php | 132 + .../hamcrest/Hamcrest/SelfDescribing.php | 23 + .../hamcrest/Hamcrest/StringDescription.php | 57 + .../hamcrest/Hamcrest/Text/IsEmptyString.php | 85 + .../Hamcrest/Text/IsEqualIgnoringCase.php | 52 + .../Text/IsEqualIgnoringWhiteSpace.php | 66 + .../hamcrest/Hamcrest/Text/MatchesPattern.php | 40 + .../hamcrest/Hamcrest/Text/StringContains.php | 45 + .../Text/StringContainsIgnoringCase.php | 40 + .../Hamcrest/Text/StringContainsInOrder.php | 66 + .../hamcrest/Hamcrest/Text/StringEndsWith.php | 40 + .../Hamcrest/Text/StringStartsWith.php | 40 + .../Hamcrest/Text/SubstringMatcher.php | 45 + .../hamcrest/Hamcrest/Type/IsArray.php | 32 + .../hamcrest/Hamcrest/Type/IsBoolean.php | 32 + .../hamcrest/Hamcrest/Type/IsCallable.php | 37 + .../hamcrest/Hamcrest/Type/IsDouble.php | 34 + .../hamcrest/Hamcrest/Type/IsInteger.php | 32 + .../hamcrest/Hamcrest/Type/IsNumeric.php | 54 + .../hamcrest/Hamcrest/Type/IsObject.php | 32 + .../hamcrest/Hamcrest/Type/IsResource.php | 32 + .../hamcrest/Hamcrest/Type/IsScalar.php | 34 + .../hamcrest/Hamcrest/Type/IsString.php | 32 + .../Hamcrest/TypeSafeDiagnosingMatcher.php | 29 + .../hamcrest/Hamcrest/TypeSafeMatcher.php | 107 + .../hamcrest-php/hamcrest/Hamcrest/Util.php | 76 + .../hamcrest/Hamcrest/Xml/HasXPath.php | 195 + vendor/mockery/mockery/.phpstorm.meta.php | 11 + vendor/mockery/mockery/.readthedocs.yml | 24 + vendor/mockery/mockery/CHANGELOG.md | 419 + vendor/mockery/mockery/CONTRIBUTING.md | 82 + vendor/mockery/mockery/COPYRIGHT.md | 7 + vendor/mockery/mockery/LICENSE | 29 + vendor/mockery/mockery/README.md | 294 + vendor/mockery/mockery/SECURITY.md | 14 + vendor/mockery/mockery/composer.json | 119 + vendor/mockery/mockery/composer.lock | 1867 + vendor/mockery/mockery/docs/.gitignore | 1 + vendor/mockery/mockery/docs/Makefile | 177 + vendor/mockery/mockery/docs/README.md | 4 + vendor/mockery/mockery/docs/_static/.gitkeep | 0 vendor/mockery/mockery/docs/conf.py | 268 + .../docs/cookbook/big_parent_class.rst | 52 + .../mockery/docs/cookbook/class_constants.rst | 183 + .../docs/cookbook/default_expectations.rst | 17 + .../docs/cookbook/detecting_mock_objects.rst | 13 + .../mockery/mockery/docs/cookbook/index.rst | 16 + .../mockery/mockery/docs/cookbook/map.rst.inc | 7 + .../mockery/docs/cookbook/mockery_on.rst | 85 + .../cookbook/mocking_class_within_class.rst | 146 + .../cookbook/mocking_hard_dependencies.rst | 137 + .../cookbook/not_calling_the_constructor.rst | 63 + .../mockery/docs/getting_started/index.rst | 12 + .../docs/getting_started/installation.rst | 49 + .../mockery/docs/getting_started/map.rst.inc | 4 + .../docs/getting_started/quick_reference.rst | 200 + .../docs/getting_started/simple_example.rst | 70 + .../docs/getting_started/upgrading.rst | 82 + vendor/mockery/mockery/docs/index.rst | 76 + .../mockery/docs/mockery/configuration.rst | 94 + .../mockery/docs/mockery/exceptions.rst | 65 + .../mockery/mockery/docs/mockery/gotchas.rst | 44 + vendor/mockery/mockery/docs/mockery/index.rst | 12 + .../mockery/mockery/docs/mockery/map.rst.inc | 4 + .../docs/mockery/reserved_method_names.rst | 33 + .../alternative_should_receive_syntax.rst | 91 + .../docs/reference/argument_validation.rst | 338 + .../docs/reference/creating_test_doubles.rst | 435 + .../mockery/docs/reference/demeter_chains.rst | 38 + .../mockery/docs/reference/expectations.rst | 533 + .../docs/reference/final_methods_classes.rst | 29 + .../mockery/mockery/docs/reference/index.rst | 23 + .../docs/reference/instance_mocking.rst | 22 + .../mockery/docs/reference/magic_methods.rst | 16 + .../mockery/docs/reference/map.rst.inc | 14 + .../mockery/docs/reference/partial_mocks.rst | 108 + .../pass_by_reference_behaviours.rst | 130 + .../docs/reference/phpunit_integration.rst | 145 + .../docs/reference/protected_methods.rst | 26 + .../docs/reference/public_properties.rst | 20 + .../reference/public_static_properties.rst | 15 + .../mockery/mockery/docs/reference/spies.rst | 154 + vendor/mockery/mockery/docs/requirements.txt | 25 + vendor/mockery/mockery/library/Mockery.php | 1062 + .../Phpunit/MockeryPHPUnitIntegration.php | 86 + ...PHPUnitIntegrationAssertPostConditions.php | 21 + .../Adapter/Phpunit/MockeryTestCase.php | 27 + .../Adapter/Phpunit/MockeryTestCaseSetUp.php | 28 + .../Mockery/Adapter/Phpunit/TestListener.php | 38 + .../Adapter/Phpunit/TestListenerTrait.php | 84 + .../library/Mockery/ClosureWrapper.php | 36 + .../library/Mockery/CompositeExpectation.php | 150 + .../mockery/library/Mockery/Configuration.php | 406 + .../mockery/library/Mockery/Container.php | 678 + .../Mockery/CountValidator/AtLeast.php | 58 + .../library/Mockery/CountValidator/AtMost.php | 45 + .../CountValidator/CountValidatorAbstract.php | 62 + .../CountValidatorInterface.php | 24 + .../library/Mockery/CountValidator/Exact.php | 48 + .../Mockery/CountValidator/Exception.php | 18 + .../mockery/library/Mockery/Exception.php | 18 + .../Exception/BadMethodCallException.php | 39 + .../Exception/InvalidArgumentException.php | 15 + .../Exception/InvalidCountException.php | 152 + .../Exception/InvalidOrderException.php | 125 + .../Exception/MockeryExceptionInterface.php | 19 + .../NoMatchingExpectationException.php | 102 + .../Mockery/Exception/RuntimeException.php | 17 + .../mockery/library/Mockery/Expectation.php | 1085 + .../library/Mockery/ExpectationDirector.php | 242 + .../library/Mockery/ExpectationInterface.php | 38 + .../Mockery/ExpectsHigherOrderMessage.php | 32 + .../Mockery/Generator/CachingGenerator.php | 43 + .../Mockery/Generator/DefinedTargetClass.php | 188 + .../library/Mockery/Generator/Generator.php | 19 + .../library/Mockery/Generator/Method.php | 66 + .../Mockery/Generator/MockConfiguration.php | 709 + .../Generator/MockConfigurationBuilder.php | 252 + .../Mockery/Generator/MockDefinition.php | 64 + .../Mockery/Generator/MockNameBuilder.php | 51 + .../library/Mockery/Generator/Parameter.php | 130 + .../Pass/AvoidMethodClashPass.php | 42 + .../Pass/CallTypeHintPass.php | 42 + .../Pass/ClassAttributesPass.php | 40 + .../StringManipulation/Pass/ClassNamePass.php | 35 + .../StringManipulation/Pass/ClassPass.php | 49 + .../StringManipulation/Pass/ConstantsPass.php | 51 + .../Pass/InstanceMockPass.php | 78 + .../StringManipulation/Pass/InterfacePass.php | 41 + .../Pass/MagicMethodTypeHintsPass.php | 197 + .../Pass/MethodDefinitionPass.php | 199 + .../StringManipulation/Pass/Pass.php | 22 + .../RemoveBuiltinMethodsThatAreFinalPass.php | 56 + .../Pass/RemoveDestructorPass.php | 39 + ...lizeForInternalSerializableClassesPass.php | 57 + .../StringManipulation/Pass/TraitPass.php | 39 + .../Generator/StringManipulationGenerator.php | 102 + .../Generator/TargetClassInterface.php | 104 + .../Generator/UndefinedTargetClass.php | 141 + .../library/Mockery/HigherOrderMessage.php | 52 + .../mockery/library/Mockery/Instantiator.php | 147 + .../library/Mockery/LegacyMockInterface.php | 258 + .../library/Mockery/Loader/EvalLoader.php | 32 + .../mockery/library/Mockery/Loader/Loader.php | 23 + .../library/Mockery/Loader/RequireLoader.php | 80 + .../Mockery/Matcher/AndAnyOtherArgs.php | 38 + .../mockery/library/Mockery/Matcher/Any.php | 38 + .../library/Mockery/Matcher/AnyArgs.php | 31 + .../mockery/library/Mockery/Matcher/AnyOf.php | 41 + .../Mockery/Matcher/ArgumentListMatcher.php | 15 + .../library/Mockery/Matcher/Closure.php | 38 + .../library/Mockery/Matcher/Contains.php | 61 + .../library/Mockery/Matcher/Ducktype.php | 52 + .../library/Mockery/Matcher/HasKey.php | 48 + .../library/Mockery/Matcher/HasValue.php | 47 + .../library/Mockery/Matcher/IsEqual.php | 38 + .../library/Mockery/Matcher/IsSame.php | 38 + .../Mockery/Matcher/MatcherAbstract.php | 39 + .../Mockery/Matcher/MatcherInterface.php | 36 + .../Mockery/Matcher/MultiArgumentClosure.php | 40 + .../library/Mockery/Matcher/MustBe.php | 47 + .../library/Mockery/Matcher/NoArgs.php | 33 + .../mockery/library/Mockery/Matcher/Not.php | 39 + .../library/Mockery/Matcher/NotAnyOf.php | 45 + .../library/Mockery/Matcher/Pattern.php | 40 + .../library/Mockery/Matcher/Subset.php | 99 + .../mockery/library/Mockery/Matcher/Type.php | 59 + .../mockery/library/Mockery/MethodCall.php | 50 + .../mockery/mockery/library/Mockery/Mock.php | 1020 + .../mockery/library/Mockery/MockInterface.php | 28 + .../Mockery/QuickDefinitionsConfiguration.php | 47 + .../library/Mockery/ReceivedMethodCalls.php | 38 + .../mockery/library/Mockery/Reflector.php | 316 + .../mockery/library/Mockery/Undefined.php | 39 + .../library/Mockery/VerificationDirector.php | 168 + .../Mockery/VerificationExpectation.php | 29 + vendor/mockery/mockery/library/helpers.php | 77 + vendor/myclabs/deep-copy/LICENSE | 20 + vendor/myclabs/deep-copy/README.md | 406 + vendor/myclabs/deep-copy/composer.json | 43 + .../deep-copy/src/DeepCopy/DeepCopy.php | 328 + .../src/DeepCopy/Exception/CloneException.php | 9 + .../DeepCopy/Exception/PropertyException.php | 9 + .../src/DeepCopy/Filter/ChainableFilter.php | 24 + .../Doctrine/DoctrineCollectionFilter.php | 35 + .../DoctrineEmptyCollectionFilter.php | 30 + .../Filter/Doctrine/DoctrineProxyFilter.php | 22 + .../deep-copy/src/DeepCopy/Filter/Filter.php | 18 + .../src/DeepCopy/Filter/KeepFilter.php | 16 + .../src/DeepCopy/Filter/ReplaceFilter.php | 41 + .../src/DeepCopy/Filter/SetNullFilter.php | 26 + .../Matcher/Doctrine/DoctrineProxyMatcher.php | 22 + .../src/DeepCopy/Matcher/Matcher.php | 14 + .../src/DeepCopy/Matcher/PropertyMatcher.php | 39 + .../DeepCopy/Matcher/PropertyNameMatcher.php | 32 + .../DeepCopy/Matcher/PropertyTypeMatcher.php | 54 + .../DeepCopy/Reflection/ReflectionHelper.php | 78 + .../TypeFilter/Date/DateIntervalFilter.php | 33 + .../TypeFilter/Date/DatePeriodFilter.php | 42 + .../src/DeepCopy/TypeFilter/ReplaceFilter.php | 30 + .../DeepCopy/TypeFilter/ShallowCopyFilter.php | 17 + .../TypeFilter/Spl/ArrayObjectFilter.php | 36 + .../TypeFilter/Spl/SplDoublyLinkedList.php | 10 + .../Spl/SplDoublyLinkedListFilter.php | 51 + .../src/DeepCopy/TypeFilter/TypeFilter.php | 13 + .../src/DeepCopy/TypeMatcher/TypeMatcher.php | 29 + .../deep-copy/src/DeepCopy/deep_copy.php | 20 + vendor/nikic/php-parser/LICENSE | 29 + vendor/nikic/php-parser/README.md | 233 + vendor/nikic/php-parser/bin/php-parse | 206 + vendor/nikic/php-parser/composer.json | 43 + .../php-parser/lib/PhpParser/Builder.php | 12 + .../lib/PhpParser/Builder/ClassConst.php | 150 + .../lib/PhpParser/Builder/Class_.php | 151 + .../lib/PhpParser/Builder/Declaration.php | 50 + .../lib/PhpParser/Builder/EnumCase.php | 86 + .../lib/PhpParser/Builder/Enum_.php | 116 + .../lib/PhpParser/Builder/FunctionLike.php | 73 + .../lib/PhpParser/Builder/Function_.php | 67 + .../lib/PhpParser/Builder/Interface_.php | 94 + .../lib/PhpParser/Builder/Method.php | 147 + .../lib/PhpParser/Builder/Namespace_.php | 45 + .../lib/PhpParser/Builder/Param.php | 171 + .../lib/PhpParser/Builder/Property.php | 223 + .../lib/PhpParser/Builder/TraitUse.php | 65 + .../PhpParser/Builder/TraitUseAdaptation.php | 145 + .../lib/PhpParser/Builder/Trait_.php | 83 + .../php-parser/lib/PhpParser/Builder/Use_.php | 49 + .../lib/PhpParser/BuilderFactory.php | 375 + .../lib/PhpParser/BuilderHelpers.php | 338 + .../php-parser/lib/PhpParser/Comment.php | 209 + .../php-parser/lib/PhpParser/Comment/Doc.php | 6 + .../ConstExprEvaluationException.php | 6 + .../lib/PhpParser/ConstExprEvaluator.php | 237 + .../nikic/php-parser/lib/PhpParser/Error.php | 173 + .../php-parser/lib/PhpParser/ErrorHandler.php | 12 + .../lib/PhpParser/ErrorHandler/Collecting.php | 43 + .../lib/PhpParser/ErrorHandler/Throwing.php | 17 + .../lib/PhpParser/Internal/DiffElem.php | 31 + .../lib/PhpParser/Internal/Differ.php | 178 + .../Internal/PrintableNewAnonClassNode.php | 71 + .../lib/PhpParser/Internal/TokenPolyfill.php | 237 + .../lib/PhpParser/Internal/TokenStream.php | 282 + .../php-parser/lib/PhpParser/JsonDecoder.php | 108 + .../nikic/php-parser/lib/PhpParser/Lexer.php | 116 + .../lib/PhpParser/Lexer/Emulative.php | 230 + .../AsymmetricVisibilityTokenEmulator.php | 93 + .../Lexer/TokenEmulator/AttributeEmulator.php | 49 + .../Lexer/TokenEmulator/EnumTokenEmulator.php | 26 + .../TokenEmulator/ExplicitOctalEmulator.php | 45 + .../Lexer/TokenEmulator/KeywordEmulator.php | 60 + .../TokenEmulator/MatchTokenEmulator.php | 19 + .../TokenEmulator/NullsafeTokenEmulator.php | 60 + .../TokenEmulator/PipeOperatorEmulator.php | 45 + .../TokenEmulator/PropertyTokenEmulator.php | 19 + .../ReadonlyFunctionTokenEmulator.php | 31 + .../TokenEmulator/ReadonlyTokenEmulator.php | 31 + .../Lexer/TokenEmulator/ReverseEmulator.php | 37 + .../Lexer/TokenEmulator/TokenEmulator.php | 30 + .../Lexer/TokenEmulator/VoidCastEmulator.php | 98 + .../php-parser/lib/PhpParser/Modifiers.php | 85 + .../php-parser/lib/PhpParser/NameContext.php | 284 + .../nikic/php-parser/lib/PhpParser/Node.php | 150 + .../php-parser/lib/PhpParser/Node/Arg.php | 44 + .../lib/PhpParser/Node/ArrayItem.php | 43 + .../lib/PhpParser/Node/Attribute.php | 33 + .../lib/PhpParser/Node/AttributeGroup.php | 27 + .../lib/PhpParser/Node/ClosureUse.php | 36 + .../lib/PhpParser/Node/ComplexType.php | 13 + .../php-parser/lib/PhpParser/Node/Const_.php | 36 + .../lib/PhpParser/Node/DeclareItem.php | 37 + .../php-parser/lib/PhpParser/Node/Expr.php | 8 + .../lib/PhpParser/Node/Expr/ArrayDimFetch.php | 33 + .../lib/PhpParser/Node/Expr/ArrayItem.php | 15 + .../lib/PhpParser/Node/Expr/Array_.php | 34 + .../lib/PhpParser/Node/Expr/ArrowFunction.php | 84 + .../lib/PhpParser/Node/Expr/Assign.php | 33 + .../lib/PhpParser/Node/Expr/AssignOp.php | 29 + .../Node/Expr/AssignOp/BitwiseAnd.php | 11 + .../Node/Expr/AssignOp/BitwiseOr.php | 11 + .../Node/Expr/AssignOp/BitwiseXor.php | 11 + .../PhpParser/Node/Expr/AssignOp/Coalesce.php | 11 + .../PhpParser/Node/Expr/AssignOp/Concat.php | 11 + .../lib/PhpParser/Node/Expr/AssignOp/Div.php | 11 + .../PhpParser/Node/Expr/AssignOp/Minus.php | 11 + .../lib/PhpParser/Node/Expr/AssignOp/Mod.php | 11 + .../lib/PhpParser/Node/Expr/AssignOp/Mul.php | 11 + .../lib/PhpParser/Node/Expr/AssignOp/Plus.php | 11 + .../lib/PhpParser/Node/Expr/AssignOp/Pow.php | 11 + .../Node/Expr/AssignOp/ShiftLeft.php | 11 + .../Node/Expr/AssignOp/ShiftRight.php | 11 + .../lib/PhpParser/Node/Expr/AssignRef.php | 33 + .../lib/PhpParser/Node/Expr/BinaryOp.php | 37 + .../Node/Expr/BinaryOp/BitwiseAnd.php | 15 + .../Node/Expr/BinaryOp/BitwiseOr.php | 15 + .../Node/Expr/BinaryOp/BitwiseXor.php | 15 + .../Node/Expr/BinaryOp/BooleanAnd.php | 15 + .../Node/Expr/BinaryOp/BooleanOr.php | 15 + .../PhpParser/Node/Expr/BinaryOp/Coalesce.php | 15 + .../PhpParser/Node/Expr/BinaryOp/Concat.php | 15 + .../lib/PhpParser/Node/Expr/BinaryOp/Div.php | 15 + .../PhpParser/Node/Expr/BinaryOp/Equal.php | 15 + .../PhpParser/Node/Expr/BinaryOp/Greater.php | 15 + .../Node/Expr/BinaryOp/GreaterOrEqual.php | 15 + .../Node/Expr/BinaryOp/Identical.php | 15 + .../Node/Expr/BinaryOp/LogicalAnd.php | 15 + .../Node/Expr/BinaryOp/LogicalOr.php | 15 + .../Node/Expr/BinaryOp/LogicalXor.php | 15 + .../PhpParser/Node/Expr/BinaryOp/Minus.php | 15 + .../lib/PhpParser/Node/Expr/BinaryOp/Mod.php | 15 + .../lib/PhpParser/Node/Expr/BinaryOp/Mul.php | 15 + .../PhpParser/Node/Expr/BinaryOp/NotEqual.php | 15 + .../Node/Expr/BinaryOp/NotIdentical.php | 15 + .../lib/PhpParser/Node/Expr/BinaryOp/Pipe.php | 15 + .../lib/PhpParser/Node/Expr/BinaryOp/Plus.php | 15 + .../lib/PhpParser/Node/Expr/BinaryOp/Pow.php | 15 + .../Node/Expr/BinaryOp/ShiftLeft.php | 15 + .../Node/Expr/BinaryOp/ShiftRight.php | 15 + .../PhpParser/Node/Expr/BinaryOp/Smaller.php | 15 + .../Node/Expr/BinaryOp/SmallerOrEqual.php | 15 + .../Node/Expr/BinaryOp/Spaceship.php | 15 + .../lib/PhpParser/Node/Expr/BitwiseNot.php | 29 + .../lib/PhpParser/Node/Expr/BooleanNot.php | 29 + .../lib/PhpParser/Node/Expr/CallLike.php | 60 + .../lib/PhpParser/Node/Expr/Cast.php | 25 + .../lib/PhpParser/Node/Expr/Cast/Array_.php | 11 + .../lib/PhpParser/Node/Expr/Cast/Bool_.php | 15 + .../lib/PhpParser/Node/Expr/Cast/Double.php | 16 + .../lib/PhpParser/Node/Expr/Cast/Int_.php | 15 + .../lib/PhpParser/Node/Expr/Cast/Object_.php | 11 + .../lib/PhpParser/Node/Expr/Cast/String_.php | 15 + .../lib/PhpParser/Node/Expr/Cast/Unset_.php | 11 + .../lib/PhpParser/Node/Expr/Cast/Void_.php | 11 + .../PhpParser/Node/Expr/ClassConstFetch.php | 36 + .../lib/PhpParser/Node/Expr/Clone_.php | 29 + .../lib/PhpParser/Node/Expr/Closure.php | 86 + .../lib/PhpParser/Node/Expr/ClosureUse.php | 15 + .../lib/PhpParser/Node/Expr/ConstFetch.php | 30 + .../lib/PhpParser/Node/Expr/Empty_.php | 29 + .../lib/PhpParser/Node/Expr/Error.php | 30 + .../lib/PhpParser/Node/Expr/ErrorSuppress.php | 29 + .../lib/PhpParser/Node/Expr/Eval_.php | 29 + .../lib/PhpParser/Node/Expr/Exit_.php | 33 + .../lib/PhpParser/Node/Expr/FuncCall.php | 38 + .../lib/PhpParser/Node/Expr/Include_.php | 38 + .../lib/PhpParser/Node/Expr/Instanceof_.php | 35 + .../lib/PhpParser/Node/Expr/Isset_.php | 29 + .../lib/PhpParser/Node/Expr/List_.php | 34 + .../lib/PhpParser/Node/Expr/Match_.php | 32 + .../lib/PhpParser/Node/Expr/MethodCall.php | 45 + .../lib/PhpParser/Node/Expr/New_.php | 40 + .../Node/Expr/NullsafeMethodCall.php | 45 + .../Node/Expr/NullsafePropertyFetch.php | 35 + .../lib/PhpParser/Node/Expr/PostDec.php | 29 + .../lib/PhpParser/Node/Expr/PostInc.php | 29 + .../lib/PhpParser/Node/Expr/PreDec.php | 29 + .../lib/PhpParser/Node/Expr/PreInc.php | 29 + .../lib/PhpParser/Node/Expr/Print_.php | 29 + .../lib/PhpParser/Node/Expr/PropertyFetch.php | 35 + .../lib/PhpParser/Node/Expr/ShellExec.php | 30 + .../lib/PhpParser/Node/Expr/StaticCall.php | 45 + .../Node/Expr/StaticPropertyFetch.php | 36 + .../lib/PhpParser/Node/Expr/Ternary.php | 37 + .../lib/PhpParser/Node/Expr/Throw_.php | 29 + .../lib/PhpParser/Node/Expr/UnaryMinus.php | 29 + .../lib/PhpParser/Node/Expr/UnaryPlus.php | 29 + .../lib/PhpParser/Node/Expr/Variable.php | 29 + .../lib/PhpParser/Node/Expr/YieldFrom.php | 29 + .../lib/PhpParser/Node/Expr/Yield_.php | 33 + .../lib/PhpParser/Node/FunctionLike.php | 40 + .../lib/PhpParser/Node/Identifier.php | 85 + .../PhpParser/Node/InterpolatedStringPart.php | 32 + .../lib/PhpParser/Node/IntersectionType.php | 27 + .../lib/PhpParser/Node/MatchArm.php | 29 + .../php-parser/lib/PhpParser/Node/Name.php | 278 + .../PhpParser/Node/Name/FullyQualified.php | 49 + .../lib/PhpParser/Node/Name/Relative.php | 49 + .../lib/PhpParser/Node/NullableType.php | 29 + .../php-parser/lib/PhpParser/Node/Param.php | 123 + .../lib/PhpParser/Node/PropertyHook.php | 105 + .../lib/PhpParser/Node/PropertyItem.php | 37 + .../php-parser/lib/PhpParser/Node/Scalar.php | 6 + .../lib/PhpParser/Node/Scalar/DNumber.php | 15 + .../lib/PhpParser/Node/Scalar/Encapsed.php | 15 + .../Node/Scalar/EncapsedStringPart.php | 17 + .../lib/PhpParser/Node/Scalar/Float_.php | 78 + .../lib/PhpParser/Node/Scalar/Int_.php | 82 + .../Node/Scalar/InterpolatedString.php | 34 + .../lib/PhpParser/Node/Scalar/LNumber.php | 15 + .../lib/PhpParser/Node/Scalar/MagicConst.php | 27 + .../Node/Scalar/MagicConst/Class_.php | 15 + .../PhpParser/Node/Scalar/MagicConst/Dir.php | 15 + .../PhpParser/Node/Scalar/MagicConst/File.php | 15 + .../Node/Scalar/MagicConst/Function_.php | 15 + .../PhpParser/Node/Scalar/MagicConst/Line.php | 15 + .../Node/Scalar/MagicConst/Method.php | 15 + .../Node/Scalar/MagicConst/Namespace_.php | 15 + .../Node/Scalar/MagicConst/Property.php | 15 + .../Node/Scalar/MagicConst/Trait_.php | 15 + .../lib/PhpParser/Node/Scalar/String_.php | 161 + .../lib/PhpParser/Node/StaticVar.php | 39 + .../php-parser/lib/PhpParser/Node/Stmt.php | 8 + .../lib/PhpParser/Node/Stmt/Block.php | 29 + .../lib/PhpParser/Node/Stmt/Break_.php | 29 + .../lib/PhpParser/Node/Stmt/Case_.php | 33 + .../lib/PhpParser/Node/Stmt/Catch_.php | 40 + .../lib/PhpParser/Node/Stmt/ClassConst.php | 77 + .../lib/PhpParser/Node/Stmt/ClassLike.php | 109 + .../lib/PhpParser/Node/Stmt/ClassMethod.php | 154 + .../lib/PhpParser/Node/Stmt/Class_.php | 94 + .../lib/PhpParser/Node/Stmt/Const_.php | 37 + .../lib/PhpParser/Node/Stmt/Continue_.php | 29 + .../PhpParser/Node/Stmt/DeclareDeclare.php | 17 + .../lib/PhpParser/Node/Stmt/Declare_.php | 34 + .../lib/PhpParser/Node/Stmt/Do_.php | 33 + .../lib/PhpParser/Node/Stmt/Echo_.php | 29 + .../lib/PhpParser/Node/Stmt/ElseIf_.php | 33 + .../lib/PhpParser/Node/Stmt/Else_.php | 29 + .../lib/PhpParser/Node/Stmt/EnumCase.php | 36 + .../lib/PhpParser/Node/Stmt/Enum_.php | 44 + .../lib/PhpParser/Node/Stmt/Expression.php | 32 + .../lib/PhpParser/Node/Stmt/Finally_.php | 29 + .../lib/PhpParser/Node/Stmt/For_.php | 47 + .../lib/PhpParser/Node/Stmt/Foreach_.php | 50 + .../lib/PhpParser/Node/Stmt/Function_.php | 81 + .../lib/PhpParser/Node/Stmt/Global_.php | 29 + .../lib/PhpParser/Node/Stmt/Goto_.php | 30 + .../lib/PhpParser/Node/Stmt/GroupUse.php | 41 + .../lib/PhpParser/Node/Stmt/HaltCompiler.php | 29 + .../lib/PhpParser/Node/Stmt/If_.php | 46 + .../lib/PhpParser/Node/Stmt/InlineHTML.php | 29 + .../lib/PhpParser/Node/Stmt/Interface_.php | 40 + .../lib/PhpParser/Node/Stmt/Label.php | 30 + .../lib/PhpParser/Node/Stmt/Namespace_.php | 37 + .../lib/PhpParser/Node/Stmt/Nop.php | 16 + .../lib/PhpParser/Node/Stmt/Property.php | 121 + .../PhpParser/Node/Stmt/PropertyProperty.php | 17 + .../lib/PhpParser/Node/Stmt/Return_.php | 29 + .../lib/PhpParser/Node/Stmt/StaticVar.php | 15 + .../lib/PhpParser/Node/Stmt/Static_.php | 30 + .../lib/PhpParser/Node/Stmt/Switch_.php | 33 + .../lib/PhpParser/Node/Stmt/TraitUse.php | 33 + .../Node/Stmt/TraitUseAdaptation.php | 12 + .../Node/Stmt/TraitUseAdaptation/Alias.php | 37 + .../Stmt/TraitUseAdaptation/Precedence.php | 33 + .../lib/PhpParser/Node/Stmt/Trait_.php | 34 + .../lib/PhpParser/Node/Stmt/TryCatch.php | 37 + .../lib/PhpParser/Node/Stmt/Unset_.php | 29 + .../lib/PhpParser/Node/Stmt/UseUse.php | 17 + .../lib/PhpParser/Node/Stmt/Use_.php | 47 + .../lib/PhpParser/Node/Stmt/While_.php | 33 + .../lib/PhpParser/Node/UnionType.php | 27 + .../php-parser/lib/PhpParser/Node/UseItem.php | 55 + .../lib/PhpParser/Node/VarLikeIdentifier.php | 16 + .../PhpParser/Node/VariadicPlaceholder.php | 27 + .../php-parser/lib/PhpParser/NodeAbstract.php | 181 + .../php-parser/lib/PhpParser/NodeDumper.php | 299 + .../php-parser/lib/PhpParser/NodeFinder.php | 90 + .../lib/PhpParser/NodeTraverser.php | 287 + .../lib/PhpParser/NodeTraverserInterface.php | 26 + .../php-parser/lib/PhpParser/NodeVisitor.php | 124 + .../PhpParser/NodeVisitor/CloningVisitor.php | 19 + .../NodeVisitor/CommentAnnotatingVisitor.php | 82 + .../PhpParser/NodeVisitor/FindingVisitor.php | 47 + .../NodeVisitor/FirstFindingVisitor.php | 49 + .../PhpParser/NodeVisitor/NameResolver.php | 269 + .../NodeVisitor/NodeConnectingVisitor.php | 73 + .../NodeVisitor/ParentConnectingVisitor.php | 51 + .../lib/PhpParser/NodeVisitorAbstract.php | 24 + .../nikic/php-parser/lib/PhpParser/Parser.php | 24 + .../php-parser/lib/PhpParser/Parser/Php7.php | 2919 + .../php-parser/lib/PhpParser/Parser/Php8.php | 2917 + .../lib/PhpParser/ParserAbstract.php | 1335 + .../lib/PhpParser/ParserFactory.php | 42 + .../php-parser/lib/PhpParser/PhpVersion.php | 175 + .../lib/PhpParser/PrettyPrinter.php | 51 + .../lib/PhpParser/PrettyPrinter/Standard.php | 1232 + .../lib/PhpParser/PrettyPrinterAbstract.php | 1706 + .../nikic/php-parser/lib/PhpParser/Token.php | 18 + .../lib/PhpParser/compatibility_tokens.php | 71 + vendor/phar-io/manifest/.github/FUNDING.yml | 3 + .../phar-io/manifest/.github/workflows/ci.yml | 86 + .../phar-io/manifest/.php-cs-fixer.dist.php | 223 + vendor/phar-io/manifest/CHANGELOG.md | 45 + vendor/phar-io/manifest/LICENSE | 31 + vendor/phar-io/manifest/README.md | 178 + vendor/phar-io/manifest/composer.json | 43 + vendor/phar-io/manifest/composer.lock | 76 + vendor/phar-io/manifest/manifest.xsd | 116 + .../manifest/src/ManifestDocumentMapper.php | 151 + .../phar-io/manifest/src/ManifestLoader.php | 47 + .../manifest/src/ManifestSerializer.php | 172 + .../exceptions/ElementCollectionException.php | 16 + .../manifest/src/exceptions/Exception.php | 16 + .../InvalidApplicationNameException.php | 17 + .../src/exceptions/InvalidEmailException.php | 16 + .../src/exceptions/InvalidUrlException.php | 16 + .../exceptions/ManifestDocumentException.php | 16 + .../ManifestDocumentLoadingException.php | 47 + .../ManifestDocumentMapperException.php | 16 + .../exceptions/ManifestElementException.php | 16 + .../exceptions/ManifestLoaderException.php | 14 + .../exceptions/NoEmailAddressException.php | 16 + .../manifest/src/values/Application.php | 17 + .../manifest/src/values/ApplicationName.php | 41 + vendor/phar-io/manifest/src/values/Author.php | 57 + .../manifest/src/values/AuthorCollection.php | 40 + .../src/values/AuthorCollectionIterator.php | 47 + .../manifest/src/values/BundledComponent.php | 34 + .../src/values/BundledComponentCollection.php | 40 + .../BundledComponentCollectionIterator.php | 47 + .../src/values/CopyrightInformation.php | 32 + vendor/phar-io/manifest/src/values/Email.php | 35 + .../phar-io/manifest/src/values/Extension.php | 47 + .../phar-io/manifest/src/values/Library.php | 17 + .../phar-io/manifest/src/values/License.php | 32 + .../phar-io/manifest/src/values/Manifest.php | 93 + .../src/values/PhpExtensionRequirement.php | 24 + .../src/values/PhpVersionRequirement.php | 26 + .../manifest/src/values/Requirement.php | 14 + .../src/values/RequirementCollection.php | 40 + .../values/RequirementCollectionIterator.php | 47 + vendor/phar-io/manifest/src/values/Type.php | 42 + vendor/phar-io/manifest/src/values/Url.php | 38 + .../manifest/src/xml/AuthorElement.php | 25 + .../src/xml/AuthorElementCollection.php | 19 + .../manifest/src/xml/BundlesElement.php | 19 + .../manifest/src/xml/ComponentElement.php | 21 + .../src/xml/ComponentElementCollection.php | 19 + .../manifest/src/xml/ContainsElement.php | 31 + .../manifest/src/xml/CopyrightElement.php | 25 + .../manifest/src/xml/ElementCollection.php | 68 + .../phar-io/manifest/src/xml/ExtElement.php | 17 + .../manifest/src/xml/ExtElementCollection.php | 19 + .../manifest/src/xml/ExtensionElement.php | 21 + .../manifest/src/xml/LicenseElement.php | 21 + .../manifest/src/xml/ManifestDocument.php | 115 + .../manifest/src/xml/ManifestElement.php | 72 + .../phar-io/manifest/src/xml/PhpElement.php | 27 + .../manifest/src/xml/RequiresElement.php | 19 + .../PhpdocSingleLineVarFixer.php | 72 + .../manifest/tools/php-cs-fixer.d/header.txt | 6 + vendor/phar-io/version/CHANGELOG.md | 142 + vendor/phar-io/version/LICENSE | 29 + vendor/phar-io/version/README.md | 61 + vendor/phar-io/version/composer.json | 34 + vendor/phar-io/version/src/BuildMetaData.php | 28 + .../phar-io/version/src/PreReleaseSuffix.php | 82 + vendor/phar-io/version/src/Version.php | 208 + .../version/src/VersionConstraintParser.php | 115 + .../version/src/VersionConstraintValue.php | 88 + vendor/phar-io/version/src/VersionNumber.php | 28 + .../constraints/AbstractVersionConstraint.php | 23 + .../constraints/AndVersionConstraintGroup.php | 34 + .../src/constraints/AnyVersionConstraint.php | 20 + .../constraints/ExactVersionConstraint.php | 22 + .../GreaterThanOrEqualToVersionConstraint.php | 26 + .../constraints/OrVersionConstraintGroup.php | 35 + ...SpecificMajorAndMinorVersionConstraint.php | 33 + .../SpecificMajorVersionConstraint.php | 25 + .../src/constraints/VersionConstraint.php | 16 + .../version/src/exceptions/Exception.php | 15 + .../InvalidPreReleaseSuffixException.php | 5 + .../exceptions/InvalidVersionException.php | 5 + .../exceptions/NoBuildMetaDataException.php | 5 + .../NoPreReleaseSuffixException.php | 5 + .../UnsupportedVersionConstraintException.php | 13 + .../.github/workflows/generate.yml | 37 + .../.github/workflows/integrate.yml | 46 + .../.github/workflows/spelling.yml | 23 + vendor/php-stubs/wordpress-stubs/.typos.toml | 19 + vendor/php-stubs/wordpress-stubs/LICENSE | 21 + .../php-stubs/wordpress-stubs/composer.json | 67 + .../php-stubs/wordpress-stubs/phpcs.xml.dist | 61 + .../wordpress-stubs/wordpress-stubs.php | 150130 +++++++++++++++ vendor/phpcsstandards/phpcsextra/CHANGELOG.md | 781 + vendor/phpcsstandards/phpcsextra/LICENSE | 165 + .../Docs/FunctionCalls/DirnameStandard.xml | 40 + .../Sniffs/FunctionCalls/DirnameSniff.php | 389 + .../phpcsextra/Modernize/ruleset.xml | 5 + .../Docs/Arrays/ArrayBraceSpacingStandard.xml | 94 + .../Docs/Arrays/CommaAfterLastStandard.xml | 43 + .../Sniffs/Arrays/ArrayBraceSpacingSniff.php | 305 + .../Sniffs/Arrays/CommaAfterLastSniff.php | 226 + .../phpcsextra/NormalizedArrays/ruleset.xml | 5 + vendor/phpcsstandards/phpcsextra/README.md | 614 + .../DisallowShortArraySyntaxStandard.xml | 27 + .../Docs/Arrays/DuplicateArrayKeyStandard.xml | 44 + .../Arrays/MixedArrayKeyTypesStandard.xml | 40 + .../Arrays/MixedKeyedUnkeyedArrayStandard.xml | 31 + .../Attributes/BracketSpacingStandard.xml | 54 + .../DisallowAttributeParenthesesStandard.xml | 26 + .../RequireAttributeParenthesesStandard.xml | 25 + .../Docs/Attributes/TrailingCommaStandard.xml | 77 + .../DisallowAnonClassParenthesesStandard.xml | 24 + .../Classes/DisallowFinalClassStandard.xml | 25 + .../Classes/ModifierKeywordOrderStandard.xml | 27 + .../RequireAnonClassParenthesesStandard.xml | 23 + .../Classes/RequireFinalClassStandard.xml | 25 + .../ConstructorDestructorReturnStandard.xml | 64 + .../ForeachUniqueAssignmentStandard.xml | 26 + .../CodeAnalysis/NoDoubleNegativeStandard.xml | 27 + .../CodeAnalysis/NoEchoSprintfStandard.xml | 25 + .../StaticInFinalClassStandard.xml | 43 + ...owercaseClassResolutionKeywordStandard.xml | 23 + .../ModifierKeywordOrderStandard.xml | 30 + .../UppercaseMagicConstantsStandard.xml | 25 + .../DisallowAlternativeSyntaxStandard.xml | 35 + .../DisallowLonelyIfStandard.xml | 49 + .../IfElseDeclarationStandard.xml | 37 + .../Files/SeparateFunctionsFromOOStandard.xml | 45 + .../NoLongClosuresStandard.xml | 42 + .../RequireFinalMethodsInTraitsStandard.xml | 33 + .../Lists/DisallowLongListSyntaxStandard.xml | 23 + .../Lists/DisallowShortListSyntaxStandard.xml | 23 + .../DisallowCurlyBraceSyntaxStandard.xml | 27 + ...DisallowDeclarationWithoutNameStandard.xml | 25 + .../EnforceCurlyBraceSyntaxStandard.xml | 27 + .../OneDeclarationPerFileStandard.xml | 27 + ...oReservedKeywordParameterNamesStandard.xml | 23 + .../AlphabeticExtendsImplementsStandard.xml | 27 + .../Docs/Operators/ConcatPositionStandard.xml | 31 + .../DisallowLogicalAndOrStandard.xml | 30 + .../DisallowShortTernaryStandard.xml | 26 + ...andalonePostIncrementDecrementStandard.xml | 44 + .../Operators/StrictComparisonsStandard.xml | 29 + .../TypeSeparatorSpacingStandard.xml | 39 + .../DisallowExitDieParenthesesStandard.xml | 25 + .../Docs/PHP/LowercasePHPTagStandard.xml | 25 + .../Docs/PHP/NoFQNTrueFalseNullStandard.xml | 27 + .../OneStatementInShortEchoTagStandard.xml | 41 + .../PHP/RequireExitDieParenthesesStandard.xml | 25 + .../DisallowMixedGroupUseStandard.xml | 39 + .../DisallowUseClassStandard.xml | 25 + .../DisallowUseConstStandard.xml | 25 + .../DisallowUseFunctionStandard.xml | 25 + .../UseStatements/KeywordSpacingStandard.xml | 29 + .../LowercaseFunctionConstStandard.xml | 25 + .../NoLeadingBackslashStandard.xml | 23 + .../NoUselessAliasesStandard.xml | 30 + .../AnonClassKeywordSpacingStandard.xml | 31 + .../Docs/WhiteSpace/CommaSpacingStandard.xml | 94 + .../WhiteSpace/DisallowInlineTabsStandard.xml | 25 + .../FirstClassCallableSpacingStandard.xml | 33 + .../WhiteSpace/PrecisionAlignmentStandard.xml | 29 + .../Universal/Helpers/DummyTokenizer.php | 60 + .../Arrays/DisallowShortArraySyntaxSniff.php | 89 + .../Sniffs/Arrays/DuplicateArrayKeySniff.php | 294 + .../Sniffs/Arrays/MixedArrayKeyTypesSniff.php | 174 + .../Arrays/MixedKeyedUnkeyedArraySniff.php | 134 + .../Sniffs/Attributes/BracketSpacingSniff.php | 216 + .../DisallowAttributeParenthesesSniff.php | 121 + .../RequireAttributeParenthesesSniff.php | 90 + .../Sniffs/Attributes/TrailingCommaSniff.php | 144 + .../DisallowAnonClassParenthesesSniff.php | 112 + .../Classes/DisallowFinalClassSniff.php | 116 + .../Classes/ModifierKeywordOrderSniff.php | 188 + .../RequireAnonClassParenthesesSniff.php | 81 + .../Sniffs/Classes/RequireFinalClassSniff.php | 102 + .../ConstructorDestructorReturnSniff.php | 211 + .../ForeachUniqueAssignmentSniff.php | 153 + .../CodeAnalysis/NoDoubleNegativeSniff.php | 269 + .../CodeAnalysis/NoEchoSprintfSniff.php | 144 + .../CodeAnalysis/StaticInFinalClassSniff.php | 216 + .../LowercaseClassResolutionKeywordSniff.php | 106 + .../Constants/ModifierKeywordOrderSniff.php | 181 + .../UppercaseMagicConstantsSniff.php | 89 + .../DisallowAlternativeSyntaxSniff.php | 216 + .../DisallowLonelyIfSniff.php | 348 + .../IfElseDeclarationSniff.php | 164 + .../Files/SeparateFunctionsFromOOSniff.php | 189 + .../NoLongClosuresSniff.php | 233 + .../RequireFinalMethodsInTraitsSniff.php | 120 + .../Lists/DisallowLongListSyntaxSniff.php | 71 + .../Lists/DisallowShortListSyntaxSniff.php | 86 + .../DisallowCurlyBraceSyntaxSniff.php | 81 + .../DisallowDeclarationWithoutNameSniff.php | 80 + .../EnforceCurlyBraceSyntaxSniff.php | 81 + .../Namespaces/OneDeclarationPerFileSniff.php | 96 + .../NoReservedKeywordParameterNamesSniff.php | 190 + .../AlphabeticExtendsImplementsSniff.php | 275 + .../Sniffs/Operators/ConcatPositionSniff.php | 203 + .../Operators/DisallowLogicalAndOrSniff.php | 112 + .../Operators/DisallowShortTernarySniff.php | 76 + ...wStandalonePostIncrementDecrementSniff.php | 197 + .../Operators/StrictComparisonsSniff.php | 116 + .../Operators/TypeSeparatorSpacingSniff.php | 148 + .../PHP/DisallowExitDieParenthesesSniff.php | 110 + .../Sniffs/PHP/LowercasePHPTagSniff.php | 87 + .../Sniffs/PHP/NoFQNTrueFalseNullSniff.php | 116 + .../PHP/OneStatementInShortEchoTagSniff.php | 101 + .../PHP/RequireExitDieParenthesesSniff.php | 85 + .../DisallowMixedGroupUseSniff.php | 252 + .../UseStatements/DisallowUseClassSniff.php | 265 + .../UseStatements/DisallowUseConstSniff.php | 265 + .../DisallowUseFunctionSniff.php | 265 + .../UseStatements/KeywordSpacingSniff.php | 207 + .../LowercaseFunctionConstSniff.php | 156 + .../UseStatements/NoLeadingBackslashSniff.php | 178 + .../UseStatements/NoUselessAliasesSniff.php | 169 + .../AnonClassKeywordSpacingSniff.php | 79 + .../Sniffs/WhiteSpace/CommaSpacingSniff.php | 421 + .../WhiteSpace/DisallowInlineTabsSniff.php | 176 + .../FirstClassCallableSpacingSniff.php | 101 + .../WhiteSpace/PrecisionAlignmentSniff.php | 437 + .../phpcsextra/Universal/ruleset.xml | 5 + .../phpcsstandards/phpcsextra/composer.json | 81 + vendor/phpcsstandards/phpcsutils/CHANGELOG.md | 1425 + vendor/phpcsstandards/phpcsutils/LICENSE | 165 + .../AbstractArrayDeclarationSniff.php | 602 + .../PHPCSUtils/BackCompat/BCFile.php | 1070 + .../PHPCSUtils/BackCompat/BCTokens.php | 280 + .../PHPCSUtils/BackCompat/Helper.php | 204 + .../Exceptions/InvalidTokenArray.php | 44 + .../PHPCSUtils/Exceptions/LogicException.php | 47 + .../Exceptions/MissingArgumentError.php | 52 + .../Exceptions/OutOfBoundsStackPtr.php | 51 + .../Exceptions/RuntimeException.php | 24 + .../Exceptions/TestFileNotFound.php | 47 + .../Exceptions/TestMarkerNotFound.php | 43 + .../Exceptions/TestTargetNotFound.php | 50 + .../PHPCSUtils/Exceptions/TypeError.php | 53 + .../Exceptions/UnexpectedTokenType.php | 53 + .../PHPCSUtils/Exceptions/ValueError.php | 55 + .../PHPCSUtils/Fixers/SpacesFixer.php | 267 + .../PHPCSUtils/Internal/AttributeHelper.php | 227 + .../phpcsutils/PHPCSUtils/Internal/Cache.php | 218 + .../Internal/IsShortArrayOrList.php | 693 + .../Internal/IsShortArrayOrListWithCache.php | 269 + .../PHPCSUtils/Internal/NoFileCache.php | 164 + .../PHPCSUtils/Internal/StableCollections.php | 75 + .../PHPCSUtils/TestUtils/ConfigDouble.php | 249 + .../PHPCSUtils/TestUtils/RulesetDouble.php | 57 + .../TestUtils/UtilityMethodTestCase.php | 524 + .../PHPCSUtils/Tokens/Collections.php | 911 + .../PHPCSUtils/Tokens/TokenHelper.php | 55 + .../phpcsutils/PHPCSUtils/Utils/Arrays.php | 246 + .../PHPCSUtils/Utils/AttributeBlock.php | 292 + .../PHPCSUtils/Utils/Conditions.php | 156 + .../phpcsutils/PHPCSUtils/Utils/Constants.php | 217 + .../phpcsutils/PHPCSUtils/Utils/Context.php | 248 + .../PHPCSUtils/Utils/ControlStructures.php | 285 + .../phpcsutils/PHPCSUtils/Utils/FileInfo.php | 92 + .../phpcsutils/PHPCSUtils/Utils/FilePath.php | 154 + .../PHPCSUtils/Utils/FunctionDeclarations.php | 894 + .../PHPCSUtils/Utils/GetTokensAsString.php | 272 + .../phpcsutils/PHPCSUtils/Utils/Lists.php | 365 + .../PHPCSUtils/Utils/MessageHelper.php | 145 + .../PHPCSUtils/Utils/Namespaces.php | 403 + .../PHPCSUtils/Utils/NamingConventions.php | 116 + .../phpcsutils/PHPCSUtils/Utils/Numbers.php | 314 + .../PHPCSUtils/Utils/ObjectDeclarations.php | 661 + .../phpcsutils/PHPCSUtils/Utils/Operators.php | 251 + .../PHPCSUtils/Utils/Orthography.php | 120 + .../PHPCSUtils/Utils/Parentheses.php | 421 + .../PHPCSUtils/Utils/PassedParameters.php | 515 + .../phpcsutils/PHPCSUtils/Utils/Scopes.php | 143 + .../PHPCSUtils/Utils/TextStrings.php | 342 + .../PHPCSUtils/Utils/TypeString.php | 406 + .../PHPCSUtils/Utils/UseStatements.php | 446 + .../phpcsutils/PHPCSUtils/Utils/Variables.php | 405 + .../phpcsutils/PHPCSUtils/ruleset.xml | 4 + vendor/phpcsstandards/phpcsutils/README.md | 297 + .../phpcsstandards/phpcsutils/composer.json | 92 + .../phpcsutils/phpcsutils-autoload.php | 67 + vendor/phpstan/phpstan/LICENSE | 22 + vendor/phpstan/phpstan/README.md | 121 + vendor/phpstan/phpstan/UPGRADING.md | 338 + vendor/phpstan/phpstan/bootstrap.php | 145 + vendor/phpstan/phpstan/composer.json | 31 + vendor/phpstan/phpstan/conf/bleedingEdge.neon | 2 + vendor/phpstan/phpstan/phpstan | 8 + vendor/phpstan/phpstan/phpstan.phar | Bin 0 -> 26384636 bytes vendor/phpstan/phpstan/phpstan.phar.asc | 16 + .../php-code-coverage/ChangeLog-9.2.md | 584 + vendor/phpunit/php-code-coverage/LICENSE | 29 + vendor/phpunit/php-code-coverage/README.md | 48 + .../build/scripts/extract-release-notes.php | 47 + .../phpunit/php-code-coverage/composer.json | 69 + .../php-code-coverage/src/CodeCoverage.php | 709 + .../php-code-coverage/src/Driver/Driver.php | 167 + .../src/Driver/PcovDriver.php | 75 + .../src/Driver/PhpdbgDriver.php | 93 + .../php-code-coverage/src/Driver/Selector.php | 79 + .../src/Driver/Xdebug2Driver.php | 128 + .../src/Driver/Xdebug3Driver.php | 119 + ...chAndPathCoverageNotSupportedException.php | 16 + ...DeadCodeDetectionNotSupportedException.php | 16 + .../DirectoryCouldNotBeCreatedException.php | 17 + .../src/Exception/Exception.php | 16 + .../Exception/InvalidArgumentException.php | 14 + ...NoCodeCoverageDriverAvailableException.php | 20 + ...hPathCoverageSupportAvailableException.php | 20 + .../src/Exception/ParserException.php | 16 + .../PathExistsButIsNotDirectoryException.php | 22 + .../Exception/PcovNotAvailableException.php | 21 + .../Exception/PhpdbgNotAvailableException.php | 21 + .../src/Exception/ReflectionException.php | 16 + .../ReportAlreadyFinalizedException.php | 20 + ...ticAnalysisCacheNotConfiguredException.php | 16 + .../src/Exception/TestIdMissingException.php | 20 + .../UnintentionallyCoveredCodeException.php | 43 + .../WriteOperationFailedException.php | 22 + .../Exception/WrongXdebugVersionException.php | 17 + .../Exception/Xdebug2NotEnabledException.php | 21 + .../Exception/Xdebug3NotEnabledException.php | 21 + .../Exception/XdebugNotAvailableException.php | 21 + .../src/Exception/XmlException.php | 16 + .../phpunit/php-code-coverage/src/Filter.php | 118 + .../src/Node/AbstractNode.php | 253 + .../php-code-coverage/src/Node/Builder.php | 264 + .../php-code-coverage/src/Node/CrapIndex.php | 50 + .../php-code-coverage/src/Node/Directory.php | 440 + .../php-code-coverage/src/Node/File.php | 651 + .../php-code-coverage/src/Node/Iterator.php | 90 + .../src/ProcessedCodeCoverageData.php | 255 + .../src/RawCodeCoverageData.php | 274 + .../php-code-coverage/src/Report/Clover.php | 258 + .../src/Report/Cobertura.php | 309 + .../php-code-coverage/src/Report/Crap4j.php | 156 + .../src/Report/Html/Facade.php | 147 + .../src/Report/Html/Renderer.php | 314 + .../src/Report/Html/Renderer/Dashboard.php | 288 + .../src/Report/Html/Renderer/Directory.php | 113 + .../src/Report/Html/Renderer/File.php | 1162 + .../Html/Renderer/Template/branches.html.dist | 9 + .../Renderer/Template/coverage_bar.html.dist | 5 + .../Template/coverage_bar_branch.html.dist | 5 + .../Renderer/Template/css/bootstrap.min.css | 7 + .../Html/Renderer/Template/css/custom.css | 0 .../Html/Renderer/Template/css/nv.d3.min.css | 1 + .../Html/Renderer/Template/css/octicons.css | 5 + .../Html/Renderer/Template/css/style.css | 158 + .../Renderer/Template/dashboard.html.dist | 281 + .../Template/dashboard_branch.html.dist | 281 + .../Renderer/Template/directory.html.dist | 60 + .../Template/directory_branch.html.dist | 62 + .../Template/directory_item.html.dist | 13 + .../Template/directory_item_branch.html.dist | 19 + .../Html/Renderer/Template/file.html.dist | 65 + .../Renderer/Template/file_branch.html.dist | 67 + .../Renderer/Template/file_item.html.dist | 14 + .../Template/file_item_branch.html.dist | 20 + .../Renderer/Template/icons/file-code.svg | 1 + .../Template/icons/file-directory.svg | 1 + .../Renderer/Template/js/bootstrap.min.js | 7 + .../Html/Renderer/Template/js/d3.min.js | 5 + .../Report/Html/Renderer/Template/js/file.js | 62 + .../Html/Renderer/Template/js/jquery.min.js | 2 + .../Html/Renderer/Template/js/nv.d3.min.js | 8 + .../Html/Renderer/Template/js/popper.min.js | 5 + .../Html/Renderer/Template/line.html.dist | 1 + .../Html/Renderer/Template/lines.html.dist | 5 + .../Renderer/Template/method_item.html.dist | 12 + .../Template/method_item_branch.html.dist | 18 + .../Html/Renderer/Template/paths.html.dist | 9 + .../php-code-coverage/src/Report/PHP.php | 41 + .../php-code-coverage/src/Report/Text.php | 341 + .../src/Report/Xml/BuildInformation.php | 88 + .../src/Report/Xml/Coverage.php | 74 + .../src/Report/Xml/Directory.php | 17 + .../src/Report/Xml/Facade.php | 315 + .../php-code-coverage/src/Report/Xml/File.php | 87 + .../src/Report/Xml/Method.php | 61 + .../php-code-coverage/src/Report/Xml/Node.php | 93 + .../src/Report/Xml/Project.php | 90 + .../src/Report/Xml/Report.php | 99 + .../src/Report/Xml/Source.php | 42 + .../src/Report/Xml/Tests.php | 50 + .../src/Report/Xml/Totals.php | 146 + .../php-code-coverage/src/Report/Xml/Unit.php | 78 + .../src/StaticAnalysis/CacheWarmer.php | 32 + .../StaticAnalysis/CachingFileAnalyser.php | 209 + .../StaticAnalysis/CodeUnitFindingVisitor.php | 345 + .../ExecutableLinesFindingVisitor.php | 390 + .../src/StaticAnalysis/FileAnalyser.php | 31 + .../IgnoredLinesFindingVisitor.php | 119 + .../StaticAnalysis/ParsingFileAnalyser.php | 249 + .../php-code-coverage/src/Util/Filesystem.php | 37 + .../php-code-coverage/src/Util/Percentage.php | 66 + .../phpunit/php-code-coverage/src/Version.php | 30 + .../php-file-iterator/.psalm/baseline.xml | 8 + .../php-file-iterator/.psalm/config.xml | 16 + vendor/phpunit/php-file-iterator/ChangeLog.md | 144 + vendor/phpunit/php-file-iterator/LICENSE | 33 + vendor/phpunit/php-file-iterator/README.md | 14 + .../phpunit/php-file-iterator/composer.json | 45 + .../phpunit/php-file-iterator/src/Facade.php | 115 + .../phpunit/php-file-iterator/src/Factory.php | 91 + .../php-file-iterator/src/Iterator.php | 119 + vendor/phpunit/php-invoker/ChangeLog.md | 48 + vendor/phpunit/php-invoker/LICENSE | 33 + vendor/phpunit/php-invoker/README.md | 18 + vendor/phpunit/php-invoker/composer.json | 54 + vendor/phpunit/php-invoker/src/Invoker.php | 69 + .../php-invoker/src/exceptions/Exception.php | 16 + ...cessControlExtensionNotLoadedException.php | 16 + .../src/exceptions/TimeoutException.php | 16 + .../php-text-template/.psalm/baseline.xml | 2 + .../php-text-template/.psalm/config.xml | 16 + vendor/phpunit/php-text-template/ChangeLog.md | 43 + vendor/phpunit/php-text-template/LICENSE | 33 + vendor/phpunit/php-text-template/README.md | 12 + .../phpunit/php-text-template/composer.json | 43 + .../php-text-template/src/Template.php | 107 + .../src/exceptions/Exception.php | 16 + .../exceptions/InvalidArgumentException.php | 14 + .../src/exceptions/RuntimeException.php | 16 + vendor/phpunit/php-timer/.psalm/baseline.xml | 2 + vendor/phpunit/php-timer/.psalm/config.xml | 16 + vendor/phpunit/php-timer/ChangeLog.md | 138 + vendor/phpunit/php-timer/LICENSE | 33 + vendor/phpunit/php-timer/README.md | 104 + vendor/phpunit/php-timer/composer.json | 45 + vendor/phpunit/php-timer/src/Duration.php | 109 + .../php-timer/src/ResourceUsageFormatter.php | 73 + vendor/phpunit/php-timer/src/Timer.php | 40 + .../php-timer/src/exceptions/Exception.php | 16 + .../src/exceptions/NoActiveTimerException.php | 16 + ...nceStartOfRequestNotAvailableException.php | 16 + vendor/phpunit/phpunit/ChangeLog-9.6.md | 267 + vendor/phpunit/phpunit/DEPRECATIONS.md | 89 + vendor/phpunit/phpunit/LICENSE | 29 + vendor/phpunit/phpunit/README.md | 35 + vendor/phpunit/phpunit/SECURITY.md | 33 + vendor/phpunit/phpunit/composer.json | 91 + vendor/phpunit/phpunit/composer.lock | 1709 + vendor/phpunit/phpunit/phpunit | 107 + vendor/phpunit/phpunit/phpunit.xsd | 330 + vendor/phpunit/phpunit/schema/8.5.xsd | 319 + vendor/phpunit/phpunit/schema/9.0.xsd | 315 + vendor/phpunit/phpunit/schema/9.1.xsd | 317 + vendor/phpunit/phpunit/schema/9.2.xsd | 317 + vendor/phpunit/phpunit/schema/9.3.xsd | 327 + vendor/phpunit/phpunit/schema/9.4.xsd | 328 + vendor/phpunit/phpunit/schema/9.5.xsd | 330 + vendor/phpunit/phpunit/src/Exception.php | 19 + .../phpunit/phpunit/src/Framework/Assert.php | 2963 + .../src/Framework/Assert/Functions.php | 3079 + .../Framework/Constraint/Boolean/IsFalse.php | 35 + .../Framework/Constraint/Boolean/IsTrue.php | 35 + .../src/Framework/Constraint/Callback.php | 52 + .../Constraint/Cardinality/Count.php | 142 + .../Constraint/Cardinality/GreaterThan.php | 52 + .../Constraint/Cardinality/IsEmpty.php | 70 + .../Constraint/Cardinality/LessThan.php | 52 + .../Constraint/Cardinality/SameSize.php | 21 + .../src/Framework/Constraint/Constraint.php | 270 + .../Framework/Constraint/Equality/IsEqual.php | 137 + .../Equality/IsEqualCanonicalizing.php | 109 + .../Equality/IsEqualIgnoringCase.php | 109 + .../Constraint/Equality/IsEqualWithDelta.php | 101 + .../Constraint/Exception/Exception.php | 85 + .../Constraint/Exception/ExceptionCode.php | 68 + .../Constraint/Exception/ExceptionMessage.php | 78 + .../ExceptionMessageRegularExpression.php | 74 + .../Constraint/Filesystem/DirectoryExists.php | 54 + .../Constraint/Filesystem/FileExists.php | 54 + .../Constraint/Filesystem/IsReadable.php | 54 + .../Constraint/Filesystem/IsWritable.php | 54 + .../src/Framework/Constraint/IsAnything.php | 51 + .../src/Framework/Constraint/IsIdentical.php | 127 + .../src/Framework/Constraint/JsonMatches.php | 110 + .../JsonMatchesErrorMessageProvider.php | 78 + .../Framework/Constraint/Math/IsFinite.php | 37 + .../Framework/Constraint/Math/IsInfinite.php | 37 + .../src/Framework/Constraint/Math/IsNan.php | 37 + .../Constraint/Object/ClassHasAttribute.php | 90 + .../Object/ClassHasStaticAttribute.php | 61 + .../Constraint/Object/ObjectEquals.php | 151 + .../Constraint/Object/ObjectHasAttribute.php | 31 + .../Constraint/Object/ObjectHasProperty.php | 84 + .../Constraint/Operator/BinaryOperator.php | 148 + .../Constraint/Operator/LogicalAnd.php | 51 + .../Constraint/Operator/LogicalNot.php | 143 + .../Constraint/Operator/LogicalOr.php | 51 + .../Constraint/Operator/LogicalXor.php | 63 + .../Constraint/Operator/Operator.php | 55 + .../Constraint/Operator/UnaryOperator.php | 141 + .../Framework/Constraint/String/IsJson.php | 78 + .../Constraint/String/RegularExpression.php | 51 + .../Constraint/String/StringContains.php | 85 + .../Constraint/String/StringEndsWith.php | 48 + .../String/StringMatchesFormatDescription.php | 109 + .../Constraint/String/StringStartsWith.php | 52 + .../Constraint/Traversable/ArrayHasKey.php | 78 + .../Traversable/TraversableContains.php | 64 + .../Traversable/TraversableContainsEqual.php | 40 + .../TraversableContainsIdentical.php | 39 + .../Traversable/TraversableContainsOnly.php | 93 + .../Constraint/Type/IsInstanceOf.php | 88 + .../src/Framework/Constraint/Type/IsNull.php | 35 + .../src/Framework/Constraint/Type/IsType.php | 211 + .../src/Framework/DataProviderTestSuite.php | 76 + .../src/Framework/Error/Deprecated.php | 17 + .../phpunit/src/Framework/Error/Error.php | 26 + .../phpunit/src/Framework/Error/Notice.php | 17 + .../phpunit/src/Framework/Error/Warning.php | 17 + .../phpunit/src/Framework/ErrorTestCase.php | 66 + .../ActualValueIsNotAnObjectException.php | 32 + .../Exception/AssertionFailedError.php | 24 + .../Exception/CodeCoverageException.php | 17 + ...hodDoesNotAcceptParameterTypeException.php | 38 + ...dDoesNotDeclareBoolReturnTypeException.php | 37 + ...NotDeclareExactlyOneParameterException.php | 37 + ...odDoesNotDeclareParameterTypeException.php | 37 + .../ComparisonMethodDoesNotExistException.php | 37 + .../CoveredCodeNotExecutedException.php | 17 + .../phpunit/src/Framework/Exception/Error.php | 24 + .../src/Framework/Exception/Exception.php | 86 + .../Exception/ExpectationFailedException.php | 42 + .../Exception/IncompleteTestError.php | 17 + .../Exception/InvalidArgumentException.php | 46 + .../InvalidCoversTargetException.php | 17 + .../InvalidDataProviderException.php | 17 + .../MissingCoversAnnotationException.php | 17 + .../Exception/NoChildTestSuiteException.php | 17 + .../src/Framework/Exception/OutputError.php | 17 + .../Exception/PHPTAssertionFailedError.php | 32 + .../Framework/Exception/RiskyTestError.php | 17 + .../Framework/Exception/SkippedTestError.php | 17 + .../Exception/SkippedTestSuiteError.php | 17 + .../Framework/Exception/SyntheticError.php | 61 + .../Exception/SyntheticSkippedError.php | 17 + .../UnintentionallyCoveredCodeError.php | 17 + .../src/Framework/Exception/Warning.php | 24 + .../src/Framework/ExceptionWrapper.php | 138 + .../Framework/ExecutionOrderDependency.php | 206 + .../phpunit/src/Framework/IncompleteTest.php | 19 + .../src/Framework/IncompleteTestCase.php | 68 + .../InvalidParameterGroupException.php | 17 + .../src/Framework/MockObject/Api/Api.php | 97 + .../src/Framework/MockObject/Api/Method.php | 30 + .../Framework/MockObject/Builder/Identity.php | 25 + .../MockObject/Builder/InvocationMocker.php | 309 + .../MockObject/Builder/InvocationStubber.php | 65 + .../MockObject/Builder/MethodNameMatch.php | 28 + .../MockObject/Builder/ParametersMatch.php | 58 + .../src/Framework/MockObject/Builder/Stub.php | 24 + .../MockObject/ConfigurableMethod.php | 53 + .../Exception/BadMethodCallException.php | 17 + .../CannotUseAddMethodsException.php | 29 + .../CannotUseOnlyMethodsException.php | 29 + .../Exception/ClassAlreadyExistsException.php | 28 + .../Exception/ClassIsFinalException.php | 28 + .../Exception/ClassIsReadonlyException.php | 28 + ...ableMethodsAlreadyInitializedException.php | 17 + .../Exception/DuplicateMethodException.php | 35 + .../MockObject/Exception/Exception.php | 17 + .../IncompatibleReturnValueException.php | 36 + .../Exception/InvalidMethodNameException.php | 28 + .../MatchBuilderNotFoundException.php | 28 + .../MatcherAlreadyRegisteredException.php | 28 + .../MethodCannotBeConfiguredException.php | 28 + .../MethodNameAlreadyConfiguredException.php | 21 + .../MethodNameNotConfiguredException.php | 21 + ...odParametersAlreadyConfiguredException.php | 21 + ...ConstructorInvocationRequiredException.php | 21 + .../Exception/ReflectionException.php | 19 + .../ReturnValueNotConfiguredException.php | 29 + .../MockObject/Exception/RuntimeException.php | 17 + .../SoapExtensionNotAvailableException.php | 23 + .../Exception/UnknownClassException.php | 28 + .../Exception/UnknownTraitException.php | 28 + .../Exception/UnknownTypeException.php | 28 + .../src/Framework/MockObject/Generator.php | 1171 + .../MockObject/Generator/deprecation.tpl | 2 + .../MockObject/Generator/intersection.tpl | 5 + .../MockObject/Generator/mocked_class.tpl | 6 + .../MockObject/Generator/mocked_method.tpl | 22 + .../Generator/mocked_method_never_or_void.tpl | 20 + .../Generator/mocked_static_method.tpl | 5 + .../MockObject/Generator/proxied_method.tpl | 22 + .../proxied_method_never_or_void.tpl | 22 + .../MockObject/Generator/trait_class.tpl | 6 + .../MockObject/Generator/wsdl_class.tpl | 9 + .../MockObject/Generator/wsdl_method.tpl | 4 + .../src/Framework/MockObject/Invocation.php | 301 + .../MockObject/InvocationHandler.php | 186 + .../src/Framework/MockObject/Matcher.php | 275 + .../MockObject/MethodNameConstraint.php | 48 + .../src/Framework/MockObject/MockBuilder.php | 519 + .../src/Framework/MockObject/MockClass.php | 69 + .../src/Framework/MockObject/MockMethod.php | 380 + .../Framework/MockObject/MockMethodSet.php | 45 + .../src/Framework/MockObject/MockObject.php | 27 + .../src/Framework/MockObject/MockTrait.php | 54 + .../src/Framework/MockObject/MockType.php | 21 + .../MockObject/Rule/AnyInvokedCount.php | 36 + .../MockObject/Rule/AnyParameters.php | 31 + .../MockObject/Rule/ConsecutiveParameters.php | 134 + .../MockObject/Rule/InvocationOrder.php | 47 + .../MockObject/Rule/InvokedAtIndex.php | 76 + .../MockObject/Rule/InvokedAtLeastCount.php | 64 + .../MockObject/Rule/InvokedAtLeastOnce.php | 50 + .../MockObject/Rule/InvokedAtMostCount.php | 64 + .../MockObject/Rule/InvokedCount.php | 102 + .../Framework/MockObject/Rule/MethodName.php | 69 + .../Framework/MockObject/Rule/Parameters.php | 161 + .../MockObject/Rule/ParametersRule.php | 28 + .../phpunit/src/Framework/MockObject/Stub.php | 26 + .../MockObject/Stub/ConsecutiveCalls.php | 57 + .../Framework/MockObject/Stub/Exception.php | 46 + .../MockObject/Stub/ReturnArgument.php | 41 + .../MockObject/Stub/ReturnCallback.php | 59 + .../MockObject/Stub/ReturnReference.php | 45 + .../Framework/MockObject/Stub/ReturnSelf.php | 32 + .../Framework/MockObject/Stub/ReturnStub.php | 45 + .../MockObject/Stub/ReturnValueMap.php | 53 + .../src/Framework/MockObject/Stub/Stub.php | 27 + .../src/Framework/MockObject/Verifiable.php | 26 + .../phpunit/src/Framework/Reorderable.php | 28 + .../phpunit/src/Framework/SelfDescribing.php | 21 + .../phpunit/src/Framework/SkippedTest.php | 19 + .../phpunit/src/Framework/SkippedTestCase.php | 68 + vendor/phpunit/phpunit/src/Framework/Test.php | 23 + .../phpunit/src/Framework/TestBuilder.php | 239 + .../phpunit/src/Framework/TestCase.php | 2678 + .../phpunit/src/Framework/TestFailure.php | 155 + .../phpunit/src/Framework/TestListener.php | 45 + .../TestListenerDefaultImplementation.php | 60 + .../phpunit/src/Framework/TestResult.php | 1324 + .../phpunit/src/Framework/TestSuite.php | 922 + .../src/Framework/TestSuiteIterator.php | 85 + .../phpunit/src/Framework/WarningTestCase.php | 66 + .../phpunit/src/Runner/BaseTestRunner.php | 161 + .../src/Runner/DefaultTestResultCache.php | 158 + .../phpunit/phpunit/src/Runner/Exception.php | 19 + .../src/Runner/Extension/ExtensionHandler.php | 118 + .../src/Runner/Extension/PharLoader.php | 98 + .../Filter/ExcludeGroupFilterIterator.php | 23 + .../phpunit/src/Runner/Filter/Factory.php | 61 + .../src/Runner/Filter/GroupFilterIterator.php | 58 + .../Filter/IncludeGroupFilterIterator.php | 23 + .../src/Runner/Filter/NameFilterIterator.php | 138 + .../Runner/Hook/AfterIncompleteTestHook.php | 24 + .../src/Runner/Hook/AfterLastTestHook.php | 24 + .../src/Runner/Hook/AfterRiskyTestHook.php | 24 + .../src/Runner/Hook/AfterSkippedTestHook.php | 24 + .../Runner/Hook/AfterSuccessfulTestHook.php | 24 + .../src/Runner/Hook/AfterTestErrorHook.php | 24 + .../src/Runner/Hook/AfterTestFailureHook.php | 24 + .../phpunit/src/Runner/Hook/AfterTestHook.php | 30 + .../src/Runner/Hook/AfterTestWarningHook.php | 24 + .../src/Runner/Hook/BeforeFirstTestHook.php | 24 + .../src/Runner/Hook/BeforeTestHook.php | 24 + .../phpunit/phpunit/src/Runner/Hook/Hook.php | 23 + .../phpunit/src/Runner/Hook/TestHook.php | 23 + .../src/Runner/Hook/TestListenerAdapter.php | 141 + .../src/Runner/NullTestResultCache.php | 42 + .../phpunit/src/Runner/PhptTestCase.php | 902 + .../src/Runner/ResultCacheExtension.php | 110 + .../src/Runner/StandardTestSuiteLoader.php | 152 + .../phpunit/src/Runner/TestResultCache.php | 28 + .../phpunit/src/Runner/TestSuiteLoader.php | 24 + .../phpunit/src/Runner/TestSuiteSorter.php | 395 + vendor/phpunit/phpunit/src/Runner/Version.php | 76 + .../src/TextUI/CliArguments/Builder.php | 886 + .../src/TextUI/CliArguments/Configuration.php | 2108 + .../src/TextUI/CliArguments/Exception.php | 19 + .../src/TextUI/CliArguments/Mapper.php | 365 + vendor/phpunit/phpunit/src/TextUI/Command.php | 1042 + .../src/TextUI/DefaultResultPrinter.php | 585 + .../src/TextUI/Exception/Exception.php | 19 + .../TextUI/Exception/ReflectionException.php | 19 + .../src/TextUI/Exception/RuntimeException.php | 17 + .../TestDirectoryNotFoundException.php | 29 + .../Exception/TestFileNotFoundException.php | 29 + vendor/phpunit/phpunit/src/TextUI/Help.php | 281 + .../phpunit/src/TextUI/ResultPrinter.php | 23 + .../phpunit/phpunit/src/TextUI/TestRunner.php | 1262 + .../phpunit/src/TextUI/TestSuiteMapper.php | 103 + .../CodeCoverage/CodeCoverage.php | 363 + .../CodeCoverage/Filter/Directory.php | 66 + .../Filter/DirectoryCollection.php | 60 + .../Filter/DirectoryCollectionIterator.php | 68 + .../CodeCoverage/FilterMapper.php | 45 + .../CodeCoverage/Report/Clover.php | 35 + .../CodeCoverage/Report/Cobertura.php | 35 + .../CodeCoverage/Report/Crap4j.php | 46 + .../CodeCoverage/Report/Html.php | 57 + .../CodeCoverage/Report/Php.php | 35 + .../CodeCoverage/Report/Text.php | 57 + .../CodeCoverage/Report/Xml.php | 35 + .../TextUI/XmlConfiguration/Configuration.php | 152 + .../src/TextUI/XmlConfiguration/Exception.php | 19 + .../XmlConfiguration/Filesystem/Directory.php | 33 + .../Filesystem/DirectoryCollection.php | 65 + .../DirectoryCollectionIterator.php | 68 + .../XmlConfiguration/Filesystem/File.php | 33 + .../Filesystem/FileCollection.php | 65 + .../Filesystem/FileCollectionIterator.php | 68 + .../src/TextUI/XmlConfiguration/Generator.php | 73 + .../TextUI/XmlConfiguration/Group/Group.php | 33 + .../Group/GroupCollection.php | 72 + .../Group/GroupCollectionIterator.php | 68 + .../TextUI/XmlConfiguration/Group/Groups.php | 54 + .../src/TextUI/XmlConfiguration/Loader.php | 1274 + .../TextUI/XmlConfiguration/Logging/Junit.php | 35 + .../XmlConfiguration/Logging/Logging.php | 147 + .../XmlConfiguration/Logging/TeamCity.php | 35 + .../XmlConfiguration/Logging/TestDox/Html.php | 35 + .../XmlConfiguration/Logging/TestDox/Text.php | 35 + .../XmlConfiguration/Logging/TestDox/Xml.php | 35 + .../TextUI/XmlConfiguration/Logging/Text.php | 35 + .../Migration/MigrationBuilder.php | 62 + .../Migration/MigrationBuilderException.php | 20 + .../Migration/MigrationException.php | 20 + .../Migration/Migrations/ConvertLogTypes.php | 53 + .../Migrations/CoverageCloverToReport.php | 31 + .../Migrations/CoverageCrap4jToReport.php | 33 + .../Migrations/CoverageHtmlToReport.php | 33 + .../Migrations/CoveragePhpToReport.php | 31 + .../Migrations/CoverageTextToReport.php | 33 + .../Migrations/CoverageXmlToReport.php | 31 + .../Migrations/IntroduceCoverageElement.php | 28 + .../Migrations/LogToReportMigration.php | 79 + .../Migration/Migrations/Migration.php | 20 + ...ttributesFromFilterWhitelistToCoverage.php | 51 + .../MoveAttributesFromRootToCoverage.php | 47 + .../MoveWhitelistExcludesToCoverage.php | 72 + .../MoveWhitelistIncludesToCoverage.php | 53 + .../Migrations/RemoveCacheTokensAttribute.php | 27 + .../Migrations/RemoveEmptyFilter.php | 54 + .../Migration/Migrations/RemoveLogTypes.php | 40 + .../Migrations/UpdateSchemaLocationTo93.php | 27 + .../XmlConfiguration/Migration/Migrator.php | 57 + .../TextUI/XmlConfiguration/PHP/Constant.php | 44 + .../PHP/ConstantCollection.php | 60 + .../PHP/ConstantCollectionIterator.php | 68 + .../XmlConfiguration/PHP/IniSetting.php | 44 + .../PHP/IniSettingCollection.php | 60 + .../PHP/IniSettingCollectionIterator.php | 68 + .../src/TextUI/XmlConfiguration/PHP/Php.php | 143 + .../XmlConfiguration/PHP/PhpHandler.php | 121 + .../TextUI/XmlConfiguration/PHP/Variable.php | 55 + .../PHP/VariableCollection.php | 60 + .../PHP/VariableCollectionIterator.php | 68 + .../XmlConfiguration/PHPUnit/Extension.php | 73 + .../PHPUnit/ExtensionCollection.php | 53 + .../PHPUnit/ExtensionCollectionIterator.php | 68 + .../XmlConfiguration/PHPUnit/PHPUnit.php | 715 + .../TestSuite/TestDirectory.php | 79 + .../TestSuite/TestDirectoryCollection.php | 65 + .../TestDirectoryCollectionIterator.php | 68 + .../XmlConfiguration/TestSuite/TestFile.php | 57 + .../TestSuite/TestFileCollection.php | 65 + .../TestSuite/TestFileCollectionIterator.php | 68 + .../XmlConfiguration/TestSuite/TestSuite.php | 66 + .../TestSuite/TestSuiteCollection.php | 65 + .../TestSuite/TestSuiteCollectionIterator.php | 68 + .../phpunit/src/Util/Annotation/DocBlock.php | 546 + .../phpunit/src/Util/Annotation/Registry.php | 95 + vendor/phpunit/phpunit/src/Util/Blacklist.php | 41 + vendor/phpunit/phpunit/src/Util/Cloner.php | 34 + vendor/phpunit/phpunit/src/Util/Color.php | 159 + .../phpunit/phpunit/src/Util/ErrorHandler.php | 164 + vendor/phpunit/phpunit/src/Util/Exception.php | 19 + .../phpunit/phpunit/src/Util/ExcludeList.php | 240 + .../phpunit/phpunit/src/Util/FileLoader.php | 84 + .../phpunit/phpunit/src/Util/Filesystem.php | 41 + vendor/phpunit/phpunit/src/Util/Filter.php | 115 + .../phpunit/phpunit/src/Util/GlobalState.php | 323 + .../src/Util/InvalidDataSetException.php | 20 + vendor/phpunit/phpunit/src/Util/Json.php | 98 + vendor/phpunit/phpunit/src/Util/Log/JUnit.php | 424 + .../phpunit/phpunit/src/Util/Log/TeamCity.php | 384 + .../src/Util/PHP/AbstractPhpProcess.php | 427 + .../src/Util/PHP/DefaultPhpProcess.php | 236 + .../src/Util/PHP/Template/PhptTestCase.tpl | 57 + .../src/Util/PHP/Template/TestCaseClass.tpl | 123 + .../src/Util/PHP/Template/TestCaseMethod.tpl | 126 + .../src/Util/PHP/WindowsPhpProcess.php | 52 + vendor/phpunit/phpunit/src/Util/Printer.php | 116 + .../phpunit/phpunit/src/Util/Reflection.php | 63 + .../phpunit/src/Util/RegularExpression.php | 31 + vendor/phpunit/phpunit/src/Util/Test.php | 784 + .../src/Util/TestDox/CliTestDoxPrinter.php | 384 + .../src/Util/TestDox/HtmlResultPrinter.php | 159 + .../src/Util/TestDox/NamePrettifier.php | 313 + .../src/Util/TestDox/ResultPrinter.php | 345 + .../src/Util/TestDox/TestDoxPrinter.php | 392 + .../src/Util/TestDox/TextResultPrinter.php | 52 + .../src/Util/TestDox/XmlResultPrinter.php | 262 + .../phpunit/src/Util/TextTestListRenderer.php | 55 + vendor/phpunit/phpunit/src/Util/Type.php | 39 + .../src/Util/VersionComparisonOperator.php | 58 + .../src/Util/XdebugFilterScriptGenerator.php | 81 + vendor/phpunit/phpunit/src/Util/Xml.php | 193 + .../phpunit/src/Util/Xml/Exception.php | 19 + .../Util/Xml/FailedSchemaDetectionResult.php | 19 + .../phpunit/phpunit/src/Util/Xml/Loader.php | 117 + .../src/Util/Xml/SchemaDetectionResult.php | 34 + .../phpunit/src/Util/Xml/SchemaDetector.php | 41 + .../phpunit/src/Util/Xml/SchemaFinder.php | 80 + .../phpunit/src/Util/Xml/SnapshotNodeList.php | 51 + .../Xml/SuccessfulSchemaDetectionResult.php | 47 + .../phpunit/src/Util/Xml/ValidationResult.php | 70 + .../phpunit/src/Util/Xml/Validator.php | 35 + .../phpunit/src/Util/XmlTestListRenderer.php | 92 + vendor/sebastian/cli-parser/ChangeLog.md | 23 + vendor/sebastian/cli-parser/LICENSE | 33 + vendor/sebastian/cli-parser/README.md | 17 + vendor/sebastian/cli-parser/composer.json | 41 + vendor/sebastian/cli-parser/infection.json | 12 + vendor/sebastian/cli-parser/src/Parser.php | 204 + .../exceptions/AmbiguousOptionException.php | 26 + .../cli-parser/src/exceptions/Exception.php | 16 + .../OptionDoesNotAllowArgumentException.php | 26 + ...RequiredOptionArgumentMissingException.php | 26 + .../src/exceptions/UnknownOptionException.php | 26 + .../code-unit-reverse-lookup/ChangeLog.md | 38 + .../code-unit-reverse-lookup/LICENSE | 33 + .../code-unit-reverse-lookup/README.md | 20 + .../code-unit-reverse-lookup/composer.json | 36 + .../code-unit-reverse-lookup/src/Wizard.php | 125 + .../sebastian/code-unit/.psalm/baseline.xml | 23 + vendor/sebastian/code-unit/.psalm/config.xml | 16 + vendor/sebastian/code-unit/ChangeLog.md | 65 + vendor/sebastian/code-unit/LICENSE | 33 + vendor/sebastian/code-unit/README.md | 17 + vendor/sebastian/code-unit/composer.json | 50 + .../code-unit/src/ClassMethodUnit.php | 24 + vendor/sebastian/code-unit/src/ClassUnit.php | 24 + vendor/sebastian/code-unit/src/CodeUnit.php | 445 + .../code-unit/src/CodeUnitCollection.php | 84 + .../src/CodeUnitCollectionIterator.php | 55 + .../sebastian/code-unit/src/FunctionUnit.php | 24 + .../code-unit/src/InterfaceMethodUnit.php | 24 + .../sebastian/code-unit/src/InterfaceUnit.php | 24 + vendor/sebastian/code-unit/src/Mapper.php | 414 + .../code-unit/src/TraitMethodUnit.php | 24 + vendor/sebastian/code-unit/src/TraitUnit.php | 24 + .../code-unit/src/exceptions/Exception.php | 16 + .../exceptions/InvalidCodeUnitException.php | 16 + .../src/exceptions/NoTraitException.php | 16 + .../src/exceptions/ReflectionException.php | 16 + vendor/sebastian/comparator/ChangeLog.md | 171 + vendor/sebastian/comparator/LICENSE | 33 + vendor/sebastian/comparator/README.md | 41 + vendor/sebastian/comparator/composer.json | 57 + .../comparator/src/ArrayComparator.php | 141 + .../sebastian/comparator/src/Comparator.php | 61 + .../comparator/src/ComparisonFailure.php | 129 + .../comparator/src/DOMNodeComparator.php | 93 + .../comparator/src/DateTimeComparator.php | 95 + .../comparator/src/DoubleComparator.php | 61 + .../comparator/src/ExceptionComparator.php | 54 + vendor/sebastian/comparator/src/Factory.php | 141 + .../comparator/src/MockObjectComparator.php | 48 + .../comparator/src/NumericComparator.php | 84 + .../comparator/src/ObjectComparator.php | 112 + .../comparator/src/ResourceComparator.php | 54 + .../comparator/src/ScalarComparator.php | 99 + .../src/SplObjectStorageComparator.php | 71 + .../comparator/src/TypeComparator.php | 62 + .../comparator/src/exceptions/Exception.php | 16 + .../src/exceptions/RuntimeException.php | 14 + .../sebastian/complexity/.psalm/baseline.xml | 2 + vendor/sebastian/complexity/.psalm/config.xml | 16 + vendor/sebastian/complexity/ChangeLog.md | 37 + vendor/sebastian/complexity/LICENSE | 33 + vendor/sebastian/complexity/README.md | 22 + vendor/sebastian/complexity/composer.json | 42 + .../sebastian/complexity/src/Calculator.php | 81 + .../complexity/src/Complexity/Complexity.php | 42 + .../src/Complexity/ComplexityCollection.php | 72 + .../ComplexityCollectionIterator.php | 55 + .../complexity/src/Exception/Exception.php | 16 + .../src/Exception/RuntimeException.php | 14 + .../Visitor/ComplexityCalculatingVisitor.php | 109 + ...CyclomaticComplexityCalculatingVisitor.php | 59 + vendor/sebastian/diff/ChangeLog.md | 103 + vendor/sebastian/diff/LICENSE | 33 + vendor/sebastian/diff/README.md | 202 + vendor/sebastian/diff/composer.json | 47 + vendor/sebastian/diff/src/Chunk.php | 89 + vendor/sebastian/diff/src/Diff.php | 64 + vendor/sebastian/diff/src/Differ.php | 327 + .../src/Exception/ConfigurationException.php | 38 + .../diff/src/Exception/Exception.php | 16 + .../Exception/InvalidArgumentException.php | 14 + vendor/sebastian/diff/src/Line.php | 45 + .../LongestCommonSubsequenceCalculator.php | 18 + ...ientLongestCommonSubsequenceCalculator.php | 93 + .../src/Output/AbstractChunkOutputBuilder.php | 52 + .../diff/src/Output/DiffOnlyOutputBuilder.php | 72 + .../src/Output/DiffOutputBuilderInterface.php | 19 + .../Output/StrictUnifiedDiffOutputBuilder.php | 338 + .../src/Output/UnifiedDiffOutputBuilder.php | 272 + vendor/sebastian/diff/src/Parser.php | 110 + ...ientLongestCommonSubsequenceCalculator.php | 82 + vendor/sebastian/environment/ChangeLog.md | 183 + vendor/sebastian/environment/LICENSE | 33 + vendor/sebastian/environment/README.md | 21 + vendor/sebastian/environment/composer.json | 40 + vendor/sebastian/environment/src/Console.php | 187 + .../environment/src/OperatingSystem.php | 53 + vendor/sebastian/environment/src/Runtime.php | 321 + vendor/sebastian/exporter/ChangeLog.md | 67 + vendor/sebastian/exporter/LICENSE | 33 + vendor/sebastian/exporter/README.md | 174 + vendor/sebastian/exporter/composer.json | 56 + vendor/sebastian/exporter/src/Exporter.php | 346 + vendor/sebastian/global-state/ChangeLog.md | 100 + vendor/sebastian/global-state/LICENSE | 33 + vendor/sebastian/global-state/README.md | 20 + vendor/sebastian/global-state/composer.json | 51 + .../global-state/src/CodeExporter.php | 109 + .../global-state/src/ExcludeList.php | 119 + .../sebastian/global-state/src/Restorer.php | 150 + .../sebastian/global-state/src/Snapshot.php | 445 + .../global-state/src/exceptions/Exception.php | 16 + .../src/exceptions/RuntimeException.php | 14 + .../lines-of-code/.psalm/baseline.xml | 2 + .../sebastian/lines-of-code/.psalm/config.xml | 16 + vendor/sebastian/lines-of-code/ChangeLog.md | 41 + vendor/sebastian/lines-of-code/LICENSE | 33 + vendor/sebastian/lines-of-code/README.md | 22 + vendor/sebastian/lines-of-code/composer.json | 42 + .../sebastian/lines-of-code/src/Counter.php | 84 + .../lines-of-code/src/Exception/Exception.php | 16 + .../Exception/IllogicalValuesException.php | 16 + .../src/Exception/NegativeValueException.php | 16 + .../src/Exception/RuntimeException.php | 14 + .../lines-of-code/src/LineCountingVisitor.php | 82 + .../lines-of-code/src/LinesOfCode.php | 98 + .../object-enumerator/.psalm/baseline.xml | 9 + .../object-enumerator/.psalm/config.xml | 16 + .../sebastian/object-enumerator/ChangeLog.md | 88 + vendor/sebastian/object-enumerator/LICENSE | 33 + vendor/sebastian/object-enumerator/README.md | 20 + .../sebastian/object-enumerator/composer.json | 43 + .../sebastian/object-enumerator/phpunit.xml | 24 + .../object-enumerator/src/Enumerator.php | 88 + .../object-enumerator/src/Exception.php | 16 + .../src/InvalidArgumentException.php | 14 + .../object-reflector/.psalm/baseline.xml | 8 + .../object-reflector/.psalm/config.xml | 16 + .../sebastian/object-reflector/ChangeLog.md | 55 + vendor/sebastian/object-reflector/LICENSE | 33 + vendor/sebastian/object-reflector/README.md | 20 + .../sebastian/object-reflector/composer.json | 41 + .../object-reflector/src/Exception.php | 16 + .../src/InvalidArgumentException.php | 14 + .../object-reflector/src/ObjectReflector.php | 51 + .../sebastian/recursion-context/ChangeLog.md | 47 + vendor/sebastian/recursion-context/LICENSE | 33 + vendor/sebastian/recursion-context/README.md | 18 + .../sebastian/recursion-context/composer.json | 44 + .../recursion-context/src/Context.php | 191 + .../recursion-context/src/Exception.php | 16 + .../src/InvalidArgumentException.php | 14 + .../resource-operations/ChangeLog.md | 59 + vendor/sebastian/resource-operations/LICENSE | 33 + .../sebastian/resource-operations/README.md | 14 + .../sebastian/resource-operations/SECURITY.md | 30 + .../resource-operations/build/generate.php | 65 + .../resource-operations/composer.json | 38 + .../src/ResourceOperations.php | 2232 + vendor/sebastian/type/ChangeLog.md | 169 + vendor/sebastian/type/LICENSE | 33 + vendor/sebastian/type/README.md | 20 + vendor/sebastian/type/composer.json | 50 + vendor/sebastian/type/src/Parameter.php | 42 + .../sebastian/type/src/ReflectionMapper.php | 184 + vendor/sebastian/type/src/TypeName.php | 83 + .../type/src/exception/Exception.php | 16 + .../type/src/exception/RuntimeException.php | 14 + .../sebastian/type/src/type/CallableType.php | 212 + vendor/sebastian/type/src/type/FalseType.php | 42 + .../type/src/type/GenericObjectType.php | 54 + .../type/src/type/IntersectionType.php | 126 + .../sebastian/type/src/type/IterableType.php | 84 + vendor/sebastian/type/src/type/MixedType.php | 41 + vendor/sebastian/type/src/type/NeverType.php | 36 + vendor/sebastian/type/src/type/NullType.php | 41 + vendor/sebastian/type/src/type/ObjectType.php | 74 + vendor/sebastian/type/src/type/SimpleType.php | 104 + vendor/sebastian/type/src/type/StaticType.php | 68 + vendor/sebastian/type/src/type/TrueType.php | 42 + vendor/sebastian/type/src/type/Type.php | 226 + vendor/sebastian/type/src/type/UnionType.php | 138 + .../sebastian/type/src/type/UnknownType.php | 41 + vendor/sebastian/type/src/type/VoidType.php | 36 + vendor/sebastian/version/.gitattributes | 4 + vendor/sebastian/version/.gitignore | 2 + vendor/sebastian/version/ChangeLog.md | 25 + vendor/sebastian/version/LICENSE | 33 + vendor/sebastian/version/README.md | 43 + vendor/sebastian/version/composer.json | 37 + vendor/sebastian/version/src/Version.php | 97 + vendor/squizlabs/php_codesniffer/CHANGELOG.md | 8138 + .../php_codesniffer/CodeSniffer.conf | 5 + .../php_codesniffer/CodeSniffer.conf.dist | 9 + vendor/squizlabs/php_codesniffer/README.md | 153 + vendor/squizlabs/php_codesniffer/autoload.php | 346 + vendor/squizlabs/php_codesniffer/bin/phpcbf | 15 + .../squizlabs/php_codesniffer/bin/phpcbf.bat | 10 + vendor/squizlabs/php_codesniffer/bin/phpcs | 15 + .../squizlabs/php_codesniffer/bin/phpcs.bat | 10 + .../squizlabs/php_codesniffer/composer.json | 85 + vendor/squizlabs/php_codesniffer/licence.txt | 25 + vendor/squizlabs/php_codesniffer/phpcs.xsd | 136 + .../squizlabs/php_codesniffer/src/Config.php | 1760 + .../src/Exceptions/DeepExitException.php | 20 + .../src/Exceptions/RuntimeException.php | 17 + .../src/Exceptions/TokenizerException.php | 17 + .../php_codesniffer/src/Files/DummyFile.php | 82 + .../php_codesniffer/src/Files/File.php | 2996 + .../php_codesniffer/src/Files/FileList.php | 266 + .../php_codesniffer/src/Files/LocalFile.php | 219 + .../src/Filters/ExactMatch.php | 156 + .../php_codesniffer/src/Filters/Filter.php | 281 + .../src/Filters/GitModified.php | 124 + .../php_codesniffer/src/Filters/GitStaged.php | 126 + .../squizlabs/php_codesniffer/src/Fixer.php | 867 + .../src/Generators/Generator.php | 143 + .../php_codesniffer/src/Generators/HTML.php | 564 + .../src/Generators/Markdown.php | 350 + .../php_codesniffer/src/Generators/Text.php | 313 + .../php_codesniffer/src/Reporter.php | 445 + .../php_codesniffer/src/Reports/Cbf.php | 259 + .../src/Reports/Checkstyle.php | 111 + .../php_codesniffer/src/Reports/Code.php | 369 + .../php_codesniffer/src/Reports/Csv.php | 92 + .../php_codesniffer/src/Reports/Diff.php | 131 + .../php_codesniffer/src/Reports/Emacs.php | 91 + .../php_codesniffer/src/Reports/Full.php | 260 + .../php_codesniffer/src/Reports/Gitblame.php | 91 + .../php_codesniffer/src/Reports/Hgblame.php | 110 + .../php_codesniffer/src/Reports/Info.php | 173 + .../php_codesniffer/src/Reports/Json.php | 107 + .../php_codesniffer/src/Reports/Junit.php | 133 + .../src/Reports/Notifysend.php | 243 + .../src/Reports/Performance.php | 161 + .../php_codesniffer/src/Reports/Report.php | 87 + .../php_codesniffer/src/Reports/Source.php | 337 + .../php_codesniffer/src/Reports/Summary.php | 184 + .../php_codesniffer/src/Reports/Svnblame.php | 73 + .../src/Reports/VersionControl.php | 377 + .../php_codesniffer/src/Reports/Xml.php | 128 + .../squizlabs/php_codesniffer/src/Ruleset.php | 1747 + .../squizlabs/php_codesniffer/src/Runner.php | 986 + .../src/Sniffs/AbstractArraySniff.php | 172 + .../src/Sniffs/AbstractPatternSniff.php | 941 + .../src/Sniffs/AbstractScopeSniff.php | 189 + .../src/Sniffs/AbstractVariableSniff.php | 230 + .../src/Sniffs/DeprecatedSniff.php | 63 + .../php_codesniffer/src/Sniffs/Sniff.php | 80 + .../Docs/Arrays/ArrayIndentStandard.xml | 107 + .../DisallowLongArraySyntaxStandard.xml | 23 + .../DisallowShortArraySyntaxStandard.xml | 23 + .../Classes/DuplicateClassNameStandard.xml | 27 + .../Classes/OpeningBraceSameLineStandard.xml | 36 + .../AssignmentInConditionStandard.xml | 23 + .../EmptyPHPStatementStandard.xml | 44 + .../CodeAnalysis/EmptyStatementStandard.xml | 23 + .../ForLoopShouldBeWhileLoopStandard.xml | 23 + .../ForLoopWithTestFunctionCallStandard.xml | 24 + .../JumbledIncrementerStandard.xml | 25 + ...licitBooleanOperatorPrecedenceStandard.xml | 44 + .../UnconditionalIfStatementStandard.xml | 39 + .../UnnecessaryFinalModifierStandard.xml | 29 + .../UnusedFunctionParameterStandard.xml | 25 + .../UselessOverridingMethodStandard.xml | 32 + .../Docs/Commenting/DocCommentStandard.xml | 269 + .../Generic/Docs/Commenting/FixmeStandard.xml | 25 + .../Generic/Docs/Commenting/TodoStandard.xml | 25 + .../DisallowYodaConditionsStandard.xml | 23 + .../InlineControlStructureStandard.xml | 22 + .../Generic/Docs/Debug/CSSLintStandard.xml | 19 + .../Docs/Debug/ClosureLinterStandard.xml | 19 + .../Generic/Docs/Debug/JSHintStandard.xml | 19 + .../Docs/Files/ByteOrderMarkStandard.xml | 7 + .../Docs/Files/EndFileNewlineStandard.xml | 7 + .../Docs/Files/EndFileNoNewlineStandard.xml | 7 + .../Docs/Files/ExecutableFileStandard.xml | 7 + .../Generic/Docs/Files/InlineHTMLStandard.xml | 24 + .../Docs/Files/LineEndingsStandard.xml | 7 + .../Generic/Docs/Files/LineLengthStandard.xml | 7 + .../Docs/Files/LowercasedFilenameStandard.xml | 7 + .../Docs/Files/OneClassPerFileStandard.xml | 29 + .../Files/OneInterfacePerFileStandard.xml | 29 + .../OneObjectStructurePerFileStandard.xml | 29 + .../Docs/Files/OneTraitPerFileStandard.xml | 29 + .../DisallowMultipleStatementsStandard.xml | 20 + .../MultipleStatementAlignmentStandard.xml | 56 + .../Formatting/NoSpaceAfterCastStandard.xml | 19 + .../Formatting/SpaceAfterCastStandard.xml | 19 + .../Docs/Formatting/SpaceAfterNotStandard.xml | 22 + .../Formatting/SpaceBeforeCastStandard.xml | 21 + .../CallTimePassByReferenceStandard.xml | 31 + .../FunctionCallArgumentSpacingStandard.xml | 19 + .../OpeningFunctionBraceBsdAllmanStandard.xml | 26 + ...gFunctionBraceKernighanRitchieStandard.xml | 26 + .../Metrics/CyclomaticComplexityStandard.xml | 7 + .../Docs/Metrics/NestingLevelStandard.xml | 7 + .../AbstractClassNamePrefixStandard.xml | 23 + .../CamelCapsFunctionNameStandard.xml | 23 + .../ConstructorNameStandard.xml | 29 + .../InterfaceNameSuffixStandard.xml | 23 + .../TraitNameSuffixStandard.xml | 23 + .../UpperCaseConstantNameStandard.xml | 29 + .../Docs/PHP/BacktickOperatorStandard.xml | 7 + .../CharacterBeforePHPOpeningTagStandard.xml | 22 + .../Docs/PHP/ClosingPHPTagStandard.xml | 22 + .../Docs/PHP/DeprecatedFunctionsStandard.xml | 19 + .../DisallowAlternativePHPTagsStandard.xml | 7 + .../DisallowRequestSuperglobalStandard.xml | 7 + .../Docs/PHP/DisallowShortOpenTagStandard.xml | 7 + .../Docs/PHP/DiscourageGotoStandard.xml | 7 + .../Docs/PHP/ForbiddenFunctionsStandard.xml | 19 + .../Docs/PHP/LowerCaseConstantStandard.xml | 23 + .../Docs/PHP/LowerCaseKeywordStandard.xml | 19 + .../Docs/PHP/LowerCaseTypeStandard.xml | 38 + .../Docs/PHP/NoSilencedErrorsStandard.xml | 23 + .../Docs/PHP/RequireStrictTypesStandard.xml | 38 + .../Generic/Docs/PHP/SAPIUsageStandard.xml | 23 + .../Generic/Docs/PHP/SyntaxStandard.xml | 21 + .../Docs/PHP/UpperCaseConstantStandard.xml | 23 + .../Strings/UnnecessaryHeredocStandard.xml | 39 + .../UnnecessaryStringConcatStandard.xml | 19 + .../SubversionPropertiesStandard.xml | 7 + .../ArbitraryParenthesesSpacingStandard.xml | 23 + .../DisallowSpaceIndentStandard.xml | 7 + .../WhiteSpace/DisallowTabIndentStandard.xml | 7 + .../HereNowdocIdentifierSpacingStandard.xml | 23 + .../IncrementDecrementSpacingStandard.xml | 26 + .../LanguageConstructSpacingStandard.xml | 47 + .../Docs/WhiteSpace/ScopeIndentStandard.xml | 23 + .../SpreadOperatorSpacingAfterStandard.xml | 34 + .../Sniffs/Arrays/ArrayIndentSniff.php | 193 + .../Arrays/DisallowLongArraySyntaxSniff.php | 72 + .../Arrays/DisallowShortArraySyntaxSniff.php | 61 + .../Classes/DuplicateClassNameSniff.php | 126 + .../Classes/OpeningBraceSameLineSniff.php | 124 + .../AssignmentInConditionSniff.php | 171 + .../CodeAnalysis/EmptyPHPStatementSniff.php | 183 + .../CodeAnalysis/EmptyStatementSniff.php | 97 + .../ForLoopShouldBeWhileLoopSniff.php | 91 + .../ForLoopWithTestFunctionCallSniff.php | 101 + .../CodeAnalysis/JumbledIncrementerSniff.php | 134 + ...ExplicitBooleanOperatorPrecedenceSniff.php | 112 + .../UnconditionalIfStatementSniff.php | 93 + .../UnnecessaryFinalModifierSniff.php | 88 + .../UnusedFunctionParameterSniff.php | 307 + .../UselessOverridingMethodSniff.php | 184 + .../Sniffs/Commenting/DocCommentSniff.php | 357 + .../Generic/Sniffs/Commenting/FixmeSniff.php | 78 + .../Generic/Sniffs/Commenting/TodoSniff.php | 77 + .../DisallowYodaConditionsSniff.php | 185 + .../InlineControlStructureSniff.php | 365 + .../Generic/Sniffs/Debug/CSSLintSniff.php | 135 + .../Sniffs/Debug/ClosureLinterSniff.php | 156 + .../Generic/Sniffs/Debug/ESLintSniff.php | 152 + .../Generic/Sniffs/Debug/JSHintSniff.php | 134 + .../Sniffs/Files/ByteOrderMarkSniff.php | 82 + .../Sniffs/Files/EndFileNewlineSniff.php | 84 + .../Sniffs/Files/EndFileNoNewlineSniff.php | 91 + .../Sniffs/Files/ExecutableFileSniff.php | 62 + .../Generic/Sniffs/Files/InlineHTMLSniff.php | 79 + .../Generic/Sniffs/Files/LineEndingsSniff.php | 148 + .../Generic/Sniffs/Files/LineLengthSniff.php | 201 + .../Sniffs/Files/LowercasedFilenameSniff.php | 70 + .../Sniffs/Files/OneClassPerFileSniff.php | 57 + .../Sniffs/Files/OneInterfacePerFileSniff.php | 57 + .../Files/OneObjectStructurePerFileSniff.php | 62 + .../Sniffs/Files/OneTraitPerFileSniff.php | 57 + .../DisallowMultipleStatementsSniff.php | 105 + .../MultipleStatementAlignmentSniff.php | 426 + .../Formatting/NoSpaceAfterCastSniff.php | 98 + .../Sniffs/Formatting/SpaceAfterCastSniff.php | 161 + .../Sniffs/Formatting/SpaceAfterNotSniff.php | 143 + .../Formatting/SpaceBeforeCastSniff.php | 73 + .../CallTimePassByReferenceSniff.php | 180 + .../FunctionCallArgumentSpacingSniff.php | 197 + .../OpeningFunctionBraceBsdAllmanSniff.php | 225 + ...ningFunctionBraceKernighanRitchieSniff.php | 177 + .../Metrics/CyclomaticComplexitySniff.php | 117 + .../Sniffs/Metrics/NestingLevelSniff.php | 100 + .../AbstractClassNamePrefixSniff.php | 60 + .../CamelCapsFunctionNameSniff.php | 222 + .../ConstructorNameSniff.php | 189 + .../InterfaceNameSuffixSniff.php | 55 + .../TraitNameSuffixSniff.php | 55 + .../UpperCaseConstantNameSniff.php | 151 + .../Sniffs/PHP/BacktickOperatorSniff.php | 48 + .../PHP/CharacterBeforePHPOpeningTagSniff.php | 86 + .../Generic/Sniffs/PHP/ClosingPHPTagSniff.php | 54 + .../Sniffs/PHP/DeprecatedFunctionsSniff.php | 75 + .../PHP/DisallowAlternativePHPTagsSniff.php | 253 + .../PHP/DisallowRequestSuperglobalSniff.php | 55 + .../Sniffs/PHP/DisallowShortOpenTagSniff.php | 170 + .../Sniffs/PHP/DiscourageGotoSniff.php | 50 + .../Sniffs/PHP/ForbiddenFunctionsSniff.php | 246 + .../Sniffs/PHP/LowerCaseConstantSniff.php | 250 + .../Sniffs/PHP/LowerCaseKeywordSniff.php | 85 + .../Generic/Sniffs/PHP/LowerCaseTypeSniff.php | 364 + .../Sniffs/PHP/NoSilencedErrorsSniff.php | 77 + .../Sniffs/PHP/RequireStrictTypesSniff.php | 108 + .../Generic/Sniffs/PHP/SAPIUsageSniff.php | 67 + .../Generic/Sniffs/PHP/SyntaxSniff.php | 104 + .../Sniffs/PHP/UpperCaseConstantSniff.php | 57 + .../Strings/UnnecessaryHeredocSniff.php | 145 + .../Strings/UnnecessaryStringConcatSniff.php | 129 + .../VersionControl/GitMergeConflictSniff.php | 228 + .../SubversionPropertiesSniff.php | 186 + .../ArbitraryParenthesesSpacingSniff.php | 239 + .../WhiteSpace/DisallowSpaceIndentSniff.php | 232 + .../WhiteSpace/DisallowTabIndentSniff.php | 201 + .../HereNowdocIdentifierSpacingSniff.php | 69 + .../IncrementDecrementSpacingSniff.php | 174 + .../LanguageConstructSpacingSniff.php | 163 + .../Sniffs/WhiteSpace/ScopeIndentSniff.php | 1587 + .../SpreadOperatorSpacingAfterSniff.php | 159 + .../Tests/Arrays/ArrayIndentUnitTest.inc | 154 + .../Arrays/ArrayIndentUnitTest.inc.fixed | 155 + .../Tests/Arrays/ArrayIndentUnitTest.php | 81 + .../DisallowLongArraySyntaxUnitTest.1.inc | 33 + ...isallowLongArraySyntaxUnitTest.1.inc.fixed | 33 + .../DisallowLongArraySyntaxUnitTest.2.inc | 17 + ...isallowLongArraySyntaxUnitTest.2.inc.fixed | 17 + .../DisallowLongArraySyntaxUnitTest.3.inc | 7 + .../DisallowLongArraySyntaxUnitTest.php | 75 + .../DisallowShortArraySyntaxUnitTest.inc | 12 + ...DisallowShortArraySyntaxUnitTest.inc.fixed | 12 + .../DisallowShortArraySyntaxUnitTest.php | 58 + .../Classes/DuplicateClassNameUnitTest.1.inc | 14 + .../Classes/DuplicateClassNameUnitTest.10.inc | 6 + .../Classes/DuplicateClassNameUnitTest.11.inc | 13 + .../Classes/DuplicateClassNameUnitTest.2.inc | 6 + .../Classes/DuplicateClassNameUnitTest.3.inc | 10 + .../Classes/DuplicateClassNameUnitTest.4.inc | 5 + .../Classes/DuplicateClassNameUnitTest.5.inc | 8 + .../Classes/DuplicateClassNameUnitTest.6.inc | 12 + .../Classes/DuplicateClassNameUnitTest.7.inc | 13 + .../Classes/DuplicateClassNameUnitTest.8.inc | 8 + .../Classes/DuplicateClassNameUnitTest.9.inc | 5 + .../Classes/DuplicateClassNameUnitTest.97.inc | 8 + .../Classes/DuplicateClassNameUnitTest.98.inc | 8 + .../Classes/DuplicateClassNameUnitTest.99.inc | 7 + .../Classes/DuplicateClassNameUnitTest.php | 98 + .../Classes/OpeningBraceSameLineUnitTest.inc | 100 + .../OpeningBraceSameLineUnitTest.inc.fixed | 100 + .../Classes/OpeningBraceSameLineUnitTest.php | 68 + .../AssignmentInConditionUnitTest.1.inc | 95 + .../AssignmentInConditionUnitTest.2.inc | 4 + .../AssignmentInConditionUnitTest.3.inc | 4 + .../AssignmentInConditionUnitTest.4.inc | 6 + .../AssignmentInConditionUnitTest.5.inc | 6 + .../AssignmentInConditionUnitTest.6.inc | 5 + .../AssignmentInConditionUnitTest.php | 96 + .../EmptyPHPStatementUnitTest.1.inc | 86 + .../EmptyPHPStatementUnitTest.1.inc.fixed | 80 + .../EmptyPHPStatementUnitTest.2.inc | 27 + .../EmptyPHPStatementUnitTest.2.inc.fixed | 23 + .../EmptyPHPStatementUnitTest.php | 110 + .../CodeAnalysis/EmptyStatementUnitTest.inc | 74 + .../CodeAnalysis/EmptyStatementUnitTest.php | 68 + .../ForLoopShouldBeWhileLoopUnitTest.1.inc | 37 + .../ForLoopShouldBeWhileLoopUnitTest.2.inc | 4 + .../ForLoopShouldBeWhileLoopUnitTest.3.inc | 6 + .../ForLoopShouldBeWhileLoopUnitTest.php | 64 + .../ForLoopWithTestFunctionCallUnitTest.1.inc | 95 + .../ForLoopWithTestFunctionCallUnitTest.2.inc | 5 + .../ForLoopWithTestFunctionCallUnitTest.3.inc | 6 + .../ForLoopWithTestFunctionCallUnitTest.php | 75 + .../JumbledIncrementerUnitTest.1.inc | 89 + .../JumbledIncrementerUnitTest.2.inc | 8 + .../JumbledIncrementerUnitTest.3.inc | 6 + .../JumbledIncrementerUnitTest.4.inc | 8 + .../JumbledIncrementerUnitTest.php | 72 + ...licitBooleanOperatorPrecedenceUnitTest.inc | 131 + ...licitBooleanOperatorPrecedenceUnitTest.php | 91 + .../UnconditionalIfStatementUnitTest.1.inc | 18 + .../UnconditionalIfStatementUnitTest.2.inc | 4 + .../UnconditionalIfStatementUnitTest.php | 67 + .../UnnecessaryFinalModifierUnitTest.1.inc | 78 + .../UnnecessaryFinalModifierUnitTest.2.inc | 5 + .../UnnecessaryFinalModifierUnitTest.php | 71 + .../UnusedFunctionParameterUnitTest.1.inc | 274 + .../UnusedFunctionParameterUnitTest.2.inc | 5 + .../UnusedFunctionParameterUnitTest.3.inc | 5 + .../UnusedFunctionParameterUnitTest.php | 78 + .../UselessOverridingMethodUnitTest.1.inc | 173 + .../UselessOverridingMethodUnitTest.2.inc | 7 + .../UselessOverridingMethodUnitTest.3.inc | 10 + .../UselessOverridingMethodUnitTest.4.inc | 10 + .../UselessOverridingMethodUnitTest.5.inc | 10 + .../UselessOverridingMethodUnitTest.6.inc | 10 + .../UselessOverridingMethodUnitTest.php | 72 + .../Tests/Commenting/DocCommentUnitTest.1.inc | 270 + .../Commenting/DocCommentUnitTest.1.inc.fixed | 275 + .../Tests/Commenting/DocCommentUnitTest.1.js | 270 + .../Commenting/DocCommentUnitTest.1.js.fixed | 275 + .../Tests/Commenting/DocCommentUnitTest.2.inc | 6 + .../Tests/Commenting/DocCommentUnitTest.2.js | 4 + .../Tests/Commenting/DocCommentUnitTest.php | 127 + .../Tests/Commenting/FixmeUnitTest.inc | 23 + .../Generic/Tests/Commenting/FixmeUnitTest.js | 23 + .../Tests/Commenting/FixmeUnitTest.php | 63 + .../Generic/Tests/Commenting/TodoUnitTest.inc | 23 + .../Generic/Tests/Commenting/TodoUnitTest.js | 23 + .../Generic/Tests/Commenting/TodoUnitTest.php | 62 + .../DisallowYodaConditionsUnitTest.inc | 198 + .../DisallowYodaConditionsUnitTest.php | 99 + .../InlineControlStructureUnitTest.1.inc | 278 + ...InlineControlStructureUnitTest.1.inc.fixed | 316 + .../InlineControlStructureUnitTest.1.js | 35 + .../InlineControlStructureUnitTest.1.js.fixed | 44 + .../InlineControlStructureUnitTest.2.inc | 8 + .../InlineControlStructureUnitTest.2.js | 5 + .../InlineControlStructureUnitTest.3.inc | 4 + .../InlineControlStructureUnitTest.3.js | 5 + .../InlineControlStructureUnitTest.4.inc | 5 + .../InlineControlStructureUnitTest.5.inc | 4 + .../InlineControlStructureUnitTest.6.inc | 6 + .../InlineControlStructureUnitTest.7.inc | 16 + .../InlineControlStructureUnitTest.php | 121 + .../Generic/Tests/Debug/CSSLintUnitTest.css | 6 + .../Generic/Tests/Debug/CSSLintUnitTest.php | 77 + .../Tests/Debug/ClosureLinterUnitTest.js | 6 + .../Tests/Debug/ClosureLinterUnitTest.php | 74 + .../Generic/Tests/Debug/ESLintUnitTest.js | 1 + .../Generic/Tests/Debug/ESLintUnitTest.php | 122 + .../Generic/Tests/Debug/JSHintUnitTest.js | 3 + .../Generic/Tests/Debug/JSHintUnitTest.php | 71 + .../Tests/Files/ByteOrderMarkUnitTest.1.inc | 4 + .../Tests/Files/ByteOrderMarkUnitTest.2.inc | 3 + .../Tests/Files/ByteOrderMarkUnitTest.3.inc | 1 + .../Tests/Files/ByteOrderMarkUnitTest.4.inc | Bin 0 -> 208 bytes .../Tests/Files/ByteOrderMarkUnitTest.5.inc | Bin 0 -> 202 bytes .../Tests/Files/ByteOrderMarkUnitTest.php | 63 + .../Tests/Files/EndFileNewlineUnitTest.1.css | 3 + .../Tests/Files/EndFileNewlineUnitTest.1.inc | 3 + .../Tests/Files/EndFileNewlineUnitTest.1.js | 3 + .../Tests/Files/EndFileNewlineUnitTest.2.css | 2 + .../Tests/Files/EndFileNewlineUnitTest.2.inc | 2 + .../Tests/Files/EndFileNewlineUnitTest.2.js | 2 + .../Tests/Files/EndFileNewlineUnitTest.3.css | 2 + .../Files/EndFileNewlineUnitTest.3.css.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.3.inc | 2 + .../Files/EndFileNewlineUnitTest.3.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.3.js | 2 + .../Files/EndFileNewlineUnitTest.3.js.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.4.inc | 2 + .../Files/EndFileNewlineUnitTest.4.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.5.inc | 2 + .../Tests/Files/EndFileNewlineUnitTest.6.inc | 1 + .../Files/EndFileNewlineUnitTest.6.inc.fixed | 1 + .../Tests/Files/EndFileNewlineUnitTest.7.inc | 1 + .../Files/EndFileNewlineUnitTest.7.inc.fixed | 1 + .../Tests/Files/EndFileNewlineUnitTest.8.inc | 1 + .../Tests/Files/EndFileNewlineUnitTest.php | 68 + .../Files/EndFileNoNewlineUnitTest.1.css | 3 + .../EndFileNoNewlineUnitTest.1.css.fixed | 2 + .../Files/EndFileNoNewlineUnitTest.1.inc | 3 + .../EndFileNoNewlineUnitTest.1.inc.fixed | 2 + .../Tests/Files/EndFileNoNewlineUnitTest.1.js | 3 + .../Files/EndFileNoNewlineUnitTest.1.js.fixed | 2 + .../Files/EndFileNoNewlineUnitTest.10.inc | 1 + .../Files/EndFileNoNewlineUnitTest.2.css | 2 + .../EndFileNoNewlineUnitTest.2.css.fixed | 2 + .../Files/EndFileNoNewlineUnitTest.2.inc | 3 + .../EndFileNoNewlineUnitTest.2.inc.fixed | 3 + .../Tests/Files/EndFileNoNewlineUnitTest.2.js | 2 + .../Files/EndFileNoNewlineUnitTest.2.js.fixed | 2 + .../Files/EndFileNoNewlineUnitTest.3.css | 2 + .../Files/EndFileNoNewlineUnitTest.3.inc | 2 + .../Tests/Files/EndFileNoNewlineUnitTest.3.js | 2 + .../Files/EndFileNoNewlineUnitTest.4.inc | 3 + .../Files/EndFileNoNewlineUnitTest.5.inc | 2 + .../Files/EndFileNoNewlineUnitTest.6.inc | 2 + .../EndFileNoNewlineUnitTest.6.inc.fixed | 2 + .../Files/EndFileNoNewlineUnitTest.7.inc | 6 + .../Files/EndFileNoNewlineUnitTest.8.inc | 1 + .../EndFileNoNewlineUnitTest.8.inc.fixed | 1 + .../Files/EndFileNoNewlineUnitTest.9.inc | 1 + .../EndFileNoNewlineUnitTest.9.inc.fixed | 1 + .../Tests/Files/EndFileNoNewlineUnitTest.php | 72 + .../Tests/Files/ExecutableFileUnitTest.1.inc | 1 + .../Tests/Files/ExecutableFileUnitTest.2.inc | 1 + .../Tests/Files/ExecutableFileUnitTest.3.inc | 1 + .../Tests/Files/ExecutableFileUnitTest.4.inc | 1 + .../Tests/Files/ExecutableFileUnitTest.php | 76 + .../Tests/Files/InlineHTMLUnitTest.1.inc | 3 + .../Tests/Files/InlineHTMLUnitTest.2.inc | 3 + .../Tests/Files/InlineHTMLUnitTest.3.inc | 6 + .../Tests/Files/InlineHTMLUnitTest.4.inc | 3 + .../Tests/Files/InlineHTMLUnitTest.5.inc | 3 + .../Tests/Files/InlineHTMLUnitTest.6.inc | 2 + .../Tests/Files/InlineHTMLUnitTest.7.inc | 2 + .../Tests/Files/InlineHTMLUnitTest.php | 69 + .../Tests/Files/LineEndingsUnitTest.1.inc | 18 + .../Files/LineEndingsUnitTest.1.inc.fixed | 18 + .../Tests/Files/LineEndingsUnitTest.2.inc | 5 + .../Files/LineEndingsUnitTest.2.inc.fixed | 5 + .../Tests/Files/LineEndingsUnitTest.css | 3 + .../Tests/Files/LineEndingsUnitTest.css.fixed | 3 + .../Tests/Files/LineEndingsUnitTest.js | 2 + .../Tests/Files/LineEndingsUnitTest.js.fixed | 2 + .../Tests/Files/LineEndingsUnitTest.php | 68 + .../Tests/Files/LineLengthUnitTest.1.inc | 84 + .../Tests/Files/LineLengthUnitTest.2.inc | 7 + .../Tests/Files/LineLengthUnitTest.3.inc | 16 + .../Tests/Files/LineLengthUnitTest.4.inc | 16 + .../Tests/Files/LineLengthUnitTest.php | 114 + .../Files/LowercasedFilenameUnitTest.1.inc | 7 + .../Files/LowercasedFilenameUnitTest.2.inc | 7 + .../Files/LowercasedFilenameUnitTest.php | 106 + .../Tests/Files/OneClassPerFileUnitTest.inc | 13 + .../Tests/Files/OneClassPerFileUnitTest.php | 56 + .../Files/OneInterfacePerFileUnitTest.inc | 13 + .../Files/OneInterfacePerFileUnitTest.php | 56 + .../OneObjectStructurePerFileUnitTest.inc | 26 + .../OneObjectStructurePerFileUnitTest.php | 59 + .../Tests/Files/OneTraitPerFileUnitTest.inc | 17 + .../Tests/Files/OneTraitPerFileUnitTest.php | 56 + .../Files/lowercased_filename_unit_test.inc | 1 + .../DisallowMultipleStatementsUnitTest.inc | 20 + ...sallowMultipleStatementsUnitTest.inc.fixed | 25 + .../DisallowMultipleStatementsUnitTest.php | 59 + .../MultipleStatementAlignmentUnitTest.inc | 504 + ...ltipleStatementAlignmentUnitTest.inc.fixed | 504 + .../MultipleStatementAlignmentUnitTest.js | 118 + ...ultipleStatementAlignmentUnitTest.js.fixed | 118 + .../MultipleStatementAlignmentUnitTest.php | 170 + .../Formatting/NoSpaceAfterCastUnitTest.inc | 51 + .../NoSpaceAfterCastUnitTest.inc.fixed | 51 + .../Formatting/NoSpaceAfterCastUnitTest.php | 77 + .../Formatting/SpaceAfterCastUnitTest.1.inc | 100 + .../SpaceAfterCastUnitTest.1.inc.fixed | 97 + .../Formatting/SpaceAfterCastUnitTest.2.inc | 3 + .../Formatting/SpaceAfterCastUnitTest.php | 103 + .../Formatting/SpaceAfterNotUnitTest.1.inc | 86 + .../SpaceAfterNotUnitTest.1.inc.fixed | 83 + .../Formatting/SpaceAfterNotUnitTest.2.inc | 7 + .../Tests/Formatting/SpaceAfterNotUnitTest.js | 5 + .../Formatting/SpaceAfterNotUnitTest.js.fixed | 5 + .../Formatting/SpaceAfterNotUnitTest.php | 96 + .../Formatting/SpaceBeforeCastUnitTest.inc | 65 + .../SpaceBeforeCastUnitTest.inc.fixed | 65 + .../Formatting/SpaceBeforeCastUnitTest.php | 83 + .../CallTimePassByReferenceUnitTest.1.inc | 66 + .../CallTimePassByReferenceUnitTest.2.inc | 7 + .../CallTimePassByReferenceUnitTest.3.inc | 7 + .../CallTimePassByReferenceUnitTest.php | 75 + .../FunctionCallArgumentSpacingUnitTest.1.inc | 199 + ...ionCallArgumentSpacingUnitTest.1.inc.fixed | 199 + .../FunctionCallArgumentSpacingUnitTest.2.inc | 7 + .../FunctionCallArgumentSpacingUnitTest.php | 96 + .../OpeningFunctionBraceBsdAllmanUnitTest.inc | 270 + ...ngFunctionBraceBsdAllmanUnitTest.inc.fixed | 287 + .../OpeningFunctionBraceBsdAllmanUnitTest.php | 91 + ...unctionBraceKernighanRitchieUnitTest.1.inc | 232 + ...nBraceKernighanRitchieUnitTest.1.inc.fixed | 222 + ...unctionBraceKernighanRitchieUnitTest.2.inc | 19 + ...nBraceKernighanRitchieUnitTest.2.inc.fixed | 19 + ...unctionBraceKernighanRitchieUnitTest.3.inc | 7 + ...gFunctionBraceKernighanRitchieUnitTest.php | 116 + .../CyclomaticComplexityUnitTest.1.inc | 460 + .../CyclomaticComplexityUnitTest.2.inc | 7 + .../CyclomaticComplexityUnitTest.3.inc | 7 + .../Metrics/CyclomaticComplexityUnitTest.php | 77 + .../Tests/Metrics/NestingLevelUnitTest.1.inc | 108 + .../Tests/Metrics/NestingLevelUnitTest.2.inc | 7 + .../Tests/Metrics/NestingLevelUnitTest.3.inc | 7 + .../Tests/Metrics/NestingLevelUnitTest.php | 70 + .../AbstractClassNamePrefixUnitTest.1.inc | 45 + .../AbstractClassNamePrefixUnitTest.2.inc | 7 + .../AbstractClassNamePrefixUnitTest.php | 67 + .../CamelCapsFunctionNameUnitTest.1.inc | 204 + .../CamelCapsFunctionNameUnitTest.2.inc | 9 + .../CamelCapsFunctionNameUnitTest.3.inc | 7 + .../CamelCapsFunctionNameUnitTest.php | 105 + .../ConstructorNameUnitTest.1.inc | 130 + .../ConstructorNameUnitTest.2.inc | 9 + .../ConstructorNameUnitTest.php | 73 + .../InterfaceNameSuffixUnitTest.1.inc | 13 + .../InterfaceNameSuffixUnitTest.2.inc | 7 + .../InterfaceNameSuffixUnitTest.php | 62 + .../TraitNameSuffixUnitTest.1.inc | 11 + .../TraitNameSuffixUnitTest.2.inc | 7 + .../TraitNameSuffixUnitTest.php | 63 + .../UpperCaseConstantNameUnitTest.1.inc | 91 + .../UpperCaseConstantNameUnitTest.2.inc | 7 + .../UpperCaseConstantNameUnitTest.3.inc | 7 + .../UpperCaseConstantNameUnitTest.4.inc | 7 + .../UpperCaseConstantNameUnitTest.5.inc | 9 + .../UpperCaseConstantNameUnitTest.php | 74 + .../Tests/PHP/BacktickOperatorUnitTest.inc | 2 + .../Tests/PHP/BacktickOperatorUnitTest.php | 55 + ...CharacterBeforePHPOpeningTagUnitTest.1.inc | 9 + ...CharacterBeforePHPOpeningTagUnitTest.2.inc | 4 + ...CharacterBeforePHPOpeningTagUnitTest.3.inc | 3 + .../CharacterBeforePHPOpeningTagUnitTest.php | 61 + .../Tests/PHP/ClosingPHPTagUnitTest.1.inc | 10 + .../Tests/PHP/ClosingPHPTagUnitTest.2.inc | 5 + .../Tests/PHP/ClosingPHPTagUnitTest.php | 64 + .../Tests/PHP/DeprecatedFunctionsUnitTest.inc | 5 + .../Tests/PHP/DeprecatedFunctionsUnitTest.php | 67 + .../DisallowAlternativePHPTagsUnitTest.1.inc | 14 + ...llowAlternativePHPTagsUnitTest.1.inc.fixed | 14 + .../DisallowAlternativePHPTagsUnitTest.2.inc | 6 + ...llowAlternativePHPTagsUnitTest.2.inc.fixed | 6 + .../DisallowAlternativePHPTagsUnitTest.3.inc | 7 + .../DisallowAlternativePHPTagsUnitTest.php | 110 + .../DisallowRequestSuperglobalUnitTest.inc | 16 + .../DisallowRequestSuperglobalUnitTest.php | 56 + .../PHP/DisallowShortOpenTagUnitTest.1.inc | 11 + .../DisallowShortOpenTagUnitTest.1.inc.fixed | 11 + .../PHP/DisallowShortOpenTagUnitTest.2.inc | 8 + .../DisallowShortOpenTagUnitTest.2.inc.fixed | 8 + .../PHP/DisallowShortOpenTagUnitTest.3.inc | 20 + .../PHP/DisallowShortOpenTagUnitTest.4.inc | 6 + .../PHP/DisallowShortOpenTagUnitTest.5.inc | 4 + .../PHP/DisallowShortOpenTagUnitTest.php | 110 + .../Tests/PHP/DiscourageGotoUnitTest.inc | 18 + .../Tests/PHP/DiscourageGotoUnitTest.php | 58 + .../Tests/PHP/ForbiddenFunctionsUnitTest.inc | 62 + .../Tests/PHP/ForbiddenFunctionsUnitTest.php | 60 + .../Tests/PHP/LowerCaseConstantUnitTest.1.inc | 183 + .../PHP/LowerCaseConstantUnitTest.1.inc.fixed | 183 + .../Tests/PHP/LowerCaseConstantUnitTest.2.inc | 4 + .../Tests/PHP/LowerCaseConstantUnitTest.js | 14 + .../PHP/LowerCaseConstantUnitTest.js.fixed | 14 + .../Tests/PHP/LowerCaseConstantUnitTest.php | 112 + .../Tests/PHP/LowerCaseKeywordUnitTest.inc | 76 + .../PHP/LowerCaseKeywordUnitTest.inc.fixed | 76 + .../Tests/PHP/LowerCaseKeywordUnitTest.php | 83 + .../Tests/PHP/LowerCaseTypeUnitTest.inc | 145 + .../Tests/PHP/LowerCaseTypeUnitTest.inc.fixed | 145 + .../Tests/PHP/LowerCaseTypeUnitTest.php | 117 + .../Tests/PHP/NoSilencedErrorsUnitTest.inc | 16 + .../Tests/PHP/NoSilencedErrorsUnitTest.php | 57 + .../PHP/RequireStrictTypesUnitTest.1.inc | 8 + .../PHP/RequireStrictTypesUnitTest.10.inc | 5 + .../PHP/RequireStrictTypesUnitTest.11.inc | 5 + .../RequireStrictTypesUnitTest.11.inc.fixed | 5 + .../PHP/RequireStrictTypesUnitTest.12.inc | 5 + .../RequireStrictTypesUnitTest.12.inc.fixed | 5 + .../PHP/RequireStrictTypesUnitTest.13.inc | 3 + .../PHP/RequireStrictTypesUnitTest.14.inc | 5 + .../RequireStrictTypesUnitTest.14.inc.fixed | 5 + .../PHP/RequireStrictTypesUnitTest.15.inc | 5 + .../RequireStrictTypesUnitTest.15.inc.fixed | 5 + .../PHP/RequireStrictTypesUnitTest.2.inc | 2 + .../PHP/RequireStrictTypesUnitTest.3.inc | 5 + .../PHP/RequireStrictTypesUnitTest.4.inc | 10 + .../PHP/RequireStrictTypesUnitTest.5.inc | 6 + .../PHP/RequireStrictTypesUnitTest.6.inc | 4 + .../PHP/RequireStrictTypesUnitTest.7.inc | 4 + .../PHP/RequireStrictTypesUnitTest.8.inc | 5 + .../PHP/RequireStrictTypesUnitTest.9.inc | 5 + .../Tests/PHP/RequireStrictTypesUnitTest.php | 72 + .../Generic/Tests/PHP/SAPIUsageUnitTest.inc | 5 + .../Generic/Tests/PHP/SAPIUsageUnitTest.php | 53 + .../Generic/Tests/PHP/SyntaxUnitTest.1.inc | 4 + .../Generic/Tests/PHP/SyntaxUnitTest.2.inc | 3 + .../Generic/Tests/PHP/SyntaxUnitTest.php | 170 + .../Tests/PHP/UpperCaseConstantUnitTest.inc | 124 + .../PHP/UpperCaseConstantUnitTest.inc.fixed | 124 + .../Tests/PHP/UpperCaseConstantUnitTest.php | 81 + .../Strings/UnnecessaryHeredocUnitTest.1.inc | 122 + .../UnnecessaryHeredocUnitTest.1.inc.fixed | 122 + .../Strings/UnnecessaryHeredocUnitTest.2.inc | 122 + .../UnnecessaryHeredocUnitTest.2.inc.fixed | 122 + .../Strings/UnnecessaryHeredocUnitTest.3.inc | 6 + .../Strings/UnnecessaryHeredocUnitTest.php | 74 + .../UnnecessaryStringConcatUnitTest.1.inc | 34 + .../UnnecessaryStringConcatUnitTest.2.inc | 7 + .../UnnecessaryStringConcatUnitTest.js | 15 + .../UnnecessaryStringConcatUnitTest.php | 87 + .../GitMergeConflictUnitTest.1.css | 35 + .../GitMergeConflictUnitTest.1.inc | 61 + .../GitMergeConflictUnitTest.2.css | 32 + .../GitMergeConflictUnitTest.2.inc | 31 + .../GitMergeConflictUnitTest.3.inc | 43 + .../GitMergeConflictUnitTest.4.inc | 71 + .../GitMergeConflictUnitTest.5.inc | 34 + .../GitMergeConflictUnitTest.6.inc | 34 + .../GitMergeConflictUnitTest.7.inc | 19 + .../GitMergeConflictUnitTest.js | 33 + .../GitMergeConflictUnitTest.php | 175 + .../SubversionPropertiesUnitTest.inc | 3 + .../SubversionPropertiesUnitTest.php | 66 + .../ArbitraryParenthesesSpacingUnitTest.1.inc | 192 + ...raryParenthesesSpacingUnitTest.1.inc.fixed | 180 + .../ArbitraryParenthesesSpacingUnitTest.2.inc | 4 + .../ArbitraryParenthesesSpacingUnitTest.php | 106 + .../DisallowSpaceIndentUnitTest.1.inc | 125 + .../DisallowSpaceIndentUnitTest.1.inc.fixed | 125 + .../DisallowSpaceIndentUnitTest.2.inc | 125 + .../DisallowSpaceIndentUnitTest.2.inc.fixed | 125 + .../DisallowSpaceIndentUnitTest.3.inc | 19 + .../DisallowSpaceIndentUnitTest.3.inc.fixed | 19 + .../DisallowSpaceIndentUnitTest.4.inc | 13 + .../DisallowSpaceIndentUnitTest.css | 4 + .../DisallowSpaceIndentUnitTest.css.fixed | 4 + .../WhiteSpace/DisallowSpaceIndentUnitTest.js | 9 + .../DisallowSpaceIndentUnitTest.js.fixed | 9 + .../DisallowSpaceIndentUnitTest.php | 145 + .../DisallowTabIndentUnitTest.1.inc | 102 + .../DisallowTabIndentUnitTest.1.inc.fixed | 102 + .../DisallowTabIndentUnitTest.2.inc | 19 + .../DisallowTabIndentUnitTest.2.inc.fixed | 19 + .../DisallowTabIndentUnitTest.3.inc | 13 + .../WhiteSpace/DisallowTabIndentUnitTest.css | 5 + .../DisallowTabIndentUnitTest.css.fixed | 5 + .../WhiteSpace/DisallowTabIndentUnitTest.js | 9 + .../DisallowTabIndentUnitTest.js.fixed | 9 + .../WhiteSpace/DisallowTabIndentUnitTest.php | 153 + .../HereNowdocIdentifierSpacingUnitTest.inc | 25 + ...eNowdocIdentifierSpacingUnitTest.inc.fixed | 25 + .../HereNowdocIdentifierSpacingUnitTest.php | 58 + .../IncrementDecrementSpacingUnitTest.inc | 43 + ...ncrementDecrementSpacingUnitTest.inc.fixed | 41 + .../IncrementDecrementSpacingUnitTest.js | 17 + ...IncrementDecrementSpacingUnitTest.js.fixed | 16 + .../IncrementDecrementSpacingUnitTest.php | 86 + .../LanguageConstructSpacingUnitTest.1.inc | 107 + ...nguageConstructSpacingUnitTest.1.inc.fixed | 101 + .../LanguageConstructSpacingUnitTest.2.inc | 4 + .../LanguageConstructSpacingUnitTest.php | 102 + .../WhiteSpace/ScopeIndentUnitTest.1.inc | 1659 + .../ScopeIndentUnitTest.1.inc.fixed | 1659 + .../Tests/WhiteSpace/ScopeIndentUnitTest.1.js | 239 + .../WhiteSpace/ScopeIndentUnitTest.1.js.fixed | 239 + .../WhiteSpace/ScopeIndentUnitTest.2.inc | 1659 + .../ScopeIndentUnitTest.2.inc.fixed | 1659 + .../WhiteSpace/ScopeIndentUnitTest.3.inc | 34 + .../ScopeIndentUnitTest.3.inc.fixed | 34 + .../WhiteSpace/ScopeIndentUnitTest.4.inc | 6 + .../Tests/WhiteSpace/ScopeIndentUnitTest.php | 222 + .../SpreadOperatorSpacingAfterUnitTest.1.inc | 78 + ...adOperatorSpacingAfterUnitTest.1.inc.fixed | 73 + .../SpreadOperatorSpacingAfterUnitTest.2.inc | 4 + .../SpreadOperatorSpacingAfterUnitTest.php | 72 + .../src/Standards/Generic/ruleset.xml | 4 + .../Sniffs/CSS/BrowserSpecificStylesSniff.php | 126 + .../Channels/DisallowSelfActionsSniff.php | 164 + .../Sniffs/Channels/IncludeOwnSystemSniff.php | 137 + .../Sniffs/Channels/IncludeSystemSniff.php | 353 + .../Sniffs/Channels/UnusedSystemSniff.php | 180 + .../Commenting/FunctionCommentSniff.php | 123 + .../MySource/Sniffs/Debug/DebugCodeSniff.php | 94 + .../Sniffs/Debug/FirebugConsoleSniff.php | 103 + .../Sniffs/Objects/AssignThisSniff.php | 120 + .../Objects/CreateWidgetTypeCallbackSniff.php | 257 + .../Sniffs/Objects/DisallowNewWidgetSniff.php | 98 + .../Sniffs/PHP/AjaxNullComparisonSniff.php | 142 + .../Sniffs/PHP/EvalObjectFactorySniff.php | 153 + .../Sniffs/PHP/GetRequestDataSniff.php | 145 + .../Sniffs/PHP/ReturnFunctionValueSniff.php | 102 + .../Sniffs/Strings/JoinStringsSniff.php | 115 + .../CSS/BrowserSpecificStylesUnitTest.css | 13 + .../CSS/BrowserSpecificStylesUnitTest.php | 53 + .../Channels/DisallowSelfActionsUnitTest.inc | 51 + .../Channels/DisallowSelfActionsUnitTest.php | 58 + .../Tests/Channels/IncludeSystemUnitTest.inc | 112 + .../Tests/Channels/IncludeSystemUnitTest.php | 65 + .../Tests/Channels/UnusedSystemUnitTest.inc | 67 + .../Tests/Channels/UnusedSystemUnitTest.php | 60 + .../Commenting/FunctionCommentUnitTest.inc | 101 + .../Commenting/FunctionCommentUnitTest.php | 59 + .../Tests/Debug/DebugCodeUnitTest.inc | 4 + .../Tests/Debug/DebugCodeUnitTest.php | 56 + .../Tests/Debug/FirebugConsoleUnitTest.js | 8 + .../Tests/Debug/FirebugConsoleUnitTest.php | 66 + .../Tests/Objects/AssignThisUnitTest.js | 20 + .../Tests/Objects/AssignThisUnitTest.php | 63 + .../CreateWidgetTypeCallbackUnitTest.js | 186 + .../CreateWidgetTypeCallbackUnitTest.php | 62 + .../Objects/DisallowNewWidgetUnitTest.inc | 6 + .../Objects/DisallowNewWidgetUnitTest.php | 53 + .../Tests/PHP/AjaxNullComparisonUnitTest.inc | 182 + .../Tests/PHP/AjaxNullComparisonUnitTest.php | 60 + .../Tests/PHP/EvalObjectFactoryUnitTest.inc | 26 + .../Tests/PHP/EvalObjectFactoryUnitTest.php | 57 + .../Tests/PHP/GetRequestDataUnitTest.inc | 30 + .../Tests/PHP/GetRequestDataUnitTest.php | 61 + .../Tests/PHP/ReturnFunctionValueUnitTest.inc | 9 + .../Tests/PHP/ReturnFunctionValueUnitTest.php | 57 + .../Tests/Strings/JoinStringsUnitTest.js | 18 + .../Tests/Strings/JoinStringsUnitTest.php | 67 + .../src/Standards/MySource/ruleset.xml | 18 + .../Docs/Classes/ClassDeclarationStandard.xml | 76 + .../Docs/Commenting/ClassCommentStandard.xml | 177 + .../Docs/Commenting/FileCommentStandard.xml | 293 + .../Commenting/FunctionCommentStandard.xml | 230 + .../Docs/Commenting/InlineCommentStandard.xml | 19 + .../ControlSignatureStandard.xml | 36 + .../MultiLineConditionStandard.xml | 60 + .../PEAR/Docs/Files/IncludingFileStandard.xml | 24 + .../MultiLineAssignmentStandard.xml | 35 + .../FunctionCallSignatureStandard.xml | 19 + .../Functions/FunctionDeclarationStandard.xml | 41 + .../Functions/ValidDefaultValueStandard.xml | 25 + .../ValidClassNameStandard.xml | 23 + .../ValidFunctionNameStandard.xml | 23 + .../ValidVariableNameStandard.xml | 29 + .../ObjectOperatorIndentStandard.xml | 39 + .../WhiteSpace/ScopeClosingBraceStandard.xml | 23 + .../Docs/WhiteSpace/ScopeIndentStandard.xml | 29 + .../Sniffs/Classes/ClassDeclarationSniff.php | 150 + .../Sniffs/Commenting/ClassCommentSniff.php | 122 + .../Sniffs/Commenting/FileCommentSniff.php | 583 + .../Commenting/FunctionCommentSniff.php | 550 + .../Sniffs/Commenting/InlineCommentSniff.php | 68 + .../ControlSignatureSniff.php | 48 + .../MultiLineConditionSniff.php | 283 + .../PEAR/Sniffs/Files/IncludingFileSniff.php | 136 + .../Formatting/MultiLineAssignmentSniff.php | 106 + .../Functions/FunctionCallSignatureSniff.php | 634 + .../Functions/FunctionDeclarationSniff.php | 546 + .../Functions/ValidDefaultValueSniff.php | 81 + .../NamingConventions/ValidClassNameSniff.php | 98 + .../ValidFunctionNameSniff.php | 284 + .../ValidVariableNameSniff.php | 107 + .../WhiteSpace/ObjectOperatorIndentSniff.php | 201 + .../WhiteSpace/ScopeClosingBraceSniff.php | 182 + .../Sniffs/WhiteSpace/ScopeIndentSniff.php | 24 + .../Classes/ClassDeclarationUnitTest.1.inc | 114 + .../ClassDeclarationUnitTest.1.inc.fixed | 125 + .../Classes/ClassDeclarationUnitTest.2.inc | 11 + .../Classes/ClassDeclarationUnitTest.php | 100 + .../Tests/Commenting/ClassCommentUnitTest.inc | 163 + .../Tests/Commenting/ClassCommentUnitTest.php | 78 + .../Commenting/FileCommentUnitTest.1.inc | 53 + .../Commenting/FileCommentUnitTest.2.inc | 9 + .../Commenting/FileCommentUnitTest.3.inc | 8 + .../Commenting/FileCommentUnitTest.4.inc | 7 + .../Tests/Commenting/FileCommentUnitTest.php | 95 + .../Commenting/FunctionCommentUnitTest.inc | 550 + .../FunctionCommentUnitTest.inc.fixed | 521 + .../Commenting/FunctionCommentUnitTest.php | 108 + .../Commenting/InlineCommentUnitTest.inc | 31 + .../InlineCommentUnitTest.inc.fixed | 31 + .../Commenting/InlineCommentUnitTest.php | 61 + .../ControlSignatureUnitTest.inc | 165 + .../ControlSignatureUnitTest.php | 77 + .../MultiLineConditionUnitTest.inc | 251 + .../MultiLineConditionUnitTest.inc.fixed | 247 + .../MultiLineConditionUnitTest.js | 251 + .../MultiLineConditionUnitTest.js.fixed | 247 + .../MultiLineConditionUnitTest.php | 96 + .../Tests/Files/IncludingFileUnitTest.inc | 99 + .../Files/IncludingFileUnitTest.inc.fixed | 99 + .../Tests/Files/IncludingFileUnitTest.php | 72 + .../MultiLineAssignmentUnitTest.inc | 22 + .../MultiLineAssignmentUnitTest.php | 57 + .../FunctionCallSignatureUnitTest.inc | 576 + .../FunctionCallSignatureUnitTest.inc.fixed | 591 + .../FunctionCallSignatureUnitTest.js | 80 + .../FunctionCallSignatureUnitTest.js.fixed | 84 + .../FunctionCallSignatureUnitTest.php | 164 + .../FunctionDeclarationUnitTest.1.inc | 490 + .../FunctionDeclarationUnitTest.1.inc.fixed | 487 + .../FunctionDeclarationUnitTest.2.inc | 7 + .../FunctionDeclarationUnitTest.3.inc | 7 + .../FunctionDeclarationUnitTest.4.inc | 7 + .../FunctionDeclarationUnitTest.4.inc.fixed | 7 + .../Functions/FunctionDeclarationUnitTest.js | 59 + .../FunctionDeclarationUnitTest.js.fixed | 60 + .../Functions/FunctionDeclarationUnitTest.php | 154 + .../Functions/ValidDefaultValueUnitTest.1.inc | 120 + .../Functions/ValidDefaultValueUnitTest.2.inc | 7 + .../Functions/ValidDefaultValueUnitTest.php | 74 + .../ValidClassNameUnitTest.inc | 90 + .../ValidClassNameUnitTest.php | 78 + .../ValidFunctionNameUnitTest.inc | 243 + .../ValidFunctionNameUnitTest.php | 154 + .../ValidVariableNameUnitTest.inc | 115 + .../ValidVariableNameUnitTest.php | 64 + .../ObjectOperatorIndentUnitTest.inc | 153 + .../ObjectOperatorIndentUnitTest.inc.fixed | 153 + .../ObjectOperatorIndentUnitTest.php | 80 + .../WhiteSpace/ScopeClosingBraceUnitTest.inc | 170 + .../ScopeClosingBraceUnitTest.inc.fixed | 177 + .../WhiteSpace/ScopeClosingBraceUnitTest.php | 73 + .../Tests/WhiteSpace/ScopeIndentUnitTest.inc | 314 + .../WhiteSpace/ScopeIndentUnitTest.inc.fixed | 314 + .../Tests/WhiteSpace/ScopeIndentUnitTest.php | 86 + .../src/Standards/PEAR/ruleset.xml | 41 + .../Docs/Classes/ClassDeclarationStandard.xml | 48 + .../PSR1/Docs/Files/SideEffectsStandard.xml | 27 + .../Methods/CamelCapsMethodNameStandard.xml | 29 + .../Sniffs/Classes/ClassDeclarationSniff.php | 75 + .../PSR1/Sniffs/Files/SideEffectsSniff.php | 303 + .../Methods/CamelCapsMethodNameSniff.php | 91 + .../Classes/ClassDeclarationUnitTest.1.inc | 3 + .../Classes/ClassDeclarationUnitTest.2.inc | 4 + .../Classes/ClassDeclarationUnitTest.3.inc | 3 + .../Classes/ClassDeclarationUnitTest.php | 62 + .../Tests/Files/SideEffectsUnitTest.1.inc | 87 + .../Tests/Files/SideEffectsUnitTest.10.inc | 8 + .../Tests/Files/SideEffectsUnitTest.11.inc | 11 + .../Tests/Files/SideEffectsUnitTest.12.inc | 8 + .../Tests/Files/SideEffectsUnitTest.13.inc | 2 + .../Tests/Files/SideEffectsUnitTest.14.inc | 2 + .../Tests/Files/SideEffectsUnitTest.15.inc | 2 + .../Tests/Files/SideEffectsUnitTest.16.inc | 2 + .../Tests/Files/SideEffectsUnitTest.17.inc | 8 + .../Tests/Files/SideEffectsUnitTest.2.inc | 24 + .../Tests/Files/SideEffectsUnitTest.3.inc | 6 + .../Tests/Files/SideEffectsUnitTest.4.inc | 10 + .../Tests/Files/SideEffectsUnitTest.5.inc | 2 + .../Tests/Files/SideEffectsUnitTest.6.inc | 9 + .../Tests/Files/SideEffectsUnitTest.7.inc | 8 + .../Tests/Files/SideEffectsUnitTest.8.inc | 8 + .../Tests/Files/SideEffectsUnitTest.9.inc | 8 + .../PSR1/Tests/Files/SideEffectsUnitTest.php | 85 + .../Methods/CamelCapsMethodNameUnitTest.inc | 81 + .../Methods/CamelCapsMethodNameUnitTest.php | 64 + .../src/Standards/PSR1/ruleset.xml | 47 + .../Classes/ClassInstantiationStandard.xml | 19 + .../Docs/Classes/ClosingBraceStandard.xml | 35 + .../Classes/OpeningBraceSpaceStandard.xml | 32 + .../BooleanOperatorPlacementStandard.xml | 59 + .../ControlStructureSpacingStandard.xml | 124 + .../Docs/Files/ImportStatementStandard.xml | 33 + .../PSR12/Docs/Files/OpenTagStandard.xml | 40 + .../NullableTypeDeclarationStandard.xml | 45 + .../ReturnTypeDeclarationStandard.xml | 41 + .../ShortFormTypeKeywordsStandard.xml | 19 + .../CompoundNamespaceDepthStandard.xml | 28 + .../Operators/OperatorSpacingStandard.xml | 27 + .../Properties/ConstantVisibilityStandard.xml | 27 + .../Classes/AnonClassDeclarationSniff.php | 246 + .../Classes/ClassInstantiationSniff.php | 112 + .../Sniffs/Classes/ClosingBraceSniff.php | 67 + .../Sniffs/Classes/OpeningBraceSpaceSniff.php | 80 + .../BooleanOperatorPlacementSniff.php | 229 + .../ControlStructureSpacingSniff.php | 220 + .../Sniffs/Files/DeclareStatementSniff.php | 262 + .../PSR12/Sniffs/Files/FileHeaderSniff.php | 429 + .../Sniffs/Files/ImportStatementSniff.php | 77 + .../PSR12/Sniffs/Files/OpenTagSniff.php | 76 + .../NullableTypeDeclarationSniff.php | 94 + .../Functions/ReturnTypeDeclarationSniff.php | 108 + .../Keywords/ShortFormTypeKeywordsSniff.php | 75 + .../CompoundNamespaceDepthSniff.php | 80 + .../Sniffs/Operators/OperatorSpacingSniff.php | 128 + .../Properties/ConstantVisibilitySniff.php | 70 + .../Sniffs/Traits/UseDeclarationSniff.php | 700 + .../Classes/AnonClassDeclarationUnitTest.inc | 96 + .../AnonClassDeclarationUnitTest.inc.fixed | 98 + .../Classes/AnonClassDeclarationUnitTest.php | 80 + .../Classes/ClassInstantiationUnitTest.inc | 51 + .../ClassInstantiationUnitTest.inc.fixed | 51 + .../Classes/ClassInstantiationUnitTest.php | 72 + .../Tests/Classes/ClosingBraceUnitTest.inc | 52 + .../Tests/Classes/ClosingBraceUnitTest.php | 60 + .../Classes/OpeningBraceSpaceUnitTest.inc | 57 + .../OpeningBraceSpaceUnitTest.inc.fixed | 48 + .../Classes/OpeningBraceSpaceUnitTest.php | 60 + .../BooleanOperatorPlacementUnitTest.inc | 131 + ...BooleanOperatorPlacementUnitTest.inc.fixed | 141 + .../BooleanOperatorPlacementUnitTest.php | 64 + .../ControlStructureSpacingUnitTest.inc | 133 + .../ControlStructureSpacingUnitTest.inc.fixed | 131 + .../ControlStructureSpacingUnitTest.php | 77 + .../Files/DeclareStatementUnitTest.1.inc | 50 + .../DeclareStatementUnitTest.1.inc.fixed | 54 + .../Files/DeclareStatementUnitTest.2.inc | 3 + .../Tests/Files/DeclareStatementUnitTest.php | 84 + .../Tests/Files/FileHeaderUnitTest.1.inc | 29 + .../Tests/Files/FileHeaderUnitTest.10.inc | 4 + .../Files/FileHeaderUnitTest.10.inc.fixed | 5 + .../Tests/Files/FileHeaderUnitTest.11.inc | 21 + .../Files/FileHeaderUnitTest.11.inc.fixed | 22 + .../Tests/Files/FileHeaderUnitTest.12.inc | 17 + .../Files/FileHeaderUnitTest.12.inc.fixed | 18 + .../Tests/Files/FileHeaderUnitTest.13.inc | 24 + .../Tests/Files/FileHeaderUnitTest.14.inc | 7 + .../Tests/Files/FileHeaderUnitTest.15.inc | 5 + .../Tests/Files/FileHeaderUnitTest.16.inc | 13 + .../Tests/Files/FileHeaderUnitTest.17.inc | 13 + .../Tests/Files/FileHeaderUnitTest.18.inc | 16 + .../Tests/Files/FileHeaderUnitTest.19.inc | 11 + .../Tests/Files/FileHeaderUnitTest.2.inc | 33 + .../Files/FileHeaderUnitTest.2.inc.fixed | 29 + .../Tests/Files/FileHeaderUnitTest.3.inc | 27 + .../Tests/Files/FileHeaderUnitTest.4.inc | 15 + .../Files/FileHeaderUnitTest.4.inc.fixed | 19 + .../Tests/Files/FileHeaderUnitTest.5.inc | 18 + .../Tests/Files/FileHeaderUnitTest.6.inc | 13 + .../Tests/Files/FileHeaderUnitTest.7.inc | 2 + .../Files/FileHeaderUnitTest.7.inc.fixed | 3 + .../Tests/Files/FileHeaderUnitTest.8.inc | 5 + .../Tests/Files/FileHeaderUnitTest.9.inc | 7 + .../PSR12/Tests/Files/FileHeaderUnitTest.php | 87 + .../Tests/Files/ImportStatementUnitTest.inc | 26 + .../Files/ImportStatementUnitTest.inc.fixed | 26 + .../Tests/Files/ImportStatementUnitTest.php | 58 + .../PSR12/Tests/Files/OpenTagUnitTest.1.inc | 3 + .../PSR12/Tests/Files/OpenTagUnitTest.2.inc | 1 + .../Tests/Files/OpenTagUnitTest.2.inc.fixed | 2 + .../PSR12/Tests/Files/OpenTagUnitTest.3.inc | 3 + .../PSR12/Tests/Files/OpenTagUnitTest.4.inc | 2 + .../PSR12/Tests/Files/OpenTagUnitTest.5.inc | 1 + .../PSR12/Tests/Files/OpenTagUnitTest.php | 60 + .../NullableTypeDeclarationUnitTest.inc | 95 + .../NullableTypeDeclarationUnitTest.inc.fixed | 92 + .../NullableTypeDeclarationUnitTest.php | 72 + .../ReturnTypeDeclarationUnitTest.inc | 66 + .../ReturnTypeDeclarationUnitTest.inc.fixed | 62 + .../ReturnTypeDeclarationUnitTest.php | 66 + .../ShortFormTypeKeywordsUnitTest.inc | 14 + .../ShortFormTypeKeywordsUnitTest.inc.fixed | 14 + .../ShortFormTypeKeywordsUnitTest.php | 59 + .../CompoundNamespaceDepthUnitTest.inc | 34 + .../CompoundNamespaceDepthUnitTest.php | 57 + .../Operators/OperatorSpacingUnitTest.1.inc | 79 + .../OperatorSpacingUnitTest.1.inc.fixed | 79 + .../Operators/OperatorSpacingUnitTest.2.inc | 3 + .../Operators/OperatorSpacingUnitTest.3.inc | 6 + .../Operators/OperatorSpacingUnitTest.php | 81 + .../ConstantVisibilityUnitTest.1.inc | 22 + .../ConstantVisibilityUnitTest.2.inc | 7 + .../Properties/ConstantVisibilityUnitTest.php | 70 + .../Tests/Traits/UseDeclarationUnitTest.inc | 221 + .../Traits/UseDeclarationUnitTest.inc.fixed | 213 + .../Tests/Traits/UseDeclarationUnitTest.php | 76 + .../src/Standards/PSR12/ruleset.xml | 348 + .../Docs/Classes/ClassDeclarationStandard.xml | 23 + .../Classes/PropertyDeclarationStandard.xml | 81 + .../ControlStructureSpacingStandard.xml | 23 + .../ElseIfDeclarationStandard.xml | 27 + .../SwitchDeclarationStandard.xml | 204 + .../PSR2/Docs/Files/ClosingTagStandard.xml | 23 + .../Docs/Files/EndFileNewlineStandard.xml | 7 + .../Methods/FunctionCallSignatureStandard.xml | 107 + .../Methods/FunctionClosingBraceStandard.xml | 26 + .../Methods/MethodDeclarationStandard.xml | 51 + .../NamespaceDeclarationStandard.xml | 22 + .../Namespaces/UseDeclarationStandard.xml | 57 + .../Sniffs/Classes/ClassDeclarationSniff.php | 540 + .../Classes/PropertyDeclarationSniff.php | 311 + .../ControlStructureSpacingSniff.php | 141 + .../ElseIfDeclarationSniff.php | 72 + .../SwitchDeclarationSniff.php | 405 + .../PSR2/Sniffs/Files/ClosingTagSniff.php | 89 + .../PSR2/Sniffs/Files/EndFileNewlineSniff.php | 107 + .../Methods/FunctionCallSignatureSniff.php | 79 + .../Methods/FunctionClosingBraceSniff.php | 91 + .../Sniffs/Methods/MethodDeclarationSniff.php | 162 + .../Namespaces/NamespaceDeclarationSniff.php | 100 + .../Sniffs/Namespaces/UseDeclarationSniff.php | 297 + .../Classes/ClassDeclarationUnitTest.inc | 346 + .../ClassDeclarationUnitTest.inc.fixed | 335 + .../Classes/ClassDeclarationUnitTest.php | 103 + .../Classes/PropertyDeclarationUnitTest.inc | 136 + .../PropertyDeclarationUnitTest.inc.fixed | 133 + .../Classes/PropertyDeclarationUnitTest.php | 108 + .../ControlStructureSpacingUnitTest.inc | 81 + .../ControlStructureSpacingUnitTest.inc.fixed | 80 + .../ControlStructureSpacingUnitTest.php | 67 + .../ElseIfDeclarationUnitTest.inc | 17 + .../ElseIfDeclarationUnitTest.inc.fixed | 17 + .../ElseIfDeclarationUnitTest.php | 56 + .../SwitchDeclarationUnitTest.inc | 624 + .../SwitchDeclarationUnitTest.inc.fixed | 619 + .../SwitchDeclarationUnitTest.php | 91 + .../PSR2/Tests/Files/ClosingTagUnitTest.1.inc | 12 + .../Files/ClosingTagUnitTest.1.inc.fixed | 12 + .../PSR2/Tests/Files/ClosingTagUnitTest.2.inc | 3 + .../PSR2/Tests/Files/ClosingTagUnitTest.3.inc | 7 + .../PSR2/Tests/Files/ClosingTagUnitTest.4.inc | 1 + .../Files/ClosingTagUnitTest.4.inc.fixed | 1 + .../PSR2/Tests/Files/ClosingTagUnitTest.5.inc | 1 + .../Files/ClosingTagUnitTest.5.inc.fixed | 1 + .../PSR2/Tests/Files/ClosingTagUnitTest.6.inc | 5 + .../Files/ClosingTagUnitTest.6.inc.fixed | 5 + .../PSR2/Tests/Files/ClosingTagUnitTest.7.inc | 5 + .../Files/ClosingTagUnitTest.7.inc.fixed | 5 + .../PSR2/Tests/Files/ClosingTagUnitTest.php | 69 + .../Tests/Files/EndFileNewlineUnitTest.1.inc | 3 + .../Files/EndFileNewlineUnitTest.1.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.10.inc | 3 + .../Files/EndFileNewlineUnitTest.10.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.11.inc | 1 + .../Files/EndFileNewlineUnitTest.11.inc.fixed | 1 + .../Tests/Files/EndFileNewlineUnitTest.12.inc | 1 + .../Files/EndFileNewlineUnitTest.12.inc.fixed | 1 + .../Tests/Files/EndFileNewlineUnitTest.13.inc | 5 + .../Files/EndFileNewlineUnitTest.13.inc.fixed | 1 + .../Tests/Files/EndFileNewlineUnitTest.14.inc | 1 + .../Tests/Files/EndFileNewlineUnitTest.2.inc | 2 + .../Tests/Files/EndFileNewlineUnitTest.3.inc | 2 + .../Files/EndFileNewlineUnitTest.3.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.4.inc | 4 + .../Tests/Files/EndFileNewlineUnitTest.5.inc | 6 + .../Tests/Files/EndFileNewlineUnitTest.6.inc | 2 + .../Files/EndFileNewlineUnitTest.6.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.7.inc | 11 + .../Files/EndFileNewlineUnitTest.7.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.8.inc | 2 + .../Tests/Files/EndFileNewlineUnitTest.9.inc | 2 + .../Files/EndFileNewlineUnitTest.9.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.php | 71 + .../Methods/FunctionCallSignatureUnitTest.inc | 267 + .../FunctionCallSignatureUnitTest.inc.fixed | 283 + .../Methods/FunctionCallSignatureUnitTest.php | 99 + .../Methods/FunctionClosingBraceUnitTest.inc | 70 + .../FunctionClosingBraceUnitTest.inc.fixed | 61 + .../Methods/FunctionClosingBraceUnitTest.php | 60 + .../Methods/MethodDeclarationUnitTest.inc | 75 + .../MethodDeclarationUnitTest.inc.fixed | 75 + .../Methods/MethodDeclarationUnitTest.php | 76 + .../NamespaceDeclarationUnitTest.inc | 26 + .../NamespaceDeclarationUnitTest.inc.fixed | 28 + .../NamespaceDeclarationUnitTest.php | 58 + .../Namespaces/UseDeclarationUnitTest.1.inc | 40 + .../Namespaces/UseDeclarationUnitTest.10.inc | 8 + .../UseDeclarationUnitTest.10.inc.fixed | 9 + .../Namespaces/UseDeclarationUnitTest.11.inc | 2 + .../UseDeclarationUnitTest.11.inc.fixed | 4 + .../Namespaces/UseDeclarationUnitTest.12.inc | 9 + .../UseDeclarationUnitTest.12.inc.fixed | 11 + .../Namespaces/UseDeclarationUnitTest.13.inc | 10 + .../UseDeclarationUnitTest.13.inc.fixed | 11 + .../Namespaces/UseDeclarationUnitTest.14.inc | 8 + .../UseDeclarationUnitTest.14.inc.fixed | 9 + .../Namespaces/UseDeclarationUnitTest.15.inc | 10 + .../Namespaces/UseDeclarationUnitTest.16.inc | 11 + .../UseDeclarationUnitTest.16.inc.fixed | 9 + .../Namespaces/UseDeclarationUnitTest.17.inc | 3 + .../Namespaces/UseDeclarationUnitTest.18.inc | 4 + .../Namespaces/UseDeclarationUnitTest.2.inc | 21 + .../UseDeclarationUnitTest.2.inc.fixed | 27 + .../Namespaces/UseDeclarationUnitTest.3.inc | 16 + .../UseDeclarationUnitTest.3.inc.fixed | 16 + .../Namespaces/UseDeclarationUnitTest.4.inc | 4 + .../Namespaces/UseDeclarationUnitTest.5.inc | 47 + .../UseDeclarationUnitTest.5.inc.fixed | 56 + .../Namespaces/UseDeclarationUnitTest.6.inc | 1 + .../Namespaces/UseDeclarationUnitTest.7.inc | 1 + .../Namespaces/UseDeclarationUnitTest.8.inc | 8 + .../Namespaces/UseDeclarationUnitTest.9.inc | 8 + .../Namespaces/UseDeclarationUnitTest.php | 102 + .../src/Standards/PSR2/ruleset.xml | 218 + .../Arrays/ArrayBracketSpacingStandard.xml | 19 + .../Docs/Arrays/ArrayDeclarationStandard.xml | 117 + .../Docs/Classes/ClassFileNameStandard.xml | 47 + .../LowercaseClassKeywordsStandard.xml | 23 + .../Classes/SelfMemberReferenceStandard.xml | 81 + .../Docs/Classes/ValidClassNameStandard.xml | 39 + .../Docs/Commenting/BlockCommentStandard.xml | 280 + .../DocCommentAlignmentStandard.xml | 39 + .../FunctionCommentThrowTagStandard.xml | 32 + .../ForEachLoopDeclarationStandard.xml | 39 + .../ForLoopDeclarationStandard.xml | 55 + .../LowercaseDeclarationStandard.xml | 23 + .../LowercaseFunctionKeywordsStandard.xml | 25 + .../Squiz/Docs/PHP/HeredocStandard.xml | 32 + .../Docs/Scope/StaticThisUsageStandard.xml | 31 + .../Docs/Strings/EchoedStringsStandard.xml | 19 + .../Docs/WhiteSpace/CastSpacingStandard.xml | 19 + .../FunctionClosingBraceSpaceStandard.xml | 73 + .../FunctionOpeningBraceSpaceStandard.xml | 26 + .../LanguageConstructSpacingStandard.xml | 19 + .../WhiteSpace/MemberVarSpacingStandard.xml | 91 + .../ObjectOperatorSpacingStandard.xml | 19 + .../WhiteSpace/ScopeClosingBraceStandard.xml | 59 + .../ScopeKeywordSpacingStandard.xml | 23 + .../WhiteSpace/SemicolonSpacingStandard.xml | 19 + .../SuperfluousWhitespaceStandard.xml | 98 + .../Arrays/ArrayBracketSpacingSniff.php | 95 + .../Sniffs/Arrays/ArrayDeclarationSniff.php | 962 + .../ClassDefinitionClosingBraceSpaceSniff.php | 173 + .../CSS/ClassDefinitionNameSpacingSniff.php | 150 + .../ClassDefinitionOpeningBraceSpaceSniff.php | 215 + .../Squiz/Sniffs/CSS/ColonSpacingSniff.php | 146 + .../Sniffs/CSS/ColourDefinitionSniff.php | 127 + .../DisallowMultipleStyleDefinitionsSniff.php | 110 + .../CSS/DuplicateClassDefinitionSniff.php | 155 + .../CSS/DuplicateStyleDefinitionSniff.php | 127 + .../Sniffs/CSS/EmptyClassDefinitionSniff.php | 100 + .../Sniffs/CSS/EmptyStyleDefinitionSniff.php | 103 + .../Squiz/Sniffs/CSS/ForbiddenStylesSniff.php | 216 + .../Squiz/Sniffs/CSS/IndentationSniff.php | 189 + .../CSS/LowercaseStyleDefinitionSniff.php | 136 + .../Squiz/Sniffs/CSS/MissingColonSniff.php | 130 + .../Squiz/Sniffs/CSS/NamedColoursSniff.php | 132 + .../Squiz/Sniffs/CSS/OpacitySniff.php | 140 + .../Sniffs/CSS/SemicolonSpacingSniff.php | 142 + .../Squiz/Sniffs/CSS/ShorthandSizeSniff.php | 220 + .../Sniffs/Classes/ClassDeclarationSniff.php | 224 + .../Sniffs/Classes/ClassFileNameSniff.php | 75 + .../Sniffs/Classes/DuplicatePropertySniff.php | 121 + .../Classes/LowercaseClassKeywordsSniff.php | 73 + .../Classes/SelfMemberReferenceSniff.php | 248 + .../Sniffs/Classes/ValidClassNameSniff.php | 88 + .../Sniffs/Commenting/BlockCommentSniff.php | 399 + .../Sniffs/Commenting/ClassCommentSniff.php | 109 + .../ClosingDeclarationCommentSniff.php | 130 + .../Commenting/DocCommentAlignmentSniff.php | 167 + .../Commenting/EmptyCatchCommentSniff.php | 55 + .../Sniffs/Commenting/FileCommentSniff.php | 228 + .../Commenting/FunctionCommentSniff.php | 800 + .../FunctionCommentThrowTagSniff.php | 247 + .../Sniffs/Commenting/InlineCommentSniff.php | 349 + .../LongConditionClosingCommentSniff.php | 218 + .../Commenting/PostStatementCommentSniff.php | 129 + .../Commenting/VariableCommentSniff.php | 203 + .../ControlSignatureSniff.php | 337 + .../ElseIfDeclarationSniff.php | 51 + .../ForEachLoopDeclarationSniff.php | 236 + .../ForLoopDeclarationSniff.php | 316 + .../InlineIfDeclarationSniff.php | 155 + .../LowercaseDeclarationSniff.php | 75 + .../SwitchDeclarationSniff.php | 305 + .../Squiz/Sniffs/Debug/JSLintSniff.php | 125 + .../Sniffs/Debug/JavaScriptLintSniff.php | 128 + .../Squiz/Sniffs/Files/FileExtensionSniff.php | 68 + .../Formatting/OperatorBracketSniff.php | 400 + ...unctionDeclarationArgumentSpacingSniff.php | 572 + .../Functions/FunctionDeclarationSniff.php | 34 + .../FunctionDuplicateArgumentSniff.php | 64 + .../Sniffs/Functions/GlobalFunctionSniff.php | 61 + .../LowercaseFunctionKeywordsSniff.php | 69 + .../MultiLineFunctionDeclarationSniff.php | 262 + .../ValidFunctionNameSniff.php | 54 + .../ValidVariableNameSniff.php | 190 + .../DisallowObjectStringIndexSniff.php | 124 + .../Objects/ObjectInstantiationSniff.php | 85 + .../Sniffs/Objects/ObjectMemberCommaSniff.php | 103 + .../ComparisonOperatorUsageSniff.php | 235 + .../IncrementDecrementUsageSniff.php | 231 + .../Operators/ValidLogicalOperatorsSniff.php | 67 + .../Sniffs/PHP/CommentedOutCodeSniff.php | 283 + .../PHP/DisallowBooleanStatementSniff.php | 59 + .../PHP/DisallowComparisonAssignmentSniff.php | 112 + .../Sniffs/PHP/DisallowInlineIfSniff.php | 57 + .../PHP/DisallowMultipleAssignmentsSniff.php | 196 + .../PHP/DisallowSizeFunctionsInLoopsSniff.php | 116 + .../Sniffs/PHP/DiscouragedFunctionsSniff.php | 38 + .../Squiz/Sniffs/PHP/EmbeddedPhpSniff.php | 524 + .../Standards/Squiz/Sniffs/PHP/EvalSniff.php | 48 + .../Squiz/Sniffs/PHP/GlobalKeywordSniff.php | 53 + .../Squiz/Sniffs/PHP/HeredocSniff.php | 51 + .../Squiz/Sniffs/PHP/InnerFunctionsSniff.php | 76 + .../Sniffs/PHP/LowercasePHPFunctionsSniff.php | 167 + .../Sniffs/PHP/NonExecutableCodeSniff.php | 308 + .../Sniffs/Scope/MemberVarScopeSniff.php | 83 + .../Squiz/Sniffs/Scope/MethodScopeSniff.php | 83 + .../Sniffs/Scope/StaticThisUsageSniff.php | 128 + .../Strings/ConcatenationSpacingSniff.php | 164 + .../Sniffs/Strings/DoubleQuoteUsageSniff.php | 144 + .../Sniffs/Strings/EchoedStringsSniff.php | 88 + .../Sniffs/WhiteSpace/CastSpacingSniff.php | 65 + .../ControlStructureSpacingSniff.php | 359 + .../FunctionClosingBraceSpaceSniff.php | 164 + .../FunctionOpeningBraceSpaceSniff.php | 98 + .../WhiteSpace/FunctionSpacingSniff.php | 376 + .../LanguageConstructSpacingSniff.php | 128 + .../LogicalOperatorSpacingSniff.php | 102 + .../WhiteSpace/MemberVarSpacingSniff.php | 258 + .../WhiteSpace/ObjectOperatorSpacingSniff.php | 167 + .../WhiteSpace/OperatorSpacingSniff.php | 409 + .../WhiteSpace/PropertyLabelSpacingSniff.php | 118 + .../WhiteSpace/ScopeClosingBraceSniff.php | 114 + .../WhiteSpace/ScopeKeywordSpacingSniff.php | 171 + .../WhiteSpace/SemicolonSpacingSniff.php | 116 + .../WhiteSpace/SuperfluousWhitespaceSniff.php | 265 + .../Arrays/ArrayBracketSpacingUnitTest.inc | 31 + .../ArrayBracketSpacingUnitTest.inc.fixed | 31 + .../Arrays/ArrayBracketSpacingUnitTest.php | 62 + .../Arrays/ArrayDeclarationUnitTest.1.inc | 560 + .../ArrayDeclarationUnitTest.1.inc.fixed | 598 + .../Arrays/ArrayDeclarationUnitTest.2.inc | 555 + .../ArrayDeclarationUnitTest.2.inc.fixed | 591 + .../Arrays/ArrayDeclarationUnitTest.3.inc | 7 + .../Arrays/ArrayDeclarationUnitTest.4.inc | 8 + .../ArrayDeclarationUnitTest.4.inc.fixed | 8 + .../Tests/Arrays/ArrayDeclarationUnitTest.php | 262 + ...assDefinitionClosingBraceSpaceUnitTest.css | 81 + ...initionClosingBraceSpaceUnitTest.css.fixed | 85 + ...assDefinitionClosingBraceSpaceUnitTest.php | 65 + .../ClassDefinitionNameSpacingUnitTest.css | 66 + .../ClassDefinitionNameSpacingUnitTest.php | 56 + ...assDefinitionOpeningBraceSpaceUnitTest.css | 108 + ...initionOpeningBraceSpaceUnitTest.css.fixed | 106 + ...assDefinitionOpeningBraceSpaceUnitTest.php | 69 + .../Squiz/Tests/CSS/ColonSpacingUnitTest.css | 42 + .../Tests/CSS/ColonSpacingUnitTest.css.fixed | 40 + .../Squiz/Tests/CSS/ColonSpacingUnitTest.php | 65 + .../Tests/CSS/ColourDefinitionUnitTest.css | 16 + .../CSS/ColourDefinitionUnitTest.css.fixed | 16 + .../Tests/CSS/ColourDefinitionUnitTest.php | 57 + ...sallowMultipleStyleDefinitionsUnitTest.css | 17 + ...MultipleStyleDefinitionsUnitTest.css.fixed | 27 + ...sallowMultipleStyleDefinitionsUnitTest.php | 59 + .../CSS/DuplicateClassDefinitionUnitTest.css | 103 + .../CSS/DuplicateClassDefinitionUnitTest.php | 59 + .../CSS/DuplicateStyleDefinitionUnitTest.css | 27 + .../CSS/DuplicateStyleDefinitionUnitTest.php | 53 + .../CSS/EmptyClassDefinitionUnitTest.css | 15 + .../CSS/EmptyClassDefinitionUnitTest.php | 59 + .../CSS/EmptyStyleDefinitionUnitTest.css | 11 + .../CSS/EmptyStyleDefinitionUnitTest.php | 58 + .../Tests/CSS/ForbiddenStylesUnitTest.css | 18 + .../CSS/ForbiddenStylesUnitTest.css.fixed | 18 + .../Tests/CSS/ForbiddenStylesUnitTest.php | 62 + .../Squiz/Tests/CSS/IndentationUnitTest.1.css | 79 + .../Tests/CSS/IndentationUnitTest.1.css.fixed | 73 + .../Squiz/Tests/CSS/IndentationUnitTest.2.css | 3 + .../Squiz/Tests/CSS/IndentationUnitTest.php | 80 + .../CSS/LowercaseStyleDefinitionUnitTest.css | 14 + .../CSS/LowercaseStyleDefinitionUnitTest.php | 58 + .../Squiz/Tests/CSS/MissingColonUnitTest.css | 21 + .../Squiz/Tests/CSS/MissingColonUnitTest.php | 58 + .../Squiz/Tests/CSS/NamedColoursUnitTest.css | 25 + .../Squiz/Tests/CSS/NamedColoursUnitTest.php | 59 + .../Squiz/Tests/CSS/OpacityUnitTest.css | 35 + .../Squiz/Tests/CSS/OpacityUnitTest.css.fixed | 35 + .../Squiz/Tests/CSS/OpacityUnitTest.php | 65 + .../Tests/CSS/SemicolonSpacingUnitTest.css | 61 + .../CSS/SemicolonSpacingUnitTest.css.fixed | 58 + .../Tests/CSS/SemicolonSpacingUnitTest.php | 63 + .../Tests/CSS/ShorthandSizeUnitTest.1.css | 41 + .../CSS/ShorthandSizeUnitTest.1.css.fixed | 37 + .../Tests/CSS/ShorthandSizeUnitTest.2.css | 3 + .../Squiz/Tests/CSS/ShorthandSizeUnitTest.php | 72 + .../Classes/ClassDeclarationUnitTest.inc | 152 + .../ClassDeclarationUnitTest.inc.fixed | 162 + .../Classes/ClassDeclarationUnitTest.php | 93 + ...assFileName Spaces In FilenameUnitTest.inc | 7 + ...assFileName-Dashes-In-FilenameUnitTest.inc | 7 + .../ClassFileNameLiveCodingFailUnitTest.inc | 6 + .../ClassFileNameLiveCodingPassUnitTest.inc | 6 + .../ClassFileNameParseError1UnitTest.inc | 6 + .../Tests/Classes/ClassFileNameUnitTest.inc | 44 + .../Tests/Classes/ClassFileNameUnitTest.php | 146 + .../Classes/DuplicatePropertyUnitTest.js | 45 + .../Classes/DuplicatePropertyUnitTest.php | 57 + .../LowercaseClassKeywordsUnitTest.inc | 24 + .../LowercaseClassKeywordsUnitTest.inc.fixed | 24 + .../LowercaseClassKeywordsUnitTest.php | 69 + .../Classes/SelfMemberReferenceUnitTest.inc | 199 + .../SelfMemberReferenceUnitTest.inc.fixed | 187 + .../Classes/SelfMemberReferenceUnitTest.php | 71 + .../Tests/Classes/ValidClassNameUnitTest.inc | 201 + .../Tests/Classes/ValidClassNameUnitTest.php | 83 + .../Tests/Commenting/BlockCommentUnitTest.inc | 340 + .../Commenting/BlockCommentUnitTest.inc.fixed | 342 + .../Tests/Commenting/BlockCommentUnitTest.php | 109 + .../Tests/Commenting/ClassCommentUnitTest.inc | 145 + .../Tests/Commenting/ClassCommentUnitTest.php | 66 + .../ClosingDeclarationCommentUnitTest.1.inc | 124 + ...singDeclarationCommentUnitTest.1.inc.fixed | 117 + .../ClosingDeclarationCommentUnitTest.2.inc | 7 + .../ClosingDeclarationCommentUnitTest.3.inc | 7 + .../ClosingDeclarationCommentUnitTest.4.inc | 8 + ...singDeclarationCommentUnitTest.4.inc.fixed | 8 + .../ClosingDeclarationCommentUnitTest.5.inc | 11 + ...singDeclarationCommentUnitTest.5.inc.fixed | 11 + .../ClosingDeclarationCommentUnitTest.php | 96 + .../DocCommentAlignmentUnitTest.inc | 146 + .../DocCommentAlignmentUnitTest.inc.fixed | 146 + .../Commenting/DocCommentAlignmentUnitTest.js | 76 + .../DocCommentAlignmentUnitTest.js.fixed | 76 + .../DocCommentAlignmentUnitTest.php | 100 + .../Commenting/EmptyCatchCommentUnitTest.inc | 55 + .../Commenting/EmptyCatchCommentUnitTest.php | 60 + .../Commenting/FileCommentUnitTest.1.inc | 43 + .../FileCommentUnitTest.1.inc.fixed | 43 + .../Tests/Commenting/FileCommentUnitTest.1.js | 40 + .../Commenting/FileCommentUnitTest.1.js.fixed | 40 + .../Commenting/FileCommentUnitTest.10.inc | 12 + .../Commenting/FileCommentUnitTest.2.inc | 11 + .../Tests/Commenting/FileCommentUnitTest.2.js | 10 + .../Commenting/FileCommentUnitTest.3.inc | 9 + .../Commenting/FileCommentUnitTest.4.inc | 3 + .../Commenting/FileCommentUnitTest.5.inc | 4 + .../Commenting/FileCommentUnitTest.6.inc | 12 + .../Commenting/FileCommentUnitTest.7.inc | 12 + .../Commenting/FileCommentUnitTest.8.inc | 9 + .../Commenting/FileCommentUnitTest.9.inc | 12 + .../Tests/Commenting/FileCommentUnitTest.php | 82 + .../FunctionCommentThrowTagUnitTest.inc | 533 + .../FunctionCommentThrowTagUnitTest.php | 67 + .../Commenting/FunctionCommentUnitTest.inc | 1196 + .../FunctionCommentUnitTest.inc.fixed | 1196 + .../Commenting/FunctionCommentUnitTest.php | 211 + .../Commenting/InlineCommentUnitTest.inc | 199 + .../InlineCommentUnitTest.inc.fixed | 192 + .../Tests/Commenting/InlineCommentUnitTest.js | 129 + .../Commenting/InlineCommentUnitTest.js.fixed | 125 + .../Commenting/InlineCommentUnitTest.php | 97 + .../LongConditionClosingCommentUnitTest.inc | 1033 + ...gConditionClosingCommentUnitTest.inc.fixed | 1033 + .../LongConditionClosingCommentUnitTest.js | 444 + ...ngConditionClosingCommentUnitTest.js.fixed | 444 + .../LongConditionClosingCommentUnitTest.php | 107 + .../PostStatementCommentUnitTest.1.js | 36 + .../PostStatementCommentUnitTest.1.js.fixed | 39 + .../PostStatementCommentUnitTest.2.js | 2 + .../PostStatementCommentUnitTest.inc | 64 + .../PostStatementCommentUnitTest.inc.fixed | 71 + .../PostStatementCommentUnitTest.php | 80 + .../Commenting/VariableCommentUnitTest.inc | 495 + .../VariableCommentUnitTest.inc.fixed | 495 + .../Commenting/VariableCommentUnitTest.php | 88 + .../ControlSignatureUnitTest.1.inc | 320 + .../ControlSignatureUnitTest.1.inc.fixed | 324 + .../ControlSignatureUnitTest.2.inc | 5 + .../ControlSignatureUnitTest.js | 135 + .../ControlSignatureUnitTest.js.fixed | 141 + .../ControlSignatureUnitTest.php | 115 + .../ElseIfDeclarationUnitTest.inc | 14 + .../ElseIfDeclarationUnitTest.inc.fixed | 14 + .../ElseIfDeclarationUnitTest.php | 56 + .../ForEachLoopDeclarationUnitTest.inc | 36 + .../ForEachLoopDeclarationUnitTest.inc.fixed | 36 + .../ForEachLoopDeclarationUnitTest.php | 61 + .../ForLoopDeclarationUnitTest.1.inc | 126 + .../ForLoopDeclarationUnitTest.1.inc.fixed | 92 + .../ForLoopDeclarationUnitTest.1.js | 122 + .../ForLoopDeclarationUnitTest.1.js.fixed | 88 + .../ForLoopDeclarationUnitTest.2.inc | 6 + .../ForLoopDeclarationUnitTest.2.js | 2 + .../ForLoopDeclarationUnitTest.3.inc | 6 + .../ForLoopDeclarationUnitTest.php | 138 + .../InlineIfDeclarationUnitTest.inc | 48 + .../InlineIfDeclarationUnitTest.inc.fixed | 48 + .../InlineIfDeclarationUnitTest.php | 80 + .../LowercaseDeclarationUnitTest.inc | 24 + .../LowercaseDeclarationUnitTest.inc.fixed | 24 + .../LowercaseDeclarationUnitTest.php | 66 + .../SwitchDeclarationUnitTest.inc | 346 + .../SwitchDeclarationUnitTest.inc.fixed | 356 + .../SwitchDeclarationUnitTest.js | 287 + .../SwitchDeclarationUnitTest.php | 159 + .../Squiz/Tests/Debug/JSLintUnitTest.js | 2 + .../Squiz/Tests/Debug/JSLintUnitTest.php | 74 + .../Tests/Debug/JavaScriptLintUnitTest.js | 2 + .../Tests/Debug/JavaScriptLintUnitTest.php | 71 + .../Tests/Files/FileExtensionUnitTest.1.inc | 3 + .../Tests/Files/FileExtensionUnitTest.2.inc | 3 + .../Tests/Files/FileExtensionUnitTest.3.inc | 3 + .../Tests/Files/FileExtensionUnitTest.4.inc | 3 + .../Tests/Files/FileExtensionUnitTest.5.inc | 3 + .../Tests/Files/FileExtensionUnitTest.php | 60 + .../Formatting/OperatorBracketUnitTest.1.inc | 203 + .../OperatorBracketUnitTest.1.inc.fixed | 203 + .../Formatting/OperatorBracketUnitTest.2.inc | 7 + .../Formatting/OperatorBracketUnitTest.3.inc | 5 + .../Formatting/OperatorBracketUnitTest.js | 118 + .../OperatorBracketUnitTest.js.fixed | 118 + .../Formatting/OperatorBracketUnitTest.php | 121 + ...onDeclarationArgumentSpacingUnitTest.1.inc | 227 + ...arationArgumentSpacingUnitTest.1.inc.fixed | 199 + ...onDeclarationArgumentSpacingUnitTest.2.inc | 6 + ...onDeclarationArgumentSpacingUnitTest.3.inc | 6 + ...onDeclarationArgumentSpacingUnitTest.4.inc | 6 + ...onDeclarationArgumentSpacingUnitTest.5.inc | 6 + ...onDeclarationArgumentSpacingUnitTest.6.inc | 6 + ...tionDeclarationArgumentSpacingUnitTest.php | 128 + .../FunctionDeclarationUnitTest.1.inc | 75 + .../FunctionDeclarationUnitTest.2.inc | 5 + .../FunctionDeclarationUnitTest.3.inc | 5 + .../Functions/FunctionDeclarationUnitTest.php | 64 + .../FunctionDuplicateArgumentUnitTest.inc | 6 + .../FunctionDuplicateArgumentUnitTest.php | 57 + .../Functions/GlobalFunctionUnitTest.inc | 17 + .../Functions/GlobalFunctionUnitTest.php | 53 + .../LowercaseFunctionKeywordsUnitTest.inc | 28 + ...owercaseFunctionKeywordsUnitTest.inc.fixed | 28 + .../LowercaseFunctionKeywordsUnitTest.php | 63 + .../MultiLineFunctionDeclarationUnitTest.inc | 356 + ...iLineFunctionDeclarationUnitTest.inc.fixed | 370 + .../MultiLineFunctionDeclarationUnitTest.js | 73 + ...tiLineFunctionDeclarationUnitTest.js.fixed | 81 + .../MultiLineFunctionDeclarationUnitTest.php | 120 + .../ValidFunctionNameUnitTest.inc | 27 + .../ValidFunctionNameUnitTest.php | 64 + .../ValidVariableNameUnitTest.inc | 171 + .../ValidVariableNameUnitTest.php | 96 + .../DisallowObjectStringIndexUnitTest.js | 37 + .../DisallowObjectStringIndexUnitTest.php | 64 + .../Objects/ObjectInstantiationUnitTest.inc | 49 + .../Objects/ObjectInstantiationUnitTest.php | 58 + .../Objects/ObjectMemberCommaUnitTest.js | 47 + .../ObjectMemberCommaUnitTest.js.fixed | 47 + .../Objects/ObjectMemberCommaUnitTest.php | 58 + .../ComparisonOperatorUsageUnitTest.inc | 144 + .../ComparisonOperatorUsageUnitTest.js | 71 + .../ComparisonOperatorUsageUnitTest.php | 105 + .../IncrementDecrementUsageUnitTest.inc | 56 + .../IncrementDecrementUsageUnitTest.php | 73 + .../ValidLogicalOperatorsUnitTest.inc | 28 + .../ValidLogicalOperatorsUnitTest.php | 57 + .../Tests/PHP/CommentedOutCodeUnitTest.css | 23 + .../Tests/PHP/CommentedOutCodeUnitTest.inc | 158 + .../Tests/PHP/CommentedOutCodeUnitTest.php | 80 + .../PHP/DisallowBooleanStatementUnitTest.inc | 27 + .../PHP/DisallowBooleanStatementUnitTest.php | 58 + .../DisallowComparisonAssignmentUnitTest.inc | 83 + .../DisallowComparisonAssignmentUnitTest.php | 64 + .../Tests/PHP/DisallowInlineIfUnitTest.inc | 18 + .../Tests/PHP/DisallowInlineIfUnitTest.js | 2 + .../Tests/PHP/DisallowInlineIfUnitTest.php | 67 + .../DisallowMultipleAssignmentsUnitTest.1.inc | 150 + .../DisallowMultipleAssignmentsUnitTest.2.inc | 7 + .../DisallowMultipleAssignmentsUnitTest.php | 71 + .../DisallowSizeFunctionsInLoopsUnitTest.inc | 58 + .../DisallowSizeFunctionsInLoopsUnitTest.js | 13 + .../DisallowSizeFunctionsInLoopsUnitTest.php | 77 + .../PHP/DiscouragedFunctionsUnitTest.inc | 7 + .../PHP/DiscouragedFunctionsUnitTest.php | 57 + .../Squiz/Tests/PHP/EmbeddedPhpUnitTest.1.inc | 296 + .../Tests/PHP/EmbeddedPhpUnitTest.1.inc.fixed | 314 + .../Tests/PHP/EmbeddedPhpUnitTest.10.inc | 16 + .../Tests/PHP/EmbeddedPhpUnitTest.11.inc | 14 + .../Tests/PHP/EmbeddedPhpUnitTest.12.inc | 12 + .../PHP/EmbeddedPhpUnitTest.12.inc.fixed | 10 + .../Tests/PHP/EmbeddedPhpUnitTest.13.inc | 12 + .../PHP/EmbeddedPhpUnitTest.13.inc.fixed | 10 + .../Tests/PHP/EmbeddedPhpUnitTest.14.inc | 8 + .../Tests/PHP/EmbeddedPhpUnitTest.15.inc | 9 + .../Tests/PHP/EmbeddedPhpUnitTest.16.inc | 8 + .../Tests/PHP/EmbeddedPhpUnitTest.17.inc | 8 + .../Tests/PHP/EmbeddedPhpUnitTest.18.inc | 15 + .../PHP/EmbeddedPhpUnitTest.18.inc.fixed | 13 + .../Tests/PHP/EmbeddedPhpUnitTest.19.inc | 17 + .../PHP/EmbeddedPhpUnitTest.19.inc.fixed | 15 + .../Squiz/Tests/PHP/EmbeddedPhpUnitTest.2.inc | 7 + .../Tests/PHP/EmbeddedPhpUnitTest.2.inc.fixed | 7 + .../Tests/PHP/EmbeddedPhpUnitTest.20.inc | 15 + .../PHP/EmbeddedPhpUnitTest.20.inc.fixed | 16 + .../Tests/PHP/EmbeddedPhpUnitTest.21.inc | 15 + .../PHP/EmbeddedPhpUnitTest.21.inc.fixed | 16 + .../Tests/PHP/EmbeddedPhpUnitTest.22.inc | 30 + .../PHP/EmbeddedPhpUnitTest.22.inc.fixed | 31 + .../Tests/PHP/EmbeddedPhpUnitTest.23.inc | 23 + .../Tests/PHP/EmbeddedPhpUnitTest.24.inc | 25 + .../PHP/EmbeddedPhpUnitTest.24.inc.fixed | 25 + .../Tests/PHP/EmbeddedPhpUnitTest.25.inc | 21 + .../PHP/EmbeddedPhpUnitTest.25.inc.fixed | 25 + .../Squiz/Tests/PHP/EmbeddedPhpUnitTest.3.inc | 123 + .../Tests/PHP/EmbeddedPhpUnitTest.3.inc.fixed | 132 + .../Squiz/Tests/PHP/EmbeddedPhpUnitTest.4.inc | 7 + .../Tests/PHP/EmbeddedPhpUnitTest.4.inc.fixed | 7 + .../Squiz/Tests/PHP/EmbeddedPhpUnitTest.5.inc | 48 + .../Tests/PHP/EmbeddedPhpUnitTest.5.inc.fixed | 39 + .../Squiz/Tests/PHP/EmbeddedPhpUnitTest.6.inc | 8 + .../Squiz/Tests/PHP/EmbeddedPhpUnitTest.7.inc | 8 + .../Squiz/Tests/PHP/EmbeddedPhpUnitTest.8.inc | 10 + .../Squiz/Tests/PHP/EmbeddedPhpUnitTest.9.inc | 10 + .../Squiz/Tests/PHP/EmbeddedPhpUnitTest.php | 241 + .../Squiz/Tests/PHP/EvalUnitTest.inc | 5 + .../Squiz/Tests/PHP/EvalUnitTest.php | 56 + .../Squiz/Tests/PHP/GlobalKeywordUnitTest.inc | 13 + .../Squiz/Tests/PHP/GlobalKeywordUnitTest.php | 56 + .../Squiz/Tests/PHP/HeredocUnitTest.1.inc | 12 + .../Squiz/Tests/PHP/HeredocUnitTest.2.inc | 17 + .../Squiz/Tests/PHP/HeredocUnitTest.php | 64 + .../Tests/PHP/InnerFunctionsUnitTest.inc | 87 + .../Tests/PHP/InnerFunctionsUnitTest.php | 58 + .../PHP/LowercasePHPFunctionsUnitTest.inc | 50 + .../LowercasePHPFunctionsUnitTest.inc.fixed | 50 + .../PHP/LowercasePHPFunctionsUnitTest.php | 60 + .../Tests/PHP/NonExecutableCodeUnitTest.1.inc | 434 + .../Tests/PHP/NonExecutableCodeUnitTest.2.inc | 73 + .../Tests/PHP/NonExecutableCodeUnitTest.3.inc | 64 + .../Tests/PHP/NonExecutableCodeUnitTest.4.inc | 6 + .../Tests/PHP/NonExecutableCodeUnitTest.php | 126 + .../Tests/Scope/MemberVarScopeUnitTest.inc | 91 + .../Tests/Scope/MemberVarScopeUnitTest.php | 68 + .../Squiz/Tests/Scope/MethodScopeUnitTest.inc | 57 + .../Squiz/Tests/Scope/MethodScopeUnitTest.php | 58 + .../Tests/Scope/StaticThisUsageUnitTest.inc | 127 + .../Tests/Scope/StaticThisUsageUnitTest.php | 67 + .../Strings/ConcatenationSpacingUnitTest.inc | 49 + .../ConcatenationSpacingUnitTest.inc.fixed | 47 + .../Strings/ConcatenationSpacingUnitTest.php | 71 + .../Strings/DoubleQuoteUsageUnitTest.inc | 37 + .../DoubleQuoteUsageUnitTest.inc.fixed | 37 + .../Strings/DoubleQuoteUsageUnitTest.php | 67 + .../Tests/Strings/EchoedStringsUnitTest.inc | 13 + .../Strings/EchoedStringsUnitTest.inc.fixed | 13 + .../Tests/Strings/EchoedStringsUnitTest.php | 60 + .../Tests/WhiteSpace/CastSpacingUnitTest.inc | 9 + .../WhiteSpace/CastSpacingUnitTest.inc.fixed | 9 + .../Tests/WhiteSpace/CastSpacingUnitTest.php | 59 + .../ControlStructureSpacingUnitTest.inc | 269 + .../ControlStructureSpacingUnitTest.inc.fixed | 261 + .../ControlStructureSpacingUnitTest.js | 93 + .../ControlStructureSpacingUnitTest.js.fixed | 93 + .../ControlStructureSpacingUnitTest.php | 107 + .../FunctionClosingBraceSpaceUnitTest.inc | 90 + ...unctionClosingBraceSpaceUnitTest.inc.fixed | 94 + .../FunctionClosingBraceSpaceUnitTest.js | 132 + ...FunctionClosingBraceSpaceUnitTest.js.fixed | 133 + .../FunctionClosingBraceSpaceUnitTest.php | 84 + .../FunctionOpeningBraceSpaceUnitTest.inc | 54 + ...unctionOpeningBraceSpaceUnitTest.inc.fixed | 49 + .../FunctionOpeningBraceSpaceUnitTest.js | 115 + ...FunctionOpeningBraceSpaceUnitTest.js.fixed | 109 + .../FunctionOpeningBraceSpaceUnitTest.php | 73 + .../WhiteSpace/FunctionSpacingUnitTest.1.inc | 752 + .../FunctionSpacingUnitTest.1.inc.fixed | 850 + .../WhiteSpace/FunctionSpacingUnitTest.2.inc | 5 + .../FunctionSpacingUnitTest.2.inc.fixed | 7 + .../WhiteSpace/FunctionSpacingUnitTest.3.inc | 10 + .../FunctionSpacingUnitTest.3.inc.fixed | 7 + .../WhiteSpace/FunctionSpacingUnitTest.4.inc | 7 + .../WhiteSpace/FunctionSpacingUnitTest.5.inc | 8 + .../FunctionSpacingUnitTest.5.inc.fixed | 10 + .../WhiteSpace/FunctionSpacingUnitTest.6.inc | 13 + .../FunctionSpacingUnitTest.6.inc.fixed | 10 + .../WhiteSpace/FunctionSpacingUnitTest.7.inc | 10 + .../WhiteSpace/FunctionSpacingUnitTest.php | 150 + .../LanguageConstructSpacingUnitTest.inc | 43 + ...LanguageConstructSpacingUnitTest.inc.fixed | 41 + .../LanguageConstructSpacingUnitTest.php | 65 + .../LogicalOperatorSpacingUnitTest.inc | 19 + .../LogicalOperatorSpacingUnitTest.inc.fixed | 19 + .../LogicalOperatorSpacingUnitTest.js | 19 + .../LogicalOperatorSpacingUnitTest.js.fixed | 19 + .../LogicalOperatorSpacingUnitTest.php | 59 + .../WhiteSpace/MemberVarSpacingUnitTest.1.inc | 474 + .../MemberVarSpacingUnitTest.1.inc.fixed | 463 + .../WhiteSpace/MemberVarSpacingUnitTest.2.inc | 10 + .../WhiteSpace/MemberVarSpacingUnitTest.3.inc | 14 + .../WhiteSpace/MemberVarSpacingUnitTest.php | 120 + .../ObjectOperatorSpacingUnitTest.inc | 52 + .../ObjectOperatorSpacingUnitTest.inc.fixed | 48 + .../ObjectOperatorSpacingUnitTest.php | 73 + .../WhiteSpace/OperatorSpacingUnitTest.1.inc | 510 + .../OperatorSpacingUnitTest.1.inc.fixed | 502 + .../WhiteSpace/OperatorSpacingUnitTest.2.inc | 3 + .../WhiteSpace/OperatorSpacingUnitTest.3.inc | 6 + .../WhiteSpace/OperatorSpacingUnitTest.js | 104 + .../OperatorSpacingUnitTest.js.fixed | 98 + .../WhiteSpace/OperatorSpacingUnitTest.php | 180 + .../PropertyLabelSpacingUnitTest.js | 40 + .../PropertyLabelSpacingUnitTest.js.fixed | 39 + .../PropertyLabelSpacingUnitTest.php | 60 + .../WhiteSpace/ScopeClosingBraceUnitTest.inc | 134 + .../ScopeClosingBraceUnitTest.inc.fixed | 138 + .../WhiteSpace/ScopeClosingBraceUnitTest.php | 64 + .../ScopeKeywordSpacingUnitTest.1.inc | 209 + .../ScopeKeywordSpacingUnitTest.1.inc.fixed | 202 + .../ScopeKeywordSpacingUnitTest.2.inc | 6 + .../ScopeKeywordSpacingUnitTest.3.inc | 6 + .../ScopeKeywordSpacingUnitTest.3.inc.fixed | 6 + .../ScopeKeywordSpacingUnitTest.4.inc | 11 + .../ScopeKeywordSpacingUnitTest.php | 104 + .../WhiteSpace/SemicolonSpacingUnitTest.inc | 42 + .../SemicolonSpacingUnitTest.inc.fixed | 41 + .../WhiteSpace/SemicolonSpacingUnitTest.js | 25 + .../SemicolonSpacingUnitTest.js.fixed | 25 + .../WhiteSpace/SemicolonSpacingUnitTest.php | 87 + .../SuperfluousWhitespaceUnitTest.1.css | 32 + .../SuperfluousWhitespaceUnitTest.1.css.fixed | 30 + .../SuperfluousWhitespaceUnitTest.1.inc | 74 + .../SuperfluousWhitespaceUnitTest.1.inc.fixed | 68 + .../SuperfluousWhitespaceUnitTest.1.js | 56 + .../SuperfluousWhitespaceUnitTest.1.js.fixed | 50 + .../SuperfluousWhitespaceUnitTest.2.css | 3 + .../SuperfluousWhitespaceUnitTest.2.css.fixed | 3 + .../SuperfluousWhitespaceUnitTest.2.inc | 9 + .../SuperfluousWhitespaceUnitTest.2.inc.fixed | 7 + .../SuperfluousWhitespaceUnitTest.2.js | 1 + .../SuperfluousWhitespaceUnitTest.2.js.fixed | 1 + .../SuperfluousWhitespaceUnitTest.3.css | 3 + .../SuperfluousWhitespaceUnitTest.3.css.fixed | 3 + .../SuperfluousWhitespaceUnitTest.3.inc | 14 + .../SuperfluousWhitespaceUnitTest.3.inc.fixed | 5 + .../SuperfluousWhitespaceUnitTest.3.js | 1 + .../SuperfluousWhitespaceUnitTest.3.js.fixed | 1 + .../SuperfluousWhitespaceUnitTest.4.inc | 4 + .../SuperfluousWhitespaceUnitTest.4.inc.fixed | 4 + .../SuperfluousWhitespaceUnitTest.5.inc | 5 + .../SuperfluousWhitespaceUnitTest.5.inc.fixed | 4 + .../SuperfluousWhitespaceUnitTest.php | 117 + .../src/Standards/Squiz/ruleset.xml | 138 + .../Zend/Docs/Debug/CodeAnalyzerStandard.xml | 25 + .../Zend/Docs/Files/ClosingTagStandard.xml | 22 + .../ValidVariableNameStandard.xml | 37 + .../Zend/Sniffs/Debug/CodeAnalyzerSniff.php | 137 + .../Zend/Sniffs/Files/ClosingTagSniff.php | 79 + .../ValidVariableNameSniff.php | 196 + .../Zend/Tests/Debug/CodeAnalyzerUnitTest.inc | 6 + .../Zend/Tests/Debug/CodeAnalyzerUnitTest.php | 71 + .../Zend/Tests/Files/ClosingTagUnitTest.1.inc | 12 + .../Files/ClosingTagUnitTest.1.inc.fixed | 12 + .../Zend/Tests/Files/ClosingTagUnitTest.2.inc | 3 + .../Zend/Tests/Files/ClosingTagUnitTest.3.inc | 1 + .../Files/ClosingTagUnitTest.3.inc.fixed | 1 + .../Zend/Tests/Files/ClosingTagUnitTest.4.inc | 1 + .../Files/ClosingTagUnitTest.4.inc.fixed | 1 + .../Zend/Tests/Files/ClosingTagUnitTest.5.inc | 1 + .../Files/ClosingTagUnitTest.5.inc.fixed | 1 + .../Zend/Tests/Files/ClosingTagUnitTest.6.inc | 3 + .../Files/ClosingTagUnitTest.6.inc.fixed | 3 + .../Zend/Tests/Files/ClosingTagUnitTest.7.inc | 1 + .../Files/ClosingTagUnitTest.7.inc.fixed | 1 + .../Zend/Tests/Files/ClosingTagUnitTest.php | 70 + .../ValidVariableNameUnitTest.inc | 145 + .../ValidVariableNameUnitTest.php | 106 + .../src/Standards/Zend/ruleset.xml | 32 + .../php_codesniffer/src/Tokenizers/CSS.php | 541 + .../src/Tokenizers/Comment.php | 280 + .../php_codesniffer/src/Tokenizers/JS.php | 1256 + .../php_codesniffer/src/Tokenizers/PHP.php | 4222 + .../src/Tokenizers/Tokenizer.php | 1738 + .../php_codesniffer/src/Util/Cache.php | 355 + .../php_codesniffer/src/Util/Common.php | 605 + .../php_codesniffer/src/Util/Help.php | 626 + .../src/Util/MessageCollector.php | 310 + .../php_codesniffer/src/Util/Standards.php | 340 + .../php_codesniffer/src/Util/Timing.php | 133 + .../php_codesniffer/src/Util/Tokens.php | 835 + .../php_codesniffer/tests/AllTests.php | 58 + .../php_codesniffer/tests/ConfigDouble.php | 213 + .../tests/Core/AbstractMethodUnitTest.php | 274 + .../php_codesniffer/tests/Core/AllTests.php | 63 + .../Autoloader/DetermineLoadedClassTest.php | 126 + .../tests/Core/Autoloader/TestFiles/A.inc | 3 + .../tests/Core/Autoloader/TestFiles/B.inc | 4 + .../tests/Core/Autoloader/TestFiles/C.inc | 4 + .../tests/Core/Autoloader/TestFiles/Sub/C.inc | 5 + .../Config/AbstractRealConfigTestCase.php | 92 + .../tests/Core/Config/ExtensionsArgTest.php | 128 + .../tests/Core/Config/GeneratorArgTest.php | 163 + .../tests/Core/Config/ReportArgsTest.php | 64 + .../tests/Core/Config/ReportWidthTest.php | 260 + .../Core/Config/SniffsExcludeArgsTest.php | 327 + .../tests/Core/ErrorSuppressionTest.php | 1277 + .../Files/File/FindEndOfStatementTest.inc | 105 + .../Files/File/FindEndOfStatementTest.php | 457 + .../Files/File/FindExtendedClassNameTest.inc | 58 + .../Files/File/FindExtendedClassNameTest.php | 153 + .../FindImplementedInterfaceNamesTest.inc | 47 + .../FindImplementedInterfaceNamesTest.php | 162 + .../Files/File/FindStartOfStatementTest.inc | 212 + .../Files/File/FindStartOfStatementTest.php | 989 + .../Files/File/GetClassPropertiesTest.inc | 58 + .../Files/File/GetClassPropertiesTest.php | 192 + .../Core/Files/File/GetConditionTest.inc | 91 + .../Core/Files/File/GetConditionTest.php | 494 + .../Files/File/GetDeclarationNameJSTest.js | 23 + .../Files/File/GetDeclarationNameJSTest.php | 158 + .../GetDeclarationNameParseError1Test.inc | 5 + .../GetDeclarationNameParseError1Test.php | 37 + .../GetDeclarationNameParseError2Test.inc | 6 + .../GetDeclarationNameParseError2Test.php | 37 + .../Files/File/GetDeclarationNameTest.inc | 98 + .../Files/File/GetDeclarationNameTest.php | 221 + .../Files/File/GetMemberPropertiesTest.inc | 427 + .../Files/File/GetMemberPropertiesTest.php | 1899 + .../GetMethodParametersParseError1Test.inc | 4 + .../GetMethodParametersParseError1Test.php | 38 + .../GetMethodParametersParseError2Test.inc | 4 + .../GetMethodParametersParseError2Test.php | 38 + .../Files/File/GetMethodParametersTest.inc | 352 + .../Files/File/GetMethodParametersTest.php | 3347 + .../Files/File/GetMethodPropertiesTest.inc | 226 + .../Files/File/GetMethodPropertiesTest.php | 1562 + .../Core/Files/File/GetTokensAsStringTest.inc | 25 + .../Core/Files/File/GetTokensAsStringTest.php | 334 + .../tests/Core/Files/File/IsReferenceTest.inc | 216 + .../tests/Core/Files/File/IsReferenceTest.php | 396 + .../FileList/AbstractFileListTestCase.php | 55 + .../tests/Core/Files/FileList/AddFileTest.php | 142 + .../Core/Files/FileList/ConstructTest.php | 122 + .../Core/Files/FileList/FilterDouble.php | 31 + .../Core/Files/FileList/Fixtures/file1.php | 3 + .../Core/Files/FileList/Fixtures/file2.php | 3 + .../Core/Filters/AbstractFilterTestCase.php | 250 + .../tests/Core/Filters/Filter/AcceptTest.php | 110 + .../tests/Core/Filters/Filter/AcceptTest.xml | 18 + .../tests/Core/Filters/GitModifiedTest.php | 273 + .../tests/Core/Filters/GitStagedTest.php | 273 + .../Fixer/FixFileReturnValueAllGoodTest.xml | 8 + .../Fixer/FixFileReturnValueConflictTest.xml | 8 + .../FixFileReturnValueNotEnoughLoopsTest.xml | 8 + .../Core/Fixer/FixFileReturnValueTest.php | 89 + .../GenerateDiffTest-BlankLinesAtEnd.diff | 10 + .../GenerateDiffTest-BlankLinesAtEnd.inc | 11 + .../GenerateDiffTest-BlankLinesAtStart.diff | 9 + .../GenerateDiffTest-BlankLinesAtStart.inc | 10 + .../Fixtures/GenerateDiffTest-LineAdded.diff | 8 + .../Fixtures/GenerateDiffTest-LineAdded.inc | 6 + .../GenerateDiffTest-LineRemoved.diff | 8 + .../Fixtures/GenerateDiffTest-LineRemoved.inc | 8 + .../Fixtures/GenerateDiffTest-NoDiff.diff | 0 .../Fixtures/GenerateDiffTest-NoDiff.inc | 7 + ...GenerateDiffTest-NoTrailingWhitespace.diff | 9 + .../GenerateDiffTest-NoTrailingWhitespace.inc | 7 + .../GenerateDiffTest-TabsToSpaces.diff | 9 + .../GenerateDiffTest-TabsToSpaces.inc | 7 + .../GenerateDiffTest-VarNameChanged.diff | 12 + .../GenerateDiffTest-VarNameChanged.inc | 7 + .../GenerateDiffTest-WhiteSpaceAtEnd.diff | 8 + .../GenerateDiffTest-WhiteSpaceAtEnd.inc | 7 + .../GenerateDiffTest-WhiteSpaceAtStart.diff | 8 + .../GenerateDiffTest-WhiteSpaceAtStart.inc | 7 + .../GenerateDiffTest-WindowsLineEndings.inc | 7 + .../Core/Fixer/Fixtures/GenerateDiffTest.inc | 7 + .../FixFileReturnValue/AllGoodSniff.php | 37 + .../FixFileReturnValue/ConflictSniff.php | 101 + .../NotEnoughLoopsSniff.php | 40 + .../Fixer/Fixtures/TestStandard/ruleset.xml | 4 + .../tests/Core/Fixer/Fixtures/test.inc | 2 + .../tests/Core/Fixer/GenerateDiffTest.php | 227 + .../Core/Generators/AllValidDocsTest.xml | 10 + .../tests/Core/Generators/AnchorLinksTest.xml | 10 + ...xpectedOutputCodeComparisonBlankLines.html | 105 + .../ExpectedOutputCodeComparisonBlankLines.md | 35 + ...ExpectedOutputCodeComparisonBlankLines.txt | 18 + ...pectedOutputCodeComparisonBlockLength.html | 115 + ...ExpectedOutputCodeComparisonBlockLength.md | 47 + ...xpectedOutputCodeComparisonBlockLength.txt | 23 + .../ExpectedOutputCodeComparisonEncoding.html | 105 + .../ExpectedOutputCodeComparisonEncoding.md | 48 + .../ExpectedOutputCodeComparisonEncoding.txt | 26 + ...xpectedOutputCodeComparisonLineLength.html | 106 + .../ExpectedOutputCodeComparisonLineLength.md | 31 + ...ExpectedOutputCodeComparisonLineLength.txt | 18 + .../ExpectedOutputCodeTitleLineWrapping.html | 135 + .../ExpectedOutputCodeTitleLineWrapping.md | 79 + .../ExpectedOutputCodeTitleLineWrapping.txt | 33 + .../ExpectedOutputCodeTitleWhitespace.html | 115 + .../ExpectedOutputCodeTitleWhitespace.md | 44 + .../ExpectedOutputCodeTitleWhitespace.txt | 20 + .../ExpectedOutputDocumentationTitleCase.html | 95 + .../ExpectedOutputDocumentationTitleCase.md | 7 + .../ExpectedOutputDocumentationTitleCase.txt | 7 + ...xpectedOutputDocumentationTitleLength.html | 95 + .../ExpectedOutputDocumentationTitleLength.md | 7 + ...ExpectedOutputDocumentationTitleLength.txt | 7 + ...dOutputDocumentationTitlePCREFallback.html | 96 + ...tedOutputDocumentationTitlePCREFallback.md | 9 + ...edOutputDocumentationTitlePCREFallback.txt | 9 + ...dOutputDocumentationTitleToAnchorSlug.html | 107 + .../Expectations/ExpectedOutputEmpty.txt | 0 ...validCodeComparisonMismatchedCodeElms.html | 105 + ...InvalidCodeComparisonMismatchedCodeElms.md | 25 + ...nvalidCodeComparisonMismatchedCodeElms.txt | 13 + ...utInvalidCodeComparisonMissingCodeElm.html | 95 + ...tputInvalidCodeComparisonMissingCodeElm.md | 7 + ...putInvalidCodeComparisonMissingCodeElm.txt | 7 + ...ctedOutputInvalidCodeComparisonNoCode.html | 101 + ...pectedOutputInvalidCodeComparisonNoCode.md | 13 + ...ectedOutputInvalidCodeComparisonNoCode.txt | 10 + ...dOutputInvalidCodeComparisonNoContent.html | 95 + ...tedOutputInvalidCodeComparisonNoContent.md | 7 + ...edOutputInvalidCodeComparisonNoContent.txt | 7 + ...tInvalidCodeComparisonOneEmptyCodeElm.html | 105 + ...putInvalidCodeComparisonOneEmptyCodeElm.md | 25 + ...utInvalidCodeComparisonOneEmptyCodeElm.txt | 13 + ...InvalidCodeComparisonTwoEmptyCodeElms.html | 95 + ...utInvalidCodeComparisonTwoEmptyCodeElms.md | 7 + ...tInvalidCodeComparisonTwoEmptyCodeElms.txt | 7 + .../ExpectedOutputInvalidCodeTitleEmpty.html | 101 + .../ExpectedOutputInvalidCodeTitleEmpty.md | 21 + .../ExpectedOutputInvalidCodeTitleEmpty.txt | 11 + ...ExpectedOutputInvalidCodeTitleMissing.html | 101 + .../ExpectedOutputInvalidCodeTitleMissing.md | 21 + .../ExpectedOutputInvalidCodeTitleMissing.txt | 11 + ...dOutputInvalidDocumentationTitleEmpty.html | 105 + ...tedOutputInvalidDocumentationTitleEmpty.md | 25 + ...edOutputInvalidDocumentationTitleEmpty.txt | 13 + ...utputInvalidDocumentationTitleMissing.html | 105 + ...dOutputInvalidDocumentationTitleMissing.md | 25 + ...OutputInvalidDocumentationTitleMissing.txt | 13 + ...xpectedOutputInvalidStandardNoContent.html | 104 + .../ExpectedOutputInvalidStandardNoContent.md | 24 + ...ExpectedOutputInvalidStandardNoContent.txt | 11 + .../Expectations/ExpectedOutputOneDoc.html | 95 + .../Expectations/ExpectedOutputOneDoc.md | 7 + .../Expectations/ExpectedOutputOneDoc.txt | 7 + .../ExpectedOutputStandardBlankLines.html | 97 + .../ExpectedOutputStandardBlankLines.md | 11 + .../ExpectedOutputStandardBlankLines.txt | 11 + .../ExpectedOutputStandardEncoding.html | 96 + .../ExpectedOutputStandardEncoding.md | 8 + .../ExpectedOutputStandardEncoding.txt | 9 + .../ExpectedOutputStandardIndent.html | 98 + .../ExpectedOutputStandardIndent.md | 10 + .../ExpectedOutputStandardIndent.txt | 10 + .../ExpectedOutputStandardLineWrapping.html | 97 + .../ExpectedOutputStandardLineWrapping.md | 9 + .../ExpectedOutputStandardLineWrapping.txt | 11 + .../ExpectedOutputStructureDocs.html | 200 + .../ExpectedOutputStructureDocs.md | 177 + .../ExpectedOutputStructureDocs.txt | 106 + ...edOutputUnsupportedOneElmAtWrongLevel.html | 95 + ...ctedOutputUnsupportedOneElmAtWrongLevel.md | 7 + ...tedOutputUnsupportedOneElmAtWrongLevel.txt | 7 + ...tputUnsupportedSuperfluousCodeElement.html | 105 + ...OutputUnsupportedSuperfluousCodeElement.md | 25 + ...utputUnsupportedSuperfluousCodeElement.txt | 13 + .../Core/Generators/Fixtures/HTMLDouble.php | 70 + .../Generators/Fixtures/MarkdownDouble.php | 68 + .../Generators/Fixtures/MockGenerator.php | 28 + .../CodeComparisonBlankLinesStandard.xml | 33 + .../CodeComparisonBlockLengthStandard.xml | 35 + .../CodeComparisonEncodingStandard.xml | 42 + .../CodeComparisonLineLengthStandard.xml | 25 + .../Content/CodeTitleLineWrappingStandard.xml | 55 + .../Content/CodeTitleWhitespaceStandard.xml | 32 + .../DocumentationTitleCaseStandard.xml | 7 + .../DocumentationTitleLengthStandard.xml | 7 + ...DocumentationTitlePCREFallbackStandard.xml | 9 + ...ocumentationTitleToAnchorSlug1Standard.xml | 7 + ...ocumentationTitleToAnchorSlug2Standard.xml | 8 + ...ocumentationTitleToAnchorSlug3Standard.xml | 8 + .../Content/StandardBlankLinesStandard.xml | 13 + .../Docs/Content/StandardEncodingStandard.xml | 8 + .../Docs/Content/StandardIndentStandard.xml | 10 + .../Content/StandardLineWrappingStandard.xml | 9 + ...deComparisonMismatchedCodeElmsStandard.xml | 18 + .../CodeComparisonMissingCodeElmStandard.xml | 14 + .../Invalid/CodeComparisonNoCodeStandard.xml | 11 + .../CodeComparisonNoContentStandard.xml | 8 + .../CodeComparisonOneEmptyCodeElmStandard.xml | 15 + ...CodeComparisonTwoEmptyCodeElmsStandard.xml | 12 + .../Docs/Invalid/CodeTitleEmptyStandard.xml | 19 + .../Docs/Invalid/CodeTitleMissingStandard.xml | 19 + .../DocumentationTitleEmptyStandard.xml | 19 + .../DocumentationTitleMissingStandard.xml | 19 + .../Invalid/StandardNoContentStandard.xml | 15 + .../Docs/Structure/NoContentStandard.xml | 2 + .../NoDocumentationElementStandard.xml | 2 + .../OneCodeComparisonNoStandardStandard.xml | 14 + ...OneStandardBlockCodeComparisonStandard.xml | 19 + .../OneStandardBlockNoCodeStandard.xml | 7 + ...tandardBlockTwoCodeComparisonsStandard.xml | 31 + .../TwoStandardBlocksNoCodeStandard.xml | 12 + ...tandardBlocksOneCodeComparisonStandard.xml | 24 + ...dardBlocksThreeCodeComparisonsStandard.xml | 48 + .../ElementAtWrongLevelStandard.xml | 8 + .../OneElmAtWrongLevelStandard.xml | 13 + .../SuperfluousCodeElementStandard.xml | 24 + .../Unsupported/UnknownElementStandard.xml | 7 + .../Content/CodeComparisonBlankLinesSniff.php | 12 + .../CodeComparisonBlockLengthSniff.php | 12 + .../Content/CodeComparisonEncodingSniff.php | 12 + .../Content/CodeComparisonLineLengthSniff.php | 12 + .../Content/CodeTitleLineWrappingSniff.php | 12 + .../Content/CodeTitleWhitespaceSniff.php | 12 + .../Content/DocumentationTitleCaseSniff.php | 12 + .../Content/DocumentationTitleLengthSniff.php | 12 + .../DocumentationTitlePCREFallbackSniff.php | 12 + .../DocumentationTitleToAnchorSlug1Sniff.php | 12 + .../DocumentationTitleToAnchorSlug2Sniff.php | 12 + .../DocumentationTitleToAnchorSlug3Sniff.php | 12 + .../Content/StandardBlankLinesSniff.php | 12 + .../Sniffs/Content/StandardEncodingSniff.php | 12 + .../Sniffs/Content/StandardIndentSniff.php | 12 + .../Content/StandardLineWrappingSniff.php | 12 + .../StandardWithDocs/Sniffs/DummySniff.php | 25 + .../CodeComparisonMismatchedCodeElmsSniff.php | 12 + .../CodeComparisonMissingCodeElmSniff.php | 12 + .../Invalid/CodeComparisonNoCodeSniff.php | 12 + .../Invalid/CodeComparisonNoContentSniff.php | 12 + .../CodeComparisonOneEmptyCodeElmSniff.php | 12 + .../CodeComparisonTwoEmptyCodeElmsSniff.php | 12 + .../Sniffs/Invalid/CodeTitleEmptySniff.php | 12 + .../Sniffs/Invalid/CodeTitleMissingSniff.php | 12 + .../Invalid/DocumentationTitleEmptySniff.php | 12 + .../DocumentationTitleMissingSniff.php | 12 + .../Sniffs/Invalid/StandardNoContentSniff.php | 12 + .../Structure/DocumentationMissingSniff.php | 12 + .../Sniffs/Structure/NoContentSniff.php | 12 + .../Structure/NoDocumentationElementSniff.php | 12 + .../OneCodeComparisonNoStandardSniff.php | 12 + .../OneStandardBlockCodeComparisonSniff.php | 12 + .../Structure/OneStandardBlockNoCodeSniff.php | 12 + ...neStandardBlockTwoCodeComparisonsSniff.php | 12 + .../TwoStandardBlocksNoCodeSniff.php | 12 + ...woStandardBlocksOneCodeComparisonSniff.php | 12 + ...tandardBlocksThreeCodeComparisonsSniff.php | 12 + .../Unsupported/ElementAtWrongLevelSniff.php | 12 + .../Unsupported/OneElmAtWrongLevelSniff.php | 12 + .../SuperfluousCodeElementSniff.php | 12 + .../Unsupported/UnknownElementSniff.php | 12 + .../Fixtures/StandardWithDocs/ruleset.xml | 4 + .../tests/Core/Generators/GeneratorTest.php | 227 + .../tests/Core/Generators/HTMLTest.php | 426 + .../tests/Core/Generators/MarkdownTest.php | 397 + .../tests/Core/Generators/NoDocsTest.xml | 8 + .../tests/Core/Generators/NoValidDocsTest.xml | 8 + .../tests/Core/Generators/OneDocTest.xml | 8 + .../Core/Generators/StructureDocsTest.xml | 10 + .../tests/Core/Generators/TextTest.php | 245 + .../Core/Ruleset/AbstractRulesetTestCase.php | 115 + .../Core/Ruleset/ConstructorNoSniffsTest.xml | 6 + .../tests/Core/Ruleset/ConstructorTest.php | 293 + .../Ruleset/DisplayCachedMessagesTest.php | 312 + ...xpandRulesetReferenceCaseMismatch1Test.xml | 9 + ...xpandRulesetReferenceCaseMismatch2Test.xml | 9 + ...ExpandRulesetReferenceHomePathFailTest.xml | 8 + .../ExpandRulesetReferenceHomePathTest.php | 121 + .../ExpandRulesetReferenceHomePathTest.xml | 7 + ...pandRulesetReferenceInternalIgnoreTest.xml | 15 + ...ndRulesetReferenceInternalStandardTest.xml | 8 + .../ExpandRulesetReferenceInternalTest.php | 71 + ...dRulesetReferenceInvalidErrorCode1Test.xml | 7 + ...dRulesetReferenceInvalidErrorCode2Test.xml | 7 + ...dRulesetReferenceInvalidErrorCode3Test.xml | 7 + ...RulesetReferenceInvalidHomePathRefTest.xml | 8 + .../ExpandRulesetReferenceMissingFileTest.xml | 7 + .../Ruleset/ExpandRulesetReferenceTest.php | 134 + .../Ruleset/ExpandRulesetReferenceTest.xml | 13 + ...andRulesetReferenceUnknownCategoryTest.xml | 10 + ...ExpandRulesetReferenceUnknownSniffTest.xml | 10 + ...andRulesetReferenceUnknownStandardTest.xml | 10 + .../Core/Ruleset/ExpandSniffDirectoryTest.php | 67 + .../Core/Ruleset/ExpandSniffDirectoryTest.xml | 8 + .../Core/Ruleset/ExplainCustomRulesetTest.xml | 10 + .../Core/Ruleset/ExplainSingleSniffTest.xml | 6 + .../tests/Core/Ruleset/ExplainTest.php | 212 + .../Sniffs/Category/Sniff.php | 24 + .../Category/SubDir/TooDeeplyNestedSniff.php | 24 + .../Sniffs/MissingCategoryDirSniff.php | 24 + .../Sniffs/NoNamespaceSniff.php | 22 + .../Sniffs/PartialNamespaceSniff.php | 24 + .../Sniffs/CategoryCalledSniffsSniff.php | 24 + .../Sniffs/CheckSomething/ValidSniff.php | 25 + .../Ruleset/Fixtures/ExternalA/ruleset.xml | 4 + .../ExternalB/Sniffs/CheckMore/ValidSniff.php | 25 + .../Ruleset/Fixtures/ExternalB/ruleset.xml | 4 + .../MyStandard/Sniffs/Category/ValidSniff.php | 25 + .../FakeHomePath/src/MyStandard/ruleset.xml | 4 + .../Internal/Sniffs/Valid/ValidSniff.php | 25 + .../Ruleset/Fixtures/Internal/ruleset.xml | 11 + .../Fixtures/InvalidNoSniffsDir/Sniffs | 0 .../Fixtures/InvalidNoSniffsDir/ruleset.xml | 4 + .../ProcessRulesetAutoloadLoadAlways.1.php | 8 + .../ProcessRulesetAutoloadLoadAlways.2.php | 8 + .../ProcessRulesetAutoloadLoadAlways.3.php | 8 + .../ProcessRulesetAutoloadLoadAlways.4.php | 8 + .../ProcessRulesetAutoloadLoadPhpcbfOnly.php | 8 + .../ProcessRulesetAutoloadLoadPhpcsOnly.php | 8 + .../Fixtures/PropertyTypeHandlingInline.inc | 31 + .../Deprecated/WithLongReplacementSniff.php | 41 + ...eplacementContainingLinuxNewlinesSniff.php | 45 + ...WithReplacementContainingNewlinesSniff.php | 45 + .../Deprecated/WithReplacementSniff.php | 41 + .../Deprecated/WithoutReplacementSniff.php | 41 + .../EmptyDeprecationVersionSniff.php | 41 + .../EmptyRemovalVersionSniff.php | 41 + .../InvalidDeprecationMessageSniff.php | 42 + .../InvalidDeprecationVersionSniff.php | 41 + .../InvalidRemovalVersionSniff.php | 41 + .../NoImplementsNoProcessSniff.php | 17 + .../NoImplementsNoRegisterOrProcessSniff.php | 12 + .../NoImplementsNoRegisterSniff.php | 19 + .../InvalidSniffs/RegisterNoArraySniff.php | 25 + ...InvalidImplementsWithoutImplementSniff.php | 24 + .../MissingInterface/ValidImplementsSniff.php | 25 + .../ValidImplementsViaAbstractSniff.php | 24 + .../SetProperty/AllowedAsDeclaredSniff.php | 28 + .../AllowedViaMagicMethodSniff.php | 40 + .../SetProperty/AllowedViaStdClassSniff.php | 26 + .../NotAllowedViaAttributeSniff.php | 27 + .../SetProperty/PropertyTypeHandlingSniff.php | 190 + .../ImplementsDeprecatedInterfaceSniff.php | 46 + .../ListensForCSSAndJSSniff.php | 30 + .../ListensForCSSAndUnrecognizedSniff.php | 30 + .../ListensForCSSSniff.php | 27 + .../ListensForEmptySniff.php | 27 + .../SupportedTokenizers/ListensForJSSniff.php | 27 + .../ListensForPHPAndCSSAndJSSniff.php | 34 + .../ListensForUnrecognizedTokenizersSniff.php | 30 + .../ValidSniffs/RegisterEmptyArraySniff.php | 25 + .../Ruleset/Fixtures/TestStandard/ruleset.xml | 4 + .../Core/Ruleset/GetIgnorePatternsTest.php | 111 + .../Core/Ruleset/GetIgnorePatternsTest.xml | 19 + .../Core/Ruleset/GetIncludePatternsTest.php | 108 + .../Core/Ruleset/GetIncludePatternsTest.xml | 15 + ...ateTokenListenersNamingConventionsTest.php | 82 + ...ateTokenListenersNamingConventionsTest.xml | 24 + ...ulateTokenListenersRegisterNoArrayTest.xml | 10 + ...eTokenListenersSupportedTokenizersTest.php | 111 + ...eTokenListenersSupportedTokenizersTest.xml | 8 + .../Ruleset/PopulateTokenListenersTest.php | 553 + .../Ruleset/PopulateTokenListenersTest.xml | 45 + .../Ruleset/ProcessRuleInvalidTypeTest.php | 43 + .../Ruleset/ProcessRuleInvalidTypeTest.xml | 9 + .../ProcessRuleShouldProcessElementTest.php | 666 + .../ProcessRuleShouldProcessElementTest.xml | 105 + ...ssRulesetAutoExpandSniffsDirectoryTest.xml | 13 + ...ProcessRulesetAutoloadFileNotFoundTest.xml | 8 + .../Ruleset/ProcessRulesetAutoloadTest.php | 164 + .../Ruleset/ProcessRulesetAutoloadTest.xml | 37 + ...ocessRulesetBrokenRulesetEmptyFileTest.xml | 0 ...cessRulesetBrokenRulesetMultiErrorTest.xml | 10 + ...essRulesetBrokenRulesetSingleErrorTest.xml | 2 + .../ProcessRulesetBrokenRulesetTest.php | 96 + .../ProcessRulesetExcludeSniffGroupTest.xml | 11 + .../ProcessRulesetInvalidNoSniffsDirTest.xml | 10 + .../Core/Ruleset/ProcessRulesetMiscTest.xml | 25 + ...ProcessRulesetShouldProcessElementTest.php | 391 + ...ProcessRulesetShouldProcessElementTest.xml | 54 + .../tests/Core/Ruleset/ProcessRulesetTest.php | 266 + .../PropertyTypeHandlingInlineTest.xml | 6 + .../Core/Ruleset/PropertyTypeHandlingTest.php | 335 + .../Core/Ruleset/PropertyTypeHandlingTest.xml | 79 + ...isterSniffsMissingInterfaceInvalidTest.xml | 8 + .../RegisterSniffsMissingInterfaceTest.php | 65 + ...egisterSniffsMissingInterfaceValidTest.xml | 9 + ...sInvalidSniffNoImplementsNoProcessTest.xml | 8 + ...iffNoImplementsNoRegisterOrProcessTest.xml | 8 + ...InvalidSniffNoImplementsNoRegisterTest.xml | 8 + .../RegisterSniffsRejectsInvalidSniffTest.php | 80 + .../tests/Core/Ruleset/RegisterSniffsTest.php | 293 + .../RuleInclusionAbsoluteLinuxTest.php | 119 + .../RuleInclusionAbsoluteLinuxTest.xml | 11 + .../RuleInclusionAbsoluteWindowsTest.php | 116 + .../RuleInclusionAbsoluteWindowsTest.xml | 11 + .../Ruleset/RuleInclusionTest-include.xml | 10 + .../tests/Core/Ruleset/RuleInclusionTest.php | 479 + .../tests/Core/Ruleset/RuleInclusionTest.xml | 58 + .../SetPropertyAllowedAsDeclaredTest.xml | 16 + .../SetPropertyAllowedViaMagicMethodTest.xml | 16 + .../SetPropertyAllowedViaStdClassTest.xml | 16 + ...PropertyToMultipleSniffsInCategoryTest.xml | 9 + ...nInvalidPropertyWhenSetForCategoryTest.xml | 9 + ...nInvalidPropertyWhenSetForStandardTest.xml | 10 + .../SetPropertyNotAllowedViaAttributeTest.xml | 10 + ...opertyThrowsErrorOnInvalidPropertyTest.xml | 9 + .../Core/Ruleset/SetSniffPropertyTest.php | 421 + ...eprecationsEmptyDeprecationVersionTest.xml | 8 + ...iffDeprecationsEmptyRemovalVersionTest.xml | 8 + ...recationsInvalidDeprecationMessageTest.xml | 8 + ...recationsInvalidDeprecationVersionTest.xml | 8 + ...fDeprecationsInvalidRemovalVersionTest.xml | 8 + .../ShowSniffDeprecationsOrderTest.xml | 10 + .../ShowSniffDeprecationsReportWidthTest.xml | 8 + .../Ruleset/ShowSniffDeprecationsTest.php | 540 + .../Ruleset/ShowSniffDeprecationsTest.xml | 14 + .../Core/Runner/AbstractRunnerTestCase.php | 19 + .../Core/Runner/PrintProgressDotsTest.php | 222 + .../tests/Core/Runner/PrintProgressTest.php | 235 + .../tests/Core/Runner/RunPHPCSExplainTest.php | 73 + .../Core/Runner/RunPHPCSGeneratorTest.php | 72 + .../Core/Sniffs/AbstractArraySniffTest.inc | 51 + .../Core/Sniffs/AbstractArraySniffTest.php | 297 + .../Sniffs/AbstractArraySniffTestable.php | 65 + .../Core/Standards/StandardRulesetsQATest.php | 82 + .../Tokenizers/AbstractTokenizerTestCase.php | 147 + .../Tokenizers/Comment/CommentTestCase.php | 117 + .../Tokenizers/Comment/LiveCoding1Test.inc | 6 + .../Tokenizers/Comment/LiveCoding1Test.php | 69 + .../Tokenizers/Comment/LiveCoding2Test.inc | 5 + .../Tokenizers/Comment/LiveCoding2Test.php | 68 + .../Tokenizers/Comment/LiveCoding3Test.inc | 4 + .../Tokenizers/Comment/LiveCoding3Test.php | 62 + .../Tokenizers/Comment/LiveCoding4Test.inc | 7 + .../Tokenizers/Comment/LiveCoding4Test.php | 76 + .../Comment/MultiLineDocBlockTest.inc | 81 + .../Comment/MultiLineDocBlockTest.php | 439 + .../PhpcsAnnotationsInDocBlockTest.inc | 116 + .../PhpcsAnnotationsInDocBlockTest.php | 637 + .../Comment/SingleLineDocBlockTest.inc | 26 + .../Comment/SingleLineDocBlockTest.php | 217 + .../PHP/AnonClassParenthesisOwnerTest.inc | 29 + .../PHP/AnonClassParenthesisOwnerTest.php | 158 + .../Core/Tokenizers/PHP/ArrayKeywordTest.inc | 58 + .../Core/Tokenizers/PHP/ArrayKeywordTest.php | 200 + .../PHP/AttributesParseError1Test.inc | 8 + .../PHP/AttributesParseError1Test.php | 66 + .../PHP/AttributesParseError2Test.inc | 8 + .../PHP/AttributesParseError2Test.php | 67 + .../PHP/AttributesParseError3Test.inc | 10 + .../PHP/AttributesParseError3Test.php | 76 + .../PHP/AttributesParseError4Test.inc | 8 + .../PHP/AttributesParseError4Test.php | 84 + .../Core/Tokenizers/PHP/AttributesTest.inc | 86 + .../Core/Tokenizers/PHP/AttributesTest.php | 702 + .../PHP/BackfillAsymmetricVisibilityTest.inc | 60 + .../PHP/BackfillAsymmetricVisibilityTest.php | 331 + .../Core/Tokenizers/PHP/BackfillEnumTest.inc | 91 + .../Core/Tokenizers/PHP/BackfillEnumTest.php | 226 + .../PHP/BackfillExplicitOctalNotationTest.inc | 31 + .../PHP/BackfillExplicitOctalNotationTest.php | 120 + .../PHP/BackfillFnTokenParseErrorTest.inc | 5 + .../PHP/BackfillFnTokenParseErrorTest.php | 44 + .../Tokenizers/PHP/BackfillFnTokenTest.inc | 228 + .../Tokenizers/PHP/BackfillFnTokenTest.php | 967 + .../Tokenizers/PHP/BackfillMatchTokenTest.inc | 319 + .../Tokenizers/PHP/BackfillMatchTokenTest.php | 555 + .../PHP/BackfillNumericSeparatorTest.inc | 94 + .../PHP/BackfillNumericSeparatorTest.php | 402 + .../Tokenizers/PHP/BackfillReadonlyTest.inc | 156 + .../Tokenizers/PHP/BackfillReadonlyTest.php | 271 + .../Core/Tokenizers/PHP/BitwiseOrTest.inc | 213 + .../Core/Tokenizers/PHP/BitwiseOrTest.php | 170 + .../PHP/ContextSensitiveKeywordsTest.inc | 253 + .../PHP/ContextSensitiveKeywordsTest.php | 576 + .../PHP/DNFTypesParseError1Test.inc | 17 + .../PHP/DNFTypesParseError1Test.php | 69 + .../PHP/DNFTypesParseError2Test.inc | 48 + .../PHP/DNFTypesParseError2Test.php | 218 + .../Core/Tokenizers/PHP/DNFTypesTest.inc | 288 + .../Core/Tokenizers/PHP/DNFTypesTest.php | 557 + .../Tokenizers/PHP/DefaultKeywordTest.inc | 203 + .../Tokenizers/PHP/DefaultKeywordTest.php | 255 + .../Core/Tokenizers/PHP/DoubleArrowTest.inc | 281 + .../Core/Tokenizers/PHP/DoubleArrowTest.php | 237 + .../Tokenizers/PHP/DoubleQuotedStringTest.inc | 52 + .../Tokenizers/PHP/DoubleQuotedStringTest.php | 144 + .../Core/Tokenizers/PHP/EnumCaseTest.inc | 97 + .../Core/Tokenizers/PHP/EnumCaseTest.php | 151 + .../Core/Tokenizers/PHP/ExitKeywordTest.inc | 106 + .../Core/Tokenizers/PHP/ExitKeywordTest.php | 228 + .../tests/Core/Tokenizers/PHP/FinallyTest.inc | 40 + .../tests/Core/Tokenizers/PHP/FinallyTest.php | 98 + .../Core/Tokenizers/PHP/GotoLabelTest.inc | 85 + .../Core/Tokenizers/PHP/GotoLabelTest.php | 194 + .../Core/Tokenizers/PHP/HeredocNowdocTest.inc | 39 + .../Core/Tokenizers/PHP/HeredocNowdocTest.php | 213 + .../Tokenizers/PHP/HeredocParseErrorTest.inc | 11 + .../Tokenizers/PHP/HeredocParseErrorTest.php | 41 + .../Core/Tokenizers/PHP/HeredocStringTest.inc | 193 + .../Core/Tokenizers/PHP/HeredocStringTest.php | 161 + .../PHP/NamedFunctionCallArgumentsTest.inc | 419 + .../PHP/NamedFunctionCallArgumentsTest.php | 992 + .../NullableVsInlineThenParseErrorTest.inc | 9 + .../NullableVsInlineThenParseErrorTest.php | 40 + .../PHP/NullableVsInlineThenTest.inc | 79 + .../PHP/NullableVsInlineThenTest.php | 124 + .../PHP/NullsafeObjectOperatorTest.inc | 29 + .../PHP/NullsafeObjectOperatorTest.php | 144 + .../PHP/OtherContextSensitiveKeywordsTest.inc | 261 + .../PHP/OtherContextSensitiveKeywordsTest.php | 745 + .../Tokenizers/PHP/PHPOpenTagEOF1Test.inc | 4 + .../Tokenizers/PHP/PHPOpenTagEOF1Test.php | 54 + .../Tokenizers/PHP/PHPOpenTagEOF2Test.inc | 4 + .../Tokenizers/PHP/PHPOpenTagEOF2Test.php | 54 + .../Tokenizers/PHP/PHPOpenTagEOF3Test.inc | 4 + .../Tokenizers/PHP/PHPOpenTagEOF3Test.php | 54 + .../Tokenizers/PHP/ResolveSimpleTokenTest.inc | 51 + .../Tokenizers/PHP/ResolveSimpleTokenTest.php | 433 + .../Core/Tokenizers/PHP/ShortArrayTest.inc | 128 + .../Core/Tokenizers/PHP/ShortArrayTest.php | 146 + .../PHP/StableCommentWhitespaceTest.inc | 139 + .../PHP/StableCommentWhitespaceTest.php | 1064 + .../PHP/StableCommentWhitespaceWinTest.inc | 63 + .../PHP/StableCommentWhitespaceWinTest.php | 375 + .../Tokenizers/PHP/TypeIntersectionTest.inc | 185 + .../Tokenizers/PHP/TypeIntersectionTest.php | 165 + .../Tokenizers/PHP/TypedConstantsTest.inc | 156 + .../Tokenizers/PHP/TypedConstantsTest.php | 668 + .../PHP/UndoNamespacedNameSingleTokenTest.inc | 200 + .../PHP/UndoNamespacedNameSingleTokenTest.php | 1827 + .../tests/Core/Tokenizers/PHP/YieldTest.inc | 77 + .../tests/Core/Tokenizers/PHP/YieldTest.php | 448 + ...reateParenthesisNestingMapDNFTypesTest.inc | 185 + ...reateParenthesisNestingMapDNFTypesTest.php | 374 + ...eatePositionMapHeredocNowdocCloserTest.inc | 43 + ...eatePositionMapHeredocNowdocCloserTest.php | 117 + ...eatePositionMapHeredocNowdocOpenerTest.inc | 31 + ...eatePositionMapHeredocNowdocOpenerTest.php | 122 + .../CreatePositionMapTabWidth0Test.php | 107 + .../CreatePositionMapYieldFromTest.inc | 15 + .../CreatePositionMapYieldFromTest.php | 100 + .../CreateTokenMapArrayParenthesesTest.inc | 58 + .../CreateTokenMapArrayParenthesesTest.php | 212 + ...curseScopeMapCaseKeywordConditionsTest.inc | 134 + ...curseScopeMapCaseKeywordConditionsTest.php | 272 + ...seScopeMapDefaultKeywordConditionsTest.inc | 231 + ...seScopeMapDefaultKeywordConditionsTest.php | 487 + ...RecurseScopeMapIfKeywordConditionsTest.inc | 13 + ...RecurseScopeMapIfKeywordConditionsTest.php | 76 + .../RecurseScopeMapSwitchTokenScopeTest.inc | 60 + .../RecurseScopeMapSwitchTokenScopeTest.php | 160 + ...curseScopeMapWithNamespaceOperatorTest.inc | 19 + ...curseScopeMapWithNamespaceOperatorTest.php | 98 + .../Tokenizer/ReplaceTabsInTokenMiscTest.php | 124 + .../ReplaceTabsInTokenTabWidth1Test.php | 111 + .../ReplaceTabsInTokenTabWidth2Test.php | 111 + .../ReplaceTabsInTokenTabWidth4Test.php | 111 + .../ReplaceTabsInTokenTabWidth5Test.php | 111 + .../Tokenizer/ReplaceTabsInTokenTest.inc | 46 + .../Tokenizer/ReplaceTabsInTokenTestCase.php | 274 + .../Core/Util/Common/EscapeshellcmdTest.php | 91 + .../Core/Util/Common/GetSniffCodeTest.php | 212 + .../Core/Util/Common/IsCamelCapsTest.php | 512 + .../Core/Util/Common/PrepareForOutputTest.php | 113 + .../Core/Util/Common/StripColorsTest.php | 96 + .../Core/Util/Common/SuggestTypeTest.php | 224 + .../tests/Core/Util/Help/HelpTest.php | 792 + .../MessageCollector/MessageCollectorTest.php | 538 + .../Timing/GetHumanReadableDurationTest.php | 114 + .../tests/Core/Util/Timing/TimingTest.php | 121 + .../Tokens/GetHighestWeightedTokenTest.php | 162 + .../tests/Core/Util/Tokens/TokenNameTest.php | 197 + .../Fixtures/ClassOneWithoutStyleError.inc | 18 + .../Fixtures/ClassTwoWithoutStyleError.inc | 20 + .../EndToEnd/Fixtures/ClassWithStyleError.inc | 22 + .../tests/EndToEnd/Fixtures/endtoend.xml.dist | 13 + .../tests/EndToEnd/outofmemory_test.sh | 25 + .../tests/EndToEnd/phpcbf_test.sh | 38 + .../tests/EndToEnd/phpcs_test.sh | 28 + .../php_codesniffer/tests/FileList.php | 98 + .../tests/Standards/AbstractSniffUnitTest.php | 468 + .../tests/Standards/AllSniffs.php | 114 + .../php_codesniffer/tests/TestSuite.php | 35 + .../php_codesniffer/tests/TestSuite7.php | 35 + .../php_codesniffer/tests/bootstrap.php | 99 + vendor/szepeviktor/phpstan-wordpress/LICENSE | 21 + .../szepeviktor/phpstan-wordpress/README.md | 135 + .../phpstan-wordpress/bootstrap.php | 69 + .../phpstan-wordpress/composer.json | 69 + .../phpstan-wordpress/extension.neon | 81 + ...tersDynamicFunctionReturnTypeExtension.php | 64 + .../AssertWpErrorTypeSpecifyingExtension.php | 61 + ...cSqlDynamicFunctionReturnTypeExtension.php | 92 + .../src/HookCallbackRule.php | 236 + .../phpstan-wordpress/src/HookDocBlock.php | 54 + .../phpstan-wordpress/src/HookDocsRule.php | 213 + .../phpstan-wordpress/src/HookDocsVisitor.php | 47 + ...paceDynamicFunctionReturnTypeExtension.php | 113 + .../src/NormalizedArguments.php | 41 + ...AttsDynamicFunctionReturnTypeExtension.php | 138 + ...ionsDynamicFunctionReturnTypeExtension.php | 97 + ...OnlyDynamicFunctionReturnTypeExtension.php | 60 + .../src/WpConstantFetchRule.php | 91 + ...eUrlFunctionDynamicReturnTypeExtension.php | 177 + ...lashDynamicFunctionReturnTypeExtension.php | 99 + vendor/theseer/tokenizer/CHANGELOG.md | 87 + vendor/theseer/tokenizer/LICENSE | 30 + vendor/theseer/tokenizer/README.md | 47 + vendor/theseer/tokenizer/composer.json | 27 + vendor/theseer/tokenizer/composer.lock | 22 + vendor/theseer/tokenizer/src/Exception.php | 5 + vendor/theseer/tokenizer/src/NamespaceUri.php | 25 + .../tokenizer/src/NamespaceUriException.php | 5 + vendor/theseer/tokenizer/src/Token.php | 35 + .../theseer/tokenizer/src/TokenCollection.php | 82 + .../src/TokenCollectionException.php | 5 + vendor/theseer/tokenizer/src/Tokenizer.php | 149 + .../theseer/tokenizer/src/XMLSerializer.php | 74 + vendor/wp-coding-standards/wpcs/CHANGELOG.md | 1777 + vendor/wp-coding-standards/wpcs/LICENSE | 21 + vendor/wp-coding-standards/wpcs/README.md | 261 + .../wpcs/WordPress-Core/ruleset.xml | 944 + .../wpcs/WordPress-Docs/ruleset.xml | 109 + .../wpcs/WordPress-Extra/ruleset.xml | 211 + ...stractArrayAssignmentRestrictionsSniff.php | 261 + .../AbstractClassRestrictionsSniff.php | 268 + .../AbstractFunctionParameterSniff.php | 169 + .../AbstractFunctionRestrictionsSniff.php | 358 + .../Docs/Arrays/ArrayIndentationStandard.xml | 116 + .../ArrayKeySpacingRestrictionsStandard.xml | 31 + .../MultipleStatementAlignmentStandard.xml | 50 + .../EscapedNotTranslatedStandard.xml | 24 + .../WordPress/Docs/DB/PreparedSQLStandard.xml | 51 + .../DateTime/CurrentTimeTimestampStandard.xml | 35 + .../DateTime/RestrictedFunctionsStandard.xml | 54 + .../PrefixAllGlobalsStandard.xml | 119 + .../ValidFunctionNameStandard.xml | 51 + .../ValidHookNameStandard.xml | 35 + .../ValidPostTypeSlugStandard.xml | 121 + .../ValidVariableNameStandard.xml | 43 + .../Docs/PHP/DontExtractStandard.xml | 35 + .../WordPress/Docs/PHP/IniSetStandard.xml | 40 + .../Docs/PHP/StrictInArrayStandard.xml | 53 + .../Docs/PHP/YodaConditionsStandard.xml | 27 + .../Docs/Security/SafeRedirectStandard.xml | 23 + .../Docs/WP/CapabilitiesStandard.xml | 69 + .../Docs/WP/CapitalPDangitStandard.xml | 43 + .../Docs/WP/ClassNameCaseStandard.xml | 23 + .../Docs/WP/CronIntervalStandard.xml | 45 + .../Docs/WP/DeprecatedClassesStandard.xml | 23 + .../Docs/WP/DeprecatedFunctionsStandard.xml | 23 + .../WP/DeprecatedParameterValuesStandard.xml | 23 + .../Docs/WP/DeprecatedParametersStandard.xml | 40 + .../WP/EnqueuedResourceParametersStandard.xml | 92 + .../Docs/WP/EnqueuedResourcesStandard.xml | 57 + .../Docs/WP/GetMetaSingleStandard.xml | 39 + .../Docs/WP/PostsPerPageStandard.xml | 73 + .../CastStructureSpacingStandard.xml | 27 + .../ControlStructureSpacingStandard.xml | 150 + .../ObjectOperatorSpacingStandard.xml | 23 + .../WhiteSpace/OperatorSpacingStandard.xml | 61 + .../Helpers/ArrayWalkingFunctionsHelper.php | 108 + .../WordPress/Helpers/ConstantsHelper.php | 135 + .../wpcs/WordPress/Helpers/ContextHelper.php | 394 + .../WordPress/Helpers/DeprecationHelper.php | 84 + .../Helpers/EscapingFunctionsTrait.php | 255 + .../Helpers/FormattingFunctionsHelper.php | 60 + .../WordPress/Helpers/IsUnitTestTrait.php | 238 + .../wpcs/WordPress/Helpers/ListHelper.php | 101 + .../Helpers/MinimumWPVersionTrait.php | 159 + .../Helpers/PrintingFunctionsTrait.php | 122 + .../Helpers/RulesetPropertyHelper.php | 73 + .../Helpers/SanitizationHelperTrait.php | 419 + .../WordPress/Helpers/SnakeCaseHelper.php | 60 + .../Helpers/UnslashingFunctionsHelper.php | 59 + .../WordPress/Helpers/ValidationHelper.php | 349 + .../wpcs/WordPress/Helpers/VariableHelper.php | 262 + .../wpcs/WordPress/Helpers/WPDBTrait.php | 115 + .../Helpers/WPGlobalVariablesHelper.php | 312 + .../wpcs/WordPress/Helpers/WPHookHelper.php | 113 + .../wpcs/WordPress/Sniff.php | 72 + .../Arrays/ArrayDeclarationSpacingSniff.php | 252 + .../Sniffs/Arrays/ArrayIndentationSniff.php | 550 + .../ArrayKeySpacingRestrictionsSniff.php | 174 + .../MultipleStatementAlignmentSniff.php | 583 + .../AssignmentInTernaryConditionSniff.php | 173 + .../EscapedNotTranslatedSniff.php | 89 + .../Sniffs/DB/DirectDatabaseQuerySniff.php | 324 + .../DB/PreparedSQLPlaceholdersSniff.php | 766 + .../WordPress/Sniffs/DB/PreparedSQLSniff.php | 243 + .../Sniffs/DB/RestrictedClassesSniff.php | 57 + .../Sniffs/DB/RestrictedFunctionsSniff.php | 63 + .../WordPress/Sniffs/DB/SlowDBQuerySniff.php | 58 + .../DateTime/CurrentTimeTimestampSniff.php | 168 + .../DateTime/RestrictedFunctionsSniff.php | 59 + .../WordPress/Sniffs/Files/FileNameSniff.php | 312 + .../PrefixAllGlobalsSniff.php | 1312 + .../ValidFunctionNameSniff.php | 188 + .../NamingConventions/ValidHookNameSniff.php | 277 + .../ValidPostTypeSlugSniff.php | 230 + .../ValidVariableNameSniff.php | 289 + .../Sniffs/PHP/DevelopmentFunctionsSniff.php | 63 + .../PHP/DiscouragedPHPFunctionsSniff.php | 100 + .../WordPress/Sniffs/PHP/DontExtractSniff.php | 52 + .../wpcs/WordPress/Sniffs/PHP/IniSetSniff.php | 190 + .../Sniffs/PHP/NoSilencedErrorsSniff.php | 245 + .../Sniffs/PHP/POSIXFunctionsSniff.php | 103 + .../Sniffs/PHP/PregQuoteDelimiterSniff.php | 70 + .../PHP/RestrictedPHPFunctionsSniff.php | 45 + .../Sniffs/PHP/StrictInArraySniff.php | 122 + .../WordPress/Sniffs/PHP/TypeCastsSniff.php | 90 + .../Sniffs/PHP/YodaConditionsSniff.php | 123 + .../Sniffs/Security/EscapeOutputSniff.php | 920 + .../Security/NonceVerificationSniff.php | 426 + .../Sniffs/Security/PluginMenuSlugSniff.php | 126 + .../Sniffs/Security/SafeRedirectSniff.php | 45 + .../Security/ValidatedSanitizedInputSniff.php | 244 + .../Sniffs/Utils/I18nTextDomainFixerSniff.php | 862 + .../Sniffs/WP/AlternativeFunctionsSniff.php | 371 + .../WordPress/Sniffs/WP/CapabilitiesSniff.php | 479 + .../Sniffs/WP/CapitalPDangitSniff.php | 315 + .../Sniffs/WP/ClassNameCaseSniff.php | 975 + .../WordPress/Sniffs/WP/CronIntervalSniff.php | 321 + .../Sniffs/WP/DeprecatedClassesSniff.php | 152 + .../Sniffs/WP/DeprecatedFunctionsSniff.php | 1776 + .../WP/DeprecatedParameterValuesSniff.php | 307 + .../Sniffs/WP/DeprecatedParametersSniff.php | 531 + .../Sniffs/WP/DiscouragedConstantsSniff.php | 160 + .../Sniffs/WP/DiscouragedFunctionsSniff.php | 54 + .../WP/EnqueuedResourceParametersSniff.php | 268 + .../Sniffs/WP/EnqueuedResourcesSniff.php | 106 + .../Sniffs/WP/GetMetaSingleSniff.php | 161 + .../WP/GlobalVariablesOverrideSniff.php | 436 + .../wpcs/WordPress/Sniffs/WP/I18nSniff.php | 977 + .../WordPress/Sniffs/WP/PostsPerPageSniff.php | 102 + .../WhiteSpace/CastStructureSpacingSniff.php | 59 + .../ControlStructureSpacingSniff.php | 486 + .../WhiteSpace/ObjectOperatorSpacingSniff.php | 63 + .../WhiteSpace/OperatorSpacingSniff.php | 60 + .../wpcs/WordPress/ruleset.xml | 22 + vendor/wp-coding-standards/wpcs/_typos.toml | 26 + vendor/wp-coding-standards/wpcs/composer.json | 91 + .../wpcs/phpcs.xml.dist.sample | 153 + 4025 files changed, 612022 insertions(+), 32 deletions(-) create mode 100644 tests/test-fields-extended.php create mode 100644 tests/test-quality.php create mode 100644 tests/test-settings.php create mode 100644 tests/test-shortcode.php create mode 100644 vendor/10up/wp_mock/.gitattributes create mode 100644 vendor/10up/wp_mock/.gitignore create mode 100644 vendor/10up/wp_mock/CHANGELOG.md create mode 100644 vendor/10up/wp_mock/CODE_OF_CONDUCT.md create mode 100644 vendor/10up/wp_mock/CONTRIBUTING.md create mode 100644 vendor/10up/wp_mock/CREDITS.md create mode 100644 vendor/10up/wp_mock/LICENSE.md create mode 100644 vendor/10up/wp_mock/README.md create mode 100644 vendor/10up/wp_mock/bootstrap.php.dist create mode 100644 vendor/10up/wp_mock/composer.json create mode 100644 vendor/10up/wp_mock/composer.lock create mode 100644 vendor/10up/wp_mock/php/WP_Mock.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/API/constant-mocks.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/API/dummy-files/themes/vip/plugins/vip-init.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/API/dummy-files/wp-includes/class-http.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/API/function-mocks.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/Action.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/DeprecatedMethodListener.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/EventManager.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/Filter.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/Functions.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/Functions/Handler.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/Functions/ReturnSequence.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/Hook.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/HookedCallback.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/InvokedFilterValue.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/Matcher/AnyInstance.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/Matcher/FuzzyObject.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/Tools/Constraints/ExpectationsMet.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/Tools/Constraints/IsEqualHtml.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/Tools/TestCase.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/Traits/AccessInaccessibleClassMembersTrait.php create mode 100644 vendor/10up/wp_mock/php/WP_Mock/Traits/MockWordPressObjectsTrait.php create mode 100644 vendor/antecedent/patchwork/LICENSE create mode 100644 vendor/antecedent/patchwork/Patchwork.php create mode 100644 vendor/antecedent/patchwork/README.md create mode 100644 vendor/antecedent/patchwork/box.json create mode 100644 vendor/antecedent/patchwork/composer.json create mode 100644 vendor/antecedent/patchwork/src/CallRerouting.php create mode 100644 vendor/antecedent/patchwork/src/CallRerouting/Decorator.php create mode 100644 vendor/antecedent/patchwork/src/CallRerouting/Handle.php create mode 100644 vendor/antecedent/patchwork/src/CodeManipulation.php create mode 100644 vendor/antecedent/patchwork/src/CodeManipulation/Actions/Arguments.php create mode 100644 vendor/antecedent/patchwork/src/CodeManipulation/Actions/CallRerouting.php create mode 100644 vendor/antecedent/patchwork/src/CodeManipulation/Actions/CodeManipulation.php create mode 100644 vendor/antecedent/patchwork/src/CodeManipulation/Actions/ConflictPrevention.php create mode 100644 vendor/antecedent/patchwork/src/CodeManipulation/Actions/Generic.php create mode 100644 vendor/antecedent/patchwork/src/CodeManipulation/Actions/Namespaces.php create mode 100644 vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfInternals.php create mode 100644 vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfLanguageConstructs.php create mode 100644 vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfNew.php create mode 100644 vendor/antecedent/patchwork/src/CodeManipulation/Source.php create mode 100644 vendor/antecedent/patchwork/src/CodeManipulation/Stream.php create mode 100644 vendor/antecedent/patchwork/src/Config.php create mode 100644 vendor/antecedent/patchwork/src/Console.php create mode 100644 vendor/antecedent/patchwork/src/Exceptions.php create mode 100644 vendor/antecedent/patchwork/src/Redefinitions/LanguageConstructs.php create mode 100644 vendor/antecedent/patchwork/src/Stack.php create mode 100644 vendor/antecedent/patchwork/src/Utils.php create mode 100755 vendor/bin/php-parse create mode 100755 vendor/bin/phpcbf create mode 100755 vendor/bin/phpcs create mode 100755 vendor/bin/phpstan create mode 100755 vendor/bin/phpstan.phar create mode 100755 vendor/bin/phpunit create mode 100644 vendor/composer/autoload_files.php create mode 100644 vendor/dealerdirect/phpcodesniffer-composer-installer/CHANGELOG.md create mode 100644 vendor/dealerdirect/phpcodesniffer-composer-installer/LICENSE.md create mode 100644 vendor/dealerdirect/phpcodesniffer-composer-installer/README.md create mode 100644 vendor/dealerdirect/phpcodesniffer-composer-installer/composer.json create mode 100644 vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php create mode 100644 vendor/doctrine/instantiator/LICENSE create mode 100644 vendor/doctrine/instantiator/README.md create mode 100644 vendor/doctrine/instantiator/composer.json create mode 100644 vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php create mode 100644 vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php create mode 100644 vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php create mode 100644 vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php create mode 100644 vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php create mode 100644 vendor/hamcrest/hamcrest-php/.gitattributes create mode 100644 vendor/hamcrest/hamcrest-php/.gitignore create mode 100644 vendor/hamcrest/hamcrest-php/CHANGES.txt create mode 100644 vendor/hamcrest/hamcrest-php/CONTRIBUTING.md create mode 100644 vendor/hamcrest/hamcrest-php/LICENSE.txt create mode 100644 vendor/hamcrest/hamcrest-php/README.md create mode 100644 vendor/hamcrest/hamcrest-php/composer.json create mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryCall.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryClass.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryFile.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php create mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt create mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/functions_footer.txt create mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/functions_header.txt create mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/functions_imports.txt create mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt create mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt create mode 100644 vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt create mode 100644 vendor/hamcrest/hamcrest-php/generator/run.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/MatchingOnce.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseDescription.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AllOf.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/DiagnosingMatcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/IsCloseTo.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/StringDescription.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsBoolean.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsCallable.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsDouble.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsInteger.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsNumeric.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsResource.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsScalar.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsString.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeDiagnosingMatcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php create mode 100644 vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php create mode 100644 vendor/mockery/mockery/.phpstorm.meta.php create mode 100644 vendor/mockery/mockery/.readthedocs.yml create mode 100644 vendor/mockery/mockery/CHANGELOG.md create mode 100644 vendor/mockery/mockery/CONTRIBUTING.md create mode 100644 vendor/mockery/mockery/COPYRIGHT.md create mode 100644 vendor/mockery/mockery/LICENSE create mode 100644 vendor/mockery/mockery/README.md create mode 100644 vendor/mockery/mockery/SECURITY.md create mode 100644 vendor/mockery/mockery/composer.json create mode 100644 vendor/mockery/mockery/composer.lock create mode 100644 vendor/mockery/mockery/docs/.gitignore create mode 100644 vendor/mockery/mockery/docs/Makefile create mode 100644 vendor/mockery/mockery/docs/README.md create mode 100644 vendor/mockery/mockery/docs/_static/.gitkeep create mode 100644 vendor/mockery/mockery/docs/conf.py create mode 100644 vendor/mockery/mockery/docs/cookbook/big_parent_class.rst create mode 100644 vendor/mockery/mockery/docs/cookbook/class_constants.rst create mode 100644 vendor/mockery/mockery/docs/cookbook/default_expectations.rst create mode 100644 vendor/mockery/mockery/docs/cookbook/detecting_mock_objects.rst create mode 100644 vendor/mockery/mockery/docs/cookbook/index.rst create mode 100644 vendor/mockery/mockery/docs/cookbook/map.rst.inc create mode 100644 vendor/mockery/mockery/docs/cookbook/mockery_on.rst create mode 100644 vendor/mockery/mockery/docs/cookbook/mocking_class_within_class.rst create mode 100644 vendor/mockery/mockery/docs/cookbook/mocking_hard_dependencies.rst create mode 100644 vendor/mockery/mockery/docs/cookbook/not_calling_the_constructor.rst create mode 100644 vendor/mockery/mockery/docs/getting_started/index.rst create mode 100644 vendor/mockery/mockery/docs/getting_started/installation.rst create mode 100644 vendor/mockery/mockery/docs/getting_started/map.rst.inc create mode 100644 vendor/mockery/mockery/docs/getting_started/quick_reference.rst create mode 100644 vendor/mockery/mockery/docs/getting_started/simple_example.rst create mode 100644 vendor/mockery/mockery/docs/getting_started/upgrading.rst create mode 100644 vendor/mockery/mockery/docs/index.rst create mode 100644 vendor/mockery/mockery/docs/mockery/configuration.rst create mode 100644 vendor/mockery/mockery/docs/mockery/exceptions.rst create mode 100644 vendor/mockery/mockery/docs/mockery/gotchas.rst create mode 100644 vendor/mockery/mockery/docs/mockery/index.rst create mode 100644 vendor/mockery/mockery/docs/mockery/map.rst.inc create mode 100644 vendor/mockery/mockery/docs/mockery/reserved_method_names.rst create mode 100644 vendor/mockery/mockery/docs/reference/alternative_should_receive_syntax.rst create mode 100644 vendor/mockery/mockery/docs/reference/argument_validation.rst create mode 100644 vendor/mockery/mockery/docs/reference/creating_test_doubles.rst create mode 100644 vendor/mockery/mockery/docs/reference/demeter_chains.rst create mode 100644 vendor/mockery/mockery/docs/reference/expectations.rst create mode 100644 vendor/mockery/mockery/docs/reference/final_methods_classes.rst create mode 100644 vendor/mockery/mockery/docs/reference/index.rst create mode 100644 vendor/mockery/mockery/docs/reference/instance_mocking.rst create mode 100644 vendor/mockery/mockery/docs/reference/magic_methods.rst create mode 100644 vendor/mockery/mockery/docs/reference/map.rst.inc create mode 100644 vendor/mockery/mockery/docs/reference/partial_mocks.rst create mode 100644 vendor/mockery/mockery/docs/reference/pass_by_reference_behaviours.rst create mode 100644 vendor/mockery/mockery/docs/reference/phpunit_integration.rst create mode 100644 vendor/mockery/mockery/docs/reference/protected_methods.rst create mode 100644 vendor/mockery/mockery/docs/reference/public_properties.rst create mode 100644 vendor/mockery/mockery/docs/reference/public_static_properties.rst create mode 100644 vendor/mockery/mockery/docs/reference/spies.rst create mode 100644 vendor/mockery/mockery/docs/requirements.txt create mode 100644 vendor/mockery/mockery/library/Mockery.php create mode 100644 vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php create mode 100644 vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditions.php create mode 100644 vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php create mode 100644 vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUp.php create mode 100644 vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php create mode 100644 vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListenerTrait.php create mode 100644 vendor/mockery/mockery/library/Mockery/ClosureWrapper.php create mode 100644 vendor/mockery/mockery/library/Mockery/CompositeExpectation.php create mode 100644 vendor/mockery/mockery/library/Mockery/Configuration.php create mode 100644 vendor/mockery/mockery/library/Mockery/Container.php create mode 100644 vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php create mode 100644 vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php create mode 100644 vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php create mode 100644 vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorInterface.php create mode 100644 vendor/mockery/mockery/library/Mockery/CountValidator/Exact.php create mode 100644 vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php create mode 100644 vendor/mockery/mockery/library/Mockery/Exception.php create mode 100644 vendor/mockery/mockery/library/Mockery/Exception/BadMethodCallException.php create mode 100644 vendor/mockery/mockery/library/Mockery/Exception/InvalidArgumentException.php create mode 100644 vendor/mockery/mockery/library/Mockery/Exception/InvalidCountException.php create mode 100644 vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php create mode 100644 vendor/mockery/mockery/library/Mockery/Exception/MockeryExceptionInterface.php create mode 100644 vendor/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php create mode 100644 vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php create mode 100644 vendor/mockery/mockery/library/Mockery/Expectation.php create mode 100644 vendor/mockery/mockery/library/Mockery/ExpectationDirector.php create mode 100644 vendor/mockery/mockery/library/Mockery/ExpectationInterface.php create mode 100644 vendor/mockery/mockery/library/Mockery/ExpectsHigherOrderMessage.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/CachingGenerator.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/Generator.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/Method.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/MockNameBuilder.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/Parameter.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassAttributesPass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ConstantsPass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MagicMethodTypeHintsPass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/Pass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveBuiltinMethodsThatAreFinalPass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveDestructorPass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/TraitPass.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/TargetClassInterface.php create mode 100644 vendor/mockery/mockery/library/Mockery/Generator/UndefinedTargetClass.php create mode 100644 vendor/mockery/mockery/library/Mockery/HigherOrderMessage.php create mode 100644 vendor/mockery/mockery/library/Mockery/Instantiator.php create mode 100644 vendor/mockery/mockery/library/Mockery/LegacyMockInterface.php create mode 100644 vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php create mode 100644 vendor/mockery/mockery/library/Mockery/Loader/Loader.php create mode 100644 vendor/mockery/mockery/library/Mockery/Loader/RequireLoader.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/AndAnyOtherArgs.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/Any.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/AnyArgs.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/ArgumentListMatcher.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/Closure.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/Contains.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/IsEqual.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/IsSame.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/MatcherInterface.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/MultiArgumentClosure.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/NoArgs.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/Not.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/Pattern.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/Subset.php create mode 100644 vendor/mockery/mockery/library/Mockery/Matcher/Type.php create mode 100644 vendor/mockery/mockery/library/Mockery/MethodCall.php create mode 100644 vendor/mockery/mockery/library/Mockery/Mock.php create mode 100644 vendor/mockery/mockery/library/Mockery/MockInterface.php create mode 100644 vendor/mockery/mockery/library/Mockery/QuickDefinitionsConfiguration.php create mode 100644 vendor/mockery/mockery/library/Mockery/ReceivedMethodCalls.php create mode 100644 vendor/mockery/mockery/library/Mockery/Reflector.php create mode 100644 vendor/mockery/mockery/library/Mockery/Undefined.php create mode 100644 vendor/mockery/mockery/library/Mockery/VerificationDirector.php create mode 100644 vendor/mockery/mockery/library/Mockery/VerificationExpectation.php create mode 100644 vendor/mockery/mockery/library/helpers.php create mode 100644 vendor/myclabs/deep-copy/LICENSE create mode 100644 vendor/myclabs/deep-copy/README.md create mode 100644 vendor/myclabs/deep-copy/composer.json create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Exception/PropertyException.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Filter/ChainableFilter.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DatePeriodFilter.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedListFilter.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php create mode 100644 vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php create mode 100644 vendor/nikic/php-parser/LICENSE create mode 100644 vendor/nikic/php-parser/README.md create mode 100755 vendor/nikic/php-parser/bin/php-parse create mode 100644 vendor/nikic/php-parser/composer.json create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Comment.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Error.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Modifiers.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/NameContext.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pipe.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Void_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Name.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Param.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Property.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Parser.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Token.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php create mode 100644 vendor/phar-io/manifest/.github/FUNDING.yml create mode 100644 vendor/phar-io/manifest/.github/workflows/ci.yml create mode 100644 vendor/phar-io/manifest/.php-cs-fixer.dist.php create mode 100644 vendor/phar-io/manifest/CHANGELOG.md create mode 100644 vendor/phar-io/manifest/LICENSE create mode 100644 vendor/phar-io/manifest/README.md create mode 100644 vendor/phar-io/manifest/composer.json create mode 100644 vendor/phar-io/manifest/composer.lock create mode 100644 vendor/phar-io/manifest/manifest.xsd create mode 100644 vendor/phar-io/manifest/src/ManifestDocumentMapper.php create mode 100644 vendor/phar-io/manifest/src/ManifestLoader.php create mode 100644 vendor/phar-io/manifest/src/ManifestSerializer.php create mode 100644 vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php create mode 100644 vendor/phar-io/manifest/src/exceptions/Exception.php create mode 100644 vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php create mode 100644 vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php create mode 100644 vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php create mode 100644 vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php create mode 100644 vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php create mode 100644 vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php create mode 100644 vendor/phar-io/manifest/src/exceptions/ManifestElementException.php create mode 100644 vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php create mode 100644 vendor/phar-io/manifest/src/exceptions/NoEmailAddressException.php create mode 100644 vendor/phar-io/manifest/src/values/Application.php create mode 100644 vendor/phar-io/manifest/src/values/ApplicationName.php create mode 100644 vendor/phar-io/manifest/src/values/Author.php create mode 100644 vendor/phar-io/manifest/src/values/AuthorCollection.php create mode 100644 vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php create mode 100644 vendor/phar-io/manifest/src/values/BundledComponent.php create mode 100644 vendor/phar-io/manifest/src/values/BundledComponentCollection.php create mode 100644 vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php create mode 100644 vendor/phar-io/manifest/src/values/CopyrightInformation.php create mode 100644 vendor/phar-io/manifest/src/values/Email.php create mode 100644 vendor/phar-io/manifest/src/values/Extension.php create mode 100644 vendor/phar-io/manifest/src/values/Library.php create mode 100644 vendor/phar-io/manifest/src/values/License.php create mode 100644 vendor/phar-io/manifest/src/values/Manifest.php create mode 100644 vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php create mode 100644 vendor/phar-io/manifest/src/values/PhpVersionRequirement.php create mode 100644 vendor/phar-io/manifest/src/values/Requirement.php create mode 100644 vendor/phar-io/manifest/src/values/RequirementCollection.php create mode 100644 vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php create mode 100644 vendor/phar-io/manifest/src/values/Type.php create mode 100644 vendor/phar-io/manifest/src/values/Url.php create mode 100644 vendor/phar-io/manifest/src/xml/AuthorElement.php create mode 100644 vendor/phar-io/manifest/src/xml/AuthorElementCollection.php create mode 100644 vendor/phar-io/manifest/src/xml/BundlesElement.php create mode 100644 vendor/phar-io/manifest/src/xml/ComponentElement.php create mode 100644 vendor/phar-io/manifest/src/xml/ComponentElementCollection.php create mode 100644 vendor/phar-io/manifest/src/xml/ContainsElement.php create mode 100644 vendor/phar-io/manifest/src/xml/CopyrightElement.php create mode 100644 vendor/phar-io/manifest/src/xml/ElementCollection.php create mode 100644 vendor/phar-io/manifest/src/xml/ExtElement.php create mode 100644 vendor/phar-io/manifest/src/xml/ExtElementCollection.php create mode 100644 vendor/phar-io/manifest/src/xml/ExtensionElement.php create mode 100644 vendor/phar-io/manifest/src/xml/LicenseElement.php create mode 100644 vendor/phar-io/manifest/src/xml/ManifestDocument.php create mode 100644 vendor/phar-io/manifest/src/xml/ManifestElement.php create mode 100644 vendor/phar-io/manifest/src/xml/PhpElement.php create mode 100644 vendor/phar-io/manifest/src/xml/RequiresElement.php create mode 100644 vendor/phar-io/manifest/tools/php-cs-fixer.d/PhpdocSingleLineVarFixer.php create mode 100644 vendor/phar-io/manifest/tools/php-cs-fixer.d/header.txt create mode 100644 vendor/phar-io/version/CHANGELOG.md create mode 100644 vendor/phar-io/version/LICENSE create mode 100644 vendor/phar-io/version/README.md create mode 100644 vendor/phar-io/version/composer.json create mode 100644 vendor/phar-io/version/src/BuildMetaData.php create mode 100644 vendor/phar-io/version/src/PreReleaseSuffix.php create mode 100644 vendor/phar-io/version/src/Version.php create mode 100644 vendor/phar-io/version/src/VersionConstraintParser.php create mode 100644 vendor/phar-io/version/src/VersionConstraintValue.php create mode 100644 vendor/phar-io/version/src/VersionNumber.php create mode 100644 vendor/phar-io/version/src/constraints/AbstractVersionConstraint.php create mode 100644 vendor/phar-io/version/src/constraints/AndVersionConstraintGroup.php create mode 100644 vendor/phar-io/version/src/constraints/AnyVersionConstraint.php create mode 100644 vendor/phar-io/version/src/constraints/ExactVersionConstraint.php create mode 100644 vendor/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php create mode 100644 vendor/phar-io/version/src/constraints/OrVersionConstraintGroup.php create mode 100644 vendor/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php create mode 100644 vendor/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php create mode 100644 vendor/phar-io/version/src/constraints/VersionConstraint.php create mode 100644 vendor/phar-io/version/src/exceptions/Exception.php create mode 100644 vendor/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php create mode 100644 vendor/phar-io/version/src/exceptions/InvalidVersionException.php create mode 100644 vendor/phar-io/version/src/exceptions/NoBuildMetaDataException.php create mode 100644 vendor/phar-io/version/src/exceptions/NoPreReleaseSuffixException.php create mode 100644 vendor/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php create mode 100644 vendor/php-stubs/wordpress-stubs/.github/workflows/generate.yml create mode 100644 vendor/php-stubs/wordpress-stubs/.github/workflows/integrate.yml create mode 100644 vendor/php-stubs/wordpress-stubs/.github/workflows/spelling.yml create mode 100644 vendor/php-stubs/wordpress-stubs/.typos.toml create mode 100644 vendor/php-stubs/wordpress-stubs/LICENSE create mode 100644 vendor/php-stubs/wordpress-stubs/composer.json create mode 100644 vendor/php-stubs/wordpress-stubs/phpcs.xml.dist create mode 100644 vendor/php-stubs/wordpress-stubs/wordpress-stubs.php create mode 100644 vendor/phpcsstandards/phpcsextra/CHANGELOG.md create mode 100644 vendor/phpcsstandards/phpcsextra/LICENSE create mode 100644 vendor/phpcsstandards/phpcsextra/Modernize/Docs/FunctionCalls/DirnameStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Modernize/Sniffs/FunctionCalls/DirnameSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Modernize/ruleset.xml create mode 100644 vendor/phpcsstandards/phpcsextra/NormalizedArrays/Docs/Arrays/ArrayBraceSpacingStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/NormalizedArrays/Docs/Arrays/CommaAfterLastStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/NormalizedArrays/Sniffs/Arrays/ArrayBraceSpacingSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/NormalizedArrays/Sniffs/Arrays/CommaAfterLastSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/NormalizedArrays/ruleset.xml create mode 100644 vendor/phpcsstandards/phpcsextra/README.md create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/DisallowShortArraySyntaxStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/DuplicateArrayKeyStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/MixedArrayKeyTypesStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/MixedKeyedUnkeyedArrayStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Attributes/BracketSpacingStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Attributes/DisallowAttributeParenthesesStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Attributes/RequireAttributeParenthesesStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Attributes/TrailingCommaStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/DisallowAnonClassParenthesesStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/DisallowFinalClassStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/ModifierKeywordOrderStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/RequireAnonClassParenthesesStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/RequireFinalClassStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/ConstructorDestructorReturnStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/ForeachUniqueAssignmentStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/NoDoubleNegativeStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/NoEchoSprintfStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/StaticInFinalClassStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/LowercaseClassResolutionKeywordStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/ModifierKeywordOrderStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/UppercaseMagicConstantsStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/ControlStructures/DisallowAlternativeSyntaxStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/ControlStructures/DisallowLonelyIfStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/ControlStructures/IfElseDeclarationStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Files/SeparateFunctionsFromOOStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/FunctionDeclarations/NoLongClosuresStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/FunctionDeclarations/RequireFinalMethodsInTraitsStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Lists/DisallowLongListSyntaxStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Lists/DisallowShortListSyntaxStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/DisallowCurlyBraceSyntaxStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/DisallowDeclarationWithoutNameStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/EnforceCurlyBraceSyntaxStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/OneDeclarationPerFileStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/NamingConventions/NoReservedKeywordParameterNamesStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/OOStructures/AlphabeticExtendsImplementsStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/ConcatPositionStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/DisallowLogicalAndOrStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/DisallowShortTernaryStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/DisallowStandalonePostIncrementDecrementStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/StrictComparisonsStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/TypeSeparatorSpacingStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/PHP/DisallowExitDieParenthesesStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/PHP/LowercasePHPTagStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/PHP/NoFQNTrueFalseNullStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/PHP/OneStatementInShortEchoTagStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/PHP/RequireExitDieParenthesesStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowMixedGroupUseStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowUseClassStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowUseConstStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowUseFunctionStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/KeywordSpacingStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/LowercaseFunctionConstStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/NoLeadingBackslashStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/NoUselessAliasesStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/AnonClassKeywordSpacingStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/CommaSpacingStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/DisallowInlineTabsStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/FirstClassCallableSpacingStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/PrecisionAlignmentStandard.xml create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Helpers/DummyTokenizer.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/DuplicateArrayKeySniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/MixedArrayKeyTypesSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/MixedKeyedUnkeyedArraySniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Attributes/BracketSpacingSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Attributes/DisallowAttributeParenthesesSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Attributes/RequireAttributeParenthesesSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Attributes/TrailingCommaSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/DisallowAnonClassParenthesesSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/DisallowFinalClassSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/ModifierKeywordOrderSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/RequireAnonClassParenthesesSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/RequireFinalClassSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/ConstructorDestructorReturnSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/ForeachUniqueAssignmentSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/NoDoubleNegativeSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/NoEchoSprintfSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/StaticInFinalClassSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Constants/LowercaseClassResolutionKeywordSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Constants/ModifierKeywordOrderSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Constants/UppercaseMagicConstantsSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/ControlStructures/DisallowAlternativeSyntaxSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/ControlStructures/DisallowLonelyIfSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/ControlStructures/IfElseDeclarationSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Files/SeparateFunctionsFromOOSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/FunctionDeclarations/NoLongClosuresSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/FunctionDeclarations/RequireFinalMethodsInTraitsSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Lists/DisallowLongListSyntaxSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Lists/DisallowShortListSyntaxSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/DisallowCurlyBraceSyntaxSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/DisallowDeclarationWithoutNameSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/EnforceCurlyBraceSyntaxSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/OneDeclarationPerFileSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/NamingConventions/NoReservedKeywordParameterNamesSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/OOStructures/AlphabeticExtendsImplementsSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/ConcatPositionSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/DisallowLogicalAndOrSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/DisallowShortTernarySniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/DisallowStandalonePostIncrementDecrementSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/StrictComparisonsSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/TypeSeparatorSpacingSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/PHP/DisallowExitDieParenthesesSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/PHP/LowercasePHPTagSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/PHP/NoFQNTrueFalseNullSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/PHP/OneStatementInShortEchoTagSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/PHP/RequireExitDieParenthesesSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowMixedGroupUseSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowUseClassSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowUseConstSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowUseFunctionSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/KeywordSpacingSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/LowercaseFunctionConstSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/NoLeadingBackslashSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/NoUselessAliasesSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/AnonClassKeywordSpacingSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/CommaSpacingSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/DisallowInlineTabsSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/FirstClassCallableSpacingSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/PrecisionAlignmentSniff.php create mode 100644 vendor/phpcsstandards/phpcsextra/Universal/ruleset.xml create mode 100644 vendor/phpcsstandards/phpcsextra/composer.json create mode 100644 vendor/phpcsstandards/phpcsutils/CHANGELOG.md create mode 100644 vendor/phpcsstandards/phpcsutils/LICENSE create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/AbstractSniffs/AbstractArrayDeclarationSniff.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCFile.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCTokens.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/Helper.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/InvalidTokenArray.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/LogicException.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/MissingArgumentError.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/OutOfBoundsStackPtr.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/RuntimeException.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestFileNotFound.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestMarkerNotFound.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestTargetNotFound.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TypeError.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/UnexpectedTokenType.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/ValueError.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Fixers/SpacesFixer.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/AttributeHelper.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/Cache.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrList.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrListWithCache.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/NoFileCache.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/StableCollections.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/ConfigDouble.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/RulesetDouble.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/UtilityMethodTestCase.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/Collections.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/TokenHelper.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Arrays.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/AttributeBlock.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Conditions.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Constants.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Context.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ControlStructures.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FileInfo.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FilePath.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FunctionDeclarations.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/GetTokensAsString.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Lists.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/MessageHelper.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Namespaces.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/NamingConventions.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Numbers.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ObjectDeclarations.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Operators.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Orthography.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Parentheses.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/PassedParameters.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Scopes.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/TextStrings.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/TypeString.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/UseStatements.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Variables.php create mode 100644 vendor/phpcsstandards/phpcsutils/PHPCSUtils/ruleset.xml create mode 100644 vendor/phpcsstandards/phpcsutils/README.md create mode 100644 vendor/phpcsstandards/phpcsutils/composer.json create mode 100644 vendor/phpcsstandards/phpcsutils/phpcsutils-autoload.php create mode 100644 vendor/phpstan/phpstan/LICENSE create mode 100644 vendor/phpstan/phpstan/README.md create mode 100644 vendor/phpstan/phpstan/UPGRADING.md create mode 100644 vendor/phpstan/phpstan/bootstrap.php create mode 100644 vendor/phpstan/phpstan/composer.json create mode 100644 vendor/phpstan/phpstan/conf/bleedingEdge.neon create mode 100755 vendor/phpstan/phpstan/phpstan create mode 100755 vendor/phpstan/phpstan/phpstan.phar create mode 100644 vendor/phpstan/phpstan/phpstan.phar.asc create mode 100644 vendor/phpunit/php-code-coverage/ChangeLog-9.2.md create mode 100644 vendor/phpunit/php-code-coverage/LICENSE create mode 100644 vendor/phpunit/php-code-coverage/README.md create mode 100755 vendor/phpunit/php-code-coverage/build/scripts/extract-release-notes.php create mode 100644 vendor/phpunit/php-code-coverage/composer.json create mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage.php create mode 100644 vendor/phpunit/php-code-coverage/src/Driver/Driver.php create mode 100644 vendor/phpunit/php-code-coverage/src/Driver/PcovDriver.php create mode 100644 vendor/phpunit/php-code-coverage/src/Driver/PhpdbgDriver.php create mode 100644 vendor/phpunit/php-code-coverage/src/Driver/Selector.php create mode 100644 vendor/phpunit/php-code-coverage/src/Driver/Xdebug2Driver.php create mode 100644 vendor/phpunit/php-code-coverage/src/Driver/Xdebug3Driver.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/BranchAndPathCoverageNotSupportedException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/DeadCodeDetectionNotSupportedException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/Exception.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverAvailableException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverWithPathCoverageSupportAvailableException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/ParserException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/PcovNotAvailableException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/PhpdbgNotAvailableException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/ReflectionException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/ReportAlreadyFinalizedException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/WriteOperationFailedException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/WrongXdebugVersionException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/Xdebug2NotEnabledException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/Xdebug3NotEnabledException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/XdebugNotAvailableException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Exception/XmlException.php create mode 100644 vendor/phpunit/php-code-coverage/src/Filter.php create mode 100644 vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php create mode 100644 vendor/phpunit/php-code-coverage/src/Node/Builder.php create mode 100644 vendor/phpunit/php-code-coverage/src/Node/CrapIndex.php create mode 100644 vendor/phpunit/php-code-coverage/src/Node/Directory.php create mode 100644 vendor/phpunit/php-code-coverage/src/Node/File.php create mode 100644 vendor/phpunit/php-code-coverage/src/Node/Iterator.php create mode 100644 vendor/phpunit/php-code-coverage/src/ProcessedCodeCoverageData.php create mode 100644 vendor/phpunit/php-code-coverage/src/RawCodeCoverageData.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Clover.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Cobertura.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Crap4j.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Facade.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/branches.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/coverage_bar.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/coverage_bar_branch.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/bootstrap.min.css create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/custom.css create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/nv.d3.min.css create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/octicons.css create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/style.css create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard_branch.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_branch.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_item.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/directory_item_branch.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_branch.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item_branch.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/icons/file-code.svg create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/icons/file-directory.svg create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/bootstrap.min.js create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/d3.min.js create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/file.js create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/jquery.min.js create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/nv.d3.min.js create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/popper.min.js create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/line.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/lines.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item_branch.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/paths.html.dist create mode 100644 vendor/phpunit/php-code-coverage/src/Report/PHP.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Text.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Coverage.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Directory.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Facade.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/File.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Method.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Node.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Project.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Totals.php create mode 100644 vendor/phpunit/php-code-coverage/src/Report/Xml/Unit.php create mode 100644 vendor/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php create mode 100644 vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php create mode 100644 vendor/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php create mode 100644 vendor/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php create mode 100644 vendor/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php create mode 100644 vendor/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php create mode 100644 vendor/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php create mode 100644 vendor/phpunit/php-code-coverage/src/Util/Filesystem.php create mode 100644 vendor/phpunit/php-code-coverage/src/Util/Percentage.php create mode 100644 vendor/phpunit/php-code-coverage/src/Version.php create mode 100644 vendor/phpunit/php-file-iterator/.psalm/baseline.xml create mode 100644 vendor/phpunit/php-file-iterator/.psalm/config.xml create mode 100644 vendor/phpunit/php-file-iterator/ChangeLog.md create mode 100644 vendor/phpunit/php-file-iterator/LICENSE create mode 100644 vendor/phpunit/php-file-iterator/README.md create mode 100644 vendor/phpunit/php-file-iterator/composer.json create mode 100644 vendor/phpunit/php-file-iterator/src/Facade.php create mode 100644 vendor/phpunit/php-file-iterator/src/Factory.php create mode 100644 vendor/phpunit/php-file-iterator/src/Iterator.php create mode 100644 vendor/phpunit/php-invoker/ChangeLog.md create mode 100644 vendor/phpunit/php-invoker/LICENSE create mode 100644 vendor/phpunit/php-invoker/README.md create mode 100644 vendor/phpunit/php-invoker/composer.json create mode 100644 vendor/phpunit/php-invoker/src/Invoker.php create mode 100644 vendor/phpunit/php-invoker/src/exceptions/Exception.php create mode 100644 vendor/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php create mode 100644 vendor/phpunit/php-invoker/src/exceptions/TimeoutException.php create mode 100644 vendor/phpunit/php-text-template/.psalm/baseline.xml create mode 100644 vendor/phpunit/php-text-template/.psalm/config.xml create mode 100644 vendor/phpunit/php-text-template/ChangeLog.md create mode 100644 vendor/phpunit/php-text-template/LICENSE create mode 100644 vendor/phpunit/php-text-template/README.md create mode 100644 vendor/phpunit/php-text-template/composer.json create mode 100644 vendor/phpunit/php-text-template/src/Template.php create mode 100644 vendor/phpunit/php-text-template/src/exceptions/Exception.php create mode 100644 vendor/phpunit/php-text-template/src/exceptions/InvalidArgumentException.php create mode 100644 vendor/phpunit/php-text-template/src/exceptions/RuntimeException.php create mode 100644 vendor/phpunit/php-timer/.psalm/baseline.xml create mode 100644 vendor/phpunit/php-timer/.psalm/config.xml create mode 100644 vendor/phpunit/php-timer/ChangeLog.md create mode 100644 vendor/phpunit/php-timer/LICENSE create mode 100644 vendor/phpunit/php-timer/README.md create mode 100644 vendor/phpunit/php-timer/composer.json create mode 100644 vendor/phpunit/php-timer/src/Duration.php create mode 100644 vendor/phpunit/php-timer/src/ResourceUsageFormatter.php create mode 100644 vendor/phpunit/php-timer/src/Timer.php create mode 100644 vendor/phpunit/php-timer/src/exceptions/Exception.php create mode 100644 vendor/phpunit/php-timer/src/exceptions/NoActiveTimerException.php create mode 100644 vendor/phpunit/php-timer/src/exceptions/TimeSinceStartOfRequestNotAvailableException.php create mode 100644 vendor/phpunit/phpunit/ChangeLog-9.6.md create mode 100644 vendor/phpunit/phpunit/DEPRECATIONS.md create mode 100644 vendor/phpunit/phpunit/LICENSE create mode 100644 vendor/phpunit/phpunit/README.md create mode 100644 vendor/phpunit/phpunit/SECURITY.md create mode 100644 vendor/phpunit/phpunit/composer.json create mode 100644 vendor/phpunit/phpunit/composer.lock create mode 100755 vendor/phpunit/phpunit/phpunit create mode 100644 vendor/phpunit/phpunit/phpunit.xsd create mode 100644 vendor/phpunit/phpunit/schema/8.5.xsd create mode 100644 vendor/phpunit/phpunit/schema/9.0.xsd create mode 100644 vendor/phpunit/phpunit/schema/9.1.xsd create mode 100644 vendor/phpunit/phpunit/schema/9.2.xsd create mode 100644 vendor/phpunit/phpunit/schema/9.3.xsd create mode 100644 vendor/phpunit/phpunit/schema/9.4.xsd create mode 100644 vendor/phpunit/phpunit/schema/9.5.xsd create mode 100644 vendor/phpunit/phpunit/src/Exception.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Assert.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Assert/Functions.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Boolean/IsFalse.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Boolean/IsTrue.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/SameSize.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessage.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageRegularExpression.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsAnything.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Math/IsFinite.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Math/IsInfinite.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Math/IsNan.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasAttribute.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasStaticAttribute.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasAttribute.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasProperty.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Operator/BinaryOperator.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalAnd.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalOr.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Operator/Operator.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/String/StringEndsWith.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsEqual.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsIdentical.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsNull.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php create mode 100644 vendor/phpunit/phpunit/src/Framework/DataProviderTestSuite.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Error/Deprecated.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Error/Error.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Error/Notice.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Error/Warning.php create mode 100644 vendor/phpunit/phpunit/src/Framework/ErrorTestCase.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/ActualValueIsNotAnObjectException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotAcceptParameterTypeException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareParameterTypeException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotExistException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/CoveredCodeNotExecutedException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/Error.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/Exception.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/IncompleteTestError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/InvalidCoversTargetException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/MissingCoversAnnotationException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/OutputError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/PHPTAssertionFailedError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/RiskyTestError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/SkippedTestError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/SkippedTestSuiteError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/SyntheticError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/SyntheticSkippedError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/UnintentionallyCoveredCodeError.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Exception/Warning.php create mode 100644 vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php create mode 100644 vendor/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php create mode 100644 vendor/phpunit/phpunit/src/Framework/IncompleteTest.php create mode 100644 vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php create mode 100644 vendor/phpunit/phpunit/src/Framework/InvalidParameterGroupException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Api/Api.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Api/Method.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Builder/Identity.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Builder/Stub.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseAddMethodsException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ClassAlreadyExistsException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsFinalException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsReadonlyException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ConfigurableMethodsAlreadyInitializedException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/DuplicateMethodException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/InvalidMethodNameException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameAlreadyConfiguredException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameNotConfiguredException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodParametersAlreadyConfiguredException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/OriginalConstructorInvocationRequiredException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ReflectionException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/SoapExtensionNotAvailableException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownClassException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTraitException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTypeException.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/deprecation.tpl create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/intersection.tpl create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_class.tpl create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_method.tpl create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_method_never_or_void.tpl create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/mocked_static_method.tpl create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/proxied_method.tpl create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/proxied_method_never_or_void.tpl create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/trait_class.tpl create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/wsdl_class.tpl create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Generator/wsdl_method.tpl create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Invocation.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Matcher.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MockClass.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MockMethodSet.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MockObject.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MockTrait.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/MockType.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/AnyInvokedCount.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/AnyParameters.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvocationOrder.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Rule/ParametersRule.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnArgument.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnValueMap.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Stub/Stub.php create mode 100644 vendor/phpunit/phpunit/src/Framework/MockObject/Verifiable.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Reorderable.php create mode 100644 vendor/phpunit/phpunit/src/Framework/SelfDescribing.php create mode 100644 vendor/phpunit/phpunit/src/Framework/SkippedTest.php create mode 100644 vendor/phpunit/phpunit/src/Framework/SkippedTestCase.php create mode 100644 vendor/phpunit/phpunit/src/Framework/Test.php create mode 100644 vendor/phpunit/phpunit/src/Framework/TestBuilder.php create mode 100644 vendor/phpunit/phpunit/src/Framework/TestCase.php create mode 100644 vendor/phpunit/phpunit/src/Framework/TestFailure.php create mode 100644 vendor/phpunit/phpunit/src/Framework/TestListener.php create mode 100644 vendor/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php create mode 100644 vendor/phpunit/phpunit/src/Framework/TestResult.php create mode 100644 vendor/phpunit/phpunit/src/Framework/TestSuite.php create mode 100644 vendor/phpunit/phpunit/src/Framework/TestSuiteIterator.php create mode 100644 vendor/phpunit/phpunit/src/Framework/WarningTestCase.php create mode 100644 vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php create mode 100644 vendor/phpunit/phpunit/src/Runner/DefaultTestResultCache.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Exception.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Extension/ExtensionHandler.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Extension/PharLoader.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Filter/Factory.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterIncompleteTestHook.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterLastTestHook.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterRiskyTestHook.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterTestErrorHook.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterTestFailureHook.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterTestHook.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/AfterTestWarningHook.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/BeforeFirstTestHook.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/BeforeTestHook.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/Hook.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/TestHook.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php create mode 100644 vendor/phpunit/phpunit/src/Runner/NullTestResultCache.php create mode 100644 vendor/phpunit/phpunit/src/Runner/PhptTestCase.php create mode 100644 vendor/phpunit/phpunit/src/Runner/ResultCacheExtension.php create mode 100644 vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php create mode 100644 vendor/phpunit/phpunit/src/Runner/TestResultCache.php create mode 100644 vendor/phpunit/phpunit/src/Runner/TestSuiteLoader.php create mode 100644 vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php create mode 100644 vendor/phpunit/phpunit/src/Runner/Version.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/CliArguments/Builder.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/CliArguments/Configuration.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/CliArguments/Exception.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/CliArguments/Mapper.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/Command.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/DefaultResultPrinter.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/Exception/Exception.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/Exception/ReflectionException.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/Exception/RuntimeException.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/Help.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/TestRunner.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/TestSuiteMapper.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/CodeCoverage.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/Directory.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollection.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollectionIterator.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/FilterMapper.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Clover.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Cobertura.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Crap4j.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Html.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Php.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Text.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Xml.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Configuration.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Exception.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/Directory.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollection.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollectionIterator.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/File.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollection.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollectionIterator.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Generator.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Group.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollection.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollectionIterator.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Groups.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Loader.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Junit.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Logging.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TeamCity.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Html.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Text.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Xml.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Text.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilder.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilderException.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationException.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/ConvertLogTypes.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageCloverToReport.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageCrap4jToReport.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageHtmlToReport.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoveragePhpToReport.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageTextToReport.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageXmlToReport.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/IntroduceCoverageElement.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/LogToReportMigration.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/Migration.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveAttributesFromFilterWhitelistToCoverage.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveAttributesFromRootToCoverage.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistExcludesToCoverage.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistIncludesToCoverage.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveCacheTokensAttribute.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveEmptyFilter.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveLogTypes.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/UpdateSchemaLocationTo93.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrator.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Constant.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollection.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollectionIterator.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSetting.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollection.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollectionIterator.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Php.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/PhpHandler.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Variable.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollection.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollectionIterator.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/Extension.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollection.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollectionIterator.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/PHPUnit.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectory.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollection.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollectionIterator.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFile.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollection.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollectionIterator.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuite.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollection.php create mode 100644 vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollectionIterator.php create mode 100644 vendor/phpunit/phpunit/src/Util/Annotation/DocBlock.php create mode 100644 vendor/phpunit/phpunit/src/Util/Annotation/Registry.php create mode 100644 vendor/phpunit/phpunit/src/Util/Blacklist.php create mode 100644 vendor/phpunit/phpunit/src/Util/Cloner.php create mode 100644 vendor/phpunit/phpunit/src/Util/Color.php create mode 100644 vendor/phpunit/phpunit/src/Util/ErrorHandler.php create mode 100644 vendor/phpunit/phpunit/src/Util/Exception.php create mode 100644 vendor/phpunit/phpunit/src/Util/ExcludeList.php create mode 100644 vendor/phpunit/phpunit/src/Util/FileLoader.php create mode 100644 vendor/phpunit/phpunit/src/Util/Filesystem.php create mode 100644 vendor/phpunit/phpunit/src/Util/Filter.php create mode 100644 vendor/phpunit/phpunit/src/Util/GlobalState.php create mode 100644 vendor/phpunit/phpunit/src/Util/InvalidDataSetException.php create mode 100644 vendor/phpunit/phpunit/src/Util/Json.php create mode 100644 vendor/phpunit/phpunit/src/Util/Log/JUnit.php create mode 100644 vendor/phpunit/phpunit/src/Util/Log/TeamCity.php create mode 100644 vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php create mode 100644 vendor/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php create mode 100644 vendor/phpunit/phpunit/src/Util/PHP/Template/PhptTestCase.tpl create mode 100644 vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseClass.tpl create mode 100644 vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl create mode 100644 vendor/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php create mode 100644 vendor/phpunit/phpunit/src/Util/Printer.php create mode 100644 vendor/phpunit/phpunit/src/Util/Reflection.php create mode 100644 vendor/phpunit/phpunit/src/Util/RegularExpression.php create mode 100644 vendor/phpunit/phpunit/src/Util/Test.php create mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php create mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php create mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php create mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php create mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/TestDoxPrinter.php create mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/TextResultPrinter.php create mode 100644 vendor/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php create mode 100644 vendor/phpunit/phpunit/src/Util/TextTestListRenderer.php create mode 100644 vendor/phpunit/phpunit/src/Util/Type.php create mode 100644 vendor/phpunit/phpunit/src/Util/VersionComparisonOperator.php create mode 100644 vendor/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php create mode 100644 vendor/phpunit/phpunit/src/Util/Xml.php create mode 100644 vendor/phpunit/phpunit/src/Util/Xml/Exception.php create mode 100644 vendor/phpunit/phpunit/src/Util/Xml/FailedSchemaDetectionResult.php create mode 100644 vendor/phpunit/phpunit/src/Util/Xml/Loader.php create mode 100644 vendor/phpunit/phpunit/src/Util/Xml/SchemaDetectionResult.php create mode 100644 vendor/phpunit/phpunit/src/Util/Xml/SchemaDetector.php create mode 100644 vendor/phpunit/phpunit/src/Util/Xml/SchemaFinder.php create mode 100644 vendor/phpunit/phpunit/src/Util/Xml/SnapshotNodeList.php create mode 100644 vendor/phpunit/phpunit/src/Util/Xml/SuccessfulSchemaDetectionResult.php create mode 100644 vendor/phpunit/phpunit/src/Util/Xml/ValidationResult.php create mode 100644 vendor/phpunit/phpunit/src/Util/Xml/Validator.php create mode 100644 vendor/phpunit/phpunit/src/Util/XmlTestListRenderer.php create mode 100644 vendor/sebastian/cli-parser/ChangeLog.md create mode 100644 vendor/sebastian/cli-parser/LICENSE create mode 100644 vendor/sebastian/cli-parser/README.md create mode 100644 vendor/sebastian/cli-parser/composer.json create mode 100644 vendor/sebastian/cli-parser/infection.json create mode 100644 vendor/sebastian/cli-parser/src/Parser.php create mode 100644 vendor/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php create mode 100644 vendor/sebastian/cli-parser/src/exceptions/Exception.php create mode 100644 vendor/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php create mode 100644 vendor/sebastian/cli-parser/src/exceptions/RequiredOptionArgumentMissingException.php create mode 100644 vendor/sebastian/cli-parser/src/exceptions/UnknownOptionException.php create mode 100644 vendor/sebastian/code-unit-reverse-lookup/ChangeLog.md create mode 100644 vendor/sebastian/code-unit-reverse-lookup/LICENSE create mode 100644 vendor/sebastian/code-unit-reverse-lookup/README.md create mode 100644 vendor/sebastian/code-unit-reverse-lookup/composer.json create mode 100644 vendor/sebastian/code-unit-reverse-lookup/src/Wizard.php create mode 100644 vendor/sebastian/code-unit/.psalm/baseline.xml create mode 100644 vendor/sebastian/code-unit/.psalm/config.xml create mode 100644 vendor/sebastian/code-unit/ChangeLog.md create mode 100644 vendor/sebastian/code-unit/LICENSE create mode 100644 vendor/sebastian/code-unit/README.md create mode 100644 vendor/sebastian/code-unit/composer.json create mode 100644 vendor/sebastian/code-unit/src/ClassMethodUnit.php create mode 100644 vendor/sebastian/code-unit/src/ClassUnit.php create mode 100644 vendor/sebastian/code-unit/src/CodeUnit.php create mode 100644 vendor/sebastian/code-unit/src/CodeUnitCollection.php create mode 100644 vendor/sebastian/code-unit/src/CodeUnitCollectionIterator.php create mode 100644 vendor/sebastian/code-unit/src/FunctionUnit.php create mode 100644 vendor/sebastian/code-unit/src/InterfaceMethodUnit.php create mode 100644 vendor/sebastian/code-unit/src/InterfaceUnit.php create mode 100644 vendor/sebastian/code-unit/src/Mapper.php create mode 100644 vendor/sebastian/code-unit/src/TraitMethodUnit.php create mode 100644 vendor/sebastian/code-unit/src/TraitUnit.php create mode 100644 vendor/sebastian/code-unit/src/exceptions/Exception.php create mode 100644 vendor/sebastian/code-unit/src/exceptions/InvalidCodeUnitException.php create mode 100644 vendor/sebastian/code-unit/src/exceptions/NoTraitException.php create mode 100644 vendor/sebastian/code-unit/src/exceptions/ReflectionException.php create mode 100644 vendor/sebastian/comparator/ChangeLog.md create mode 100644 vendor/sebastian/comparator/LICENSE create mode 100644 vendor/sebastian/comparator/README.md create mode 100644 vendor/sebastian/comparator/composer.json create mode 100644 vendor/sebastian/comparator/src/ArrayComparator.php create mode 100644 vendor/sebastian/comparator/src/Comparator.php create mode 100644 vendor/sebastian/comparator/src/ComparisonFailure.php create mode 100644 vendor/sebastian/comparator/src/DOMNodeComparator.php create mode 100644 vendor/sebastian/comparator/src/DateTimeComparator.php create mode 100644 vendor/sebastian/comparator/src/DoubleComparator.php create mode 100644 vendor/sebastian/comparator/src/ExceptionComparator.php create mode 100644 vendor/sebastian/comparator/src/Factory.php create mode 100644 vendor/sebastian/comparator/src/MockObjectComparator.php create mode 100644 vendor/sebastian/comparator/src/NumericComparator.php create mode 100644 vendor/sebastian/comparator/src/ObjectComparator.php create mode 100644 vendor/sebastian/comparator/src/ResourceComparator.php create mode 100644 vendor/sebastian/comparator/src/ScalarComparator.php create mode 100644 vendor/sebastian/comparator/src/SplObjectStorageComparator.php create mode 100644 vendor/sebastian/comparator/src/TypeComparator.php create mode 100644 vendor/sebastian/comparator/src/exceptions/Exception.php create mode 100644 vendor/sebastian/comparator/src/exceptions/RuntimeException.php create mode 100644 vendor/sebastian/complexity/.psalm/baseline.xml create mode 100644 vendor/sebastian/complexity/.psalm/config.xml create mode 100644 vendor/sebastian/complexity/ChangeLog.md create mode 100644 vendor/sebastian/complexity/LICENSE create mode 100644 vendor/sebastian/complexity/README.md create mode 100644 vendor/sebastian/complexity/composer.json create mode 100644 vendor/sebastian/complexity/src/Calculator.php create mode 100644 vendor/sebastian/complexity/src/Complexity/Complexity.php create mode 100644 vendor/sebastian/complexity/src/Complexity/ComplexityCollection.php create mode 100644 vendor/sebastian/complexity/src/Complexity/ComplexityCollectionIterator.php create mode 100644 vendor/sebastian/complexity/src/Exception/Exception.php create mode 100644 vendor/sebastian/complexity/src/Exception/RuntimeException.php create mode 100644 vendor/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php create mode 100644 vendor/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php create mode 100644 vendor/sebastian/diff/ChangeLog.md create mode 100644 vendor/sebastian/diff/LICENSE create mode 100644 vendor/sebastian/diff/README.md create mode 100644 vendor/sebastian/diff/composer.json create mode 100644 vendor/sebastian/diff/src/Chunk.php create mode 100644 vendor/sebastian/diff/src/Diff.php create mode 100644 vendor/sebastian/diff/src/Differ.php create mode 100644 vendor/sebastian/diff/src/Exception/ConfigurationException.php create mode 100644 vendor/sebastian/diff/src/Exception/Exception.php create mode 100644 vendor/sebastian/diff/src/Exception/InvalidArgumentException.php create mode 100644 vendor/sebastian/diff/src/Line.php create mode 100644 vendor/sebastian/diff/src/LongestCommonSubsequenceCalculator.php create mode 100644 vendor/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php create mode 100644 vendor/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php create mode 100644 vendor/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php create mode 100644 vendor/sebastian/diff/src/Output/DiffOutputBuilderInterface.php create mode 100644 vendor/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php create mode 100644 vendor/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php create mode 100644 vendor/sebastian/diff/src/Parser.php create mode 100644 vendor/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php create mode 100644 vendor/sebastian/environment/ChangeLog.md create mode 100644 vendor/sebastian/environment/LICENSE create mode 100644 vendor/sebastian/environment/README.md create mode 100644 vendor/sebastian/environment/composer.json create mode 100644 vendor/sebastian/environment/src/Console.php create mode 100644 vendor/sebastian/environment/src/OperatingSystem.php create mode 100644 vendor/sebastian/environment/src/Runtime.php create mode 100644 vendor/sebastian/exporter/ChangeLog.md create mode 100644 vendor/sebastian/exporter/LICENSE create mode 100644 vendor/sebastian/exporter/README.md create mode 100644 vendor/sebastian/exporter/composer.json create mode 100644 vendor/sebastian/exporter/src/Exporter.php create mode 100644 vendor/sebastian/global-state/ChangeLog.md create mode 100644 vendor/sebastian/global-state/LICENSE create mode 100644 vendor/sebastian/global-state/README.md create mode 100644 vendor/sebastian/global-state/composer.json create mode 100644 vendor/sebastian/global-state/src/CodeExporter.php create mode 100644 vendor/sebastian/global-state/src/ExcludeList.php create mode 100644 vendor/sebastian/global-state/src/Restorer.php create mode 100644 vendor/sebastian/global-state/src/Snapshot.php create mode 100644 vendor/sebastian/global-state/src/exceptions/Exception.php create mode 100644 vendor/sebastian/global-state/src/exceptions/RuntimeException.php create mode 100644 vendor/sebastian/lines-of-code/.psalm/baseline.xml create mode 100644 vendor/sebastian/lines-of-code/.psalm/config.xml create mode 100644 vendor/sebastian/lines-of-code/ChangeLog.md create mode 100644 vendor/sebastian/lines-of-code/LICENSE create mode 100644 vendor/sebastian/lines-of-code/README.md create mode 100644 vendor/sebastian/lines-of-code/composer.json create mode 100644 vendor/sebastian/lines-of-code/src/Counter.php create mode 100644 vendor/sebastian/lines-of-code/src/Exception/Exception.php create mode 100644 vendor/sebastian/lines-of-code/src/Exception/IllogicalValuesException.php create mode 100644 vendor/sebastian/lines-of-code/src/Exception/NegativeValueException.php create mode 100644 vendor/sebastian/lines-of-code/src/Exception/RuntimeException.php create mode 100644 vendor/sebastian/lines-of-code/src/LineCountingVisitor.php create mode 100644 vendor/sebastian/lines-of-code/src/LinesOfCode.php create mode 100644 vendor/sebastian/object-enumerator/.psalm/baseline.xml create mode 100644 vendor/sebastian/object-enumerator/.psalm/config.xml create mode 100644 vendor/sebastian/object-enumerator/ChangeLog.md create mode 100644 vendor/sebastian/object-enumerator/LICENSE create mode 100644 vendor/sebastian/object-enumerator/README.md create mode 100644 vendor/sebastian/object-enumerator/composer.json create mode 100644 vendor/sebastian/object-enumerator/phpunit.xml create mode 100644 vendor/sebastian/object-enumerator/src/Enumerator.php create mode 100644 vendor/sebastian/object-enumerator/src/Exception.php create mode 100644 vendor/sebastian/object-enumerator/src/InvalidArgumentException.php create mode 100644 vendor/sebastian/object-reflector/.psalm/baseline.xml create mode 100644 vendor/sebastian/object-reflector/.psalm/config.xml create mode 100644 vendor/sebastian/object-reflector/ChangeLog.md create mode 100644 vendor/sebastian/object-reflector/LICENSE create mode 100644 vendor/sebastian/object-reflector/README.md create mode 100644 vendor/sebastian/object-reflector/composer.json create mode 100644 vendor/sebastian/object-reflector/src/Exception.php create mode 100644 vendor/sebastian/object-reflector/src/InvalidArgumentException.php create mode 100644 vendor/sebastian/object-reflector/src/ObjectReflector.php create mode 100644 vendor/sebastian/recursion-context/ChangeLog.md create mode 100644 vendor/sebastian/recursion-context/LICENSE create mode 100644 vendor/sebastian/recursion-context/README.md create mode 100644 vendor/sebastian/recursion-context/composer.json create mode 100644 vendor/sebastian/recursion-context/src/Context.php create mode 100644 vendor/sebastian/recursion-context/src/Exception.php create mode 100644 vendor/sebastian/recursion-context/src/InvalidArgumentException.php create mode 100644 vendor/sebastian/resource-operations/ChangeLog.md create mode 100644 vendor/sebastian/resource-operations/LICENSE create mode 100644 vendor/sebastian/resource-operations/README.md create mode 100644 vendor/sebastian/resource-operations/SECURITY.md create mode 100755 vendor/sebastian/resource-operations/build/generate.php create mode 100644 vendor/sebastian/resource-operations/composer.json create mode 100644 vendor/sebastian/resource-operations/src/ResourceOperations.php create mode 100644 vendor/sebastian/type/ChangeLog.md create mode 100644 vendor/sebastian/type/LICENSE create mode 100644 vendor/sebastian/type/README.md create mode 100644 vendor/sebastian/type/composer.json create mode 100644 vendor/sebastian/type/src/Parameter.php create mode 100644 vendor/sebastian/type/src/ReflectionMapper.php create mode 100644 vendor/sebastian/type/src/TypeName.php create mode 100644 vendor/sebastian/type/src/exception/Exception.php create mode 100644 vendor/sebastian/type/src/exception/RuntimeException.php create mode 100644 vendor/sebastian/type/src/type/CallableType.php create mode 100644 vendor/sebastian/type/src/type/FalseType.php create mode 100644 vendor/sebastian/type/src/type/GenericObjectType.php create mode 100644 vendor/sebastian/type/src/type/IntersectionType.php create mode 100644 vendor/sebastian/type/src/type/IterableType.php create mode 100644 vendor/sebastian/type/src/type/MixedType.php create mode 100644 vendor/sebastian/type/src/type/NeverType.php create mode 100644 vendor/sebastian/type/src/type/NullType.php create mode 100644 vendor/sebastian/type/src/type/ObjectType.php create mode 100644 vendor/sebastian/type/src/type/SimpleType.php create mode 100644 vendor/sebastian/type/src/type/StaticType.php create mode 100644 vendor/sebastian/type/src/type/TrueType.php create mode 100644 vendor/sebastian/type/src/type/Type.php create mode 100644 vendor/sebastian/type/src/type/UnionType.php create mode 100644 vendor/sebastian/type/src/type/UnknownType.php create mode 100644 vendor/sebastian/type/src/type/VoidType.php create mode 100644 vendor/sebastian/version/.gitattributes create mode 100644 vendor/sebastian/version/.gitignore create mode 100644 vendor/sebastian/version/ChangeLog.md create mode 100644 vendor/sebastian/version/LICENSE create mode 100644 vendor/sebastian/version/README.md create mode 100644 vendor/sebastian/version/composer.json create mode 100644 vendor/sebastian/version/src/Version.php create mode 100644 vendor/squizlabs/php_codesniffer/CHANGELOG.md create mode 100644 vendor/squizlabs/php_codesniffer/CodeSniffer.conf create mode 100644 vendor/squizlabs/php_codesniffer/CodeSniffer.conf.dist create mode 100644 vendor/squizlabs/php_codesniffer/README.md create mode 100644 vendor/squizlabs/php_codesniffer/autoload.php create mode 100755 vendor/squizlabs/php_codesniffer/bin/phpcbf create mode 100644 vendor/squizlabs/php_codesniffer/bin/phpcbf.bat create mode 100755 vendor/squizlabs/php_codesniffer/bin/phpcs create mode 100755 vendor/squizlabs/php_codesniffer/bin/phpcs.bat create mode 100644 vendor/squizlabs/php_codesniffer/composer.json create mode 100644 vendor/squizlabs/php_codesniffer/licence.txt create mode 100644 vendor/squizlabs/php_codesniffer/phpcs.xsd create mode 100644 vendor/squizlabs/php_codesniffer/src/Config.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Exceptions/DeepExitException.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Exceptions/RuntimeException.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Exceptions/TokenizerException.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Files/DummyFile.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Files/File.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Files/FileList.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Files/LocalFile.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Filters/ExactMatch.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Filters/Filter.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Filters/GitModified.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Filters/GitStaged.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Fixer.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Generators/Generator.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Generators/HTML.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Generators/Markdown.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Generators/Text.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reporter.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Cbf.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Checkstyle.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Code.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Csv.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Diff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Emacs.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Full.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Gitblame.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Hgblame.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Info.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Json.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Junit.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Notifysend.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Performance.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Report.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Source.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Summary.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Svnblame.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/VersionControl.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Xml.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Ruleset.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Runner.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractArraySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractPatternSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractScopeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractVariableSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Sniffs/DeprecatedSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Sniffs/Sniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Arrays/ArrayIndentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Arrays/DisallowLongArraySyntaxStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Arrays/DisallowShortArraySyntaxStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Classes/DuplicateClassNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Classes/OpeningBraceSameLineStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/AssignmentInConditionStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/EmptyPHPStatementStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/EmptyStatementStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/ForLoopShouldBeWhileLoopStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/ForLoopWithTestFunctionCallStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/JumbledIncrementerStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/RequireExplicitBooleanOperatorPrecedenceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UnconditionalIfStatementStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UnnecessaryFinalModifierStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UnusedFunctionParameterStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UselessOverridingMethodStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Commenting/DocCommentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Commenting/FixmeStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Commenting/TodoStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/ControlStructures/DisallowYodaConditionsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/ControlStructures/InlineControlStructureStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Debug/CSSLintStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Debug/ClosureLinterStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Debug/JSHintStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/ByteOrderMarkStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/EndFileNewlineStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/EndFileNoNewlineStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/ExecutableFileStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/InlineHTMLStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/LineEndingsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/LineLengthStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/LowercasedFilenameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneClassPerFileStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneInterfacePerFileStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneObjectStructurePerFileStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneTraitPerFileStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/DisallowMultipleStatementsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/MultipleStatementAlignmentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/NoSpaceAfterCastStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/SpaceAfterCastStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/SpaceAfterNotStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/SpaceBeforeCastStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/CallTimePassByReferenceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/FunctionCallArgumentSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/OpeningFunctionBraceBsdAllmanStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/OpeningFunctionBraceKernighanRitchieStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Metrics/CyclomaticComplexityStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Metrics/NestingLevelStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/AbstractClassNamePrefixStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/CamelCapsFunctionNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/ConstructorNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/InterfaceNameSuffixStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/TraitNameSuffixStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/UpperCaseConstantNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/BacktickOperatorStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/CharacterBeforePHPOpeningTagStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/ClosingPHPTagStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DeprecatedFunctionsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowAlternativePHPTagsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowRequestSuperglobalStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowShortOpenTagStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DiscourageGotoStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/ForbiddenFunctionsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/LowerCaseConstantStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/LowerCaseKeywordStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/LowerCaseTypeStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/NoSilencedErrorsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/RequireStrictTypesStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/SAPIUsageStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/SyntaxStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/UpperCaseConstantStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Strings/UnnecessaryHeredocStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Strings/UnnecessaryStringConcatStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/VersionControl/SubversionPropertiesStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/ArbitraryParenthesesSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/DisallowSpaceIndentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/DisallowTabIndentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/HereNowdocIdentifierSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/IncrementDecrementSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/LanguageConstructSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/ScopeIndentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/SpreadOperatorSpacingAfterStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Arrays/ArrayIndentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/AssignmentInConditionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/EmptyPHPStatementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/RequireExplicitBooleanOperatorPrecedenceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/FixmeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/TodoSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/ControlStructures/DisallowYodaConditionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/CSSLintSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/ESLintSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/JSHintSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/EndFileNewlineSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/EndFileNoNewlineSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/ExecutableFileSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LineEndingsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LineLengthSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LowercasedFilenameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneObjectStructurePerFileSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceBeforeCastSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/AbstractClassNamePrefixSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/InterfaceNameSuffixSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/TraitNameSuffixSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/BacktickOperatorSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/CharacterBeforePHPOpeningTagSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/ClosingPHPTagSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DisallowRequestSuperglobalSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DiscourageGotoSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/LowerCaseKeywordSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/LowerCaseTypeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/NoSilencedErrorsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/RequireStrictTypesSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/SAPIUsageSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/SyntaxSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/UpperCaseConstantSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Strings/UnnecessaryHeredocSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Strings/UnnecessaryStringConcatSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/ArbitraryParenthesesSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/HereNowdocIdentifierSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/IncrementDecrementSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/SpreadOperatorSpacingAfterSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/ArrayIndentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/ArrayIndentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/ArrayIndentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowShortArraySyntaxUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowShortArraySyntaxUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowShortArraySyntaxUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.10.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.11.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.9.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.97.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.98.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.99.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/OpeningBraceSameLineUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/OpeningBraceSameLineUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/OpeningBraceSameLineUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/AssignmentInConditionUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/AssignmentInConditionUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/AssignmentInConditionUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/AssignmentInConditionUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/AssignmentInConditionUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/AssignmentInConditionUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/AssignmentInConditionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/EmptyStatementUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/EmptyStatementUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopShouldBeWhileLoopUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopShouldBeWhileLoopUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopShouldBeWhileLoopUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopShouldBeWhileLoopUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/JumbledIncrementerUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/JumbledIncrementerUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/JumbledIncrementerUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/JumbledIncrementerUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/JumbledIncrementerUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/RequireExplicitBooleanOperatorPrecedenceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/RequireExplicitBooleanOperatorPrecedenceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnconditionalIfStatementUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnconditionalIfStatementUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnconditionalIfStatementUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnnecessaryFinalModifierUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnnecessaryFinalModifierUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnnecessaryFinalModifierUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnusedFunctionParameterUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnusedFunctionParameterUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnusedFunctionParameterUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnusedFunctionParameterUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.1.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.1.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.2.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/FixmeUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/FixmeUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/FixmeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/TodoUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/TodoUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/TodoUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/DisallowYodaConditionsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/DisallowYodaConditionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.2.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.3.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/CSSLintUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/CSSLintUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/ClosureLinterUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/ClosureLinterUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/ESLintUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/ESLintUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/JSHintUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/JSHintUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ByteOrderMarkUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ByteOrderMarkUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ByteOrderMarkUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ByteOrderMarkUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ByteOrderMarkUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ByteOrderMarkUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.1.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.1.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.2.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.2.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.3.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.3.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.3.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.3.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.4.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.6.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.7.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.10.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.3.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.3.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.6.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.8.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.9.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.9.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.1.inc create mode 100755 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.3.inc create mode 100755 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineLengthUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineLengthUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineLengthUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineLengthUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineLengthUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LowercasedFilenameUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LowercasedFilenameUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LowercasedFilenameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneClassPerFileUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneClassPerFileUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneInterfacePerFileUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneInterfacePerFileUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneObjectStructurePerFileUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneObjectStructurePerFileUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneTraitPerFileUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneTraitPerFileUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/lowercased_filename_unit_test.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/DisallowMultipleStatementsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/DisallowMultipleStatementsUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/DisallowMultipleStatementsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/NoSpaceAfterCastUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/NoSpaceAfterCastUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/NoSpaceAfterCastUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterCastUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterCastUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterCastUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterCastUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceBeforeCastUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceBeforeCastUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceBeforeCastUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/CallTimePassByReferenceUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/CallTimePassByReferenceUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/CallTimePassByReferenceUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/CallTimePassByReferenceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/FunctionCallArgumentSpacingUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/FunctionCallArgumentSpacingUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/FunctionCallArgumentSpacingUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/FunctionCallArgumentSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceBsdAllmanUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceBsdAllmanUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceBsdAllmanUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceKernighanRitchieUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceKernighanRitchieUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceKernighanRitchieUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceKernighanRitchieUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceKernighanRitchieUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceKernighanRitchieUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Metrics/CyclomaticComplexityUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Metrics/CyclomaticComplexityUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Metrics/CyclomaticComplexityUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Metrics/CyclomaticComplexityUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/AbstractClassNamePrefixUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/AbstractClassNamePrefixUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/AbstractClassNamePrefixUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/CamelCapsFunctionNameUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/CamelCapsFunctionNameUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/CamelCapsFunctionNameUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/CamelCapsFunctionNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/ConstructorNameUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/ConstructorNameUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/ConstructorNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/InterfaceNameSuffixUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/InterfaceNameSuffixUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/InterfaceNameSuffixUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/TraitNameSuffixUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/TraitNameSuffixUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/TraitNameSuffixUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/UpperCaseConstantNameUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/UpperCaseConstantNameUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/UpperCaseConstantNameUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/UpperCaseConstantNameUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/UpperCaseConstantNameUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/UpperCaseConstantNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/BacktickOperatorUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/BacktickOperatorUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/CharacterBeforePHPOpeningTagUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/CharacterBeforePHPOpeningTagUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/CharacterBeforePHPOpeningTagUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/CharacterBeforePHPOpeningTagUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ClosingPHPTagUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ClosingPHPTagUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ClosingPHPTagUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DeprecatedFunctionsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DeprecatedFunctionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowRequestSuperglobalUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowRequestSuperglobalUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DiscourageGotoUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DiscourageGotoUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ForbiddenFunctionsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ForbiddenFunctionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseTypeUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseTypeUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseTypeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/NoSilencedErrorsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/NoSilencedErrorsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.10.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.11.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.11.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.12.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.12.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.13.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.14.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.14.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.15.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.15.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.9.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SAPIUsageUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SAPIUsageUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryHeredocUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryHeredocUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryHeredocUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryHeredocUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryHeredocUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryHeredocUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.1.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.2.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/SubversionPropertiesUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/SubversionPropertiesUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/HereNowdocIdentifierSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/HereNowdocIdentifierSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/HereNowdocIdentifierSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Debug/FirebugConsoleSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/AssignThisSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/CSS/BrowserSpecificStylesUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/CSS/BrowserSpecificStylesUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/DisallowSelfActionsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/DisallowSelfActionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/IncludeSystemUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/IncludeSystemUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/UnusedSystemUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/UnusedSystemUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Commenting/FunctionCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Commenting/FunctionCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/DebugCodeUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/DebugCodeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/FirebugConsoleUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/FirebugConsoleUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/AssignThisUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/AssignThisUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/CreateWidgetTypeCallbackUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/CreateWidgetTypeCallbackUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/DisallowNewWidgetUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/DisallowNewWidgetUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/AjaxNullComparisonUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/AjaxNullComparisonUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/EvalObjectFactoryUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/EvalObjectFactoryUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/GetRequestDataUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/GetRequestDataUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/ReturnFunctionValueUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/ReturnFunctionValueUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Strings/JoinStringsUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Strings/JoinStringsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Classes/ClassDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/ClassCommentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/FileCommentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/FunctionCommentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/InlineCommentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/ControlStructures/ControlSignatureStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/ControlStructures/MultiLineConditionStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Files/IncludingFileStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Formatting/MultiLineAssignmentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Functions/FunctionCallSignatureStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Functions/FunctionDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Functions/ValidDefaultValueStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/NamingConventions/ValidClassNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/NamingConventions/ValidFunctionNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/NamingConventions/ValidVariableNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/WhiteSpace/ObjectOperatorIndentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/WhiteSpace/ScopeClosingBraceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/WhiteSpace/ScopeIndentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/InlineCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/ClassCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/ClassCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/InlineCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/InlineCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/InlineCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/ControlSignatureUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/ControlSignatureUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Files/IncludingFileUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Files/IncludingFileUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Files/IncludingFileUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Formatting/MultiLineAssignmentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Formatting/MultiLineAssignmentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.4.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidClassNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidClassNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidFunctionNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidFunctionNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeIndentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeIndentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeIndentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Classes/ClassDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Files/SideEffectsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Methods/CamelCapsMethodNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Classes/ClassDeclarationUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Classes/ClassDeclarationUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Classes/ClassDeclarationUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Classes/ClassDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.10.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.11.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.12.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.13.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.14.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.15.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.16.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.17.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.9.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Methods/CamelCapsMethodNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Methods/CamelCapsMethodNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Classes/ClassInstantiationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Classes/ClosingBraceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Classes/OpeningBraceSpaceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/ControlStructures/BooleanOperatorPlacementStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/ControlStructures/ControlStructureSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Files/ImportStatementStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Files/OpenTagStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Functions/NullableTypeDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Functions/ReturnTypeDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Keywords/ShortFormTypeKeywordsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Namespaces/CompoundNamespaceDepthStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Operators/OperatorSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Properties/ConstantVisibilityStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/ClassInstantiationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/ClosingBraceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/OpeningBraceSpaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/ControlStructures/BooleanOperatorPlacementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/DeclareStatementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/ImportStatementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/OpenTagSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Functions/NullableTypeDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Functions/ReturnTypeDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Keywords/ShortFormTypeKeywordsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Namespaces/CompoundNamespaceDepthSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Operators/OperatorSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Properties/ConstantVisibilitySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClosingBraceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClosingBraceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/OpeningBraceSpaceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/OpeningBraceSpaceUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/OpeningBraceSpaceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.10.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.10.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.11.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.11.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.12.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.12.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.13.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.14.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.15.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.16.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.17.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.18.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.19.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.4.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.7.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.9.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/ImportStatementUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/ImportStatementUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/ImportStatementUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/NullableTypeDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/NullableTypeDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/NullableTypeDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Keywords/ShortFormTypeKeywordsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Keywords/ShortFormTypeKeywordsUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Keywords/ShortFormTypeKeywordsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Namespaces/CompoundNamespaceDepthUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Namespaces/CompoundNamespaceDepthUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Properties/ConstantVisibilityUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Properties/ConstantVisibilityUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Properties/ConstantVisibilityUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Traits/UseDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Traits/UseDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Traits/UseDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Classes/ClassDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Classes/PropertyDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/ControlStructures/ControlStructureSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/ControlStructures/ElseIfDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/ControlStructures/SwitchDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Files/ClosingTagStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Files/EndFileNewlineStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Methods/FunctionCallSignatureStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Methods/FunctionClosingBraceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Methods/MethodDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Namespaces/NamespaceDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Namespaces/UseDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Methods/FunctionClosingBraceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ElseIfDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.4.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.5.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.6.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.7.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.10.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.10.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.11.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.11.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.12.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.12.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.13.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.13.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.14.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.6.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.7.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.9.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.9.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionClosingBraceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionClosingBraceUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionClosingBraceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/MethodDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/MethodDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/MethodDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/NamespaceDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/NamespaceDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/NamespaceDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.10.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.10.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.11.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.11.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.12.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.12.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.13.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.13.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.14.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.14.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.15.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.16.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.16.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.17.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.18.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.5.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.9.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Arrays/ArrayBracketSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Arrays/ArrayDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Classes/ClassFileNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Classes/LowercaseClassKeywordsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Classes/SelfMemberReferenceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Classes/ValidClassNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Commenting/BlockCommentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Commenting/DocCommentAlignmentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Commenting/FunctionCommentThrowTagStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/ControlStructures/ForEachLoopDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/ControlStructures/ForLoopDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/ControlStructures/LowercaseDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Functions/LowercaseFunctionKeywordsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/PHP/HeredocStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Scope/StaticThisUsageStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Strings/EchoedStringsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/CastSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/FunctionClosingBraceSpaceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/FunctionOpeningBraceSpaceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/LanguageConstructSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/MemberVarSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/ObjectOperatorSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/ScopeClosingBraceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/ScopeKeywordSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/SemicolonSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/SuperfluousWhitespaceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Arrays/ArrayBracketSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/DuplicateClassDefinitionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/IndentationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/NamedColoursSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/OpacitySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/ClassFileNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/DuplicatePropertySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/ValidClassNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/EmptyCatchCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Debug/JSLintSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Debug/JavaScriptLintSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Files/FileExtensionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/FunctionDuplicateArgumentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/NamingConventions/ValidFunctionNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Objects/DisallowObjectStringIndexSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Objects/ObjectInstantiationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Objects/ObjectMemberCommaSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowBooleanStatementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/EvalSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/HeredocSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.4.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionNameSpacingUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionNameSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateClassDefinitionUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateClassDefinitionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateStyleDefinitionUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateStyleDefinitionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyClassDefinitionUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyClassDefinitionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyStyleDefinitionUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyStyleDefinitionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.1.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.1.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.2.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/LowercaseStyleDefinitionUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/LowercaseStyleDefinitionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/MissingColonUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/MissingColonUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/NamedColoursUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/NamedColoursUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.1.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.1.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.2.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileName Spaces In FilenameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileName-Dashes-In-FilenameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileNameLiveCodingFailUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileNameLiveCodingPassUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileNameParseError1UnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/DuplicatePropertyUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/DuplicatePropertyUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/LowercaseClassKeywordsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/LowercaseClassKeywordsUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/LowercaseClassKeywordsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ValidClassNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ValidClassNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClassCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClassCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.4.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.5.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/EmptyCatchCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/EmptyCatchCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.10.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.2.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.9.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentThrowTagUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentThrowTagUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.1.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.1.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.2.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ElseIfDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.1.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.1.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.2.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/InlineIfDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/InlineIfDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/InlineIfDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/LowercaseDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/LowercaseDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/LowercaseDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/SwitchDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/SwitchDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/SwitchDeclarationUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/SwitchDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JSLintUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JSLintUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JavaScriptLintUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JavaScriptLintUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDuplicateArgumentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDuplicateArgumentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/GlobalFunctionUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/GlobalFunctionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/MultiLineFunctionDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/MultiLineFunctionDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/MultiLineFunctionDeclarationUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/MultiLineFunctionDeclarationUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/MultiLineFunctionDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidFunctionNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidFunctionNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidVariableNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidVariableNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/DisallowObjectStringIndexUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/DisallowObjectStringIndexUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/IncrementDecrementUsageUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/IncrementDecrementUsageUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ValidLogicalOperatorsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ValidLogicalOperatorsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowBooleanStatementUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowBooleanStatementUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowComparisonAssignmentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowComparisonAssignmentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DiscouragedFunctionsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DiscouragedFunctionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.10.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.11.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.12.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.12.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.13.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.13.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.14.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.15.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.16.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.17.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.18.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.18.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.19.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.19.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.20.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.20.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.21.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.21.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.22.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.22.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.23.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.24.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.24.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.25.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.25.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.4.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.5.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.9.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EvalUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EvalUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/GlobalKeywordUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/GlobalKeywordUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/InnerFunctionsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/InnerFunctionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/MethodScopeUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/MethodScopeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/StaticThisUsageUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/StaticThisUsageUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/CastSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/CastSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/CastSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionClosingBraceSpaceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionClosingBraceSpaceUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionClosingBraceSpaceUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionClosingBraceSpaceUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionClosingBraceSpaceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.5.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.6.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ObjectOperatorSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ObjectOperatorSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ObjectOperatorSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/PropertyLabelSpacingUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/PropertyLabelSpacingUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/PropertyLabelSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.4.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.5.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Docs/Debug/CodeAnalyzerStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Docs/Files/ClosingTagStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Docs/NamingConventions/ValidVariableNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Sniffs/Debug/CodeAnalyzerSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Sniffs/Files/ClosingTagSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.4.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.5.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.6.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.7.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Tokenizers/CSS.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Tokenizers/Comment.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Tokenizers/JS.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Tokenizers/PHP.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Tokenizers/Tokenizer.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Util/Cache.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Util/Common.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Util/Help.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Util/MessageCollector.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Util/Standards.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Util/Timing.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Util/Tokens.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/AllTests.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/ConfigDouble.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/AbstractMethodUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/AllTests.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/DetermineLoadedClassTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/TestFiles/A.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/TestFiles/B.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/TestFiles/C.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/TestFiles/Sub/C.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Config/AbstractRealConfigTestCase.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Config/ExtensionsArgTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Config/GeneratorArgTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Config/ReportArgsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Config/ReportWidthTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Config/SniffsExcludeArgsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/ErrorSuppressionTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/FindEndOfStatementTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/FindEndOfStatementTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/FindExtendedClassNameTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/FindExtendedClassNameTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/FindImplementedInterfaceNamesTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/FindImplementedInterfaceNamesTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/FindStartOfStatementTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/FindStartOfStatementTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetClassPropertiesTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetClassPropertiesTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetConditionTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetConditionTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetDeclarationNameJSTest.js create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetDeclarationNameJSTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetDeclarationNameParseError1Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetDeclarationNameParseError1Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetDeclarationNameParseError2Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetDeclarationNameParseError2Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetDeclarationNameTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetDeclarationNameTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetMemberPropertiesTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetMemberPropertiesTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetMethodParametersParseError1Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetMethodParametersParseError1Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetMethodParametersParseError2Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetMethodParametersParseError2Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetMethodParametersTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetMethodParametersTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetMethodPropertiesTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetMethodPropertiesTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetTokensAsStringTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/GetTokensAsStringTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/IsReferenceTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/File/IsReferenceTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/FileList/AbstractFileListTestCase.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/FileList/AddFileTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/FileList/ConstructTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/FileList/FilterDouble.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/FileList/Fixtures/file1.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Files/FileList/Fixtures/file2.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Filters/AbstractFilterTestCase.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Filters/Filter/AcceptTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Filters/Filter/AcceptTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Filters/GitModifiedTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Filters/GitStagedTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/FixFileReturnValueAllGoodTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/FixFileReturnValueConflictTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/FixFileReturnValueNotEnoughLoopsTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/FixFileReturnValueTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-BlankLinesAtEnd.diff create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-BlankLinesAtEnd.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-BlankLinesAtStart.diff create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-BlankLinesAtStart.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-LineAdded.diff create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-LineAdded.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-LineRemoved.diff create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-LineRemoved.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-NoDiff.diff create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-NoDiff.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-NoTrailingWhitespace.diff create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-NoTrailingWhitespace.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-TabsToSpaces.diff create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-TabsToSpaces.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-VarNameChanged.diff create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-VarNameChanged.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-WhiteSpaceAtEnd.diff create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-WhiteSpaceAtEnd.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-WhiteSpaceAtStart.diff create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-WhiteSpaceAtStart.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest-WindowsLineEndings.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/GenerateDiffTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/TestStandard/Sniffs/FixFileReturnValue/AllGoodSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/TestStandard/Sniffs/FixFileReturnValue/ConflictSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/TestStandard/Sniffs/FixFileReturnValue/NotEnoughLoopsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/TestStandard/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/Fixtures/test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Fixer/GenerateDiffTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/AllValidDocsTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/AnchorLinksTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonBlankLines.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonBlankLines.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonBlankLines.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonBlockLength.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonBlockLength.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonBlockLength.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonEncoding.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonEncoding.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonEncoding.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonLineLength.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonLineLength.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonLineLength.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeTitleLineWrapping.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeTitleLineWrapping.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeTitleLineWrapping.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeTitleWhitespace.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeTitleWhitespace.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputCodeTitleWhitespace.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputDocumentationTitleCase.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputDocumentationTitleCase.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputDocumentationTitleCase.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputDocumentationTitleLength.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputDocumentationTitleLength.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputDocumentationTitleLength.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputDocumentationTitlePCREFallback.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputDocumentationTitlePCREFallback.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputDocumentationTitlePCREFallback.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputDocumentationTitleToAnchorSlug.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputEmpty.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonMismatchedCodeElms.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonMismatchedCodeElms.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonMismatchedCodeElms.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonMissingCodeElm.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonMissingCodeElm.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonMissingCodeElm.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonNoCode.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonNoCode.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonNoCode.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonNoContent.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonNoContent.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonNoContent.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonOneEmptyCodeElm.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonOneEmptyCodeElm.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonOneEmptyCodeElm.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonTwoEmptyCodeElms.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonTwoEmptyCodeElms.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeComparisonTwoEmptyCodeElms.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeTitleEmpty.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeTitleEmpty.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeTitleEmpty.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeTitleMissing.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeTitleMissing.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidCodeTitleMissing.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidDocumentationTitleEmpty.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidDocumentationTitleEmpty.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidDocumentationTitleEmpty.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidDocumentationTitleMissing.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidDocumentationTitleMissing.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidDocumentationTitleMissing.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidStandardNoContent.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidStandardNoContent.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputInvalidStandardNoContent.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputOneDoc.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputOneDoc.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputOneDoc.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputStandardBlankLines.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputStandardBlankLines.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputStandardBlankLines.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputStandardEncoding.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputStandardEncoding.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputStandardEncoding.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputStandardIndent.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputStandardIndent.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputStandardIndent.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputStandardLineWrapping.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputStandardLineWrapping.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputStandardLineWrapping.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedOneElmAtWrongLevel.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedOneElmAtWrongLevel.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedOneElmAtWrongLevel.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.html create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.md create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.txt create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/HTMLDouble.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/MarkdownDouble.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/MockGenerator.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/CodeComparisonBlankLinesStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/CodeComparisonBlockLengthStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/CodeComparisonEncodingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/CodeComparisonLineLengthStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/CodeTitleLineWrappingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/CodeTitleWhitespaceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/DocumentationTitleCaseStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/DocumentationTitleLengthStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/DocumentationTitlePCREFallbackStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/DocumentationTitleToAnchorSlug1Standard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/DocumentationTitleToAnchorSlug2Standard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/DocumentationTitleToAnchorSlug3Standard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/StandardBlankLinesStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/StandardEncodingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/StandardIndentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Content/StandardLineWrappingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Invalid/CodeComparisonMismatchedCodeElmsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Invalid/CodeComparisonMissingCodeElmStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Invalid/CodeComparisonNoCodeStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Invalid/CodeComparisonNoContentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Invalid/CodeComparisonOneEmptyCodeElmStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Invalid/CodeComparisonTwoEmptyCodeElmsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Invalid/CodeTitleEmptyStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Invalid/CodeTitleMissingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Invalid/DocumentationTitleEmptyStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Invalid/DocumentationTitleMissingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Invalid/StandardNoContentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Structure/NoContentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Structure/NoDocumentationElementStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Structure/OneCodeComparisonNoStandardStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Structure/OneStandardBlockCodeComparisonStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Structure/OneStandardBlockNoCodeStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Structure/OneStandardBlockTwoCodeComparisonsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Structure/TwoStandardBlocksNoCodeStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Structure/TwoStandardBlocksOneCodeComparisonStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Structure/TwoStandardBlocksThreeCodeComparisonsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/ElementAtWrongLevelStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/OneElmAtWrongLevelStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/SuperfluousCodeElementStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/UnknownElementStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/CodeComparisonBlankLinesSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/CodeComparisonBlockLengthSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/CodeComparisonEncodingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/CodeComparisonLineLengthSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/CodeTitleLineWrappingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/CodeTitleWhitespaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/DocumentationTitleCaseSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/DocumentationTitleLengthSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/DocumentationTitlePCREFallbackSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/DocumentationTitleToAnchorSlug1Sniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/DocumentationTitleToAnchorSlug2Sniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/DocumentationTitleToAnchorSlug3Sniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/StandardBlankLinesSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/StandardEncodingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/StandardIndentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Content/StandardLineWrappingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/DummySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Invalid/CodeComparisonMismatchedCodeElmsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Invalid/CodeComparisonMissingCodeElmSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Invalid/CodeComparisonNoCodeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Invalid/CodeComparisonNoContentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Invalid/CodeComparisonOneEmptyCodeElmSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Invalid/CodeComparisonTwoEmptyCodeElmsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Invalid/CodeTitleEmptySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Invalid/CodeTitleMissingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Invalid/DocumentationTitleEmptySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Invalid/DocumentationTitleMissingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Invalid/StandardNoContentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Structure/DocumentationMissingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Structure/NoContentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Structure/NoDocumentationElementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Structure/OneCodeComparisonNoStandardSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Structure/OneStandardBlockCodeComparisonSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Structure/OneStandardBlockNoCodeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Structure/OneStandardBlockTwoCodeComparisonsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Structure/TwoStandardBlocksNoCodeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Structure/TwoStandardBlocksOneCodeComparisonSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Structure/TwoStandardBlocksThreeCodeComparisonsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Unsupported/ElementAtWrongLevelSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Unsupported/OneElmAtWrongLevelSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Unsupported/SuperfluousCodeElementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Unsupported/UnknownElementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/Fixtures/StandardWithDocs/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/GeneratorTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/HTMLTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/MarkdownTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/NoDocsTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/NoValidDocsTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/OneDocTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/StructureDocsTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Generators/TextTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/AbstractRulesetTestCase.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ConstructorNoSniffsTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ConstructorTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/DisplayCachedMessagesTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceCaseMismatch1Test.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceCaseMismatch2Test.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceHomePathFailTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceHomePathTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceHomePathTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceInternalIgnoreTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceInternalStandardTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceInternalTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceInvalidErrorCode1Test.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceInvalidErrorCode2Test.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceInvalidErrorCode3Test.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceInvalidHomePathRefTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceMissingFileTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceUnknownCategoryTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceUnknownSniffTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandRulesetReferenceUnknownStandardTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandSniffDirectoryTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExpandSniffDirectoryTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExplainCustomRulesetTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExplainSingleSniffTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ExplainTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/BrokenNamingConventions/Sniffs/Category/Sniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/BrokenNamingConventions/Sniffs/Category/SubDir/TooDeeplyNestedSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/BrokenNamingConventions/Sniffs/MissingCategoryDirSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/BrokenNamingConventions/Sniffs/NoNamespaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/BrokenNamingConventions/Sniffs/PartialNamespaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/BrokenNamingConventions/Sniffs/Sniffs/CategoryCalledSniffsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/ExternalA/Sniffs/CheckSomething/ValidSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/ExternalA/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/ExternalB/Sniffs/CheckMore/ValidSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/ExternalB/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/FakeHomePath/src/MyStandard/Sniffs/Category/ValidSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/FakeHomePath/src/MyStandard/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/Internal/Sniffs/Valid/ValidSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/Internal/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/InvalidNoSniffsDir/Sniffs create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/InvalidNoSniffsDir/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/ProcessRulesetAutoloadLoadAlways.1.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/ProcessRulesetAutoloadLoadAlways.2.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/ProcessRulesetAutoloadLoadAlways.3.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/ProcessRulesetAutoloadLoadAlways.4.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/ProcessRulesetAutoloadLoadPhpcbfOnly.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/ProcessRulesetAutoloadLoadPhpcsOnly.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/PropertyTypeHandlingInline.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/Deprecated/WithLongReplacementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/Deprecated/WithReplacementContainingLinuxNewlinesSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/Deprecated/WithReplacementContainingNewlinesSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/Deprecated/WithReplacementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/Deprecated/WithoutReplacementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/DeprecatedInvalid/EmptyDeprecationVersionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/DeprecatedInvalid/EmptyRemovalVersionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/DeprecatedInvalid/InvalidDeprecationMessageSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/DeprecatedInvalid/InvalidDeprecationVersionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/DeprecatedInvalid/InvalidRemovalVersionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/InvalidSniffError/NoImplementsNoProcessSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/InvalidSniffError/NoImplementsNoRegisterOrProcessSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/InvalidSniffError/NoImplementsNoRegisterSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/InvalidSniffs/RegisterNoArraySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/MissingInterface/InvalidImplementsWithoutImplementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/MissingInterface/ValidImplementsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/MissingInterface/ValidImplementsViaAbstractSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/SetProperty/AllowedAsDeclaredSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/SetProperty/AllowedViaMagicMethodSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/SetProperty/AllowedViaStdClassSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/SetProperty/NotAllowedViaAttributeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/SetProperty/PropertyTypeHandlingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/SupportedTokenizers/ImplementsDeprecatedInterfaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/SupportedTokenizers/ListensForCSSAndJSSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/SupportedTokenizers/ListensForCSSAndUnrecognizedSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/SupportedTokenizers/ListensForCSSSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/SupportedTokenizers/ListensForEmptySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/SupportedTokenizers/ListensForJSSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/SupportedTokenizers/ListensForPHPAndCSSAndJSSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/SupportedTokenizers/ListensForUnrecognizedTokenizersSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/Sniffs/ValidSniffs/RegisterEmptyArraySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/Fixtures/TestStandard/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/GetIgnorePatternsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/GetIgnorePatternsTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/GetIncludePatternsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/GetIncludePatternsTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/PopulateTokenListenersNamingConventionsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/PopulateTokenListenersNamingConventionsTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/PopulateTokenListenersRegisterNoArrayTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/PopulateTokenListenersSupportedTokenizersTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/PopulateTokenListenersSupportedTokenizersTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/PopulateTokenListenersTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/PopulateTokenListenersTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRuleInvalidTypeTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRuleInvalidTypeTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRuleShouldProcessElementTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRuleShouldProcessElementTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRulesetAutoExpandSniffsDirectoryTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRulesetAutoloadFileNotFoundTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRulesetAutoloadTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRulesetAutoloadTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRulesetBrokenRulesetEmptyFileTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRulesetBrokenRulesetMultiErrorTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRulesetBrokenRulesetSingleErrorTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRulesetBrokenRulesetTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRulesetExcludeSniffGroupTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRulesetInvalidNoSniffsDirTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRulesetMiscTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRulesetShouldProcessElementTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRulesetShouldProcessElementTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ProcessRulesetTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/PropertyTypeHandlingInlineTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/PropertyTypeHandlingTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/PropertyTypeHandlingTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RegisterSniffsMissingInterfaceInvalidTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RegisterSniffsMissingInterfaceTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RegisterSniffsMissingInterfaceValidTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RegisterSniffsRejectsInvalidSniffNoImplementsNoProcessTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RegisterSniffsRejectsInvalidSniffNoImplementsNoRegisterOrProcessTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RegisterSniffsRejectsInvalidSniffNoImplementsNoRegisterTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RegisterSniffsRejectsInvalidSniffTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RegisterSniffsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest-include.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/SetPropertyAllowedAsDeclaredTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/SetPropertyAllowedViaMagicMethodTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/SetPropertyAllowedViaStdClassTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/SetPropertyAppliesPropertyToMultipleSniffsInCategoryTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/SetPropertyDoesNotThrowErrorOnInvalidPropertyWhenSetForCategoryTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/SetPropertyDoesNotThrowErrorOnInvalidPropertyWhenSetForStandardTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/SetPropertyNotAllowedViaAttributeTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/SetPropertyThrowsErrorOnInvalidPropertyTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/SetSniffPropertyTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ShowSniffDeprecationsEmptyDeprecationVersionTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ShowSniffDeprecationsEmptyRemovalVersionTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ShowSniffDeprecationsInvalidDeprecationMessageTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ShowSniffDeprecationsInvalidDeprecationVersionTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ShowSniffDeprecationsInvalidRemovalVersionTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ShowSniffDeprecationsOrderTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ShowSniffDeprecationsReportWidthTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ShowSniffDeprecationsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/ShowSniffDeprecationsTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Runner/AbstractRunnerTestCase.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Runner/PrintProgressDotsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Runner/PrintProgressTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Runner/RunPHPCSExplainTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Runner/RunPHPCSGeneratorTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTestable.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Standards/StandardRulesetsQATest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/AbstractTokenizerTestCase.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Comment/CommentTestCase.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Comment/LiveCoding1Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Comment/LiveCoding1Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Comment/LiveCoding2Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Comment/LiveCoding2Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Comment/LiveCoding3Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Comment/LiveCoding3Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Comment/LiveCoding4Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Comment/LiveCoding4Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Comment/MultiLineDocBlockTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Comment/MultiLineDocBlockTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Comment/PhpcsAnnotationsInDocBlockTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Comment/PhpcsAnnotationsInDocBlockTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Comment/SingleLineDocBlockTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Comment/SingleLineDocBlockTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/AnonClassParenthesisOwnerTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/AnonClassParenthesisOwnerTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/ArrayKeywordTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/ArrayKeywordTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/AttributesParseError1Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/AttributesParseError1Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/AttributesParseError2Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/AttributesParseError2Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/AttributesParseError3Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/AttributesParseError3Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/AttributesParseError4Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/AttributesParseError4Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/AttributesTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/AttributesTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillAsymmetricVisibilityTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillAsymmetricVisibilityTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillEnumTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillEnumTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillExplicitOctalNotationTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillExplicitOctalNotationTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillFnTokenParseErrorTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillFnTokenParseErrorTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillFnTokenTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillFnTokenTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillMatchTokenTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillMatchTokenTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillNumericSeparatorTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillNumericSeparatorTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillReadonlyTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BackfillReadonlyTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BitwiseOrTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/BitwiseOrTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/ContextSensitiveKeywordsTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/ContextSensitiveKeywordsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/DNFTypesParseError1Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/DNFTypesParseError1Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/DNFTypesParseError2Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/DNFTypesParseError2Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/DNFTypesTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/DNFTypesTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/DefaultKeywordTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/DefaultKeywordTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/DoubleArrowTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/DoubleArrowTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/DoubleQuotedStringTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/DoubleQuotedStringTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/EnumCaseTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/EnumCaseTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/ExitKeywordTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/ExitKeywordTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/FinallyTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/FinallyTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/GotoLabelTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/GotoLabelTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/HeredocNowdocTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/HeredocNowdocTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/HeredocParseErrorTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/HeredocParseErrorTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/HeredocStringTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/HeredocStringTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/NamedFunctionCallArgumentsTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/NamedFunctionCallArgumentsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/NullableVsInlineThenParseErrorTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/NullableVsInlineThenParseErrorTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/NullableVsInlineThenTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/NullableVsInlineThenTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/NullsafeObjectOperatorTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/NullsafeObjectOperatorTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/OtherContextSensitiveKeywordsTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/OtherContextSensitiveKeywordsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/PHPOpenTagEOF1Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/PHPOpenTagEOF1Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/PHPOpenTagEOF2Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/PHPOpenTagEOF2Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/PHPOpenTagEOF3Test.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/PHPOpenTagEOF3Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/ResolveSimpleTokenTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/ResolveSimpleTokenTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/ShortArrayTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/ShortArrayTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/StableCommentWhitespaceTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/StableCommentWhitespaceTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/StableCommentWhitespaceWinTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/StableCommentWhitespaceWinTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/TypeIntersectionTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/TypeIntersectionTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/TypedConstantsTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/TypedConstantsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/UndoNamespacedNameSingleTokenTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/UndoNamespacedNameSingleTokenTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/YieldTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/PHP/YieldTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/CreateParenthesisNestingMapDNFTypesTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/CreateParenthesisNestingMapDNFTypesTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/CreatePositionMapHeredocNowdocCloserTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/CreatePositionMapHeredocNowdocCloserTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/CreatePositionMapHeredocNowdocOpenerTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/CreatePositionMapHeredocNowdocOpenerTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/CreatePositionMapTabWidth0Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/CreatePositionMapYieldFromTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/CreatePositionMapYieldFromTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/CreateTokenMapArrayParenthesesTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/CreateTokenMapArrayParenthesesTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapCaseKeywordConditionsTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapCaseKeywordConditionsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapDefaultKeywordConditionsTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapDefaultKeywordConditionsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapIfKeywordConditionsTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapIfKeywordConditionsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapSwitchTokenScopeTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapSwitchTokenScopeTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapWithNamespaceOperatorTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapWithNamespaceOperatorTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/ReplaceTabsInTokenMiscTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/ReplaceTabsInTokenTabWidth1Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/ReplaceTabsInTokenTabWidth2Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/ReplaceTabsInTokenTabWidth4Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/ReplaceTabsInTokenTabWidth5Test.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/ReplaceTabsInTokenTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizers/Tokenizer/ReplaceTabsInTokenTestCase.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Util/Common/EscapeshellcmdTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Util/Common/GetSniffCodeTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Util/Common/IsCamelCapsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Util/Common/PrepareForOutputTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Util/Common/StripColorsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Util/Common/SuggestTypeTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Util/Help/HelpTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Util/MessageCollector/MessageCollectorTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Util/Timing/GetHumanReadableDurationTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Util/Timing/TimingTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Util/Tokens/GetHighestWeightedTokenTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Util/Tokens/TokenNameTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/EndToEnd/Fixtures/ClassOneWithoutStyleError.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/EndToEnd/Fixtures/ClassTwoWithoutStyleError.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/EndToEnd/Fixtures/ClassWithStyleError.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/EndToEnd/Fixtures/endtoend.xml.dist create mode 100644 vendor/squizlabs/php_codesniffer/tests/EndToEnd/outofmemory_test.sh create mode 100644 vendor/squizlabs/php_codesniffer/tests/EndToEnd/phpcbf_test.sh create mode 100644 vendor/squizlabs/php_codesniffer/tests/EndToEnd/phpcs_test.sh create mode 100644 vendor/squizlabs/php_codesniffer/tests/FileList.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Standards/AbstractSniffUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Standards/AllSniffs.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/TestSuite.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/TestSuite7.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/bootstrap.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/LICENSE create mode 100644 vendor/szepeviktor/phpstan-wordpress/README.md create mode 100644 vendor/szepeviktor/phpstan-wordpress/bootstrap.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/composer.json create mode 100644 vendor/szepeviktor/phpstan-wordpress/extension.neon create mode 100644 vendor/szepeviktor/phpstan-wordpress/src/ApplyFiltersDynamicFunctionReturnTypeExtension.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/src/AssertWpErrorTypeSpecifyingExtension.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/src/EscSqlDynamicFunctionReturnTypeExtension.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/src/HookCallbackRule.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/src/HookDocBlock.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/src/HookDocsRule.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/src/HookDocsVisitor.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/src/NormalizeWhitespaceDynamicFunctionReturnTypeExtension.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/src/NormalizedArguments.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/src/ShortcodeAttsDynamicFunctionReturnTypeExtension.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/src/SlashitFunctionsDynamicFunctionReturnTypeExtension.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/src/StripslashesFromStringsOnlyDynamicFunctionReturnTypeExtension.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/src/WpConstantFetchRule.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/src/WpParseUrlFunctionDynamicReturnTypeExtension.php create mode 100644 vendor/szepeviktor/phpstan-wordpress/src/WpSlashDynamicFunctionReturnTypeExtension.php create mode 100644 vendor/theseer/tokenizer/CHANGELOG.md create mode 100644 vendor/theseer/tokenizer/LICENSE create mode 100644 vendor/theseer/tokenizer/README.md create mode 100644 vendor/theseer/tokenizer/composer.json create mode 100644 vendor/theseer/tokenizer/composer.lock create mode 100644 vendor/theseer/tokenizer/src/Exception.php create mode 100644 vendor/theseer/tokenizer/src/NamespaceUri.php create mode 100644 vendor/theseer/tokenizer/src/NamespaceUriException.php create mode 100644 vendor/theseer/tokenizer/src/Token.php create mode 100644 vendor/theseer/tokenizer/src/TokenCollection.php create mode 100644 vendor/theseer/tokenizer/src/TokenCollectionException.php create mode 100644 vendor/theseer/tokenizer/src/Tokenizer.php create mode 100644 vendor/theseer/tokenizer/src/XMLSerializer.php create mode 100644 vendor/wp-coding-standards/wpcs/CHANGELOG.md create mode 100644 vendor/wp-coding-standards/wpcs/LICENSE create mode 100644 vendor/wp-coding-standards/wpcs/README.md create mode 100644 vendor/wp-coding-standards/wpcs/WordPress-Core/ruleset.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress-Docs/ruleset.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress-Extra/ruleset.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/AbstractArrayAssignmentRestrictionsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/AbstractClassRestrictionsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/AbstractFunctionParameterSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/AbstractFunctionRestrictionsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/Arrays/ArrayIndentationStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/Arrays/ArrayKeySpacingRestrictionsStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/Arrays/MultipleStatementAlignmentStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/CodeAnalysis/EscapedNotTranslatedStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/DB/PreparedSQLStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/DateTime/CurrentTimeTimestampStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/DateTime/RestrictedFunctionsStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/PrefixAllGlobalsStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/ValidFunctionNameStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/ValidHookNameStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/ValidPostTypeSlugStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/ValidVariableNameStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/DontExtractStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/IniSetStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/StrictInArrayStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/YodaConditionsStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/Security/SafeRedirectStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CapabilitiesStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CapitalPDangitStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/ClassNameCaseStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CronIntervalStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedClassesStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedFunctionsStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedParameterValuesStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedParametersStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/EnqueuedResourceParametersStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/EnqueuedResourcesStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/GetMetaSingleStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/PostsPerPageStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/CastStructureSpacingStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/ControlStructureSpacingStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/ObjectOperatorSpacingStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/OperatorSpacingStandard.xml create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/ArrayWalkingFunctionsHelper.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/ConstantsHelper.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/ContextHelper.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/DeprecationHelper.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/EscapingFunctionsTrait.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/FormattingFunctionsHelper.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/IsUnitTestTrait.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/ListHelper.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/MinimumWPVersionTrait.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/PrintingFunctionsTrait.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/RulesetPropertyHelper.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/SanitizationHelperTrait.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/SnakeCaseHelper.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/UnslashingFunctionsHelper.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/ValidationHelper.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/VariableHelper.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/WPDBTrait.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/WPGlobalVariablesHelper.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Helpers/WPHookHelper.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayDeclarationSpacingSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayIndentationSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayKeySpacingRestrictionsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/MultipleStatementAlignmentSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/CodeAnalysis/AssignmentInTernaryConditionSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/CodeAnalysis/EscapedNotTranslatedSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/DirectDatabaseQuerySniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/PreparedSQLSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/RestrictedClassesSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/RestrictedFunctionsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/SlowDBQuerySniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DateTime/CurrentTimeTimestampSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DateTime/RestrictedFunctionsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Files/FileNameSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidFunctionNameSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidHookNameSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidPostTypeSlugSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidVariableNameSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/DevelopmentFunctionsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/DiscouragedPHPFunctionsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/DontExtractSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/IniSetSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/NoSilencedErrorsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/POSIXFunctionsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/PregQuoteDelimiterSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/RestrictedPHPFunctionsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/StrictInArraySniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/TypeCastsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/YodaConditionsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/EscapeOutputSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/NonceVerificationSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/PluginMenuSlugSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/SafeRedirectSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/ValidatedSanitizedInputSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Utils/I18nTextDomainFixerSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/AlternativeFunctionsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/CapabilitiesSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/CapitalPDangitSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/ClassNameCaseSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/CronIntervalSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedClassesSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedParametersSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DiscouragedConstantsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DiscouragedFunctionsSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/EnqueuedResourceParametersSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/EnqueuedResourcesSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/GetMetaSingleSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/GlobalVariablesOverrideSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/I18nSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/PostsPerPageSniff.php create mode 100755 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/CastStructureSpacingSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/OperatorSpacingSniff.php create mode 100644 vendor/wp-coding-standards/wpcs/WordPress/ruleset.xml create mode 100644 vendor/wp-coding-standards/wpcs/_typos.toml create mode 100644 vendor/wp-coding-standards/wpcs/composer.json create mode 100644 vendor/wp-coding-standards/wpcs/phpcs.xml.dist.sample diff --git a/composer.json b/composer.json index 49f6b37..2aa21c5 100644 --- a/composer.json +++ b/composer.json @@ -12,8 +12,8 @@ "szepeviktor/phpstan-wordpress": "^2.0", "wp-coding-standards/wpcs": "^3.1", "phpcsstandards/phpcsutils": "^1.0", - "phpunit/phpunit": "^10.5", - "10up/wp_mock": "^0.5" + "phpunit/phpunit": "^9.6", + "10up/wp_mock": "^1.0" }, "config": { "optimize-autoloader": true, diff --git a/composer.lock b/composer.lock index 387687a..a884c7b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d9e10bda587b5cb940fda62ebadc5288", + "content-hash": "8db8ddd282fd67a6acb66b205e25aa54", "packages": [ { "name": "htmlburger/carbon-fields", @@ -147,7 +147,2624 @@ "time": "2025-06-11T11:23:23+00:00" } ], - "packages-dev": [], + "packages-dev": [ + { + "name": "10up/wp_mock", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/10up/wp_mock.git", + "reference": "f25b5895ed31bf5e7036fe0c666664364ae011c2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/10up/wp_mock/zipball/f25b5895ed31bf5e7036fe0c666664364ae011c2", + "reference": "f25b5895ed31bf5e7036fe0c666664364ae011c2", + "shasum": "" + }, + "require": { + "antecedent/patchwork": "^2.1", + "mockery/mockery": "^1.6", + "php": ">=7.4 < 9", + "phpunit/phpunit": "^9.6" + }, + "require-dev": { + "behat/behat": "^v3.11.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "friendsofphp/php-cs-fixer": "^3.4", + "php-coveralls/php-coveralls": "^v2.7", + "php-stubs/wordpress-globals": "^0.2", + "php-stubs/wordpress-stubs": "^6.3", + "phpcompatibility/php-compatibility": "^9.3", + "phpstan/phpstan": "^1.10", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "sebastian/comparator": "^4.0.8", + "sempro/phpunit-pretty-print": "^1.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "WP_Mock\\": "./php/WP_Mock" + }, + "classmap": [ + "php/WP_Mock.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "A mocking library to take the pain out of unit testing for WordPress", + "support": { + "issues": "https://github.com/10up/wp_mock/issues", + "source": "https://github.com/10up/wp_mock/tree/1.1.0" + }, + "time": "2025-03-12T00:36:13+00:00" + }, + { + "name": "antecedent/patchwork", + "version": "2.2.3", + "source": { + "type": "git", + "url": "https://github.com/antecedent/patchwork.git", + "reference": "8b6b235f405af175259c8f56aea5fc23ab9f03ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/antecedent/patchwork/zipball/8b6b235f405af175259c8f56aea5fc23ab9f03ce", + "reference": "8b6b235f405af175259c8f56aea5fc23ab9f03ce", + "shasum": "" + }, + "require": { + "php": ">=7.1.0" + }, + "require-dev": { + "phpunit/phpunit": ">=4" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignas Rudaitis", + "email": "ignas.rudaitis@gmail.com" + } + ], + "description": "Method redefinition (monkey-patching) functionality for PHP.", + "homepage": "https://antecedent.github.io/patchwork/", + "keywords": [ + "aop", + "aspect", + "interception", + "monkeypatching", + "redefinition", + "runkit", + "testing" + ], + "support": { + "issues": "https://github.com/antecedent/patchwork/issues", + "source": "https://github.com/antecedent/patchwork/tree/2.2.3" + }, + "time": "2025-09-17T09:00:56+00:00" + }, + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/composer-installer.git", + "reference": "845eb62303d2ca9b289ef216356568ccc075ffd1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/845eb62303d2ca9b289ef216356568ccc075ffd1", + "reference": "845eb62303d2ca9b289ef216356568ccc075ffd1", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.2", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.1.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "^2.2", + "ext-json": "*", + "ext-zip": "*", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcompatibility/php-compatibility": "^9.0 || ^10.0.0@dev", + "yoast/phpunit-polyfills": "^1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "opensource@frenck.dev", + "homepage": "https://frenck.dev", + "role": "Open source developer" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcbf", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "security": "https://github.com/PHPCSStandards/composer-installer/security/policy", + "source": "https://github.com/PHPCSStandards/composer-installer" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "time": "2025-11-11T04:32:07+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "23da848e1a2308728fe5fdddabf4be17ff9720c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/23da848e1a2308728fe5fdddabf4be17ff9720c7", + "reference": "23da848e1a2308728fe5fdddabf4be17ff9720c7", + "shasum": "" + }, + "require": { + "php": "^8.4" + }, + "require-dev": { + "doctrine/coding-standard": "^14", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^10.5.58" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/2.1.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2026-01-05T06:47:08+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0 || ^3.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.1.1" + }, + "time": "2025-04-30T06:54:44+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.6.12", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": ">=7.3" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.6.17", + "symplify/easy-coding-standard": "^12.1.14" + }, + "type": "library", + "autoload": { + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], + "psr-4": { + "Mockery\\": "library/Mockery" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "https://github.com/padraic", + "role": "Author" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "docs": "https://docs.mockery.io/", + "issues": "https://github.com/mockery/mockery/issues", + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" + }, + "time": "2024-05-16T03:13:13+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.13.4", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2025-08-01T08:46:24+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.7.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" + }, + "time": "2025-12-06T11:56:16+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "php-stubs/wordpress-stubs", + "version": "v6.9.1", + "source": { + "type": "git", + "url": "https://github.com/php-stubs/wordpress-stubs.git", + "reference": "f12220f303e0d7c0844c0e5e957b0c3cee48d2f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/f12220f303e0d7c0844c0e5e957b0c3cee48d2f7", + "reference": "f12220f303e0d7c0844c0e5e957b0c3cee48d2f7", + "shasum": "" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "5.6.1" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "nikic/php-parser": "^5.5", + "php": "^7.4 || ^8.0", + "php-stubs/generator": "^0.8.3", + "phpdocumentor/reflection-docblock": "^6.0", + "phpstan/phpstan": "^2.1", + "phpunit/phpunit": "^9.5", + "symfony/polyfill-php80": "*", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.1.1", + "wp-coding-standards/wpcs": "3.1.0 as 2.3.0" + }, + "suggest": { + "paragonie/sodium_compat": "Pure PHP implementation of libsodium", + "symfony/polyfill-php80": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "WordPress function and class declaration stubs for static analysis.", + "homepage": "https://github.com/php-stubs/wordpress-stubs", + "keywords": [ + "PHPStan", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/php-stubs/wordpress-stubs/issues", + "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.9.1" + }, + "time": "2026-02-03T19:29:21+00:00" + }, + { + "name": "phpcsstandards/phpcsextra", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", + "reference": "b598aa890815b8df16363271b659d73280129101" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/b598aa890815b8df16363271b659d73280129101", + "reference": "b598aa890815b8df16363271b659d73280129101", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "phpcsstandards/phpcsutils": "^1.2.0", + "squizlabs/php_codesniffer": "^3.13.5 || ^4.0.1" + }, + "require-dev": { + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcsstandards/phpcsdevcs": "^1.2.0", + "phpcsstandards/phpcsdevtools": "^1.2.1", + "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors" + } + ], + "description": "A collection of sniffs and standards for use with PHP_CodeSniffer.", + "keywords": [ + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues", + "security": "https://github.com/PHPCSStandards/PHPCSExtra/security/policy", + "source": "https://github.com/PHPCSStandards/PHPCSExtra" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "time": "2025-11-12T23:06:57+00:00" + }, + { + "name": "phpcsstandards/phpcsutils", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", + "reference": "c216317e96c8b3f5932808f9b0f1f7a14e3bbf55" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/c216317e96c8b3f5932808f9b0f1f7a14e3bbf55", + "reference": "c216317e96c8b3f5932808f9b0f1f7a14e3bbf55", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.13.5 || ^4.0.1" + }, + "require-dev": { + "ext-filter": "*", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcsstandards/phpcsdevcs": "^1.2.0", + "yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0 || ^3.0.0" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, + "autoload": { + "classmap": [ + "PHPCSUtils/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors" + } + ], + "description": "A suite of utility functions for use with PHP_CodeSniffer", + "homepage": "https://phpcsutils.com/", + "keywords": [ + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", + "phpcs", + "phpcs3", + "phpcs4", + "standards", + "static analysis", + "tokens", + "utility" + ], + "support": { + "docs": "https://phpcsutils.com/", + "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues", + "security": "https://github.com/PHPCSStandards/PHPCSUtils/security/policy", + "source": "https://github.com/PHPCSStandards/PHPCSUtils" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "time": "2025-12-08T14:27:58+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "2.1.50", + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d452086fb4cf648c6b2d8cf3b639351f79e4f3e2", + "reference": "d452086fb4cf648c6b2d8cf3b639351f79e4f3e2", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "time": "2026-04-17T13:10:32+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.32", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.19.1 || ^5.1.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.6" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "9.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-08-22T04:23:01+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.6.34", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "b36f02317466907a230d3aa1d34467041271ef4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b36f02317466907a230d3aa1d34467041271ef4a", + "reference": "b36f02317466907a230d3aa1d34467041271ef4a", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.5.0 || ^2", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.13.4", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.32", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", + "sebastian/comparator": "^4.0.10", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.8", + "sebastian/global-state": "^5.0.8", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.6-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.34" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2026-01-27T05:45:00+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:27:43+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.10", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "e4df00b9b3571187db2831ae9aada2c6efbd715d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e4df00b9b3571187db2831ae9aada2c6efbd715d", + "reference": "e4df00b9b3571187db2831ae9aada2c6efbd715d", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.10" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", + "type": "tidelift" + } + ], + "time": "2026-01-24T09:22:56+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:19:30+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:30:58+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:03:51+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/14c6ba52f95a36c3d27c835d65efc7123c446e8c", + "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" + } + ], + "time": "2025-09-24T06:03:27+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/b6781316bdcd28260904e7cc18ec983d0d2ef4f6", + "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/global-state", + "type": "tidelift" + } + ], + "time": "2025-08-10T07:10:35+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:20:34+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "539c6691e0623af6dc6f9c20384c120f963465a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/539c6691e0623af6dc6f9c20384c120f963465a0", + "reference": "539c6691e0623af6dc6f9c20384c120f963465a0", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", + "type": "tidelift" + } + ], + "time": "2025-08-10T06:57:39+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-14T16:00:52+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:13:03+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.13.5", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4", + "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + }, + "bin": [ + "bin/phpcbf", + "bin/phpcs" + ], + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "time": "2025-11-04T16:30:35+00:00" + }, + { + "name": "szepeviktor/phpstan-wordpress", + "version": "v2.0.3", + "source": { + "type": "git", + "url": "https://github.com/szepeviktor/phpstan-wordpress.git", + "reference": "aa722f037b2d034828cd6c55ebe9e5c74961927e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/aa722f037b2d034828cd6c55ebe9e5c74961927e", + "reference": "aa722f037b2d034828cd6c55ebe9e5c74961927e", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "php-stubs/wordpress-stubs": "^6.6.2", + "phpstan/phpstan": "^2.0" + }, + "require-dev": { + "composer/composer": "^2.1.14", + "composer/semver": "^3.4", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.0", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.0", + "wp-coding-standards/wpcs": "3.1.0 as 2.3.0" + }, + "suggest": { + "swissspidy/phpstan-no-private": "Detect usage of internal core functions, classes and methods" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "SzepeViktor\\PHPStan\\WordPress\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "WordPress extensions for PHPStan", + "keywords": [ + "PHPStan", + "code analyse", + "code analysis", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/szepeviktor/phpstan-wordpress/issues", + "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v2.0.3" + }, + "time": "2025-09-14T02:58:22+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.3.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2025-11-17T20:03:58+00:00" + }, + { + "name": "wp-coding-standards/wpcs", + "version": "3.3.0", + "source": { + "type": "git", + "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", + "reference": "7795ec6fa05663d716a549d0b44e47ffc8b0d4a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7795ec6fa05663d716a549d0b44e47ffc8b0d4a6", + "reference": "7795ec6fa05663d716a549d0b44e47ffc8b0d4a6", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "ext-libxml": "*", + "ext-tokenizer": "*", + "ext-xmlreader": "*", + "php": ">=7.2", + "phpcsstandards/phpcsextra": "^1.5.0", + "phpcsstandards/phpcsutils": "^1.1.0", + "squizlabs/php_codesniffer": "^3.13.4" + }, + "require-dev": { + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcompatibility/php-compatibility": "^10.0.0@dev", + "phpcsstandards/phpcsdevtools": "^1.2.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "suggest": { + "ext-iconv": "For improved results", + "ext-mbstring": "For improved results" + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", + "keywords": [ + "phpcs", + "standards", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues", + "source": "https://github.com/WordPress/WordPress-Coding-Standards", + "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" + }, + "funding": [ + { + "url": "https://opencollective.com/php_codesniffer", + "type": "custom" + } + ], + "time": "2025-11-25T12:08:04+00:00" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": {}, diff --git a/phpunit.xml b/phpunit.xml index d62a205..782e8f7 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,23 +1,17 @@ - - - - tests/ - - - - - includes/ - open-data-wizard.php - - - vendor/ - - + + + + includes/ + open-data-wizard.php + + + vendor/ + + + + + tests/ + + diff --git a/tests/test-fields-extended.php b/tests/test-fields-extended.php new file mode 100644 index 0000000..dbb643f --- /dev/null +++ b/tests/test-fields-extended.php @@ -0,0 +1,297 @@ +andReturnArg( 1 ); + \WP_Mock::userFunction( '__' )->andReturnArg( 0 ); + require_once ODW_PLUGIN_DIR . 'includes/class-fields.php'; + } + } + + // ------------------------------------------------------------------------- + // get_periodicity_options() + // ------------------------------------------------------------------------- + + public function test_get_periodicity_options_has_empty_key_default(): void { + $this->load_fields(); + + \WP_Mock::userFunction( '__' )->andReturnArg( 0 ); + + $options = ODW_Fields::get_periodicity_options(); + $this->assertArrayHasKey( '', $options ); + } + + public function test_get_periodicity_options_contains_daily_uri(): void { + $this->load_fields(); + + \WP_Mock::userFunction( '__' )->andReturnArg( 0 ); + + $options = ODW_Fields::get_periodicity_options(); + $this->assertArrayHasKey( + 'http://publications.europa.eu/resource/authority/frequency/DAILY', + $options + ); + } + + public function test_get_periodicity_options_contains_annual_uri(): void { + $this->load_fields(); + + \WP_Mock::userFunction( '__' )->andReturnArg( 0 ); + + $options = ODW_Fields::get_periodicity_options(); + $this->assertArrayHasKey( + 'http://publications.europa.eu/resource/authority/frequency/ANNUAL', + $options + ); + } + + public function test_get_periodicity_options_all_uris_use_correct_base(): void { + $this->load_fields(); + + \WP_Mock::userFunction( '__' )->andReturnArg( 0 ); + + $base = 'http://publications.europa.eu/resource/authority/frequency/'; + $options = ODW_Fields::get_periodicity_options(); + + foreach ( array_keys( $options ) as $key ) { + if ( '' === $key ) { + continue; + } + $this->assertStringStartsWith( $base, $key, "Key '$key' does not use the EU Publications Office base URI." ); + } + } + + // ------------------------------------------------------------------------- + // odw_build_dataset_jsonld() — helper to build mock post & CF meta + // ------------------------------------------------------------------------- + + /** + * @param array $cf_meta CF field key → value + * @param array $post_meta WP meta key → value + */ + private function setup_jsonld_mocks( + int $post_id, + string $post_type, + array $cf_meta = [], + array $post_meta = [] + ): void { + $post = new \stdClass(); + $post->ID = $post_id; + $post->post_type = $post_type; + $post->post_title = 'Test Dataset'; + $post->post_status = 'publish'; + + \WP_Mock::userFunction( 'get_post' ) + ->with( $post_id ) + ->andReturn( $post ); + + // Default CF meta returns empty string unless overridden. + \WP_Mock::userFunction( 'carbon_get_post_meta' ) + ->andReturnUsing( function ( $id, $key ) use ( $cf_meta ) { + return $cf_meta[ $key ] ?? ''; + } ); + + // get_post_meta for _odw_modified and similar keys. + \WP_Mock::userFunction( 'get_post_meta' ) + ->andReturnUsing( function ( $id, $key, $single ) use ( $post_meta ) { + return $post_meta[ $key ] ?? ''; + } ); + + \WP_Mock::userFunction( 'rest_url' ) + ->andReturnUsing( function ( $path ) { + return 'http://localhost/wp-json/' . $path; + } ); + + \WP_Mock::userFunction( 'apply_filters' ) + ->andReturnArg( 1 ); + } + + public function test_build_returns_null_for_non_dataset_post_type(): void { + $this->load_fields(); + + $post = new \stdClass(); + $post->ID = 1; + $post->post_type = 'post'; + + \WP_Mock::userFunction( 'get_post' ) + ->with( 1 ) + ->andReturn( $post ); + + $this->assertNull( odw_build_dataset_jsonld( 1 ) ); + } + + public function test_build_returns_null_when_post_not_found(): void { + $this->load_fields(); + + \WP_Mock::userFunction( 'get_post' ) + ->with( 999 ) + ->andReturn( null ); + + $this->assertNull( odw_build_dataset_jsonld( 999 ) ); + } + + public function test_build_includes_landing_page_when_set(): void { + $this->load_fields(); + + $this->setup_jsonld_mocks( 10, 'odw_dataset', [ + 'odw_landing_page' => 'https://example.com/project', + ] ); + + $result = odw_build_dataset_jsonld( 10 ); + + $this->assertIsArray( $result ); + $this->assertArrayHasKey( 'dcat:landingPage', $result ); + $this->assertSame( [ '@id' => 'https://example.com/project' ], $result['dcat:landingPage'] ); + } + + public function test_build_omits_landing_page_when_empty(): void { + $this->load_fields(); + + $this->setup_jsonld_mocks( 10, 'odw_dataset' ); + + $result = odw_build_dataset_jsonld( 10 ); + + $this->assertIsArray( $result ); + $this->assertArrayNotHasKey( 'dcat:landingPage', $result ); + } + + public function test_build_includes_accrual_periodicity_when_set(): void { + $this->load_fields(); + + $uri = 'http://publications.europa.eu/resource/authority/frequency/MONTHLY'; + $this->setup_jsonld_mocks( 11, 'odw_dataset', [ + 'odw_accrual_periodicity' => $uri, + ] ); + + $result = odw_build_dataset_jsonld( 11 ); + + $this->assertIsArray( $result ); + $this->assertArrayHasKey( 'dct:accrualPeriodicity', $result ); + $this->assertSame( [ '@id' => $uri ], $result['dct:accrualPeriodicity'] ); + } + + public function test_build_includes_spatial_with_correct_type(): void { + $this->load_fields(); + + $this->setup_jsonld_mocks( 12, 'odw_dataset', [ + 'odw_spatial' => 'Berlin', + ] ); + + $result = odw_build_dataset_jsonld( 12 ); + + $this->assertIsArray( $result ); + $this->assertArrayHasKey( 'dct:spatial', $result ); + $this->assertSame( 'dct:Location', $result['dct:spatial']['@type'] ); + $this->assertSame( 'Berlin', $result['dct:spatial']['skos:prefLabel'] ); + } + + public function test_build_includes_temporal_with_start_and_end(): void { + $this->load_fields(); + + $this->setup_jsonld_mocks( 13, 'odw_dataset', [ + 'odw_temporal_start' => '2024-01-01', + 'odw_temporal_end' => '2024-12-31', + ] ); + + $result = odw_build_dataset_jsonld( 13 ); + + $this->assertIsArray( $result ); + $this->assertArrayHasKey( 'dct:temporal', $result ); + + $temporal = $result['dct:temporal']; + $this->assertSame( 'dct:PeriodOfTime', $temporal['@type'] ); + $this->assertSame( [ '@type' => 'xsd:date', '@value' => '2024-01-01' ], $temporal['dcat:startDate'] ); + $this->assertSame( [ '@type' => 'xsd:date', '@value' => '2024-12-31' ], $temporal['dcat:endDate'] ); + } + + public function test_build_includes_temporal_with_start_only(): void { + $this->load_fields(); + + $this->setup_jsonld_mocks( 14, 'odw_dataset', [ + 'odw_temporal_start' => '2025-01-01', + ] ); + + $result = odw_build_dataset_jsonld( 14 ); + + $this->assertIsArray( $result ); + $this->assertArrayHasKey( 'dct:temporal', $result ); + $this->assertArrayHasKey( 'dcat:startDate', $result['dct:temporal'] ); + $this->assertArrayNotHasKey( 'dcat:endDate', $result['dct:temporal'] ); + } + + public function test_build_omits_temporal_when_both_empty(): void { + $this->load_fields(); + + $this->setup_jsonld_mocks( 15, 'odw_dataset' ); + + $result = odw_build_dataset_jsonld( 15 ); + + $this->assertIsArray( $result ); + $this->assertArrayNotHasKey( 'dct:temporal', $result ); + } + + public function test_build_includes_contact_point_with_mailto_prefix(): void { + $this->load_fields(); + + $this->setup_jsonld_mocks( 16, 'odw_dataset', [ + 'odw_contact_name' => 'Max Mustermann', + 'odw_contact_email' => 'max@example.org', + ] ); + + $result = odw_build_dataset_jsonld( 16 ); + + $this->assertIsArray( $result ); + $this->assertArrayHasKey( 'dcat:contactPoint', $result ); + + $contact = $result['dcat:contactPoint']; + $this->assertSame( 'vcard:Organization', $contact['@type'] ); + $this->assertSame( 'Max Mustermann', $contact['vcard:fn'] ); + $this->assertSame( 'mailto:max@example.org', $contact['vcard:hasEmail'] ); + } + + public function test_build_contact_point_includes_url_as_id(): void { + $this->load_fields(); + + $this->setup_jsonld_mocks( 17, 'odw_dataset', [ + 'odw_contact_name' => 'Org', + 'odw_contact_email' => 'info@org.de', + 'odw_contact_url' => 'https://org.de', + ] ); + + $result = odw_build_dataset_jsonld( 17 ); + + $this->assertIsArray( $result ); + $contact = $result['dcat:contactPoint']; + $this->assertSame( [ '@id' => 'https://org.de' ], $contact['vcard:hasURL'] ); + } + + public function test_build_omits_contact_point_when_empty(): void { + $this->load_fields(); + + $this->setup_jsonld_mocks( 18, 'odw_dataset' ); + + $result = odw_build_dataset_jsonld( 18 ); + + $this->assertIsArray( $result ); + $this->assertArrayNotHasKey( 'dcat:contactPoint', $result ); + } +} diff --git a/tests/test-quality.php b/tests/test-quality.php new file mode 100644 index 0000000..3a2d64c --- /dev/null +++ b/tests/test-quality.php @@ -0,0 +1,245 @@ +load_class(); + $this->assertSame( ODW_Quality::LEVEL_HIGH, ODW_Quality::get_level( 80 ) ); + } + + public function test_get_level_returns_high_at_100(): void { + $this->load_class(); + $this->assertSame( ODW_Quality::LEVEL_HIGH, ODW_Quality::get_level( 100 ) ); + } + + public function test_get_level_returns_medium_at_50(): void { + $this->load_class(); + $this->assertSame( ODW_Quality::LEVEL_MEDIUM, ODW_Quality::get_level( 50 ) ); + } + + public function test_get_level_returns_medium_at_79(): void { + $this->load_class(); + $this->assertSame( ODW_Quality::LEVEL_MEDIUM, ODW_Quality::get_level( 79 ) ); + } + + public function test_get_level_returns_low_at_0(): void { + $this->load_class(); + $this->assertSame( ODW_Quality::LEVEL_LOW, ODW_Quality::get_level( 0 ) ); + } + + public function test_get_level_returns_low_at_49(): void { + $this->load_class(); + $this->assertSame( ODW_Quality::LEVEL_LOW, ODW_Quality::get_level( 49 ) ); + } + + // ------------------------------------------------------------------------- + // get_level_label() + // ------------------------------------------------------------------------- + + public function test_get_level_label_high(): void { + $this->load_class(); + + \WP_Mock::userFunction( '__' )->andReturnArg( 0 ); + + $this->assertSame( 'Gut', ODW_Quality::get_level_label( ODW_Quality::LEVEL_HIGH ) ); + } + + public function test_get_level_label_medium(): void { + $this->load_class(); + + \WP_Mock::userFunction( '__' )->andReturnArg( 0 ); + + $this->assertSame( 'Mittel', ODW_Quality::get_level_label( ODW_Quality::LEVEL_MEDIUM ) ); + } + + public function test_get_level_label_low(): void { + $this->load_class(); + + \WP_Mock::userFunction( '__' )->andReturnArg( 0 ); + + $this->assertSame( 'Verbesserungsbedarf', ODW_Quality::get_level_label( ODW_Quality::LEVEL_LOW ) ); + } + + public function test_get_level_label_unknown_returns_fallback(): void { + $this->load_class(); + + \WP_Mock::userFunction( '__' )->andReturnArg( 0 ); + + $this->assertSame( 'Unbekannt', ODW_Quality::get_level_label( 'invalid' ) ); + } + + // ------------------------------------------------------------------------- + // get_indicators() + // ------------------------------------------------------------------------- + + public function test_get_indicators_sums_to_100(): void { + $this->load_class(); + + \WP_Mock::userFunction( '__' )->andReturnArg( 0 ); + + $total = array_sum( array_column( ODW_Quality::get_indicators(), 'points' ) ); + $this->assertSame( 100, $total ); + } + + public function test_get_indicators_has_title_key(): void { + $this->load_class(); + + \WP_Mock::userFunction( '__' )->andReturnArg( 0 ); + + $keys = array_column( ODW_Quality::get_indicators(), 'key' ); + $this->assertContains( 'title', $keys ); + } + + // ------------------------------------------------------------------------- + // get() — liest aus Post-Meta + // ------------------------------------------------------------------------- + + public function test_get_returns_empty_result_when_no_level_stored(): void { + $this->load_class(); + + \WP_Mock::userFunction( 'get_post_meta' ) + ->with( 42, '_odw_quality_level', true ) + ->andReturn( '' ); + + $result = ODW_Quality::get( 42 ); + + $this->assertSame( 0, $result['score'] ); + $this->assertSame( '', $result['level'] ); + $this->assertSame( [], $result['indicators'] ); + $this->assertSame( '', $result['calculated_at'] ); + } + + public function test_get_returns_stored_values(): void { + $this->load_class(); + + \WP_Mock::userFunction( 'get_post_meta' ) + ->with( 42, '_odw_quality_level', true ) + ->andReturn( 'high' ); + + \WP_Mock::userFunction( 'get_post_meta' ) + ->with( 42, '_odw_quality_score', true ) + ->andReturn( '85' ); + + \WP_Mock::userFunction( 'get_post_meta' ) + ->with( 42, '_odw_quality_indicators', true ) + ->andReturn( [ 'title' => [ 'passed' => true ] ] ); + + \WP_Mock::userFunction( 'get_post_meta' ) + ->with( 42, '_odw_quality_calculated_at', true ) + ->andReturn( '2026-04-21 10:00:00' ); + + $result = ODW_Quality::get( 42 ); + + $this->assertSame( 85, $result['score'] ); + $this->assertSame( 'high', $result['level'] ); + $this->assertSame( '2026-04-21 10:00:00', $result['calculated_at'] ); + } + + // ------------------------------------------------------------------------- + // store() + // ------------------------------------------------------------------------- + + public function test_store_calls_update_post_meta_for_all_keys(): void { + $this->load_class(); + + $result = [ + 'score' => 75, + 'level' => 'medium', + 'indicators' => [], + 'calculated_at' => '2026-04-21 12:00:00', + ]; + + \WP_Mock::userFunction( 'update_post_meta' ) + ->with( 7, '_odw_quality_score', 75 ) + ->once(); + + \WP_Mock::userFunction( 'update_post_meta' ) + ->with( 7, '_odw_quality_level', 'medium' ) + ->once(); + + \WP_Mock::userFunction( 'update_post_meta' ) + ->with( 7, '_odw_quality_indicators', [] ) + ->once(); + + \WP_Mock::userFunction( 'update_post_meta' ) + ->with( 7, '_odw_quality_calculated_at', '2026-04-21 12:00:00' ) + ->once(); + + ODW_Quality::store( 7, $result ); + + // WP_Mock ->once() expectations verified in tearDown; count them explicitly. + $this->addToAssertionCount( 4 ); + } + + // ------------------------------------------------------------------------- + // append_to_jsonld() + // ------------------------------------------------------------------------- + + public function test_append_to_jsonld_adds_quality_data(): void { + $this->load_class(); + + \WP_Mock::userFunction( 'get_post_meta' ) + ->with( 5, '_odw_quality_level', true ) + ->andReturn( 'high' ); + + \WP_Mock::userFunction( 'get_post_meta' ) + ->with( 5, '_odw_quality_score', true ) + ->andReturn( '90' ); + + \WP_Mock::userFunction( 'get_post_meta' ) + ->with( 5, '_odw_quality_indicators', true ) + ->andReturn( [] ); + + \WP_Mock::userFunction( 'get_post_meta' ) + ->with( 5, '_odw_quality_calculated_at', true ) + ->andReturn( '2026-04-21 09:00:00' ); + + $dataset = [ '@type' => 'dcat:Dataset' ]; + $result = ODW_Quality::append_to_jsonld( $dataset, 5 ); + + $this->assertArrayHasKey( 'odw:qualityScore', $result ); + $this->assertSame( 90, $result['odw:qualityScore']['odw:score'] ); + $this->assertSame( 'high', $result['odw:qualityScore']['odw:level'] ); + $this->assertSame( 100, $result['odw:qualityScore']['odw:maxScore'] ); + } + + public function test_append_to_jsonld_skips_when_no_level(): void { + $this->load_class(); + + \WP_Mock::userFunction( 'get_post_meta' ) + ->with( 5, '_odw_quality_level', true ) + ->andReturn( '' ); + + $dataset = [ '@type' => 'dcat:Dataset' ]; + $result = ODW_Quality::append_to_jsonld( $dataset, 5 ); + + $this->assertArrayNotHasKey( 'odw:qualityScore', $result ); + } +} diff --git a/tests/test-settings.php b/tests/test-settings.php new file mode 100644 index 0000000..db37401 --- /dev/null +++ b/tests/test-settings.php @@ -0,0 +1,115 @@ +load_class(); + + \WP_Mock::userFunction( 'get_option' ) + ->with( ODW_Settings::OPTION_KEY, [] ) + ->andReturn( [] ); + + $settings = ODW_Settings::get(); + + $this->assertIsArray( $settings ); + $this->assertSame( '', $settings['catalog_title'] ); + $this->assertSame( '', $settings['default_license'] ); + $this->assertSame( '', $settings['default_language'] ); + $this->assertSame( 300, $settings['cache_ttl'] ); + $this->assertSame( '0', $settings['delete_on_uninstall'] ); + } + + public function test_get_single_key_returns_stored_value(): void { + $this->load_class(); + + \WP_Mock::userFunction( 'get_option' ) + ->with( ODW_Settings::OPTION_KEY, [] ) + ->andReturn( [ 'catalog_title' => 'Mein Datenkatalog' ] ); + + $this->assertSame( 'Mein Datenkatalog', ODW_Settings::get( 'catalog_title' ) ); + } + + public function test_get_single_key_returns_null_for_unknown_key(): void { + $this->load_class(); + + \WP_Mock::userFunction( 'get_option' ) + ->with( ODW_Settings::OPTION_KEY, [] ) + ->andReturn( [] ); + + $this->assertNull( ODW_Settings::get( 'non_existent_key' ) ); + } + + public function test_get_merges_stored_with_defaults(): void { + $this->load_class(); + + \WP_Mock::userFunction( 'get_option' ) + ->with( ODW_Settings::OPTION_KEY, [] ) + ->andReturn( [ 'cache_ttl' => 600 ] ); + + $settings = ODW_Settings::get(); + + // Gespeicherter Wert überschreibt Default. + $this->assertSame( 600, $settings['cache_ttl'] ); + // Andere Defaults bleiben. + $this->assertSame( '', $settings['catalog_title'] ); + } + + public function test_filter_catalog_title_returns_custom_when_set(): void { + $this->load_class(); + + \WP_Mock::userFunction( 'get_option' ) + ->with( ODW_Settings::OPTION_KEY, [] ) + ->andReturn( [ 'catalog_title' => 'Mein Katalog' ] ); + + $result = ODW_Settings::filter_catalog_title( 'Standard-Katalog' ); + + $this->assertSame( 'Mein Katalog', $result ); + } + + public function test_filter_catalog_title_returns_default_when_empty(): void { + $this->load_class(); + + \WP_Mock::userFunction( 'get_option' ) + ->with( ODW_Settings::OPTION_KEY, [] ) + ->andReturn( [] ); + + $result = ODW_Settings::filter_catalog_title( 'Standard-Katalog' ); + + $this->assertSame( 'Standard-Katalog', $result ); + } + + public function test_filter_catalog_title_ignores_whitespace_only(): void { + $this->load_class(); + + \WP_Mock::userFunction( 'get_option' ) + ->with( ODW_Settings::OPTION_KEY, [] ) + ->andReturn( [ 'catalog_title' => ' ' ] ); + + $result = ODW_Settings::filter_catalog_title( 'Fallback' ); + + $this->assertSame( 'Fallback', $result ); + } +} diff --git a/tests/test-shortcode.php b/tests/test-shortcode.php new file mode 100644 index 0000000..16744e5 --- /dev/null +++ b/tests/test-shortcode.php @@ -0,0 +1,167 @@ +andReturnArg( 1 ); + \WP_Mock::userFunction( '__' )->andReturnArg( 0 ); + require_once ODW_PLUGIN_DIR . 'includes/class-fields.php'; + } + + if ( ! class_exists( 'ODW_Quality' ) ) { + require_once ODW_PLUGIN_DIR . 'includes/class-quality.php'; + } + + if ( ! class_exists( 'ODW_Shortcode' ) ) { + require_once ODW_PLUGIN_DIR . 'includes/class-shortcode.php'; + } + } + + // ------------------------------------------------------------------------- + // format_bytes() — via Reflection (private method) + // ------------------------------------------------------------------------- + + private function call_format_bytes( int $bytes ): string { + $ref = new \ReflectionClass( 'ODW_Shortcode' ); + $method = $ref->getMethod( 'format_bytes' ); + $method->setAccessible( true ); + return (string) $method->invoke( null, $bytes ); + } + + public function test_format_bytes_below_1kb(): void { + $this->load_class(); + $this->assertSame( '512 B', $this->call_format_bytes( 512 ) ); + } + + public function test_format_bytes_zero(): void { + $this->load_class(); + $this->assertSame( '0 B', $this->call_format_bytes( 0 ) ); + } + + public function test_format_bytes_exactly_1kb(): void { + $this->load_class(); + $this->assertSame( '1 KB', $this->call_format_bytes( 1024 ) ); + } + + public function test_format_bytes_kb_range(): void { + $this->load_class(); + // 2048 bytes = 2.0 KB + $this->assertSame( '2 KB', $this->call_format_bytes( 2048 ) ); + } + + public function test_format_bytes_mb_range(): void { + $this->load_class(); + // 1.5 MB = 1573888 bytes + $this->assertSame( '1.5 MB', $this->call_format_bytes( 1_048_576 + 524_288 ) ); + } + + public function test_format_bytes_gb_range(): void { + $this->load_class(); + // 2 GB + $this->assertSame( '2 GB', $this->call_format_bytes( 2 * 1_073_741_824 ) ); + } + + // ------------------------------------------------------------------------- + // render() — edge cases without valid post + // ------------------------------------------------------------------------- + + public function test_render_returns_empty_when_id_is_zero(): void { + $this->load_class(); + + \WP_Mock::userFunction( 'shortcode_atts' ) + ->with( [ 'id' => '0' ], [], 'odw_dataset' ) + ->andReturn( [ 'id' => '0' ] ); + + \WP_Mock::userFunction( 'absint' ) + ->with( '0' ) + ->andReturn( 0 ); + + $result = ODW_Shortcode::render( [] ); + $this->assertSame( '', $result ); + } + + public function test_render_returns_empty_when_post_not_found(): void { + $this->load_class(); + + \WP_Mock::userFunction( 'shortcode_atts' ) + ->with( [ 'id' => '0' ], [ 'id' => '99' ], 'odw_dataset' ) + ->andReturn( [ 'id' => '99' ] ); + + \WP_Mock::userFunction( 'absint' ) + ->with( '99' ) + ->andReturn( 99 ); + + \WP_Mock::userFunction( 'get_post' ) + ->with( 99 ) + ->andReturn( null ); + + $result = ODW_Shortcode::render( [ 'id' => '99' ] ); + $this->assertSame( '', $result ); + } + + public function test_render_returns_empty_when_wrong_post_type(): void { + $this->load_class(); + + \WP_Mock::userFunction( 'shortcode_atts' ) + ->with( [ 'id' => '0' ], [ 'id' => '5' ], 'odw_dataset' ) + ->andReturn( [ 'id' => '5' ] ); + + \WP_Mock::userFunction( 'absint' ) + ->with( '5' ) + ->andReturn( 5 ); + + $post = new \stdClass(); + $post->ID = 5; + $post->post_type = 'post'; + $post->post_status = 'publish'; + + \WP_Mock::userFunction( 'get_post' ) + ->with( 5 ) + ->andReturn( $post ); + + $result = ODW_Shortcode::render( [ 'id' => '5' ] ); + $this->assertSame( '', $result ); + } + + public function test_render_returns_empty_when_post_not_published(): void { + $this->load_class(); + + \WP_Mock::userFunction( 'shortcode_atts' ) + ->with( [ 'id' => '0' ], [ 'id' => '6' ], 'odw_dataset' ) + ->andReturn( [ 'id' => '6' ] ); + + \WP_Mock::userFunction( 'absint' ) + ->with( '6' ) + ->andReturn( 6 ); + + $post = new \stdClass(); + $post->ID = 6; + $post->post_type = 'odw_dataset'; + $post->post_status = 'draft'; + + \WP_Mock::userFunction( 'get_post' ) + ->with( 6 ) + ->andReturn( $post ); + + $result = ODW_Shortcode::render( [ 'id' => '6' ] ); + $this->assertSame( '', $result ); + } +} diff --git a/vendor/10up/wp_mock/.gitattributes b/vendor/10up/wp_mock/.gitattributes new file mode 100644 index 0000000..6557891 --- /dev/null +++ b/vendor/10up/wp_mock/.gitattributes @@ -0,0 +1,12 @@ +/.editorconfig export-ignore +/.gitbook.yaml export-ignore +/.github export-ignore +/docs export-ignore +/features export-ignore +/tests export-ignore +/behat.yml export-ignore +/phpcs.xml export-ignore +/phpdoc.xml export-ignore +/phpstan.neon export-ignore +/phpstan-baseline.neon export-ignore +/phpunit.xml export-ignore \ No newline at end of file diff --git a/vendor/10up/wp_mock/.gitignore b/vendor/10up/wp_mock/.gitignore new file mode 100644 index 0000000..4d17dd2 --- /dev/null +++ b/vendor/10up/wp_mock/.gitignore @@ -0,0 +1,32 @@ +# OSX +**/.DS_Store + +# IDEs +.project/ +.settings/ +.idea/ +*.code-workspace +*.sublime-project +*.sublime-workspace +*.iml +.vscode/ + +# dotfiles +*.env +.phpunit.result.cache +.php-cs-fixer.cache + +# Logs +*.log + +# Dependencies +**/node_modules/** +**/vendor + +# Tests +/build/** +.phpunit.cache +coverage.xml +phpunit.local.xml +.phpunit.local.xml +/html \ No newline at end of file diff --git a/vendor/10up/wp_mock/CHANGELOG.md b/vendor/10up/wp_mock/CHANGELOG.md new file mode 100644 index 0000000..4ba1073 --- /dev/null +++ b/vendor/10up/wp_mock/CHANGELOG.md @@ -0,0 +1,92 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [1.1.0](https://github.com/10up/wp_mock/compare/1.0.1...1.1.0) - 2025-03-11 +### Added +- Add support for types in `expectFilter()` mocks +- Add support for `withAnyArgs()` method for `onFilter()` calls + +### Fixed +- Prevent IDEs/phpstan from detecting exceptions in mocked functions that don't actually throw in WordPress core (e.g. `esc_html()`) +- Typos in docs and function name (old function `iExcpectWhenIRun()` still exists but has been deprecated) + +## [1.0.1](https://github.com/10up/wp_mock/compare/1.0.0...1.0.1) - 2024-01-04 +### Changed +- Updated `WP_Mock::expectHookNotAdded()` with new params +- Updated PHP dependencies to ensure compatibility with PHP 8.3 + +## [1.0.0](https://github.com/10up/wp_mock/compare/0.5.0...1.0.0) - 2023-07-24 +### Added +- Added and documented return types in codebase +- New `AccessInaccessibleClassMembers` helpers in test case +- Move [documentation to GitBook](https://wp-mock.gitbook.io/documentation/getting-started/introduction) +### Changed +- Require PHP 7.4 +- Update dependencies (Mockery 1.6, PHPUnit 9.6) +- Remove deprecated methods in `WP_Mock` main class +- Update `Hook::safe_offset()` to handle closure +### Fixed +- `IsEqualHtml` extends PHPUnit `Constraint` +- Improve responder handling of closures + +## [0.5.0](https://github.com/10up/wp_mock/compare/0.4.2...0.5.0) - 2022-11-01 +### Added +- New `AnyInstance` matcher +### Changed +- Add compatibility with PHPUnit 9 +- Require PHP 7.3 +- Mocker function for `_n()` to evaluate singular or plural +### Fixed +- Patchwork not loaded error (`WP_Mock::setUsePatchwork(true)` was broken) +- Address call to undefined method `getAnnotations` error from test class +- Support for latest PHPUnit versions + +## [0.4.2](https://github.com/10up/wp_mock/compare/0.4.2...0.4.1) - 2019-03-15 +### Added +- **Minor Filter/Action/Hook Assertion Bugfix** +- Please note: As with the previously-tagged release, this is not necessarily a stable release! + +## [0.4.1](https://github.com/10up/wp_mock/compare/0.4.1...0.4.0) - 2019-02-26 +### Added +- **PHPUnit 8 Compatibility** +- This release brings us up to date with the latest release of PHPUnit. +- Please note: As with the previously-tagged release, this is not necessarily a stable release! + +## [0.4.0](https://github.com/10up/wp_mock/compare/0.4.0...0.3.0) - 2019-01-16 +### Added +- **PHPUnit 7 Compatibility** +- This release brings us up to date both with PHPUnit and with PHP itself. The minimum version of PHP now supported by the project is *7.1*. +- *Please note:* As with the previously-tagged release, this is not necessarily a stable release! + +## [0.3.0](https://github.com/10up/wp_mock/compare/0.3.0...0.2.0) - 2017-12-03 +### Added +- This release brings us up to date both with PHPUnit and with PHP itself. The minimum version of PHP now supported by the project is **7.0**. +- **Please note:** As with the previously-tagged release, this is not necessarily a stable release! + +## [0.2.0](https://github.com/10up/wp_mock/compare/0.2.0...0.1.1) - 2017-07-18 +### Added +- **Unstable Distributable Release** +- This release moves to using static, tagged versions hosted on Packagist. Aside from a handful of bugfixes, it's equivalent to the `dev-dev` version many have been using before July 2017. Moving forward, all versions will be static and tagged. +- **Please note:** As with the previously-tagged release, this is not a stable release! We strongly encourage you to use the 1.0.x-dev source release until we release a stable 1.0 version. + +## [0.1.1](https://github.com/10up/wp_mock/compare/0.1.1...0.1.0) - 2015-03-31 +### Added +- Better documentation and phpDocumentor output + +## [0.1.0](https://github.com/10up/wp_mock/commit/3529a7bcc79d196b2850d15b92b94153b0b871a4) - 2014-12-30 +### Added +- **Unstable Distributable Release** +- Currently, we only have source releases on Packagist (dev-trunk and 1.0.x-dev). This will be a distributable release that will allow local caching of the library so that not every use needs to be a git clone. +- **Please note:** this is not a stable release! We strongly encourage you to use the 1.0.x-dev source release until we release a stable 1.0 version. + +[Unreleased]: https://github.com/10up/wp_mock/compare/trunk...develop +[0.4.2]: https://github.com/10up/wp_mock/compare/0.4.1...0.4.2 +[0.4.1]: https://github.com/10up/wp_mock/compare/0.4.0...0.4.1 +[0.4.0]: https://github.com/10up/wp_mock/compare/0.3.0...0.4.0 +[0.3.0]: https://github.com/10up/wp_mock/compare/0.2.0...0.3.0 +[0.2.0]: https://github.com/10up/wp_mock/compare/0.1.1...0.2.0 +[0.1.1]: https://github.com/10up/wp_mock/compare/0.1.0...0.1.1 +[0.1.0]: https://github.com/10up/wp_mock/commit/3529a7bcc79d196b2850d15b92b94153b0b871a4 diff --git a/vendor/10up/wp_mock/CODE_OF_CONDUCT.md b/vendor/10up/wp_mock/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..e8bac02 --- /dev/null +++ b/vendor/10up/wp_mock/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at opensource@10up.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/vendor/10up/wp_mock/CONTRIBUTING.md b/vendor/10up/wp_mock/CONTRIBUTING.md new file mode 100644 index 0000000..2d311ee --- /dev/null +++ b/vendor/10up/wp_mock/CONTRIBUTING.md @@ -0,0 +1,29 @@ +# Contributing + +Contributions are **welcome** and will be fully **credited**. + +We accept contributions via Pull Requests on [GitHub](https://github.com/10up/wp_mock) + +## Branches + +* WP_Mock adheres to [SemVer](http://semver.org/) (semantic versioning). +* The current "stable" release version lives on the **trunk** branch. +* If there is a current development release, it will live on a **{version}-dev** branch. + +## Pull Requests + +* New features must be submitted against the **trunk** branch. +* Bug fixes should be submitted against the branch in which the bug exists, which is likely **trunk**. +* If you're not sure whether a feature idea would be something we'd be interested in, please open an issue before you start working on it. We'd be happy to discuss your idea with you. +* Please update the **documentation** as appropriate to reflect any changes or features you have introduced in your pull request. +* Please implement appropriate **unit tests** for any code changes you are submitting in your pull request. + +## Merging + +* As of 2019, all merges to the **trunk** branch will be squash merges of features. +* If there are multiple features pending in a release, we will create a **{version}-dev** branch to track development against that version. Once the version is ready, that branch will be squash-merged into **trunk** as well. +* When a pull request is merged, the **Squash and Merge** option **must be used** when merging a pull request. + +## Thanks + +**You're awesome** - Thanks for being interested in contributing your time and code to this project! diff --git a/vendor/10up/wp_mock/CREDITS.md b/vendor/10up/wp_mock/CREDITS.md new file mode 100644 index 0000000..85f2ca5 --- /dev/null +++ b/vendor/10up/wp_mock/CREDITS.md @@ -0,0 +1,13 @@ +The following acknowledges the Maintainers for this repository, those who have Contributed to this repository (via bug reports, code, design, ideas, project management, translation, testing, etc.), and any Libraries utilized. + +## Maintainers + +The following individuals are responsible for curating the list of issues, responding to pull requests, and ensuring regular releases happen. + +[Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Fulvio Notarstefano (@unfulvio-godaddy)](https://github.com/unfulvio-godaddy), and the [GoDaddy Managed WooCommerce Engineering team](https://github.com/orgs/10up/teams/godaddy-wp_mock). + +## Contributors + +Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc. + +[Nicolas VINCENT (@nicolqs)](https://github.com/nicolqs), [Alex Khadiwala (@khadiwaa)](https://github.com/khadiwaa), [Kat Hagan (@codebykat)](https://github.com/codebykat), [James Ehly (@jamesehly)](https://github.com/jamesehly), [Greg Boone (@gboone)](https://github.com/gboone), [Tyrel Kelsey (@ninnypants)](https://github.com/ninnypants), [Giuseppe Mazzapica (@gmazzap)](https://github.com/gmazzap), [Fritz Gerneth (@fritz-gerneth)](https://github.com/fritz-gerneth), [John P. Bloch (@johnpbloch)](https://github.com/johnpbloch), [Luís Rodrigues (@goblindegook)](https://github.com/goblindegook), [Steve Grunwell (@stevegrunwell)](https://github.com/stevegrunwell), [Zane Matthew (@zanematthew)](https://github.com/zanematthew), [Eric Mann (@ericmann)](https://github.com/ericmann), [Sudar Muthu (@sudar)](https://github.com/sudar), [Payton Swick (@sirbrillig)](https://github.com/sirbrillig), [Mike Selander (@mikeselander)](https://github.com/mikeselander), [Thorsten Frommen (@tfrommen)](https://github.com/tfrommen), [Benjamin Intal (@bfintal)](https://github.com/bfintal), [Darshan Sawardekar (@dsawardekar)](https://github.com/dsawardekar), [Gary Jones (@GaryJones)](https://github.com/GaryJones), [Brian Watson (@bswatson)](https://github.com/bswatson), [Joseph Presley (@jpresley23)](https://github.com/jpresley23), [ScreamingDev (@ScreamingDev)](https://github.com/ScreamingDev), [Borek Bernard (@borekb)](https://github.com/borekb), [UnderFenex (@UnderFenex)](https://github.com/UnderFenex), [Pete Nelson (@petenelson)](https://github.com/petenelson), [Guilherme R Vasconcelos (@guilherme6191)](https://github.com/guilherme6191), [Scott Kingsley Clark (@sc0ttkclark)](https://github.com/sc0ttkclark), [The Gitter Badger (@gitter-badger)](https://github.com/gitter-badger), [Coby Tamayo (@acobster)](https://github.com/acobster), [Duncan Stuart (@dgmstuart)](https://github.com/dgmstuart), [Mathieu (@mathieuhays)](https://github.com/mathieuhays), [Alexander Akait (@alexander-akait)](https://github.com/alexander-akait), [corradomatt (@corradomatt)](https://github.com/corradomatt), [Pierre (@strategio)](https://github.com/strategio), [Chris Wiegman (@ChrisWiegman)](https://github.com/ChrisWiegman), [Andrea (@andreasciamanna)](https://github.com/andreasciamanna), [Krody Robert (@krodyrobi)](https://github.com/krodyrobi), [Jeff Sagal (@sagalbot)](https://github.com/sagalbot), [Chris Wiseman (@Khristophor)](https://github.com/Khristophor), [Deleted user (@ghost)](https://github.com/ghost), [Piers Beckley (@piersb)](https://github.com/piersb), [wpdeveloper10 (@wpdeveloper10)](https://github.com/wpdeveloper10), [Patrick Safarov (@psafarov)](https://github.com/psafarov), [Lee Willis (@leewillis77)](https://github.com/leewillis77), [Merianos Nikos (@merianos)](https://github.com/merianos), [Grant Kinney (@creativecoder)](https://github.com/creativecoder), [Sam Schneider (@samdotme)](https://github.com/samdotme), [Aaron (@NeonArray)](https://github.com/NeonArray), [Ramy Deeb (@rdeeb)](https://github.com/rdeeb), [JayWood (@JayWood)](https://github.com/JayWood), [Denis Žoljom (@dingo-d)](https://github.com/dingo-d), [wujekbogdan (@wujekbogdan)](https://github.com/wujekbogdan), [Alex McKee (@agmckee)](https://github.com/agmckee), [Chris Taylor (@ChrisTaylorDeveloper)](https://github.com/ChrisTaylorDeveloper), [Christopher Watts (@cj-watts)](https://github.com/cj-watts), [David (@davidg251)](https://github.com/davidg251), [Bruno Barros (@bruno-barros)](https://github.com/bruno-barros), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Evan Cordulack (@cordulack)](https://github.com/cordulack), [Corey Worrell (@coreyworrell)](https://github.com/coreyworrell), [sirilyan (@sirilyan)](https://github.com/sirilyan), [SavaKatic (@SavaKatic)](https://github.com/SavaKatic), [KoenGabriels (@koengabriels)](https://github.com/koengabriels), [Zach O (@phatsk)](https://github.com/phatsk), [Daniel Walmsley (@gravityrail)](https://github.com/gravityrail), [Muhammad Haseeb (@iam-mhaseeb)](https://github.com/iam-mhaseeb), [Brian Henry (@BrianHenryIE)](https://github.com/BrianHenryIE), [Jignesh Nakrani (@jigneshnakrani088)](https://github.com/jigneshnakrani088), [Fedir Kudinov (@kudinovfedor)](https://github.com/kudinovfedor), [Willington Vega (@wvega)](https://github.com/wvega), [rneudorf-godaddy (@rneudorf-godaddy)](https://github.com/rneudorf-godaddy), [Fulvio Notarstefano (@unfulvio-godaddy)](https://github.com/unfulvio-godaddy), [Konstantinos Pappas (@over-engineer)](https://github.com/over-engineer), [Nabeel Molham (@nmolham-godaddy)](https://github.com/nmolham-godaddy), [Ahmad Wael (@DevWael)](https://github.com/DevWael), [Peter Morlion (@petermorlion)](https://github.com/petermorlion), [Talpx1 (@Talpx1)](https://github.com/Talpx1), [Willington Vega (@wvega-godaddy)](https://github.com/wvega-godaddy), [Luke Woodward (@lkwdwrd)](https://github.com/lkwdwrd), [Ivan (@ivankruchkoff)](https://github.com/ivankruchkoff), [Chris Marslender (@cmmarslender)](https://github.com/cmmarslender), [Tang Rufus (@TangRufus)](https://github.com/TangRufus), [Adriano Castro (@acastro1-godaddy)](https://github.com/acastro1-godaddy), [Ashley Gibson (@agibson-godaddy)](https://github.com/agibson-godaddy), [Lucas Lessa (@llessa-godaddy)](https://github.com/llessa-godaddy), [Drew Jaynes (@ajaynes-godaddy)](https://github.com/ajaynes-godaddy), [Olivier Lafleur (@olafleur-godaddy)](https://github.com/olafleur-godaddy), [Illimar Tambek (GoDaddy) (@itambek-godaddy)](https://github.com/itambek-godaddy), [Ivan Lopez (@ivanlopez)](https://github.com/ivanlopez), [Jun Kaneko (@goodpic)](https://github.com/goodpic), [Alec Rippberger (@arippberger)](https://github.com/arippberger), [I am (@ayebare)](https://github.com/ayebare), [Collins Agbonghama (@w3guy)](https://github.com/w3guy), [Anton Ukhanev (@XedinUnknown)](https://github.com/XedinUnknown), [Rui Sardinha (@csrui)](https://github.com/csrui), [Dennis Ploetner (@lloc)](https://github.com/lloc), [Mario Aguiar (@emeaguiar)](https://github.com/emeaguiar), [Stephen Edgar (@ntwb)](https://github.com/ntwb), [Iain Poulson (@polevaultweb)](https://github.com/polevaultweb), [Ricardo Moraleida (@moraleida)](https://github.com/moraleida), [Jeremy Ward (@jmichaelward)](https://github.com/jmichaelward), [Manu (@manuelRod)](https://github.com/manuelRod), [spikeydaiki (@spikeydaiki)](https://github.com/spikeydaiki), [Robyn (@robynm)](https://github.com/robynm), [Jack Hansard (@Rayrn)](https://github.com/Rayrn), [emeraldjava (@emeraldjava)](https://github.com/emeraldjava), [Kenton Jacobsen (@brokentone)](https://github.com/brokentone), [Jamil Lillyreed (@jlillyreed)](https://github.com/jlillyreed), [Adam Marton (@AdamMarton)](https://github.com/AdamMarton), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Sofien NAAS (@mytuny)](https://github.com/mytuny), [rumur (@rumur)](https://github.com/rumur), [KeironLowe (@KeironLowe)](https://github.com/KeironLowe), [Karolína Vyskočilová (@vyskoczilova)](https://github.com/vyskoczilova), [roman (@romanmartushev)](https://github.com/romanmartushev), [fiskhandlarn (@fiskhandlarn)](https://github.com/fiskhandlarn), [Ashley Gibson (@ashleyfae)](https://github.com/ashleyfae) diff --git a/vendor/10up/wp_mock/LICENSE.md b/vendor/10up/wp_mock/LICENSE.md new file mode 100644 index 0000000..d03f9ec --- /dev/null +++ b/vendor/10up/wp_mock/LICENSE.md @@ -0,0 +1,13 @@ +WP_Mock - WordPress API Mocking Framework + +Copyright 2013-2024 by the contributors + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/vendor/10up/wp_mock/README.md b/vendor/10up/wp_mock/README.md new file mode 100644 index 0000000..1ffe370 --- /dev/null +++ b/vendor/10up/wp_mock/README.md @@ -0,0 +1,48 @@ +# WP_Mock + +> WP_Mock is an API mocking framework, built and maintained by [10up](https://10up.com) and [GoDaddy](https://godaddy.com) for the purpose of making it possible to properly unit test within a WordPress project. + +![Support Level][support-level-image] ![PHP 7.4+][php-image] [![Coverage Status][coveralls-image]][coveralls-url] [![Packagist][packagist-image]][packagist-url] [![BSD-3-Clause License][license-image]][license-url] + +## Installation + +Install WP_Mock as a dev-dependency using Composer: + +```php +composer require --dev 10up/wp_mock +``` + +## Documentation + +Learn more about how to configure and how to use WP_Mock by reading [the WP_Mock documentation](https://wp-mock.gitbook.io/documentation/getting-started/introduction). + +## Changelog + +A complete listing of all notable changes is documented in the [Changelog](https://github.com/10up/wp_mock/blob/trunk/CHANGELOG.md). + +## Support Level + +**Active:** [10up](https://10up.com) and [GoDaddy](https://godaddy.com) are actively working on this, and we expect to continue work for the foreseeable future, including testing with the most recent version of WordPress and PHP. Bug reports, feature requests, questions, and pull requests are welcome. + +## Contributing + +Please read our [Code of Conduct](https://github.com/10up/wp_mock/blob/trunk/CODE_OF_CONDUCT.md) for details on our code of conduct and our [Contributing Guidelines](https://github.com/10up/wp_mock/blob/trunk/CONTRIBUTING.md) for details on the process for submitting pull requests. + +## Supporters + +WP_Mock is supported by [10up](https://10up.com) and [GoDaddy](https://godaddy.com). [GitBook](https://www.gitbook.com/) kindly offers free hosting for [WP_Mock documentation](https://wp-mock.gitbook.io/documentation/getting-started/introduction). + +A special thanks to all [WP_Mock contributors](https://github.com/10up/wp_mock/blob/trunk/CREDITS.md). + +## Like what you see? + + + +[support-level-image]: https://img.shields.io/badge/support-active-green.svg +[php-image]: https://img.shields.io/badge/php-7.4%2B-green.svg +[packagist-image]: https://img.shields.io/packagist/dt/10up/wp_mock.svg +[packagist-url]: https://packagist.org/packages/10up/wp_mock +[coveralls-image]: https://coveralls.io/repos/github/10up/wp_mock/badge.svg?branch=trunk +[coveralls-url]: https://coveralls.io/github/10up/wp_mock?branch=trunk +[license-image]: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg +[license-url]: https://github.com/10up/wp_mock/blob/trunk/LICENSE.md \ No newline at end of file diff --git a/vendor/10up/wp_mock/bootstrap.php.dist b/vendor/10up/wp_mock/bootstrap.php.dist new file mode 100644 index 0000000..7bb2440 --- /dev/null +++ b/vendor/10up/wp_mock/bootstrap.php.dist @@ -0,0 +1,5 @@ +=7.4 < 9", + "phpunit/phpunit": "^9.6", + "mockery/mockery": "^1.6", + "antecedent/patchwork": "^2.1" + }, + "require-dev": { + "behat/behat": "^v3.11.0", + "sebastian/comparator": "^4.0.8", + "php-coveralls/php-coveralls": "^v2.7", + "sempro/phpunit-pretty-print": "^1.4", + "phpstan/phpstan": "^1.10", + "phpstan/phpstan-phpunit": "^1.3", + "phpstan/phpstan-mockery": "^1.1", + "phpcompatibility/php-compatibility": "^9.3", + "php-stubs/wordpress-globals": "^0.2", + "php-stubs/wordpress-stubs": "^6.3", + "friendsofphp/php-cs-fixer": "^3.4", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7" + }, + "autoload": { + "psr-4": { + "WP_Mock\\": "./php/WP_Mock" + }, + "classmap": [ + "php/WP_Mock.php" + ] + }, + "autoload-dev": { + "psr-4": { + "WP_Mock\\Tests\\": "tests/" + }, + "classmap": [ + "tests" + ] + }, + "config": { + "platform": { + "php": "7.4" + }, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + }, + "scripts": { + "test:behat": "behat", + "test:phpunit": "phpunit", + "test:phpunitcov": "phpunit --coverage-clover build/logs/clover.xml", + "test": [ + "@test:behat", + "@test:phpunit" + ], + "coverage": [ + "@test:behat", + "@test:phpunitcov" + ], + "post-install-cmd": "\"vendor/bin/phpcs\" --config-set installed_paths vendor/phpcompatibility/php-compatibility", + "post-update-cmd": "\"vendor/bin/phpcs\" --config-set installed_paths vendor/phpcompatibility/php-compatibility" + } +} diff --git a/vendor/10up/wp_mock/composer.lock b/vendor/10up/wp_mock/composer.lock new file mode 100644 index 0000000..0104ad1 --- /dev/null +++ b/vendor/10up/wp_mock/composer.lock @@ -0,0 +1,5518 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "a1855a9cad4977b6e16eb92ce3a72929", + "packages": [ + { + "name": "antecedent/patchwork", + "version": "2.1.27", + "source": { + "type": "git", + "url": "https://github.com/antecedent/patchwork.git", + "reference": "16a1ab81559aabf14acb616141e801b32777f085" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/antecedent/patchwork/zipball/16a1ab81559aabf14acb616141e801b32777f085", + "reference": "16a1ab81559aabf14acb616141e801b32777f085", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": ">=4" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignas Rudaitis", + "email": "ignas.rudaitis@gmail.com" + } + ], + "description": "Method redefinition (monkey-patching) functionality for PHP.", + "homepage": "https://antecedent.github.io/patchwork/", + "keywords": [ + "aop", + "aspect", + "interception", + "monkeypatching", + "redefinition", + "runkit", + "testing" + ], + "support": { + "issues": "https://github.com/antecedent/patchwork/issues", + "source": "https://github.com/antecedent/patchwork/tree/2.1.27" + }, + "time": "2023-12-03T18:46:49+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:15:36+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, + "time": "2020-07-09T08:09:16+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.6.7", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06", + "reference": "0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": ">=7.3" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.6.10", + "symplify/easy-coding-standard": "^12.0.8" + }, + "type": "library", + "autoload": { + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], + "psr-4": { + "Mockery\\": "library/Mockery" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "https://github.com/padraic", + "role": "Author" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "docs": "https://docs.mockery.io/", + "issues": "https://github.com/mockery/mockery/issues", + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" + }, + "time": "2023-12-10T02:24:34+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2023-03-08T13:26:56+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.18.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" + }, + "time": "2023-12-10T21:03:43+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.30", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:47:57+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.6.15", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/05017b80304e0eb3f31d90194a563fd53a6021f1", + "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1 || ^2", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.28", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.5", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.2", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.6-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.15" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2023-12-01T16:55:19+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:19:30+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-05-07T05:35:17+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:03:51+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T06:03:37+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bde739e7565280bda77be70044ac1047bc007e34" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", + "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-02T09:26:13+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:20:34+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:07:39+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:13:03+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2023-11-20T00:12:19+00:00" + } + ], + "packages-dev": [ + { + "name": "behat/behat", + "version": "v3.13.0", + "source": { + "type": "git", + "url": "https://github.com/Behat/Behat.git", + "reference": "9dd7cdb309e464ddeab095cd1a5151c2dccba4ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Behat/Behat/zipball/9dd7cdb309e464ddeab095cd1a5151c2dccba4ab", + "reference": "9dd7cdb309e464ddeab095cd1a5151c2dccba4ab", + "shasum": "" + }, + "require": { + "behat/gherkin": "^4.9.0", + "behat/transliterator": "^1.2", + "ext-mbstring": "*", + "php": "^7.2 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "symfony/config": "^4.4 || ^5.0 || ^6.0", + "symfony/console": "^4.4 || ^5.0 || ^6.0", + "symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0", + "symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0", + "symfony/translation": "^4.4 || ^5.0 || ^6.0", + "symfony/yaml": "^4.4 || ^5.0 || ^6.0" + }, + "require-dev": { + "herrera-io/box": "~1.6.1", + "phpspec/prophecy": "^1.15", + "phpunit/phpunit": "^8.5 || ^9.0", + "symfony/process": "^4.4 || ^5.0 || ^6.0", + "vimeo/psalm": "^4.8" + }, + "suggest": { + "ext-dom": "Needed to output test results in JUnit format." + }, + "bin": [ + "bin/behat" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Behat\\Hook\\": "src/Behat/Hook/", + "Behat\\Step\\": "src/Behat/Step/", + "Behat\\Behat\\": "src/Behat/Behat/", + "Behat\\Testwork\\": "src/Behat/Testwork/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Scenario-oriented BDD framework for PHP", + "homepage": "http://behat.org/", + "keywords": [ + "Agile", + "BDD", + "ScenarioBDD", + "Scrum", + "StoryBDD", + "User story", + "business", + "development", + "documentation", + "examples", + "symfony", + "testing" + ], + "support": { + "issues": "https://github.com/Behat/Behat/issues", + "source": "https://github.com/Behat/Behat/tree/v3.13.0" + }, + "time": "2023-04-18T15:40:53+00:00" + }, + { + "name": "behat/gherkin", + "version": "v4.9.0", + "source": { + "type": "git", + "url": "https://github.com/Behat/Gherkin.git", + "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/0bc8d1e30e96183e4f36db9dc79caead300beff4", + "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4", + "shasum": "" + }, + "require": { + "php": "~7.2|~8.0" + }, + "require-dev": { + "cucumber/cucumber": "dev-gherkin-22.0.0", + "phpunit/phpunit": "~8|~9", + "symfony/yaml": "~3|~4|~5" + }, + "suggest": { + "symfony/yaml": "If you want to parse features, represented in YAML files" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Behat\\Gherkin": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Gherkin DSL parser for PHP", + "homepage": "http://behat.org/", + "keywords": [ + "BDD", + "Behat", + "Cucumber", + "DSL", + "gherkin", + "parser" + ], + "support": { + "issues": "https://github.com/Behat/Gherkin/issues", + "source": "https://github.com/Behat/Gherkin/tree/v4.9.0" + }, + "time": "2021-10-12T13:05:09+00:00" + }, + { + "name": "behat/transliterator", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/Behat/Transliterator.git", + "reference": "baac5873bac3749887d28ab68e2f74db3a4408af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Behat/Transliterator/zipball/baac5873bac3749887d28ab68e2f74db3a4408af", + "reference": "baac5873bac3749887d28ab68e2f74db3a4408af", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "chuyskywalker/rolling-curl": "^3.1", + "php-yaoi/php-yaoi": "^1.0", + "phpunit/phpunit": "^8.5.25 || ^9.5.19" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Behat\\Transliterator\\": "src/Behat/Transliterator" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Artistic-1.0" + ], + "description": "String transliterator", + "keywords": [ + "i18n", + "slug", + "transliterator" + ], + "support": { + "issues": "https://github.com/Behat/Transliterator/issues", + "source": "https://github.com/Behat/Transliterator/tree/v1.5.0" + }, + "time": "2022-03-30T09:27:43+00:00" + }, + { + "name": "composer/pcre", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.1" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-10-11T07:11:09+00:00" + }, + { + "name": "composer/semver", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-08-31T09:50:34+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "ced299686f41dce890debac69273b47ffe98a40c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-02-25T21:32:43+00:00" + }, + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.2", + "source": { + "type": "git", + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + }, + { + "name": "Contributors", + "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcbf", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2022-02-04T12:51:07+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v3.42.0", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "632ef1be3447a9b890bef06147475facee535d0f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/632ef1be3447a9b890bef06147475facee535d0f", + "reference": "632ef1be3447a9b890bef06147475facee535d0f", + "shasum": "" + }, + "require": { + "composer/semver": "^3.4", + "composer/xdebug-handler": "^3.0.3", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0", + "sebastian/diff": "^4.0 || ^5.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-mbstring": "^1.28", + "symfony/polyfill-php80": "^1.28", + "symfony/polyfill-php81": "^1.28", + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" + }, + "require-dev": { + "facile-it/paraunit": "^1.3 || ^2.0", + "justinrainbow/json-schema": "^5.2", + "keradus/cli-executor": "^2.1", + "mikey179/vfsstream": "^1.6.11", + "php-coveralls/php-coveralls": "^2.7", + "php-cs-fixer/accessible-object": "^1.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4", + "phpunit/phpunit": "^9.6", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.42.0" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2023-12-24T14:38:51+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.8.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0.1", + "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.8.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2023-12-03T20:35:24+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2023-12-03T20:19:20+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.6.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.6.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2023-12-03T20:05:35+00:00" + }, + { + "name": "php-coveralls/php-coveralls", + "version": "v2.7.0", + "source": { + "type": "git", + "url": "https://github.com/php-coveralls/php-coveralls.git", + "reference": "b36fa4394e519dafaddc04ae03976bc65a25ba15" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/b36fa4394e519dafaddc04ae03976bc65a25ba15", + "reference": "b36fa4394e519dafaddc04ae03976bc65a25ba15", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^6.0 || ^7.0", + "php": "^7.0 || ^8.0", + "psr/log": "^1.0 || ^2.0", + "symfony/config": "^2.1 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", + "symfony/console": "^2.1 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", + "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", + "symfony/yaml": "^2.0.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0 || ^7.0 || >=8.0 <8.5.29 || >=9.0 <9.5.23", + "sanmai/phpunit-legacy-adapter": "^6.1 || ^8.0" + }, + "suggest": { + "symfony/http-kernel": "Allows Symfony integration" + }, + "bin": [ + "bin/php-coveralls" + ], + "type": "library", + "autoload": { + "psr-4": { + "PhpCoveralls\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp", + "role": "Original creator" + }, + { + "name": "Takashi Matsuo", + "email": "tmatsuo@google.com" + }, + { + "name": "Google Inc" + }, + { + "name": "Dariusz Ruminski", + "email": "dariusz.ruminski@gmail.com", + "homepage": "https://github.com/keradus" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-coveralls/php-coveralls/graphs/contributors" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/php-coveralls/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "support": { + "issues": "https://github.com/php-coveralls/php-coveralls/issues", + "source": "https://github.com/php-coveralls/php-coveralls/tree/v2.7.0" + }, + "time": "2023-11-22T10:21:01+00:00" + }, + { + "name": "php-stubs/wordpress-globals", + "version": "v0.2.0", + "source": { + "type": "git", + "url": "https://github.com/php-stubs/wordpress-globals.git", + "reference": "748a1fb2ae8fda94844bd0545935095dbf404b32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-stubs/wordpress-globals/zipball/748a1fb2ae8fda94844bd0545935095dbf404b32", + "reference": "748a1fb2ae8fda94844bd0545935095dbf404b32", + "shasum": "" + }, + "require-dev": { + "php": "~7.1" + }, + "suggest": { + "php-stubs/wordpress-stubs": "Up-to-date WordPress function and class declaration stubs", + "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Global variables and global constants from WordPress core.", + "homepage": "https://github.com/php-stubs/wordpress-globals", + "keywords": [ + "PHPStan", + "constants", + "globals", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/php-stubs/wordpress-globals/issues", + "source": "https://github.com/php-stubs/wordpress-globals/tree/master" + }, + "time": "2020-01-13T06:12:59+00:00" + }, + { + "name": "php-stubs/wordpress-stubs", + "version": "v6.4.1", + "source": { + "type": "git", + "url": "https://github.com/php-stubs/wordpress-stubs.git", + "reference": "6d6063cf9464a306ca2a0529705d41312b08500b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/6d6063cf9464a306ca2a0529705d41312b08500b", + "reference": "6d6063cf9464a306ca2a0529705d41312b08500b", + "shasum": "" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "nikic/php-parser": "^4.13", + "php": "^7.4 || ~8.0.0", + "php-stubs/generator": "^0.8.3", + "phpdocumentor/reflection-docblock": "^5.3", + "phpstan/phpstan": "^1.10.12", + "phpunit/phpunit": "^9.5", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^0.8" + }, + "suggest": { + "paragonie/sodium_compat": "Pure PHP implementation of libsodium", + "symfony/polyfill-php80": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "WordPress function and class declaration stubs for static analysis.", + "homepage": "https://github.com/php-stubs/wordpress-stubs", + "keywords": [ + "PHPStan", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/php-stubs/wordpress-stubs/issues", + "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.4.1" + }, + "time": "2023-11-10T00:33:47+00:00" + }, + { + "name": "phpcompatibility/php-compatibility", + "version": "9.3.5", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243", + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" + }, + "conflict": { + "squizlabs/php_codesniffer": "2.6.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", + "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Wim Godden", + "homepage": "https://github.com/wimg", + "role": "lead" + }, + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" + } + ], + "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", + "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", + "keywords": [ + "compatibility", + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues", + "source": "https://github.com/PHPCompatibility/PHPCompatibility" + }, + "time": "2019-12-27T09:44:58+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.10.50", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "06a98513ac72c03e8366b5a0cb00750b487032e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/06a98513ac72c03e8366b5a0cb00750b487032e4", + "reference": "06a98513ac72c03e8366b5a0cb00750b487032e4", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2023-12-13T10:59:42+00:00" + }, + { + "name": "phpstan/phpstan-mockery", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-mockery.git", + "reference": "6aa86bd8e9c9a1be97baf0558d4a2ed1374736a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-mockery/zipball/6aa86bd8e9c9a1be97baf0558d4a2ed1374736a6", + "reference": "6aa86bd8e9c9a1be97baf0558d4a2ed1374736a6", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.10" + }, + "require-dev": { + "mockery/mockery": "^1.2.4", + "nikic/php-parser": "^4.13.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan Mockery extension", + "support": { + "issues": "https://github.com/phpstan/phpstan-mockery/issues", + "source": "https://github.com/phpstan/phpstan-mockery/tree/1.1.1" + }, + "time": "2023-02-18T13:54:03+00:00" + }, + { + "name": "phpstan/phpstan-phpunit", + "version": "1.3.15", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-phpunit.git", + "reference": "70ecacc64fe8090d8d2a33db5a51fe8e88acd93a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/70ecacc64fe8090d8d2a33db5a51fe8e88acd93a", + "reference": "70ecacc64fe8090d8d2a33db5a51fe8e88acd93a", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.10" + }, + "conflict": { + "phpunit/phpunit": "<7.0" + }, + "require-dev": { + "nikic/php-parser": "^4.13.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-strict-rules": "^1.5.1", + "phpunit/phpunit": "^9.5" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon", + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPUnit extensions and rules for PHPStan", + "support": { + "issues": "https://github.com/phpstan/phpstan-phpunit/issues", + "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.15" + }, + "time": "2023-10-09T18:58:39+00:00" + }, + { + "name": "psr/container", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.2" + }, + "time": "2021-11-05T16:50:12+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "e616d01114759c4c489f93b099585439f795fe35" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + }, + "time": "2023-04-10T20:10:41+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "sempro/phpunit-pretty-print", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/s360digital/phpunit-pretty-print.git", + "reference": "fa623aa8a17aece4a2b69e54b07a5e37572d1f1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/s360digital/phpunit-pretty-print/zipball/fa623aa8a17aece4a2b69e54b07a5e37572d1f1d", + "reference": "fa623aa8a17aece4a2b69e54b07a5e37572d1f1d", + "shasum": "" + }, + "require": { + "php": ">=7.1.0", + "phpunit/phpunit": "^7 || ^8 || ^9" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Sempro\\PHPUnitPrettyPrinter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Prettify PHPUnit output", + "support": { + "issues": "https://github.com/s360digital/phpunit-pretty-print/issues", + "source": "https://github.com/s360digital/phpunit-pretty-print/tree/1.4.0" + }, + "time": "2021-01-04T13:25:10+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.8.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5805f7a4e4958dbb5e944ef1e6edae0a303765e7", + "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2023-12-08T12:32:31+00:00" + }, + { + "name": "symfony/config", + "version": "v5.4.31", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "dd5ea39de228813aba0c23c3a4153da2a4cf3cd9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/dd5ea39de228813aba0c23c3a4153da2a4cf3cd9", + "reference": "dd5ea39de228813aba0c23c3a4153da2a4cf3cd9", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/filesystem": "^4.4|^5.0|^6.0", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php80": "^1.16", + "symfony/polyfill-php81": "^1.22" + }, + "conflict": { + "symfony/finder": "<4.4" + }, + "require-dev": { + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/finder": "^4.4|^5.0|^6.0", + "symfony/messenger": "^4.4|^5.0|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/yaml": "^4.4|^5.0|^6.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v5.4.31" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-11-09T08:22:43+00:00" + }, + { + "name": "symfony/console", + "version": "v5.4.32", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", + "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.1|^6.0" + }, + "conflict": { + "psr/log": ">=3", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0" + }, + "require-dev": { + "psr/log": "^1|^2", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.4.32" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-11-18T18:23:04+00:00" + }, + { + "name": "symfony/dependency-injection", + "version": "v5.4.33", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "14969a558cd6382b2a12b14b20ef9a851a02da79" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/14969a558cd6382b2a12b14b20ef9a851a02da79", + "reference": "14969a558cd6382b2a12b14b20ef9a851a02da79", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1.1", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php80": "^1.16", + "symfony/polyfill-php81": "^1.22", + "symfony/service-contracts": "^1.1.6|^2" + }, + "conflict": { + "ext-psr": "<1.1|>=2", + "symfony/config": "<5.3", + "symfony/finder": "<4.4", + "symfony/proxy-manager-bridge": "<4.4", + "symfony/yaml": "<4.4.26" + }, + "provide": { + "psr/container-implementation": "1.0", + "symfony/service-implementation": "1.0|2.0" + }, + "require-dev": { + "symfony/config": "^5.3|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/yaml": "^4.4.26|^5.0|^6.0" + }, + "suggest": { + "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", + "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", + "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", + "symfony/yaml": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows you to standardize and centralize the way objects are constructed in your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v5.4.33" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-11-30T08:15:37+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:53:40+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v5.4.26", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5dcc00e03413f05c1e7900090927bb7247cb0aac", + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/event-dispatcher-contracts": "^2|^3", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "symfony/dependency-injection": "<4.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/http-foundation": "^4.4|^5.0|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/stopwatch": "^4.4|^5.0|^6.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.26" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-06T06:34:20+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", + "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/event-dispatcher": "^1" + }, + "suggest": { + "symfony/event-dispatcher-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:53:40+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.4.25", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.4.25" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-31T13:04:02+00:00" + }, + { + "name": "symfony/finder", + "version": "v5.4.27", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d", + "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.4.27" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-31T08:02:31+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v5.4.21", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", + "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php73": "~1.0", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v5.4.21" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T08:03:56+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "875e90aeea2777b6f135677f618529449334a612" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "42292d99c55abe617799667f454222c54c60e229" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-28T09:04:16+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-php81", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/process", + "version": "v5.4.46", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "01906871cb9b5e3cf872863b91aba4ec9767daf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/01906871cb9b5e3cf872863b91aba4ec9767daf4", + "reference": "01906871cb9b5e3cf872863b91aba4ec9767daf4", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v5.4.46" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-11-06T09:18:28+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-30T19:17:29+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v5.4.21", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f83692cd869a6f2391691d40a01e8acb89e76fee", + "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/service-contracts": "^1|^2|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v5.4.21" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T08:03:56+00:00" + }, + { + "name": "symfony/string", + "version": "v5.4.32", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "91bf4453d65d8231688a04376c3a40efe0770f04" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/91bf4453d65d8231688a04376c3a40efe0770f04", + "reference": "91bf4453d65d8231688a04376c3a40efe0770f04", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "conflict": { + "symfony/translation-contracts": ">=3.0" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/http-client": "^4.4|^5.0|^6.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "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": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.4.32" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-11-26T13:43:46+00:00" + }, + { + "name": "symfony/translation", + "version": "v5.4.31", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "ba72f72fceddf36f00bd495966b5873f2d17ad8f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/ba72f72fceddf36f00bd495966b5873f2d17ad8f", + "reference": "ba72f72fceddf36f00bd495966b5873f2d17ad8f", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.16", + "symfony/translation-contracts": "^2.3" + }, + "conflict": { + "symfony/config": "<4.4", + "symfony/console": "<5.3", + "symfony/dependency-injection": "<5.0", + "symfony/http-kernel": "<5.0", + "symfony/twig-bundle": "<5.0", + "symfony/yaml": "<4.4" + }, + "provide": { + "symfony/translation-implementation": "2.3" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/dependency-injection": "^5.0|^6.0", + "symfony/finder": "^4.4|^5.0|^6.0", + "symfony/http-client-contracts": "^1.1|^2.0|^3.0", + "symfony/http-kernel": "^5.0|^6.0", + "symfony/intl": "^4.4|^5.0|^6.0", + "symfony/polyfill-intl-icu": "^1.21", + "symfony/service-contracts": "^1.1.2|^2|^3", + "symfony/yaml": "^4.4|^5.0|^6.0" + }, + "suggest": { + "psr/log-implementation": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to internationalize your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/translation/tree/v5.4.31" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-11-03T16:16:43+00:00" + }, + { + "name": "symfony/translation-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/136b19dd05cdf0709db6537d058bcab6dd6e2dbe", + "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe", + "shasum": "" + }, + "require": { + "php": ">=7.2.5" + }, + "suggest": { + "symfony/translation-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v2.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-06-27T16:58:25+00:00" + }, + { + "name": "symfony/yaml", + "version": "v5.4.31", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "f387675d7f5fc4231f7554baa70681f222f73563" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/f387675d7f5fc4231f7554baa70681f222f73563", + "reference": "f387675d7f5fc4231f7554baa70681f222f73563", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/console": "<5.3" + }, + "require-dev": { + "symfony/console": "^5.3|^6.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v5.4.31" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-11-03T14:41:28+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": ">=7.4 < 9" + }, + "platform-dev": [], + "platform-overrides": { + "php": "7.4" + }, + "plugin-api-version": "2.6.0" +} diff --git a/vendor/10up/wp_mock/php/WP_Mock.php b/vendor/10up/wp_mock/php/WP_Mock.php new file mode 100644 index 0000000..49ef1f3 --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock.php @@ -0,0 +1,549 @@ +flush(); + self::$functionsManager->flush(); + + Mockery::close(); + Handler::cleanup(); + } + + /** + * Fire a specific (mocked) callback when an apply_filters() call is used. + * + * @param string $filter + * + * @return \WP_Mock\Filter + */ + public static function onFilter($filter) + { + self::$event_manager->called($filter, 'filter'); + return self::$event_manager->filter($filter); + } + + /** + * Fire a specific (mocked) callback when a do_action() call is used. + * + * @param string $action + * + * @return \WP_Mock\Action + */ + public static function onAction($action) + { + return self::$event_manager->action($action); + } + + /** + * Get a filter or action added callback object + * + * @param string $hook + * @param string $type + * + * @return \WP_Mock\HookedCallback + */ + public static function onHookAdded($hook, $type = 'filter') + { + return self::$event_manager->callback($hook, $type); + } + + /** + * Get a filter added callback object + * + * @param string $hook + * + * @return \WP_Mock\HookedCallback + */ + public static function onFilterAdded($hook) + { + return self::onHookAdded($hook, 'filter'); + } + + /** + * Get an action added callback object + * + * @param string $hook + * + * @return \WP_Mock\HookedCallback + */ + public static function onActionAdded($hook) + { + return self::onHookAdded($hook, 'action'); + } + + /** + * Alert the Event Manager that an action has been invoked. + * + * @param string $action + */ + public static function invokeAction($action) + { + self::$event_manager->called($action); + } + + public static function addFilter($hook) + { + self::addHook($hook, 'filter'); + } + + public static function addAction($hook) + { + self::addHook($hook, 'action'); + } + + public static function addHook($hook, $type = 'filter') + { + $type_name = "$type::$hook"; + self::$event_manager->called($type_name, 'callback'); + } + + /** + * Adds an expectation that an action will be called during the test. + * + * @param string $action expected action + * @returnv oid + */ + public static function expectAction(string $action) : void + { + $intercept = Mockery::mock('intercept'); + $intercept->shouldReceive('intercepted')->atLeast()->once(); + $args = func_get_args(); + $args = count($args) > 1 ? array_slice($args, 1) : array( null ); + + $mocked_action = self::onAction($action); + $responder = call_user_func_array(array( $mocked_action, 'with' ), $args); + $responder->perform([$intercept, 'intercepted']); + } + + /** + * Adds an expectation that a filter will be applied during the test. + * + * @param string $filter expected filter + * @return void + */ + public static function expectFilter(string $filter) : void + { + $intercept = Mockery::mock('intercept'); + $intercept->shouldReceive('intercepted')->atLeast()->once()->andReturnUsing(function ($value) { + return $value; + }); + $args = func_num_args() > 1 ? array_slice(func_get_args(), 1) : array( null ); + + $mocked_filter = self::onFilter($filter); + $responder = call_user_func_array(array( $mocked_filter, 'with' ), $args); + $responder->reply(new WP_Mock\InvokedFilterValue(array( $intercept, 'intercepted' ))); + } + + /** + * Asserts that all actions are called. + * + * @return void + */ + public static function assertActionsCalled() : void + { + $allActionsCalled = self::$event_manager->allActionsCalled(); + $failed = implode(', ', self::$event_manager->expectedActions()); + PHPUnit\Framework\Assert::assertTrue($allActionsCalled, 'Method failed to invoke actions: ' . $failed); + } + + /** + * Asserts that all filters are called. + * + * @return void + */ + public static function assertFiltersCalled() : void + { + $allFiltersCalled = self::$event_manager->allFiltersCalled(); + $failed = implode(', ', self::$event_manager->expectedFilters()); + PHPUnit\Framework\Assert::assertTrue($allFiltersCalled, 'Method failed to invoke filters: ' . $failed); + } + + /** + * Adds an expectation that an action hook should be added. + * + * @param string $action the action hook name + * @param string|callable-string|callable|Type $callback the callback that should be registered + * @param int $priority the priority it should be registered at + * @param int $args the number of arguments that should be allowed + * @return void + */ + public static function expectActionAdded(string $action, $callback, int $priority = 10, int $args = 1) : void + { + self::expectHookAdded('action', $action, $callback, $priority, $args); + } + + /** + * Adds an expectation that an action hook should not be added. + * + * @param string $action the action hook name + * @param string|callable-string|callable|Type $callback the callback that should be registered + * @param int $priority the priority it should be registered at + * @param int $args the number of arguments that should be allowed + * @return void + */ + public static function expectActionNotAdded(string $action, $callback, int $priority = 10, int $args = 1) : void + { + self::expectHookNotAdded('action', $action, $callback, $priority, $args); + } + + /** + * Add an expectation that a filter hook should be added. + * + * @param string $filter the filter hook name + * @param string|callable-string|callable|Type $callback the callback that should be registered + * @param int $priority the priority it should be registered at + * @param int $args the number of arguments that should be allowed + * @return void + */ + public static function expectFilterAdded(string $filter, $callback, int $priority = 10, int $args = 1) : void + { + self::expectHookAdded('filter', $filter, $callback, $priority, $args); + } + + /** + * Adds an expectation that a filter hook should not be added. + * + * @param string $filter the filter hook name + * @param string|callable-string|callable|Type $callback the callback that should be registered + * @param int $priority the priority it should be registered at + * @param int $args the number of arguments that should be allowed + * @return void + */ + public static function expectFilterNotAdded(string $filter, $callback, int $priority = 10, int $args = 10) : void + { + self::expectHookNotAdded('filter', $filter, $callback, $priority, $args); + } + + /** + * Adds an expectation that a hook should be added. + * + * Based {@see Mockery\MockInterface::shouldReceive()}. + * + * @param string $type the type of hook being added ('action' or 'filter') + * @param string $hook the hook name + * @param string|callable-string|callable|Type $callback the callback that should be registered + * @param int $priority the priority it should be registered at + * @param int $args the number of arguments that should be allowed + * @return void + */ + public static function expectHookAdded(string $type, string $hook, $callback, int $priority = 10, int $args = 1) : void + { + $intercept = Mockery::mock('intercept'); + $intercept->shouldReceive('intercepted')->atLeast()->once(); + + /** @var WP_Mock\HookedCallbackResponder $responder */ + $responder = self::onHookAdded($hook, $type) + ->with($callback, $priority, $args); + $responder->perform([$intercept, 'intercepted']); + } + + /** + * Adds an expectation that a hook should not be added. + * + * Based {@see Mockery\MockInterface::shouldNotReceive()}. + * + * @param string $type the type of hook being added ('action' or 'filter') + * @param string $hook the hook name + * @param string|callable-string|callable|Type $callback the callback that should be registered + * @param int $priority the priority it should be registered at + * @param int $args the number of arguments that should be allowed + * @return void + */ + public static function expectHookNotAdded(string $type, string $hook, $callback, int $priority = 10, int $args = 1) : void + { + $intercept = Mockery::mock('intercept'); + $intercept->shouldNotReceive('intercepted'); + + /** @var WP_Mock\HookedCallbackResponder $responder */ + $responder = self::onHookAdded($hook, $type) + ->with($callback, $priority, $args); + $responder->perform([$intercept, 'intercepted']); + } + + /** + * Asserts that all hooks are added. + * + * @return void + */ + public static function assertHooksAdded() : void + { + $allHooksAdded = self::$event_manager->allHooksAdded(); + $failed = implode(', ', self::$event_manager->expectedHooks()); + PHPUnit\Framework\Assert::assertTrue($allHooksAdded, 'Method failed to add hooks: ' . $failed); + } + + /** + * Mocks a WordPress API function. + * + * This function registers a mock object for a WordPress function and, if necessary, dynamically defines the function. + * + * Pass the function name as the first argument (e.g. `wp_remote_get()`) and pass in details about the expectations in the $args param. + * The arguments have a few options for defining expectations about how the WordPress function should be used during a test. + * + * Currently, it accepts the following settings: + * + * - `times`: Defines expectations for the number of times a function should be called. The default is `0` or more times. + * To expect the function to be called an exact amount of times, set times to a non-negative numeric value. + * To specify that the function should be called a minimum number of times, use a string with the minimum followed by '+' (e.g. '3+' means 3 or more times). + * Append a '-' to indicate a maximum number of times a function should be called (e.g. '3-' means no more than 3 times). + * To indicate a range, use '-' between two numbers (e.g. '2-5' means at least 2 times and no more than 5 times). + * + * - `return`: Defines the value (if any) that the function should return. + * If you pass a `Closure` as the return value, the function will return whatever the closure's return value. + * + * - `return_in_order`: Use this if your function will be called multiple times in the test but needs to have different return values. + * Set this to an array of return values. Each time the function is called, it will return the next value in the sequence until it reaches the last value, which will become the return value for all subsequent calls. + * For example, if you are mocking `is_single()`, you can set `return_in_order` to `[false, true]`. The first time is_single() is called it will return false. + * The second and all subsequent times it will return true. Setting this value overrides return, so if you set both, return will be ignored. + * + * - `return_arg`: Use this to specify that the function should return one of its arguments. `return_arg` should be the position of the argument in the arguments array, so `0` for the first argument, `1` for the second, etc. + * You can also set this to true, which is equivalent to `0`. This will override both return and return_in_order. + * + * - `args`: Use this to set expectations about what the arguments passed to the function should be. + * This value should always be an array with the arguments in order. + * Like with `return`, if you use a `Closure`, its return value will be used to validate the argument expectations. + * WP_Mock has several helper functions to make this feature more flexible. There are static methods on the \WP_Mock\Functions class. They are: + * - {@see Functions::type($type)} Expects an argument of a certain type. This can be any core PHP data type (string, int, resource, callable, etc.) or any class or interface name. + * - {@see Functions::anyOf($values)} Expects the argument to be any value in the `$values` array. + * In addition to these helper functions, you can indicate that the argument can be any value of any type by using `*`. + * So, for example, if you are expecting `get_post_meta()` to be called, the `args` array might look something like this: `[$post->ID, 'some_meta_key', true]`. + * + * Returns the {@see Mockery\Expectation} object with the function expectations added. + * It is possible to use Mockery methods to add expectations to the object returned, which will then be combined with any expectations that may have been passed as arguments. + * + * @param string $function function name + * @param mixed[] $args optional arguments to set expectations + * @return Mockery\Expectation + * @throws InvalidArgumentException + */ + public static function userFunction(string $function, array $args = []) + { + return self::$functionsManager->register($function, $args); + } + + /** + * A wrapper for {@see WP_Mock::userFunction()} that will simply set/override the return to be a function that echoes the value that its passed. + * + * For example, `esc_attr_e()` may need to be mocked, and it must echo some value. + * {@see WP_Mock::echoFunction()} will set `esc_attr_e()` to echo the value its passed: + * + * WP_Mock::echoFunction('esc_attr_e'); + * esc_attr_e('some_value'); // echoes "some_value" + * + * @param string $function function name + * @param mixed[]|scalar $args optional arguments + * @return Mockery\Expectation + * @throws InvalidArgumentException + */ + public static function echoFunction(string $function, $args = []) + { + /** @var array $args */ + $args = (array) $args; + $args['return'] = function ($param) { + echo $param; + }; + + return self::$functionsManager->register($function, $args); + } + + /** + * A wrapper for {@see WP_Mock::userFunction()} that will simply set/override the return to be a function that returns the value that its passed. + * + * For example, `esc_attr()` may need to be mocked, and it must return some value. + * {@see WP_Mock::passthruFunction()} will set `esc_attr()` to return the value its passed: + * + * WP_Mock::passthruFunction('esc_attr'); + * echo esc_attr('some_value'); // echoes "some_value" + * + * @param string $function function name + * @param mixed[]|scalar $args function arguments (optional) + * @return Mockery\Expectation + * @throws InvalidArgumentException + */ + public static function passthruFunction(string $function, $args = []) + { + /** @var array $args */ + $args = (array) $args; + $args['return'] = function ($param) { + return $param; + }; + + return self::$functionsManager->register($function, $args); + } + + /** + * Adds a function mock that aliases another callable. + * + * e.g.: WP_Mock::alias('wp_hash', 'md5'); + * + * @param string|callable-string $function function to alias + * @param string|callable-string $aliasFunction actual function + * @param mixed[]|scalar $args optional arguments + * @return Mockery\Expectation + * @throws InvalidArgumentException + */ + public static function alias(string $function, string $aliasFunction, $args = []) + { + /** @var array $args */ + $args = (array) $args; + + if (is_callable($aliasFunction)) { + $args['return'] = function () use ($aliasFunction) { + return call_user_func_array($aliasFunction, func_get_args()); + }; + } + + return self::$functionsManager->register($function, $args); + } + + /** + * Generates a fuzzy object match expectation. + * + * This will let you fuzzy match objects based on their properties without needing to use the identical (===) operator. + * This is helpful when the object being passed to a function is constructed inside the scope of the function being tested but where you want to make assertions on more than just the type of the object. + * + * @param object|array $object + * @return FuzzyObject + * @throws MockeryException + */ + public static function fuzzyObject($object): FuzzyObject + { + return new FuzzyObject($object); + } + + /** + * Gets the deprecated method listener instance. + * + * @return DeprecatedMethodListener + */ + public static function getDeprecatedMethodListener(): DeprecatedMethodListener + { + return static::$deprecatedMethodListener; + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/API/constant-mocks.php b/vendor/10up/wp_mock/php/WP_Mock/API/constant-mocks.php new file mode 100644 index 0000000..6aaca27 --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/API/constant-mocks.php @@ -0,0 +1,72 @@ +react($functionToAdd, $priority, $acceptedArgs); + } +} + +if (! function_exists('do_action')) { + /** + * Execute functions hooked on a specific action hook. + * + * @param string $tag The name of the action to be executed. + * @param mixed $arg,... Optional additional arguments which are passed on to the functions hooked to the action. + * + * @return null Will return null if $tag does not exist in $wp_filter array + */ + function do_action($tag, $arg = '') + { + $args = func_get_args(); + $args = array_slice($args, 1); + + return \WP_Mock::onAction($tag)->react($args); + } +} + +if (! function_exists('add_filter')) { + /** + * Hooks a function on to a specific filter. + * + * Filters are the hooks that WordPress uses to alter the value of a variable at specific points during execution. + * Plugins can specify that one or more of its PHP functions are executed at these points, using the Filter API, to change the value of that variable. + * + * @link https://developer.wordpress.org/plugins/hooks/filters/ + * + * @param string $tag the name of the action to which the $function_to_add is hooked + * @param string|callable-string|callable $functionToAdd the name of the function you wish to be called + * @param int $priority optional, used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action + * @param int $acceptedArgs the number of arguments the function accept (default 1) + */ + function add_filter(string $tag, $functionToAdd, int $priority = 10, int $acceptedArgs = 1) + { + \WP_Mock::onFilterAdded($tag)->react($functionToAdd, $priority, $acceptedArgs); + } +} + +if (! function_exists('apply_filters')) { + /** + * Call the functions added to a filter hook. + * + * @param string $tag The name of the filter hook. + * @param mixed $value The value on which the filters hooked to $tag are applied on. + * @param mixed $var,... Additional variables passed to the functions hooked to $tag. + * + * @return mixed The filtered value after all hooked functions are applied to it. + */ + function apply_filters($tag, $value) + { + $args = func_get_args(); + $args = array_slice($args, 1); + $args[0] = $value; + + return \WP_Mock::onFilter($tag)->apply($args); + } +} + +if (! function_exists('esc_html')) { + /** + * @return string + */ + function esc_html() : string + { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + return Handler::handlePredefinedReturnFunction(__FUNCTION__, func_get_args()); + } +} + +if (! function_exists('esc_attr')) { + /** + * @return string + */ + function esc_attr() : string + { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + return Handler::handlePredefinedReturnFunction(__FUNCTION__, func_get_args()); + } +} + +if (! function_exists('esc_url')) { + /** + * @return string + */ + function esc_url() : string + { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + return Handler::handlePredefinedReturnFunction(__FUNCTION__, func_get_args()); + } +} + +if (! function_exists('esc_url_raw')) { + /** + * @return string + */ + function esc_url_raw() : string + { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + return Handler::handlePredefinedReturnFunction(__FUNCTION__, func_get_args()); + } +} + +if (! function_exists('esc_js')) { + /** + * @return string + */ + function esc_js() : string + { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + return Handler::handlePredefinedReturnFunction(__FUNCTION__, func_get_args()); + } +} + +if (! function_exists('esc_textarea')) { + /** + * @return string + */ + function esc_textarea() : string + { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + return Handler::handlePredefinedReturnFunction(__FUNCTION__, func_get_args()); + } +} + +if (! function_exists('__')) { + /** + * @return string + */ + function __() : string + { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + return Handler::handlePredefinedReturnFunction(__FUNCTION__, func_get_args()); + } +} + +if (! function_exists('_e')) { + /** + * @return void + */ + function _e() : void + { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + Handler::handlePredefinedEchoFunction(__FUNCTION__, func_get_args()); + } +} + +if (! function_exists('_x')) { + /** + * @return string + */ + function _x() : string + { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + return Handler::handlePredefinedReturnFunction(__FUNCTION__, func_get_args()); + } +} + +if (! function_exists('esc_html__')) { + /** + * @return string + */ + function esc_html__() : string + { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + return Handler::handlePredefinedReturnFunction(__FUNCTION__, func_get_args()); + } +} + +if (! function_exists('esc_html_e')) { + /** + * @return void + */ + function esc_html_e() : void + { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + Handler::handlePredefinedEchoFunction(__FUNCTION__, func_get_args()); + } +} + +if (! function_exists('esc_html_x')) { + /** + * @return string + */ + function esc_html_x() : string + { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + return Handler::handlePredefinedReturnFunction(__FUNCTION__, func_get_args()); + } +} + +if (! function_exists('esc_attr__')) { + /** + * @return string + */ + function esc_attr__() : string + { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + return Handler::handlePredefinedReturnFunction(__FUNCTION__, func_get_args()); + } +} + +if (! function_exists('esc_attr_e')) { + /** + * @return void + */ + function esc_attr_e() : void + { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + Handler::handlePredefinedEchoFunction(__FUNCTION__, func_get_args()); + } +} + +if (! function_exists('esc_attr_x')) { + /** + * @return string + */ + function esc_attr_x() : string + { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + return Handler::handlePredefinedReturnFunction(__FUNCTION__, func_get_args()); + } +} + +if (! function_exists('_n')) { + /** + * @return string + */ + function _n() : string + { + $args = func_get_args(); + + if (count($args) >= 3) { + /** @phpstan-ignore-next-line */ + if (isset($args[0]) && 1 >= intval($args[2])) { + /** @phpstan-ignore-next-line */ + return (string) $args[0]; + } else { + /** @phpstan-ignore-next-line */ + return (string) $args[1]; + } + } else { + /** @phpstan-ignore-next-line to prevent flagging the function as throwing exception in codebases requiring WP_Mock */ + throw new ExpectationFailedException(sprintf('Too few arguments to function %s', __FUNCTION__)); + } + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/Action.php b/vendor/10up/wp_mock/php/WP_Mock/Action.php new file mode 100644 index 0000000..d272ada --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/Action.php @@ -0,0 +1,81 @@ +name); + + $arg_num = count($args); + + if (0 === $arg_num) { + if (! isset($this->processors['argsnull'])) { + $this->strict_check(); + + return; + } + + $this->processors['argsnull']->react(); + } else { + $processors = $this->processors; + for ($i = 0; $i < $arg_num - 1; $i ++) { + $arg = $this->safe_offset($args[ $i ]); + + if (! isset($processors[ $arg ])) { + $this->strict_check(); + + return; + } + + $processors = $processors[ $arg ]; + } + + $arg = $this->safe_offset($args[ $arg_num - 1 ]); + if (! is_array($processors) || ! isset($processors[ $arg ])) { + $this->strict_check(); + + return; + } + + $processors[ $arg ]->react(); + } + } + + protected function new_responder() + { + return new Action_Responder(); + } + + /** + * @return string + */ + protected function get_strict_mode_message() + { + return sprintf('Unexpected use of do_action for action %s', $this->name); + } +} + +class Action_Responder +{ + /** + * @var mixed + */ + protected $callable; + + public function perform($callable) + { + $this->callable = $callable; + } + + public function react() + { + call_user_func($this->callable); + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/DeprecatedMethodListener.php b/vendor/10up/wp_mock/php/WP_Mock/DeprecatedMethodListener.php new file mode 100644 index 0000000..dffbfc6 --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/DeprecatedMethodListener.php @@ -0,0 +1,218 @@ +logDeprecatedCall()} within a deprecated method's logic. + */ +class DeprecatedMethodListener +{ + /** @var array}> array of logged deprecated method calls with their arguments, if any */ + protected $deprecatedCalls = []; + + /** @var string */ + protected $testName = 'test'; + + /** @var TestCase|MockInterface */ + protected $testCase; + + /** @var TestResult|MockInterface */ + protected $testResult; + + /** + * Sets the test name in context. + * + * @param string $testName + * @return $this + */ + public function setTestName(string $testName): DeprecatedMethodListener + { + $this->testName = $testName; + + return $this; + } + + /** + * Sets the test case in context. + * + * @param TestCase|MockInterface $testCase + * @return $this + */ + public function setTestCase($testCase): DeprecatedMethodListener + { + $this->testCase = $testCase; + + return $this; + } + + /** + * Sets the test result in context. + * + * @param TestResult|MockInterface $testResult + * @return $this + */ + public function setTestResult($testResult): DeprecatedMethodListener + { + $this->testResult = $testResult; + + return $this; + } + + /** + * Logs a deprecated method call. + * + * @param string $method + * @param array $args + * @return $this + */ + public function logDeprecatedCall(string $method, array $args = []): DeprecatedMethodListener + { + $this->deprecatedCalls[] = [$method, $args]; + + return $this; + } + + /** + * Resets tracking of deprecated method calls. + * + * @return $this + */ + public function reset(): DeprecatedMethodListener + { + $this->deprecatedCalls = []; + + return $this; + } + + /** + * Checks for deprecated method calls. + * + * Adds failures to the test result if any are found. + * + * @return void + */ + public function checkCalls(): void + { + if (empty($this->deprecatedCalls)) { + return; + } + + $error = new RiskyTestError($this->buildErrorMessage()); + + /** @phpstan-ignore-next-line */ + $this->testResult->addFailure($this->testCase, $error, 0); + } + + /** + * Gets a deprecated method call usage message. + * + * @return string + */ + protected function buildErrorMessage(): string + { + $maxLength = array_reduce($this->getDeprecatedMethods(), function ($carry, $item) { + return max($carry, strlen($item)); + }, 0) + 1; + + $message = sprintf('Deprecated WP Mock calls inside %s:', $this->testName); + + foreach ($this->getDeprecatedMethodsWithArgs() as $method => $args) { + $firstRun = true; + $extra = $maxLength - strlen($method); + + foreach ($args as $arg) { + $message .= "\n "; + + if ($firstRun) { + $message .= $method . str_repeat(' ', $extra); + $firstRun = false; + $extra = $maxLength; + } else { + $message .= str_repeat(' ', $extra); + } + + $message .= $arg; + } + } + + return $message; + } + + /** + * Gets a list of deprecated methods having been called. + * + * @return string[] + */ + protected function getDeprecatedMethods(): array + { + $methods = []; + + foreach ($this->deprecatedCalls as $call) { + $methods[] = $call[0]; + } + + return array_unique($methods); + } + + /** + * Gets a list of deprecated methods having been called, with their arguments formatted as JSON. + * + * @return array> + */ + protected function getDeprecatedMethodsWithArgs(): array + { + $collection = []; + + foreach ($this->deprecatedCalls as $call) { + $method = $call[0]; + $args = json_encode(array_map([$this, 'toScalar'], $call[1])); + + if (empty($collection[$method])) { + $collection[$method] = []; + } + + $collection[$method][] = $args; + } + + return array_map('array_unique', $collection); + } + + /** + * Transforms a value for use in a JSON string. + * + * @param mixed $value + * @return string|bool|null|float|int + */ + protected function toScalar($value) + { + if ($value === null) { + return null; + } elseif (is_scalar($value)) { + return $value; + } elseif (is_object($value)) { + return '<'.get_class($value).':'.spl_object_hash($value).'>'; + } elseif (is_array($value)) { + if (is_callable($value)) { + /** @phpstan-ignore-next-line */ + return '['.implode(',', array_map(array($this, 'toScalar'), $value)).']'; + } else { + return 'Array(['.count($value).'] ...)'; + } + } elseif (is_resource($value)) { + return 'Resource'; + } + + return 'Unknown Value'; + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/EventManager.php b/vendor/10up/wp_mock/php/WP_Mock/EventManager.php new file mode 100644 index 0000000..7fa58e8 --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/EventManager.php @@ -0,0 +1,169 @@ +flush(); + } + + /** + * Clear internal storage. + */ + public function flush() + { + $this->filters = array(); + $this->actions = array(); + $this->expected = array(); + } + + /** + * @param string $name Action handler to retrieve + * + * @return Action + */ + public function action($name) + { + if (! isset($this->actions[ $name ])) { + $this->actions[ $name ] = new Action($name); + $this->expected[] = 'action::' . $name; + } + + return $this->actions[ $name ]; + } + + /** + * @param string $name Filter handler to retrieve + * + * @return Filter + */ + public function filter($name) + { + if (! isset($this->filters[ $name ])) { + $this->filters[ $name ] = new Filter($name); + $this->expected[] = 'filter::' . $name; + } + + return $this->filters[ $name ]; + } + + public function callback($name, $type = 'filter') + { + $type_name = "$type::$name"; + if (! isset($this->callbacks[ $type_name ])) { + $hookedCallback = new HookedCallback($name); + $hookedCallback->setType($type); + $this->callbacks[ $type_name ] = $hookedCallback; + $this->expected[] = "callback::$type_name"; + } + + return $this->callbacks[ $type_name ]; + } + + /** + * Remember that a particular hook has been invoked during operation. + * + * @param string $hook + * @param string $type + */ + public function called($hook, $type = 'action') + { + $position = array_search($type . '::' . $hook, $this->expected); + array_splice($this->expected, $position, 1); + } + + /** + * Return a list of all the actions we're expecting a test to invoke. + * + * @return array + */ + public function expectedActions() + { + return array_keys($this->actions); + } + + /** + * Return a list of all the filters we're expecting a test to invoke. + * @return array + */ + public function expectedFilters() + { + return array_keys($this->filters); + } + + /** + * Return a list of all the hooks we're expecting a test to invoke. + * @return array + */ + public function expectedHooks() + { + return array_keys($this->callbacks); + } + + /** + * Check whether or not all actions have been invoked at least once. + * + * @return bool + */ + public function allActionsCalled() + { + foreach ($this->expected as $hook) { + if (0 === strpos($hook, 'action::')) { + return false; + } + } + + return true; + } + + /** + * Check whether or not all filters have been invoked at least once. + * + * @return bool + */ + public function allFiltersCalled() + { + foreach ($this->expected as $hook) { + if (0 === strpos($hook, 'filter::')) { + return false; + } + } + + return true; + } + + /** + * Check whether or not all hooks have been invoked at least once. + * + * @return bool + */ + public function allHooksAdded() + { + foreach ($this->expected as $hook) { + if (0 === strpos($hook, 'callback::')) { + return false; + } + } + + return true; + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/Filter.php b/vendor/10up/wp_mock/php/WP_Mock/Filter.php new file mode 100644 index 0000000..873ce1c --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/Filter.php @@ -0,0 +1,100 @@ + Collection of filter names mapped to random integers. */ + protected static array $filtersWithAnyArgs = []; + + /** + * Apply the stored filter. + * + * @param array $args Arguments passed to apply_filters() + * + * @return mixed + */ + public function apply($args) + { + if (isset(static::$filtersWithAnyArgs[ $this->name ])) { + $args = array_values(static::$filtersWithAnyArgs); + } + + if ($args[0] === null && count($args) === 1) { + if (isset($this->processors['argsnull'])) { + return $this->processors['argsnull']->send(); + } + $this->strict_check(); + + return null; + } + + $processors = $this->processors; + foreach ($args as $arg) { + $key = $this->safe_offset($arg); + if (! is_array($processors) || ! isset($processors[ $key ])) { + $this->strict_check(); + + return $arg; + } + + $processors = $processors[ $key ]; + } + + return call_user_func_array(array($processors, 'send'), $args); + } + + /** + * @return Filter_Responder + */ + protected function new_responder() + { + return new Filter_Responder(); + } + + /** + * @return string + */ + protected function get_strict_mode_message() + { + return sprintf('Unexpected use of apply_filters for filter %s', $this->name); + } + + /** + * @return Action_Responder|Filter_Responder|HookedCallbackResponder + */ + public function withAnyArgs() + { + $random_value = mt_rand(); + static::$filtersWithAnyArgs[ $this->name ] = $random_value; + + return $this->with($random_value); + } +} + +class Filter_Responder +{ + /** + * @var mixed + */ + protected $value; + + public function reply($value) + { + $this->value = $value; + } + + public function send() + { + if ($this->value instanceof InvokedFilterValue) { + return call_user_func_array($this->value, func_get_args()); + } + + return $this->value; + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/Functions.php b/vendor/10up/wp_mock/php/WP_Mock/Functions.php new file mode 100644 index 0000000..ddf5cf6 --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/Functions.php @@ -0,0 +1,421 @@ + container of function names holding a Mock object each handled by WP_Mock */ + private array $mockedFunctions = []; + + /** @var string[] list of user-defined functions (e.g. WordPress functions) mocked by WP_Mock */ + private static array $userMockedFunctions = []; + + /** @var string[] list of functions redefined by WP_Mock through Patchwork */ + private array $patchworkFunctions = []; + + /** @var string[] list of PHP internal functions as per {@see get_defined_functions()} */ + private array $internalFunctions = []; + + /** + * Initializes the handler. + */ + public function __construct() + { + Handler::cleanup(); + + $this->flush(); + } + + /** + * Flushes (resets) the registered mocked functions. + * + * @return void + */ + public function flush(): void + { + $this->mockedFunctions = []; + + Handler::cleanup(); + + $this->patchworkFunctions = []; + + if (function_exists('Patchwork\undoAll')) { + \Patchwork\restoreAll(); + } + + if (empty(self::$userMockedFunctions)) { + self::$userMockedFunctions = [ + '__', + '_e', + '_n', + '_x', + 'add_action', + 'add_filter', + 'apply_filters', + 'do_action', + 'esc_attr', + 'esc_attr__', + 'esc_attr_e', + 'esc_attr_x', + 'esc_html', + 'esc_html__', + 'esc_html_e', + 'esc_html_x', + 'esc_js', + 'esc_textarea', + 'esc_url', + 'esc_url_raw', + ]; + } + } + + /** + * Registers a function to be mocked and sets up its expectations. + * + * @param string|callable-string $function function name + * @param array $args optional arguments + * @return Mockery\Expectation + * @throws InvalidArgumentException + */ + public function register(string $function, array $args = []) + { + $this->generateFunction($function); + + if (empty($this->mockedFunctions[$function])) { + /** @phpstan-ignore-next-line */ + $this->mockedFunctions[$function] = Mockery::mock('wp_api'); + } + + /** @var Mockery\Mock $mock */ + $mock = $this->mockedFunctions[$function]; + + /** @var callable-string $method */ + $method = preg_replace('/\\\\+/', '_', $function); + + /** @var Mockery\Expectation $expectation */ + $expectation = $this->setUpMock($mock, $method, $args); + + Handler::registerHandler($function, [$mock, $method]); + + return $expectation; + } + + /** + * Sets up the mock object with expectations. + * + * @param Mockery\Mock|Mockery\MockInterface|Mockery\LegacyMockInterface $mock mock object + * @param string $functionName function name + * @param array $args optional arguments for setting expectations on the mock + * @return Mockery\Expectation|Mockery\CompositeExpectation + */ + protected function setUpMock($mock, string $functionName, array $args = []) + { + /** @var Mockery\Expectation|Mockery\CompositeExpectation $expectation */ + $expectation = $mock->shouldReceive($functionName); + + // set the expected times the function should be called + if (isset($args['times'])) { + $this->setExpectedTimes($expectation, $args['times']); + } + + // set the expected arguments the function should be called with + if (isset($args['args'])) { + $this->setExpectedArgs($expectation, $args['args']); + } + + // set the expected return value based on a passed argument or return values for each call in order + if (isset($args['return_arg']) || isset($args['return_in_order'])) { + $args['return'] = $this->parseExpectedReturn($args); + } + + // set the expected return value of the function + if (isset($args['return'])) { + $this->setExpectedReturn($expectation, $args['return']); + } + + return $expectation; + } + + /** + * Sets the expected times a function should be called based on arguments. + * + * @param Mockery\Expectation|Mockery\CompositeExpectation $expectation + * @param int|string|mixed $times + * @return Mockery\Expectation|Mockery\CompositeExpectation + */ + protected function setExpectedTimes(&$expectation, $times) + { + if (is_int($times) || (is_string($times) && preg_match('/^\d+$/', $times))) { + /** @phpstan-ignore-next-line method exists */ + $expectation->times((int) $times); + } elseif (is_string($times)) { + if (preg_match('/^(\d+)([\-+])$/', $times, $matches)) { + $method = '+' === $matches[2] ? 'atLeast' : 'atMost'; + + $expectation->$method()->times((int) $matches[1]); + } elseif (preg_match('/^(\d+)-(\d+)$/', $times, $matches)) { + $num1 = (int) $matches[1]; + $num2 = (int) $matches[2]; + + if ($num1 === $num2) { + /** @phpstan-ignore-next-line method exists */ + $expectation->times($num1); + } else { + /** @phpstan-ignore-next-line method exists */ + $expectation->between(min($num1, $num2), max($num1, $num2)); + } + } + } + + return $expectation; + } + + /** + * Sets the expected arguments that a function should be called with. + * + * @param Mockery\Expectation|Mockery\CompositeExpectation $expectation + * @param mixed $args expected arguments passed to the function + * @return Mockery\Expectation|Mockery\CompositeExpectation + */ + protected function setExpectedArgs(&$expectation, $args) + { + $args = array_map(function ($argument) { + if ($argument instanceof Closure) { + return Mockery::on($argument); + } + + if ($argument === '*') { + return Mockery::any(); + } + + return $argument; + }, (array) $args); + + /** @phpstan-ignore-next-line method exists on expectation */ + call_user_func_array([$expectation, 'with'], $args); + + return $expectation; + } + + /** + * Parses arguments for setting the expectation `return` arg. + * + * @param array $args + * @return Closure|ReturnSequence|null + */ + protected function parseExpectedReturn(array $args) + { + $returnValue = null; + + if (isset($args['return_arg'])) { + /** @phpstan-ignore-next-line */ + $argPosition = max(true === $args['return_arg'] ? 0 : (int) $args['return_arg'], 0); + + // set the expected return value based on an argument passed to the function + $returnValue = function () use ($argPosition) { + if ($argPosition >= func_num_args()) { + return null; + } + + return func_get_arg($argPosition); + }; + } elseif (isset($args['return_in_order'])) { + // sets the return values for each call in order + $returnValue = new ReturnSequence(); + $returnValue->setReturnValues((array) $args['return_in_order']); + } + + return $returnValue; + } + + /** + * Sets the expected return value for the expectation. + * + * @param Mockery\Expectation $expectation + * @param Closure|ReturnSequence|mixed $return + * @return Mockery\Expectation + */ + protected function setExpectedReturn(&$expectation, $return) + { + if ($return instanceof ReturnSequence) { + $expectation->andReturnValues($return->getReturnValues()); + } elseif ($return instanceof Closure) { + $expectation->andReturnUsing($return); + } else { + $expectation->andReturn($return); + } + + return $expectation; + } + + /** + * Dynamically declares a function if it doesn't already exist. + * + * The declared function is namespace-aware. + * + * @param string $functionName function name + * @return void + * @throws InvalidArgumentException + */ + protected function generateFunction(string $functionName): void + { + $functionName = $this->sanitizeFunctionName($functionName); + + $this->validateFunctionName($functionName); + + $this->createFunction($functionName) or $this->replaceFunction($functionName); + } + + /** + * Creates a function using eval. + * + * @param string $functionName function name + * @return bool true if this function created the mock, false otherwise + */ + protected function createFunction(string $functionName): bool + { + if (in_array($functionName, self::$userMockedFunctions, true)) { + return true; + } + + if (function_exists($functionName)) { + return false; + } + + $parts = explode('\\', $functionName); + $name = array_pop($parts); + $namespace = empty($parts) ? '' : 'namespace '.implode('\\', $parts).';'.PHP_EOL; + + $declaration = <<patchworkFunctions, true)) { + return true; + } + + if (! function_exists('Patchwork\\replace')) { + return true; + } + + $this->patchworkFunctions[] = $functionName; + + \Patchwork\redefine($functionName, function () use ($functionName) { + return Handler::handleFunction($functionName, func_get_args()); + }); + + return true; + } + + /** + * Cleans a function name to be of a standard shape. + * + * Trims any namespace separators from the function name. + * + * @param string $functionName + * @return string + */ + protected function sanitizeFunctionName(string $functionName): string + { + return trim($functionName, '\\'); + } + + /** + * Validates a function name for format and other considerations. + * + * Validation will fail if not a valid function name, if it's an internal function, or if it is a reserved word in PHP. + * + * @param string $functionName + * @return void + * @throws InvalidArgumentException + */ + protected function validateFunctionName(string $functionName): void + { + if (function_exists($functionName)) { + if (empty($this->internalFunctions)) { + $definedFunctions = get_defined_functions(); + + $this->internalFunctions = $definedFunctions['internal']; + } + + if (in_array($functionName, $this->internalFunctions)) { + throw new InvalidArgumentException('Cannot override internal PHP functions!'); + } + } + + $parts = explode('\\', $functionName); + $name = array_pop($parts); + + if (! preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $functionName)) { + throw new InvalidArgumentException('Function name not properly formatted!'); + } + + $reservedWords = ' __halt_compiler abstract and array as break callable case catch class clone const continue declare default die do echo else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval exit extends final for foreach function global goto if implements include include_once instanceof insteadof interface isset list namespace new or print private protected public require require_once return static switch throw trait try unset use var while xor __CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ '; + + if (false !== strpos($reservedWords, " $name ")) { + throw new InvalidArgumentException('Function name cannot be a reserved word!'); + } + } + + /** + * Sets up an argument placeholder that allows it to be any of an enumerated list of possibilities. + * + * @return AnyOf + */ + public static function anyOf(): AnyOf + { + /** @phpstan-ignore-next-line */ + return call_user_func_array(['\\Mockery', 'anyOf'], func_get_args()); + } + + /** + * Sets up an argument placeholder that requires the argument to be of a certain type. + * + * This may be any type for which there is a "is_*" function, or any class or interface. + * + * @param string $expected + * @return Type + */ + public static function type(string $expected): Type + { + $type = Mockery::type($expected); + Filter::$objects[ $expected ] = spl_object_hash($type); + + return $type; + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/Functions/Handler.php b/vendor/10up/wp_mock/php/WP_Mock/Functions/Handler.php new file mode 100644 index 0000000..914c3ac --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/Functions/Handler.php @@ -0,0 +1,135 @@ +> + */ + private static array $handlers = []; + + /** + * Overrides any existing handlers to set a new callback. + * + * @param string|callable-string $function function name + * @param callable|callable-string|array $callback + * @return void + */ + public static function registerHandler(string $function, $callback): void + { + self::$handlers[$function] = $callback; + } + + /** + * Handles a mocked function call. + * + * @param string|callable-string $functionName function name + * @param array $args function arguments + * @return mixed|null + * @throws ExpectationFailedException + */ + public static function handleFunction(string $functionName, array $args = []) + { + if (self::handlerExists($functionName)) { + /** @var callable $callback */ + $callback = self::$handlers[$functionName]; + + return call_user_func_array($callback, $args); + } elseif (WP_Mock::strictMode()) { + throw new ExpectationFailedException(sprintf('No handler found for function %s', $functionName)); + } + + return null; + } + + /** + * Checks if a handler exists. + * + * @param string|callable-string $functionName + * @return bool + */ + public static function handlerExists(string $functionName): bool + { + return isset(self::$handlers[$functionName]); + } + + /** + * Clears all registered handlers. + * + * @return void + */ + public static function cleanup(): void + { + self::$handlers = []; + } + + /** + * Helper function for common passthru return functions. + * + * @param string $functionName function name + * @param array $args function args + * @return scalar + * @throws ExpectationFailedException + */ + public static function handlePredefinedReturnFunction(string $functionName, array $args = []) + { + $result = self::handleFunction($functionName, $args); + + if (! self::handlerExists($functionName)) { + $result = $args[0] ?? $result; + } + + /** @var scalar $result */ + return $result; + } + + /** + * Helper function for common echo functions. + * + * @param string $functionName function name + * @param array $args function arguments + * @return void + * @throws ExpectationFailedException + */ + public static function handlePredefinedEchoFunction(string $functionName, array $args = []): void + { + ob_start(); + + try { + self::handleFunction($functionName, $args); + } catch (Exception $exception) { + ob_end_clean(); + + /** @var ExpectationFailedException $exception */ + throw $exception; + } + + $result = ob_get_clean(); + + if (! is_string($result)) { + throw new ExpectationFailedException(sprintf('Function %s did not echo a valid string', $functionName)); + } + + if (! self::handlerExists($functionName)) { + /** @var scalar $result */ + $result = $args[0] ?? $result; + } + + echo $result; + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/Functions/ReturnSequence.php b/vendor/10up/wp_mock/php/WP_Mock/Functions/ReturnSequence.php new file mode 100644 index 0000000..50a412e --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/Functions/ReturnSequence.php @@ -0,0 +1,49 @@ + */ + private array $returnValues; + + /** + * Constructor to set up the return sequence object. + */ + public function __construct() + { + $this->returnValues = func_get_args(); + } + + /** + * Retrieve the $return_values array + * + * @return array + */ + public function getReturnValues(): array + { + return $this->returnValues; + } + + /** + * Set the return values. + * + * Values should be passed in as one array. Keys will be discarded. + * + * @param array|mixed $returnValues + */ + public function setReturnValues($returnValues): ReturnSequence + { + $this->returnValues = array_values((array) $returnValues); + + return $this; + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/Hook.php b/vendor/10up/wp_mock/php/WP_Mock/Hook.php new file mode 100644 index 0000000..7ca3a2e --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/Hook.php @@ -0,0 +1,142 @@ + collection of processors */ + protected $processors = []; + + /** @var array collection of objects mapped to their Type hashes */ + public static array $objects = []; + + /** + * Hook constructor. + * + * @param string $name hook name + */ + public function __construct(string $name) + { + $this->name = $name; + } + + /** + * Gets a string representation of a value. + * + * @param mixed $value + * @return string + */ + protected function safe_offset($value): string + { + if (null === $value) { + return 'null'; + } + + /** + * The following is to prevent a possible return mismatch when {@see Functions::type()} is used with `callable`, + * and to correctly create safe offsets for processors when expecting that a hook that uses a closure is added via {@see Functions::type(Closure::class)}. + */ + $closure = fn() => null; + if ($value instanceof Closure || Closure::class === $value || (is_string($value) && '' === strtoupper($value)) || ($value instanceof Type && $value->match($closure))){ + return '__CLOSURE__'; + } + + if (is_scalar($value)){ + return (string) $value; + } + + if ($value instanceof AnyInstance){ + return (string) $value; + } + + if (is_object($value)){ + if (! $value instanceof Type) { + $class = get_class($value); + + if (isset(static::$objects[$class]) && is_string(static::$objects[$class])) { + return static::$objects[$class]; + } + } + + return spl_object_hash($value); + } + + if (is_array($value)) { + $parsed = ''; + + foreach ($value as $k => $v) { + $k = is_numeric($k) ? '' : $k; + $parsed .= $k.$this->safe_offset($v); + } + + return $parsed; + } + + return ''; + } + + /** @return Action_Responder|Filter_Responder|HookedCallbackResponder */ + public function with() + { + $args = func_get_args(); + $responder = $this->new_responder(); + + if ($args === array( null )) { + $this->processors['argsnull'] = $responder; + } else { + $num_args = count($args); + + $processors = &$this->processors; + for ($i = 0; $i < $num_args - 1; $i ++) { + $arg = $this->safe_offset($args[ $i ]); + + if (! isset($processors[ $arg ])) { + $processors[ $arg ] = array(); + } + + $processors = &$processors[ $arg ]; + } + + $processors[ $this->safe_offset($args[ $num_args - 1 ]) ] = $responder; + } + + return $responder; + } + + abstract protected function new_responder(); + + /** + * Throws an exception if strict mode is on. + * + * @return void + * @throws ExpectationFailedException + */ + protected function strict_check(): void + { + if (WP_Mock::strictMode()) { + throw new ExpectationFailedException($this->get_strict_mode_message()); + } + } + + /** + * Gets the message to output when the strict mode exception is thrown. + * + * @return string + */ + abstract protected function get_strict_mode_message(); +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/HookedCallback.php b/vendor/10up/wp_mock/php/WP_Mock/HookedCallback.php new file mode 100644 index 0000000..441beb8 --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/HookedCallback.php @@ -0,0 +1,115 @@ +type = $type; + } + + public function react($callback, $priority, $argument_count) + { + \WP_Mock::addHook($this->name, $this->type); + + $safe_callback = $this->safe_offset($callback); + + if (is_array($callback)) { + $any_instance_callback = array( new AnyInstance($callback[0]), $callback[1] ); + $safe_any_instance_callback = $this->safe_offset($any_instance_callback); + if (! empty($this->processors[ $safe_any_instance_callback ])) { + $safe_callback = $safe_any_instance_callback; + } + } + + if ( + empty($this->processors[ $safe_callback ]) || + empty($this->processors[ $safe_callback ][ $priority ]) || + empty($this->processors[ $safe_callback ][ $priority ][ $argument_count ]) + ) { + $this->callback = $callback; + $this->strict_check(); + + return null; + } + + return $this->processors[ $safe_callback ][ $priority ][ $argument_count ]->react(); + } + + protected function new_responder() + { + return new HookedCallbackResponder(); + } + + /** + * Converts a callable to a string + * + * Closures get returned as 'Closure', objects (those with an __invoke() method get turned into ::__invoke, + * and arrays get turned into :: + * + * @param callable $callback + * + * @return string + */ + protected function callback_to_string($callback) + { + if (! is_string($callback)) { + if ($callback instanceof \Closure) { + $callback = 'Closure'; + } elseif (is_object($callback)) { + $callback = get_class($callback) . '::__invoke'; + } else { + $class = $callback[0]; + $method = $callback[1]; + if (! is_string($class)) { + $class = get_class($class); + } + $callback = "{$class}::$method"; + } + } + + return $callback; + } + + /** + * @param $callback + * + * @return string + */ + protected function get_strict_mode_message() + { + return sprintf( + 'Unexpected use of add_%s for action %s with callback %s', + $this->type, + $this->name, + $this->callback_to_string($this->callback) + ); + } +} + +class HookedCallbackResponder +{ + /** + * @var callable + */ + protected $callable; + + public function perform($callable) + { + $this->callable = $callable; + } + + public function react() + { + call_user_func($this->callable); + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/InvokedFilterValue.php b/vendor/10up/wp_mock/php/WP_Mock/InvokedFilterValue.php new file mode 100644 index 0000000..7517a6c --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/InvokedFilterValue.php @@ -0,0 +1,26 @@ +callback = $callable; + } + + public function __invoke() + { + return call_user_func_array($this->callback, func_get_args()); + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/Matcher/AnyInstance.php b/vendor/10up/wp_mock/php/WP_Mock/Matcher/AnyInstance.php new file mode 100644 index 0000000..1769714 --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/Matcher/AnyInstance.php @@ -0,0 +1,83 @@ +newInstanceWithoutConstructor(); + } elseif (is_object($expected)) { + $expectedInstance = $expected; + } else { + throw new MockeryException('AnyInstance matcher can only match objects!'); + } + + parent::__construct($expectedInstance); + } + + /** + * Checks if the actual value matches the expected. + * + * Actual passed by reference to preserve reference trail (where applicable) back to the original method parameter. + * + * @param mixed $actual + * @return bool + * @throws ReflectionException + */ + public function match(&$actual): bool + { + if (! is_object($actual)) { + return false; + } + + if ($actual instanceof Closure) { + return false; + } + + /** @phpstan-ignore-next-line */ + if (get_class($actual) === get_class($this->_expected)) { + return true; + } + + /** @phpstan-ignore-next-line parent::haveCommonAncestor() expects two objects */ + $reflectedExpected = new ReflectionClass($this->_expected); + $expectedInstance = $reflectedExpected->newInstanceWithoutConstructor(); + + if (! $this->haveCommonAncestor($actual, $expectedInstance)) { + return false; + } + + return true; + } + + /** + * Returns a string representation of this Matcher. + * + * @return string + */ + public function __toString(): string + { + /** @phpstan-ignore-next-line */ + $classname = get_class($this->_expected); + + return ""; + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/Matcher/FuzzyObject.php b/vendor/10up/wp_mock/php/WP_Mock/Matcher/FuzzyObject.php new file mode 100644 index 0000000..9b2762c --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/Matcher/FuzzyObject.php @@ -0,0 +1,119 @@ +haveCommonAncestor($actual, $this->_expected)) { + return false; + } + + $expectedProperties = is_object($this->_expected) ? get_object_vars($this->_expected) : []; + + foreach ($expectedProperties as $prop => $value) { + if (! isset($actual->$prop) || $value !== $actual->$prop) { + return false; + } + } + + $actual_keys = array_keys(get_object_vars($actual)); + $extra_actual = array_diff($actual_keys, array_keys($expectedProperties)); + + if (! empty($extra_actual)) { + return false; + } + + return true; + } + + /** + * Returns a string representation of this Matcher. + * + * @return string + */ + public function __toString(): string + { + $values = array_values(is_object($this->_expected) ? get_object_vars($this->_expected) : []); + $values = array_map(function ($value) { + if (! is_scalar($value)) { + if (is_array($value)) { + $value = 'Array'; + } elseif (is_object($value)) { + $value = get_class($value); + } elseif (is_resource($value)) { + $value = get_resource_type($value); + } else { + $value = 'unknown'; + } + } + return $value; + }, $values); + + return ''; + } + + /** + * Determines if two objects have a common ancestor. + * + * @param object|mixed $object1 + * @param object|mixed $object2 + * @return bool + */ + protected function haveCommonAncestor($object1, $object2): bool + { + if (! is_object($object1) || ! is_object($object2)) { + return false; + } + + $class1 = get_class($object1); + $class2 = get_class($object2); + + if ($class1 === $class2) { + return true; + } + + $class1parents = class_parents($class1) ?: []; + $class2parents = class_parents($class2) ?: []; + + return in_array($class1, $class2parents) || in_array($class2, $class1parents); + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/Tools/Constraints/ExpectationsMet.php b/vendor/10up/wp_mock/php/WP_Mock/Tools/Constraints/ExpectationsMet.php new file mode 100644 index 0000000..a2c0291 --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/Tools/Constraints/ExpectationsMet.php @@ -0,0 +1,69 @@ +mockery_verify(); + } catch (Exception $exception) { + $this->failureDescription = $exception->getMessage(); + + return false; + } + + return true; + } + + /** + * Returns a string representation of the object. + * + * @return string + */ + public function toString(): string + { + return 'WP_Mock expectations are met'; + } + + /** + * Gets the additional failure description. + * + * @param mixed $other + * @return string + */ + protected function additionalFailureDescription($other): string + { + return str_replace(["\r", "\n"], '', $this->failureDescription); + } + + /** + * Gets the failure description. + * + * @param mixed $other + * @return string + */ + protected function failureDescription($other): string + { + return $this->toString(); + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/Tools/Constraints/IsEqualHtml.php b/vendor/10up/wp_mock/php/WP_Mock/Tools/Constraints/IsEqualHtml.php new file mode 100644 index 0000000..0d0b525 --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/Tools/Constraints/IsEqualHtml.php @@ -0,0 +1,94 @@ +value = $value; + $this->delta = $delta; + $this->canonicalize = $canonicalize; + $this->ignoreCase = $ignoreCase; + } + + /** + * Trims and removes tabs, newlines and return carriages from a string. + * + * @param string $value + * @return string + */ + protected function clean(string $value): string + { + $value = preg_replace('/\n\s+/', '', $value) ?: ''; + $value = preg_replace('/\s\s+/', ' ', $value) ?: ''; + + return str_replace(array( "\r", "\n", "\t" ), '', $value); + } + + /** + * Evaluates the constraint for parameter $other. + * + * If $returnResult is false (default), an exception is thrown in case of a failure. null is returned otherwise. + * If $returnResult is true, the result of the evaluation is returned as a boolean instead, based on success or failure. + * + * @param string $other value to evaluate + * @param string $description message used in failures + * @param bool $returnResult whether to throw an exception in case of failure or return boolean + * @return bool|null + * @throws ExpectationFailedException + */ + public function evaluate($other, string $description = '', bool $returnResult = false): ?bool + { + $other = $this->clean($other); + $this->value = $this->clean($this->value); + + $isEqual = new IsEqual($this->value, $this->delta, $this->canonicalize, $this->ignoreCase); + $result = $isEqual->evaluate($other, $description, $returnResult); + + return $returnResult ? $result : null; + } + + /** + * Returns a string representation of the constraint. + * + * @see Constraint::toString() + * + * @return string + * @throws Exception + */ + public function toString(): string + { + $isEqual = new IsEqual($this->value, $this->delta, $this->canonicalize, $this->ignoreCase); + + return 'html '.$isEqual->toString(); + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/Tools/TestCase.php b/vendor/10up/wp_mock/php/WP_Mock/Tools/TestCase.php new file mode 100644 index 0000000..7a3e82b --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/Tools/TestCase.php @@ -0,0 +1,396 @@ + */ + protected $mockedStaticMethods = []; + + /** @var array */ + protected $__default_post = []; + + /** @var array */ + protected $__default_get = []; + + /** @var array */ + protected $__default_request = []; + + /** @var bool|callable */ + protected $__contentFilterCallback = false; + + /** @var array */ + protected $testFiles = []; + + /** + * Sets up the test case. + * + * This method is called before each test. + * + * @return void + * @throws Exception + */ + public function setUp(): void + { + $this->requireFileDependencies(); + + WP_Mock::setUp(); + + $_GET = (array) $this->__default_get; + $_POST = (array) $this->__default_post; + $_REQUEST = (array) $this->__default_request; + + $this->setUpContentFiltering(); + $this->cleanGlobals(); + } + + /** + * Require any test files that are defined in a subclass. + * + * This will only work if the WP_MOCK_INCLUDE_DIR is defined to point to the root directory you want to include files from. + * + * @return void + */ + protected function requireFileDependencies(): void + { + if (! empty($this->testFiles) && defined('WP_MOCK_INCLUDE_DIR')) { + foreach ($this->testFiles as $file) { + if (file_exists(WP_MOCK_INCLUDE_DIR.$file)) { + require_once(WP_MOCK_INCLUDE_DIR.$file); + } + } + } + } + + /** + * Tears down the test case. + * + * This method is called after each test. + */ + public function tearDown(): void + { + WP_Mock::tearDown(); + + $this->cleanGlobals(); + + $this->mockedStaticMethods = []; + $_GET = $_POST = $_REQUEST = []; + } + + /** + * Runs the test case and collects the results in a {@see TestResult} object. + * + * If no {@see TestResult} object is passed a new one will be created. + * + * @param TestResult|null $result + * @return TestResult + * @throws Exception + */ + public function run(TestResult $result = null): TestResult + { + if ($result === null) { + $result = $this->createResult(); + } + + WP_Mock::getDeprecatedMethodListener() + ->setTestResult($result) + ->setTestCase($this); + + return parent::run($result); + } + + /** + * Runs logic after every test. + * + * @after + * + * @return void + */ + public function after(): void + { + $this->checkDeprecatedCalls(); + } + + /** + * Checks for deprecated usage calls. + * + * This method is called after every test to check if any deprecated WP_Mock functions are used. + * + * @return void + */ + protected function checkDeprecatedCalls(): void + { + WP_Mock::getDeprecatedMethodListener()->checkCalls(); + WP_Mock::getDeprecatedMethodListener()->reset(); + } + + /** + * Cleans common WordPress globals that may have been used in between tests. + * + * @return void + */ + protected function cleanGlobals(): void + { + $commonGlobals = [ + 'post', + 'wp_query', + ]; + + foreach ($commonGlobals as $var) { + if (isset($GLOBALS[$var])) { + unset($GLOBALS[$var]); + } + } + } + + /** + * Sets up content filtering. + * + * @return void + * @throws Exception + */ + protected function setUpContentFiltering(): void + { + $this->__contentFilterCallback = false; + + $annotations = Test::parseTestMethodAnnotations( + static::class, + $this->getName(false) + ); + + if ( + ! isset($annotations['stripTabsAndNewlinesFromOutput']) || + $annotations['stripTabsAndNewlinesFromOutput'][0] !== 'disabled' || + ( + /** @phpstan-ignore-next-line */ + is_numeric($annotations['stripTabsAndNewlinesFromOutput'][0]) && + (int) $annotations['stripTabsAndNewlinesFromOutput'][0] !== 0 + ) + ) { + $this->__contentFilterCallback = [$this, 'stripTabsAndNewlines']; + $this->setOutputCallback($this->__contentFilterCallback); + } + } + + /** + * Strips tabs, newlines and carriage returns from a value. + * + * @internal may change to protected access in future versions + * @see TestCase::setUpContentFiltering() + * + * @param string|string[] $value + * @return string|string[] + */ + public function stripTabsAndNewlines($value) + { + return str_replace([ "\t", "\r", "\n"], '', $value); + } + + /** + * Asserts that all actions have been called. + * + * @return void + * @throws ExpectationFailedException|Exception + */ + public function assertActionsCalled(): void + { + $actionsNotAdded = $expectedActions = 0; + + try { + WP_Mock::assertActionsCalled(); + } catch (Exception $exception) { + $actionsNotAdded = 1; + $expectedActions = $exception->getMessage(); + } + + $this->assertEmpty($actionsNotAdded, (string) $expectedActions); + } + + /** + * Asserts that all hooks have been added. + * + * @return void + * @throws ExpectationFailedException|Exception + */ + public function assertHooksAdded(): void + { + $hooksNotAdded = $expectedHooks = 0; + + try { + WP_Mock::assertHooksAdded(); + } catch (Exception $exception) { + $hooksNotAdded = 1; + $expectedHooks = $exception->getMessage(); + } + + $this->assertEmpty($hooksNotAdded, (string) $expectedHooks); + } + + /** + * Asserts that the current test conditions have been met. + * + * @deprecated prefer {@see TestCase::assertConditionsMet()) + * + * @param string $message + * @return void + */ + public function assertCurrentConditionsMet(string $message = ''): void + { + $this->assertConditionsMet($message); + } + + /** + * Asserts that the current test conditions have been met. + * + * @param string $message + * @return void + */ + public function assertConditionsMet(string $message = ''): void + { + /** @phpstan-ignore-next-line it will never throw an exception */ + $this->assertThat(null, new ExpectationsMet(), $message); + } + + /** + * Evaluates that an HTML string is equal to another. + * + * @param string $expected + * @param string $actual + * @param string $message + * @return void + * @throws ExpectationFailedException|Exception + */ + public function assertEqualsHtml(string $expected, string $actual, string $message = ''): void + { + $constraint = new IsEqualHtml($expected); + + $this->assertThat($actual, $constraint, $message); + } + + /** + * Sets the expectation that a string will be output. + * + * @param string $expectedString + * @return void + * @throws InvalidArgumentException + */ + public function expectOutputString(string $expectedString): void + { + if (is_callable($this->__contentFilterCallback)) { + $expectedString = call_user_func($this->__contentFilterCallback, $expectedString); + } + + if (! is_string($expectedString)) { + throw new InvalidArgumentException(sprintf('%1$s expects string, %2$s passed from content filter callback.', __METHOD__, gettype($expectedString))); + } + + parent::expectOutputString($expectedString); + } + + /** + * Mocks a static method of a class. + * + * @param string $class the classname or class::method name + * @param null|string $method the method name (optional if class::method used for $class) + * @return Mockery\Expectation + * @throws InvalidArgumentException|RuntimeException|ReflectionException + */ + protected function mockStaticMethod(string $class, ?string $method = null) + { + if (! $method) { + [$class, $method] = (explode('::', $class) + [null, null]); + } + + if (! $method || ! $class) { + throw new InvalidArgumentException(sprintf('Could not mock %s::%s', $class, $method)); + } + + if (! WP_Mock::usingPatchwork() || ! function_exists('Patchwork\redefine')) { + throw new RuntimeException('Patchwork is not loaded! Please load patchwork before mocking static methods!'); + } + + $safeMethod = "wp_mock_safe_$method"; + $signature = md5("$class::$method"); + + if (! empty($this->mockedStaticMethods[$signature])) { + $mock = $this->mockedStaticMethods[$signature]; + } else { + $reflectionMethod = false; + + if (class_exists($class)) { + $reflectionMethod = new ReflectionMethod($class, $method); + } + + // throw an exception if method doesn't exist, is not static or has private access + if ($reflectionMethod && (! $reflectionMethod->isUserDefined() || ! $reflectionMethod->isStatic() || $reflectionMethod->isPrivate())) { + throw new InvalidArgumentException(sprintf('%s::%s is not a user-defined non-private static method!', $class, $method)); + } + + /** @var Mockery\Mock $mock */ + $mock = Mockery::mock($class); + $mock->shouldAllowMockingProtectedMethods(); + $this->mockedStaticMethods[$signature] = $mock; + + \Patchwork\redefine("$class::$method", function () use ($mock, $safeMethod) { + /** @phpstan-ignore-next-line */ + return call_user_func_array([$mock, $safeMethod], func_get_args()); + }); + } + + /** @phpstan-ignore-next-line return Expectation to make PhpStan happy */ + return $mock->shouldReceive($safeMethod); + } + + /** + * Returns a function namespaced with the current test class. + * + * @deprecated the purpose of this legacy method is not clear and may be removed in a future version of WP_Mock + * + * @param mixed $function + * @return string|mixed + */ + public function ns($function) + { + if (! is_string($function) || false !== strpos($function, '\\')) { + return $function; + } + + $thisClassName = trim(get_class($this), '\\'); + + if (! strpos($thisClassName, '\\')) { + return $function; + } + + // $thisNamespace is constructed by exploding the current class name on + // namespace separators, running array_slice on that array starting at 0 + // and ending one element from the end (chops the class name off) and + // imploding that using namespace separators as the glue. + $thisNamespace = implode('\\', array_slice(explode('\\', $thisClassName), 0, - 1)); + + return "$thisNamespace\\$function"; + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/Traits/AccessInaccessibleClassMembersTrait.php b/vendor/10up/wp_mock/php/WP_Mock/Traits/AccessInaccessibleClassMembersTrait.php new file mode 100644 index 0000000..fce05e9 --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/Traits/AccessInaccessibleClassMembersTrait.php @@ -0,0 +1,118 @@ +getMethod($methodName); + $method->setAccessible(true); + + return $method; + } + + /** + * Invokes the given inaccessible method on the given class. + * + * @param object $class the class name or instance to call against + * @param string $methodName the method name to call + * @param mixed ...$args arguments to pass to the invoked method + * @return mixed + * @throws ReflectionException + */ + public function invokeInaccessibleMethod(object $class, string $methodName, ...$args) + { + return $this->getInaccessibleMethod($class, $methodName)->invoke($class, ...$args); + } + + /** + * Gets the given inaccessible property for the given class. + * + * Allows for calling protected and private properties on a class. + * + * @param class-string|object $class the class name or instance + * @param string $propertyName the property name + * @return ReflectionProperty + * @throws ReflectionException + */ + public function getInaccessibleProperty($class, string $propertyName): ReflectionProperty + { + $class = new ReflectionClass($class); + + $property = $class->getProperty($propertyName); + $property->setAccessible(true); + + return $property; + } + + /** + * Gets the given inaccessible property value for the given class. + * + * Allows for calling protected and private properties on a class. + * + * @param object $class the class name or instance + * @param string $property the property name + * @return mixed the property value + * @throws ReflectionException + */ + public function getInaccessiblePropertyValue(object $class, string $property) + { + return $this->getInaccessibleProperty($class, $property)->getValue($class); + } + + /** + * Allows for setting private or protected properties in a class. + * + * @param object|null $instance class instance or null for static classes + * @param class-string $class + * @param string $property + * @param mixed $value + * @return ReflectionProperty + * @throws ReflectionException + */ + public function setInaccessibleProperty($instance, string $class, string $property, $value): ReflectionProperty + { + $class = new ReflectionClass($class); + + $property = $class->getProperty($property); + $property->setAccessible(true); + $property->setValue($instance, $value); + + return $property; + } + + /** + * Sets a private or protected property on a class. + * + * @param object $instance class instance + * @param string $property the property to set + * @param mixed $value the value to set on the property + * @return ReflectionProperty + * @throws ReflectionException + */ + public function setInaccessiblePropertyValue(object $instance, string $property, $value) : ReflectionProperty + { + return $this->setInaccessibleProperty($instance, get_class($instance), $property, $value); + } +} diff --git a/vendor/10up/wp_mock/php/WP_Mock/Traits/MockWordPressObjectsTrait.php b/vendor/10up/wp_mock/php/WP_Mock/Traits/MockWordPressObjectsTrait.php new file mode 100644 index 0000000..155d159 --- /dev/null +++ b/vendor/10up/wp_mock/php/WP_Mock/Traits/MockWordPressObjectsTrait.php @@ -0,0 +1,74 @@ + $postData optional post data to add to the post + * @return Mockery\LegacyMockInterface&Mockery\MockInterface + */ + protected function mockPost(array $postData = []) + { + /** @var Mockery\LegacyMockInterface&Mockery\MockInterface $post */ + $post = Mockery::mock(WP_Post::class); + + $postData = array_merge([ + 'ID' => 0, + 'post_author' => 0, + 'post_type' => '', + 'post_title' => '', + 'post_date' => '', + 'post_date_gmt' => '', + 'post_content' => '', + 'post_excerpt' => '', + 'post_status' => '', + 'comment_status' => '', + 'ping_status' => '', + 'post_password' => '', + 'post_parent' => 0, + 'post_modified' => '', + 'post_modified_gmt' => '', + 'comment_count' => 0, + 'menu_order' => 0, + ], (array) $postData); + + array_walk($postData, function ($value, $prop) use ($post) { + /** @phpstan-ignore-next-line */ + $post->$prop = $value; + }); + + return $post; + } + + /** + * Mocks a WordPress instance. + * + * @param array $queryVars + * @return WP&LegacyMockInterface&MockInterface + */ + protected function mockWp(array $queryVars = []) + { + /** @var WP&Mockery\LegacyMockInterface&Mockery\MockInterface $wp */ + $wp = Mockery::mock(WP::class); + /** @phpstan-ignore-next-line */ + $wp->query_vars = $queryVars; + + return $wp; + } +} diff --git a/vendor/antecedent/patchwork/LICENSE b/vendor/antecedent/patchwork/LICENSE new file mode 100644 index 0000000..d1ccb7a --- /dev/null +++ b/vendor/antecedent/patchwork/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2010-2018 Ignas Rudaitis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/antecedent/patchwork/Patchwork.php b/vendor/antecedent/patchwork/Patchwork.php new file mode 100644 index 0000000..485117a --- /dev/null +++ b/vendor/antecedent/patchwork/Patchwork.php @@ -0,0 +1,144 @@ + + * @copyright 2010-2023 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork; + +if (function_exists('Patchwork\replace')) { + return; +} + +require_once __DIR__ . '/src/Exceptions.php'; +require_once __DIR__ . '/src/CallRerouting.php'; +require_once __DIR__ . '/src/CodeManipulation.php'; +require_once __DIR__ . '/src/Utils.php'; +require_once __DIR__ . '/src/Stack.php'; +require_once __DIR__ . '/src/Config.php'; + +function redefine($subject, callable $content) +{ + $handle = null; + foreach (array_slice(func_get_args(), 1) as $content) { + $handle = CallRerouting\connect($subject, $content, $handle); + } + $handle->silence(); + return $handle; +} + +function relay(?array $args = null) +{ + return CallRerouting\relay($args); +} + +function fallBack() +{ + throw new Exceptions\NoResult; +} + +function restore(CallRerouting\Handle $handle) +{ + $handle->expire(); +} + +function restoreAll() +{ + CallRerouting\disconnectAll(); +} + +function silence(CallRerouting\Handle $handle) +{ + $handle->silence(); +} + +function assertEventuallyDefined(CallRerouting\Handle $handle) +{ + $handle->unsilence(); +} + +function getClass() +{ + return Stack\top('class'); +} + +function getCalledClass() +{ + return Stack\topCalledClass(); +} + +function getFunction() +{ + return Stack\top('function'); +} + +function getMethod() +{ + return getClass() . '::' . getFunction(); +} + +function configure() +{ + Config\locate(); +} + +function hasMissed($callable) +{ + return Utils\callableWasMissed($callable); +} + +function always($value) +{ + return function() use ($value) { + return $value; + }; +} + +Utils\alias('Patchwork', [ + 'redefine' => ['replace', 'replaceLater'], + 'relay' => 'callOriginal', + 'fallBack' => 'pass', + 'restore' => 'undo', + 'restoreAll' => 'undoAll', +]); + +configure(); + +Utils\markMissedCallables(); + +CodeManipulation\Stream::discoverOtherWrapper(); +CodeManipulation\Stream::wrap(); + +CodeManipulation\register([ + CodeManipulation\Actions\CodeManipulation\propagateThroughEval(), + CodeManipulation\Actions\CallRerouting\injectCallInterceptionCode(), + CodeManipulation\Actions\RedefinitionOfInternals\spliceNamedFunctionCalls(), + CodeManipulation\Actions\RedefinitionOfInternals\spliceDynamicCalls(), + CodeManipulation\Actions\RedefinitionOfNew\spliceAllInstantiations, + CodeManipulation\Actions\RedefinitionOfNew\publicizeConstructors, + CodeManipulation\Actions\ConflictPrevention\preventImportingOtherCopiesOfPatchwork(), +]); + +CodeManipulation\onImport([ + CodeManipulation\Actions\CallRerouting\markPreprocessedFiles(), +]); + +Utils\clearOpcodeCaches(); + +register_shutdown_function('Patchwork\Utils\clearOpcodeCaches'); + +CallRerouting\createStubsForInternals(); +CallRerouting\connectDefaultInternals(); + +require __DIR__ . '/src/Redefinitions/LanguageConstructs.php'; + +CodeManipulation\register([ + CodeManipulation\Actions\RedefinitionOfLanguageConstructs\spliceAllConfiguredLanguageConstructs(), + CodeManipulation\Actions\CallRerouting\injectQueueDeploymentCode(), + CodeManipulation\Actions\CodeManipulation\injectStreamWrapperReinstatementCode(), +]); + +if (Utils\wasRunAsConsoleApp()) { + require __DIR__ . '/src/Console.php'; +} diff --git a/vendor/antecedent/patchwork/README.md b/vendor/antecedent/patchwork/README.md new file mode 100644 index 0000000..8352b85 --- /dev/null +++ b/vendor/antecedent/patchwork/README.md @@ -0,0 +1,41 @@ +# Patchwork + +Patchwork implements the redefinition ([monkey-patching](https://en.wikipedia.org/wiki/Monkey_patch)) of functions and methods in PHP. This includes both user-defined and internal callables, which can be functions, class methods, or instance methods. In addition, [many](https://github.com/antecedent/patchwork/blob/master/src/Redefinitions/LanguageConstructs.php) function-like constructs, such as `exit` or `include`, are supported in an analogous way. + +Internally, Patchwork uses a [stream wrapper](http://php.net/manual/en/class.streamwrapper.php) on `file://`. In the case of user-defined functions and methods, it is used to inject a simple interceptor snippet to the beginning of every such callable. For the remaining types of callables, various other strategies are applied. + +## Example: a DIY profiler + +```php +use function Patchwork\{redefine, relay, getMethod}; + +$profiling = fopen('profiling.csv', 'w'); + +redefine('App\*', function(...$args) use ($profiling) { + $begin = microtime(true); + relay(); # calls the original definition + $end = microtime(true); + fputcsv($profiling, [getMethod(), $end - $begin]); +}); +``` + +## Notes + +* *Method redefinition* is the internally preferred metaphor for Patchwork's behavior. +* `restoreAll()` and `restore($handle)` end the lifetime of, respectively, all redefinitions, or only one of them, where `$handle = redefine(...)`. +* Closure `$this` is automatically re-bound to the enclosing class of the method being redefined. +* The behavior of `__CLASS__`, `static::class` etc. inside redefinitions disregards the metaphor. `getClass()`, `getCalledClass()`, `getMethod()` and `getFunction()` from the `Patchwork` namespace should be used instead. + +## Testing-related uses + +Patchwork can be used to stub static methods, which, however, is a controversial practice. + +It should be applied prudently, that is, only after making oneself familiar with its pitfalls and temptations in other programming languages. For instance, in Javascript, Ruby, Python and some others, the native support for monkey-patching has made its testing-related uses more commonplace than in PHP. + +Tests that use monkey-patching are often no longer *unit* tests, because they become sensitive to details of implementation, not only those of interface: for example, such a test might no longer pass after switching from `time()` to `DateTime`. + +That being said, they still have their place where the only economically viable alternative is having no tests at all. + +## Other use cases + +Patchwork is not suggested for [AOP](https://en.wikipedia.org/wiki/Aspect-oriented_programming) and other kinds of production usage. Its impact on the application's performance is highly likely to be prohibitively large. Additionally, while no _particular_ Patchwork-related security risks are either known or anticipated, please keep in mind that Patchwork was never developed with production environments in mind. diff --git a/vendor/antecedent/patchwork/box.json b/vendor/antecedent/patchwork/box.json new file mode 100644 index 0000000..9dc3317 --- /dev/null +++ b/vendor/antecedent/patchwork/box.json @@ -0,0 +1,17 @@ +{ + "base-path": null, + "output": "patchwork.phar", + "check-requirements": false, + "compactors": [ + "KevinGH\\Box\\Compactor\\Php" + ], + "main": "Patchwork.php", + "directories": [ + "src" + ], + "files": [ + "Patchwork.php", + "LICENSE" + ], + "dump-autoload": false +} diff --git a/vendor/antecedent/patchwork/composer.json b/vendor/antecedent/patchwork/composer.json new file mode 100644 index 0000000..5d54aa8 --- /dev/null +++ b/vendor/antecedent/patchwork/composer.json @@ -0,0 +1,20 @@ +{ + "name": "antecedent/patchwork", + "homepage": "https://antecedent.github.io/patchwork/", + "description": "Method redefinition (monkey-patching) functionality for PHP.", + "keywords": ["testing", "redefinition", "runkit", "monkeypatching", "interception", "aop", "aspect"], + "license": "MIT", + "authors": [ + { + "name": "Ignas Rudaitis", + "email": "ignas.rudaitis@gmail.com" + } + ], + "minimum-stability": "stable", + "require": { + "php": ">=7.1.0" + }, + "require-dev": { + "phpunit/phpunit": ">=4" + } +} diff --git a/vendor/antecedent/patchwork/src/CallRerouting.php b/vendor/antecedent/patchwork/src/CallRerouting.php new file mode 100644 index 0000000..c1fbff9 --- /dev/null +++ b/vendor/antecedent/patchwork/src/CallRerouting.php @@ -0,0 +1,611 @@ + + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\CallRerouting; + +require __DIR__ . '/CallRerouting/Handle.php'; +require __DIR__ . '/CallRerouting/Decorator.php'; + +use Patchwork\Utils; +use Patchwork\Stack; +use Patchwork\Config; +use Patchwork\Exceptions; +use Patchwork\CodeManipulation; +use Patchwork\CodeManipulation\Actions\RedefinitionOfLanguageConstructs; +use Patchwork\CodeManipulation\Actions\RedefinitionOfNew; + +const INTERNAL_REDEFINITION_NAMESPACE = 'Patchwork\Redefinitions'; +const EVALUATED_CODE_FILE_NAME_SUFFIX = '/\(\d+\) : eval\(\)\'d code$/'; +const INSTANTIATOR_NAMESPACE = 'Patchwork\Instantiators'; +const INSTANTIATOR_DEFAULT_ARGUMENT = 'Patchwork\CallRerouting\INSTANTIATOR_DEFAULT_ARGUMENT'; + +const INTERNAL_STUB_CODE = ' + namespace @ns_for_redefinitions; + function @name(@signature) { + $__pwArgs = \array_slice(\debug_backtrace()[0]["args"], 1); + if (!empty($__pwNamespace) && \function_exists($__pwNamespace . "\\\\@name")) { + return \call_user_func_array($__pwNamespace . "\\\\@name", $__pwArgs); + } + @interceptor; + return \call_user_func_array("@name", $__pwArgs); + } +'; + +const INSTANTIATOR_CODE = ' + namespace @namespace; + class @instantiator { + function instantiate(@parameters) { + $__pwArgs = \debug_backtrace()[0]["args"]; + foreach ($__pwArgs as $__pwOffset => $__pwValue) { + if ($__pwValue === \Patchwork\CallRerouting\INSTANTIATOR_DEFAULT_ARGUMENT) { + unset($__pwArgs[$__pwOffset]); + } + } + switch (count($__pwArgs)) { + case 0: + return new \@class; + case 1: + return new \@class($__pwArgs[0]); + case 2: + return new \@class($__pwArgs[0], $__pwArgs[1]); + case 3: + return new \@class($__pwArgs[0], $__pwArgs[1], $__pwArgs[2]); + case 4: + return new \@class($__pwArgs[0], $__pwArgs[1], $__pwArgs[2], $__pwArgs[3]); + case 5: + return new \@class($__pwArgs[0], $__pwArgs[1], $__pwArgs[2], $__pwArgs[3], $__pwArgs[4]); + default: + $__pwReflector = new \ReflectionClass(\'@class\'); + return $__pwReflector->newInstanceArgs($__pwArgs); + } + } + } +'; + +function connect($source, callable $target, ?Handle $handle = null, $partOfWildcard = false) +{ + $source = translateIfLanguageConstruct($source); + $handle = $handle ?: new Handle; + list($class, $method) = Utils\interpretCallable($source); + if (constitutesWildcard($source)) { + return applyWildcard($source, $target, $handle); + } + if (Utils\isOwnName($class) || Utils\isOwnName($method)) { + return $handle; + } + validate($source, $partOfWildcard); + if (empty($class)) { + if (Utils\callableDefined($source) && (new \ReflectionFunction($method))->isInternal()) { + $stub = INTERNAL_REDEFINITION_NAMESPACE . '\\' . $source; + return connect($stub, $target, $handle, $partOfWildcard); + } + $handle = connectFunction($method, $target, $handle); + } else { + if (Utils\callableDefined($source)) { + if ($method === 'new') { + $handle = connectInstantiation($class, $target, $handle); + } elseif ((new \ReflectionMethod($class, $method))->isUserDefined()) { + $handle = connectMethod($source, $target, $handle); + } else { + throw new InternalMethodsNotSupported($source); + } + } else { + $handle = queueConnection($source, $target, $handle); + } + } + attachExistenceAssertion($handle, $source); + return $handle; +} + +function constitutesWildcard($source) +{ + $source = Utils\interpretCallable($source); + $source = Utils\callableToString($source); + return strcspn($source, '*{,}') != strlen($source); +} + +function applyWildcard($wildcard, callable $target, ?Handle $handle = null) +{ + $handle = $handle ?: new Handle; + list($class, $method, $instance) = Utils\interpretCallable($wildcard); + if (!empty($instance)) { + foreach (Utils\matchWildcard($method, get_class_methods($instance)) as $item) { + if (!$handle->hasTag($item)) { + connect([$instance, $item], $target, $handle); + $handle->tag($item); + } + } + return $handle; + } + + $callables = Utils\matchWildcard($wildcard, Utils\getRedefinableCallables()); + foreach ($callables as $callable) { + if (!inPreprocessedFile($callable) || $handle->hasTag($callable)) { + continue; + } + if (function_exists($callable)) { + # Restore lower/upper case distinction + $callable = (new \ReflectionFunction($callable))->getName(); + } + connect($callable, $target, $handle, true); + $handle->tag($callable); + } + if (!isset($class) || !class_exists($class, false)) { + queueConnection($wildcard, $target, $handle); + } + return $handle; +} + +function attachExistenceAssertion(Handle $handle, $function) +{ + $handle->addExpirationHandler(function() use ($function) { + if (!Utils\callableDefined($function)) { + # Not using exceptions because this might happen during PHP shutdown + $message = '%s() was never defined during the lifetime of its redefinition'; + trigger_error(sprintf($message, Utils\callableToString($function)), E_USER_WARNING); + } + }); +} + +function validate($function, $partOfWildcard = false) +{ + list($class, $method) = Utils\interpretCallable($function); + if (!Utils\callableDefined($function) || $method === 'new') { + return; + } + $reflection = Utils\reflectCallable($function); + $name = Utils\callableToString($function); + if ($reflection->isInternal() && !in_array($name, Config\getRedefinableInternals())) { + throw new Exceptions\NotUserDefined($function); + } + if (!$reflection->isInternal() && !inPreprocessedFile($function) && !$partOfWildcard) { + throw new Exceptions\DefinedTooEarly($function); + } +} + +function inPreprocessedFile($callable) +{ + if (Utils\isOwnName(Utils\callableToString($callable))) { + return false; + } + $file = Utils\reflectCallable($callable)->getFileName(); + $evaluated = preg_match(EVALUATED_CODE_FILE_NAME_SUFFIX, $file); + return $evaluated || !empty(State::$preprocessedFiles[$file]); +} + +function connectFunction($function, callable $target, ?Handle $handle = null) +{ + $handle = $handle ?: new Handle; + $routes = &State::$routes[''][$function]; + $offset = Utils\append($routes, [$target, $handle]); + $handle->addReference($routes[$offset]); + return $handle; +} + +function queueConnection($source, callable $target, ?Handle $handle = null) +{ + $handle = $handle ?: new Handle; + $offset = Utils\append(State::$queue, [$source, $target, $handle]); + $handle->addReference(State::$queue[$offset]); + return $handle; +} + +function deployQueue() +{ + foreach (State::$queue as $offset => $item) { + if (empty($item)) { + unset(State::$queue[$offset]); + continue; + } + list($source, $target, $handle) = $item; + if (Utils\callableDefined($source) || constitutesWildcard($source)) { + connect($source, $target, $handle); + unset(State::$queue[$offset]); + } + } +} + +function connectMethod($function, callable $target, ?Handle $handle = null) +{ + $handle = $handle ?: new Handle; + list($class, $method, $instance) = Utils\interpretCallable($function); + $target = new Decorator($target); + $target->superclass = $class; + $target->method = $method; + $target->instance = $instance; + $reflection = Utils\reflectCallable($function); + $declaringClass = $reflection->getDeclaringClass(); + $class = $declaringClass->getName(); + $aliases = $declaringClass->getTraitAliases(); + if (isset($aliases[$method])) { + list($trait, $method) = explode('::', $aliases[$method]); + } + $routes = &State::$routes[$class][$method]; + $offset = Utils\append($routes, [$target, $handle]); + $handle->addReference($routes[$offset]); + return $handle; +} + +function connectInstantiation($class, callable $target, ?Handle $handle = null) +{ + if (!Config\isNewKeywordRedefinable()) { + throw new Exceptions\NewKeywordNotRedefinable; + } + $handle = $handle ?: new Handle; + $class = strtr($class, ['\\' => '__']); + $routes = &State::$routes["Patchwork\\Instantiators\\$class"]['instantiate']; + $offset = Utils\append($routes, [$target, $handle]); + $handle->addReference($routes[$offset]); + return $handle; +} + +function disconnectAll() +{ + foreach (State::$routes as $class => $routesByClass) { + foreach ($routesByClass as $method => $routes) { + foreach ($routes as $route) { + list($callback, $handle) = $route; + if ($handle !== null) { + $handle->expire(); + } + } + } + } + State::$routes = []; + connectDefaultInternals(); +} + +function dispatchTo(callable $target) +{ + return call_user_func_array($target, Stack\top('args')); +} + +function dispatch($class, $calledClass, $method, $frame, &$result, ?array $args = null) +{ + $trace = debug_backtrace(); + $isInternalStub = strpos($method, INTERNAL_REDEFINITION_NAMESPACE) === 0; + $isLanguageConstructStub = strpos($method, RedefinitionOfLanguageConstructs\LANGUAGE_CONSTRUCT_PREFIX) === 0; + $isInstantiator = strpos($method, INSTANTIATOR_NAMESPACE) === 0; + if ($isInternalStub && !$isLanguageConstructStub && $args === null) { + # Mind the namespace-of-origin argument + $args = array_reverse($trace)[$frame - 1]['args']; + array_shift($args); + } + if ($isInstantiator) { + $args = $args ?: array_reverse($trace)[$frame - 1]['args']; + foreach ($args as $offset => $value) { + if ($value === INSTANTIATOR_DEFAULT_ARGUMENT) { + unset($args[$offset]); + } + } + } + $success = false; + Stack\pushFor($frame, $calledClass, function() use ($class, $method, &$result, &$success) { + foreach (getRoutesFor($class, $method) as $offset => $route) { + if (empty($route)) { + unset(State::$routes[$class][$method][$offset]); + continue; + } + State::$routeStack[] = [$class, $method, $offset]; + try { + $result = dispatchTo(reset($route)); + $success = true; + } catch (Exceptions\NoResult $e) { + array_pop(State::$routeStack); + continue; + } + array_pop(State::$routeStack); + if ($success) { + break; + } + } + }, $args); + return $success; +} + +function relay(?array $args = null) +{ + list($class, $method, $offset) = end(State::$routeStack); + $class = $class ?? ''; + $method = $method ?? ''; + $offset = $offset ?? ''; + + $route = &State::$routes[$class][$method][$offset]; + $backup = $route; + $route = ['Patchwork\fallBack', new Handle]; + $top = Stack\top(); + if ($args === null) { + $args = $top['args']; + } + $isInternalStub = strpos($method, INTERNAL_REDEFINITION_NAMESPACE) === 0; + $isLanguageConstructStub = strpos($method, RedefinitionOfLanguageConstructs\LANGUAGE_CONSTRUCT_PREFIX) === 0; + if ($isInternalStub && !$isLanguageConstructStub) { + array_unshift($args, ''); + } + try { + if (isset($top['class'])) { + $reflection = new \ReflectionMethod(Stack\topCalledClass(), $top['function']); + (\PHP_VERSION_ID < 80100) && $reflection->setAccessible(true); + $result = $reflection->invokeArgs(Stack\top('object'), $args); + } else { + $result = call_user_func_array($top['function'], $args); + } + } catch (\Exception $e) { + $exception = $e; + } + $route = $backup; + if (isset($exception)) { + throw $exception; + } + return $result; +} + +/** + * @deprecated 2.2.0 + */ +function connectOnHHVM($function, Handle $handle) +{ + fb_intercept($function, function($name, $obj, $args, $data, &$done) { + deployQueue(); + list($class, $method) = Utils\interpretCallable($name); + $calledClass = null; + if (is_string($obj)) { + $calledClass = $obj; + } elseif (is_object($obj)) { + $calledClass = get_class($obj); + } + $frame = count(debug_backtrace(0)) - 1; + $result = null; + $done = dispatch($class, $calledClass, $method, $frame, $result, $args); + return $result; + }); + $handle->addExpirationHandler(getHHVMExpirationHandler($function)); +} + +/** + * @deprecated 2.2.0 + */ +function getHHVMExpirationHandler($function) +{ + return function() use ($function) { + list($class, $method) = Utils\interpretCallable($function); + $empty = true; + foreach (getRoutesFor($class, $method) as $offset => $route) { + if (!empty($route)) { + $empty = false; + break; + } else { + unset(State::$routes[$class][$method][$offset]); + } + } + if ($empty) { + fb_intercept($function, null); + } + }; +} + +function getRoutesFor($class, $method) +{ + $class = $class ?? ''; + $method = $method ?? ''; + + if (!isset(State::$routes[$class][$method])) { + return []; + } + return array_reverse(State::$routes[$class][$method], true); +} + +function dispatchDynamic($callable, array $arguments) +{ + list($class, $method) = Utils\interpretCallable($callable); + $translation = INTERNAL_REDEFINITION_NAMESPACE . '\\' . $method; + if ($class === null && function_exists($translation)) { + $callable = $translation; + # Mind the namespace-of-origin argument + array_unshift($arguments, ''); + } + return call_user_func_array($callable, $arguments); +} + +function createStubsForInternals() +{ + $namespace = INTERNAL_REDEFINITION_NAMESPACE; + foreach (Config\getRedefinableInternals() as $name) { + if (function_exists($namespace . '\\' . $name)) { + continue; + } + $signature = ['$__pwNamespace']; + foreach ((new \ReflectionFunction($name))->getParameters() as $offset => $argument) { + $formal = ''; + if ($argument->isPassedByReference()) { + $formal .= '&'; + } + $formal .= '$' . $argument->getName(); + $isVariadic = is_callable([$argument, 'isVariadic']) ? $argument->isVariadic() : false; + if ($argument->isOptional() || $isVariadic || ($name === 'define' && $offset === 2)) { + continue; + } + $signature[] = $formal; + } + $refs = sprintf('[%s]', join(', ', $signature)); + $interceptor = sprintf( + str_replace( + '$__pwRefOffset = 0;', + '$__pwRefOffset = 1;', + \Patchwork\CodeManipulation\Actions\CallRerouting\CALL_INTERCEPTION_CODE + ), + $refs + ); + eval(strtr(INTERNAL_STUB_CODE, [ + '@name' => $name, + '@signature' => join(', ', $signature), + '@interceptor' => $interceptor, + '@ns_for_redefinitions' => INTERNAL_REDEFINITION_NAMESPACE, + ])); + } +} + +/** + * This is needed, for instance, to intercept the time() call in call_user_func('time'). + * + * For that to happen, we require that if at least one internal function is redefinable, then + * call_user_func, preg_replace_callback and other callback-taking internal functions also be + * redefinable: see Patchwork\Config. + * + * Here, we go through the callback-taking internals and add argument-inspecting patches + * (redefinitions) to them. + * + * The patches are then expected to find the "nested" internal calls, such as the 'time' argument + * in call_user_func('time'), and invoke their respective redefinitions, if any. + */ +function connectDefaultInternals() +{ + # call_user_func() etc. are not a problem if no other internal functions are redefined + if (Config\getRedefinableInternals() === []) { + return; + } + foreach (Config\getDefaultRedefinableInternals() as $function) { + # Which arguments are callbacks? Store their offsets in the following array. + $offsets = []; + foreach ((new \ReflectionFunction($function))->getParameters() as $offset => $argument) { + $name = $argument->getName(); + if (strpos($name, 'call') !== false || strpos($name, 'func') !== false) { + $offsets[] = $offset; + } + } + connect($function, function() use ($function, $offsets) { + # This is the argument-inspecting patch. + $args = Stack\top('args'); + $caller = Stack\all()[1]; + foreach ($offsets as $offset) { + # Callback absent + if (!isset($args[$offset])) { + continue; + } + $callable = $args[$offset]; + # Callback is a closure => definitely not internal + if ($callable instanceof \Closure) { + continue; + } + list($class, $method, $instance) = Utils\interpretCallable($callable); + if (empty($class)) { + # Callback is global function, which might be internal too. + $args[$offset] = function() use ($callable) { + return dispatchDynamic($callable, func_get_args()); + }; + } + # Callback involves a class => not internal either, since the only internals that + # Patchwork can handle as of 2.0 are global functions. + # However, we must handle all kinds of opaque access here too, such as self:: and + # private methods, because we're actually patching a stub (see INTERNAL_STUB_CODE) + # and not directly call_user_func itself (or usort, or any other of those). + # We must compensate for scope that is lost, and that callback-taking functions + # can make use of. + if (!empty($class)) { + if ($class === 'self' || $class === 'static' || $class === 'parent') { + # We do not discriminate between early and late static binding here: FIXME. + $actualClass = $caller['class']; + if ($class === 'parent') { + $actualClass = get_parent_class($actualClass); + } + $class = $actualClass; + } + + # When calling a parent constructor, the reference to the object being + # constructed needs to be extracted from the stack info. + # Also turned out to be necessary to solve this, without any parent + # constructors involved: https://github.com/antecedent/patchwork/issues/99 + if (is_null($instance) && isset($caller['object'])) { + $instance = $caller['object']; + } + try { + $reflection = new \ReflectionMethod($class, $method); + (\PHP_VERSION_ID < 80100) && $reflection->setAccessible(true); + $args[$offset] = function() use ($reflection, $instance) { + return $reflection->invokeArgs($instance, func_get_args()); + }; + } catch (\ReflectionException $e) { + # If it's an invalid callable, then just prevent the unexpected propagation + # of ReflectionExceptions. + } + } + } + # Give the inspected arguments back to the *original* definition of the + # callback-taking function, e.g. \array_map(). This works given that the + # present patch is the innermost. + return call_user_func_array($function, $args); + }); + } +} + +/** + * @since 2.0.5 + * + * As of version 2.0.5, this is used to accommodate language constructs + * (echo, eval, exit and others) within the concept of callable. + */ +function translateIfLanguageConstruct($callable) +{ + if (!is_string($callable)) { + return $callable; + } + if (in_array($callable, Config\getRedefinableLanguageConstructs())) { + return RedefinitionOfLanguageConstructs\LANGUAGE_CONSTRUCT_PREFIX . $callable; + } elseif (in_array($callable, Config\getSupportedLanguageConstructs())) { + throw new Exceptions\NotUserDefined($callable); + } else { + return $callable; + } +} + +function resolveClassToInstantiate($class, $calledClass) +{ + $pieces = explode('\\', $class); + $last = array_pop($pieces); + if (in_array($last, ['self', 'static', 'parent'])) { + $frame = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3)[2]; + if ($last == 'self') { + $class = $frame['class']; + } elseif ($last == 'parent') { + $class = get_parent_class($frame['class']); + } elseif ($last == 'static') { + $class = $calledClass; + } + } + return ltrim($class, '\\'); +} + +function getInstantiator($class, $calledClass) +{ + $namespace = INSTANTIATOR_NAMESPACE; + $class = resolveClassToInstantiate($class, $calledClass); + $adaptedName = strtr($class, ['\\' => '__']); + if (!class_exists("$namespace\\$adaptedName")) { + $constructor = (new \ReflectionClass($class))->getConstructor(); + list($parameters, $arguments) = Utils\getParameterAndArgumentLists($constructor); + $code = strtr(INSTANTIATOR_CODE, [ + '@namespace' => INSTANTIATOR_NAMESPACE, + '@instantiator' => $adaptedName, + '@class' => $class, + '@parameters' => $parameters, + ]); + RedefinitionOfNew\suspendFor(function() use ($code) { + eval(CodeManipulation\transformForEval($code)); + }); + } + $instantiator = "$namespace\\$adaptedName"; + return new $instantiator; +} + +class State +{ + static $routes = []; + static $queue = []; + static $preprocessedFiles = []; + static $routeStack = []; +} diff --git a/vendor/antecedent/patchwork/src/CallRerouting/Decorator.php b/vendor/antecedent/patchwork/src/CallRerouting/Decorator.php new file mode 100644 index 0000000..1a641df --- /dev/null +++ b/vendor/antecedent/patchwork/src/CallRerouting/Decorator.php @@ -0,0 +1,62 @@ + + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\CallRerouting; + +use Patchwork; +use Patchwork\Stack; + +class Decorator +{ + public $superclass; + public $instance; + public $method; + + private $patch; + + public function __construct($patch) + { + $this->patch = $patch; + } + + public function __invoke() + { + $top = Stack\top(); + $superclassMatches = $this->superclassMatches(); + $instanceMatches = $this->instanceMatches($top); + $methodMatches = $this->methodMatches($top); + if ($superclassMatches && $instanceMatches && $methodMatches) { + $patch = $this->patch; + if (isset($top["object"]) && $patch instanceof \Closure) { + $patch = $patch->bindTo($top["object"], $this->superclass); + } + return dispatchTo($patch); + } + Patchwork\fallBack(); + } + + private function superclassMatches() + { + return $this->superclass === null || + Stack\topCalledClass() === $this->superclass || + is_subclass_of(Stack\topCalledClass(), $this->superclass); + } + + private function instanceMatches(array $top) + { + return $this->instance === null || + (isset($top["object"]) && $top["object"] === $this->instance); + } + + private function methodMatches(array $top) + { + return $this->method === null || + $this->method === 'new' || + $top["function"] === $this->method; + } +} diff --git a/vendor/antecedent/patchwork/src/CallRerouting/Handle.php b/vendor/antecedent/patchwork/src/CallRerouting/Handle.php new file mode 100644 index 0000000..2c0d96d --- /dev/null +++ b/vendor/antecedent/patchwork/src/CallRerouting/Handle.php @@ -0,0 +1,65 @@ + + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\CallRerouting; + +class Handle +{ + private $references = []; + private $expirationHandlers = []; + private $silenced = false; + private $tags = []; + + public function __destruct() + { + $this->expire(); + } + + public function tag($tag) + { + $this->tags[] = $tag; + } + + public function hasTag($tag) + { + return in_array($tag, $this->tags); + } + + public function addReference(&$reference) + { + $this->references[] = &$reference; + } + + public function expire() + { + foreach ($this->references as &$reference) { + $reference = null; + } + if (!$this->silenced) { + foreach ($this->expirationHandlers as $expirationHandler) { + $expirationHandler(); + } + } + $this->expirationHandlers = []; + } + + public function addExpirationHandler(callable $expirationHandler) + { + $this->expirationHandlers[] = $expirationHandler; + } + + public function silence() + { + $this->silenced = true; + } + + public function unsilence() + { + $this->silenced = false; + } +} diff --git a/vendor/antecedent/patchwork/src/CodeManipulation.php b/vendor/antecedent/patchwork/src/CodeManipulation.php new file mode 100644 index 0000000..96d9b3e --- /dev/null +++ b/vendor/antecedent/patchwork/src/CodeManipulation.php @@ -0,0 +1,187 @@ + + * @copyright 2010-2023 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\CodeManipulation; + +require __DIR__ . '/CodeManipulation/Source.php'; +require __DIR__ . '/CodeManipulation/Stream.php'; +require __DIR__ . '/CodeManipulation/Actions/Generic.php'; +require __DIR__ . '/CodeManipulation/Actions/CallRerouting.php'; +require __DIR__ . '/CodeManipulation/Actions/CodeManipulation.php'; +require __DIR__ . '/CodeManipulation/Actions/Namespaces.php'; +require __DIR__ . '/CodeManipulation/Actions/RedefinitionOfInternals.php'; +require __DIR__ . '/CodeManipulation/Actions/RedefinitionOfLanguageConstructs.php'; +require __DIR__ . '/CodeManipulation/Actions/ConflictPrevention.php'; +require __DIR__ . '/CodeManipulation/Actions/RedefinitionOfNew.php'; +require __DIR__ . '/CodeManipulation/Actions/Arguments.php'; + +use Patchwork\Exceptions; +use Patchwork\Config; + +const OUTPUT_DESTINATION = 'php://memory'; +const OUTPUT_ACCESS_MODE = 'rb+'; + +function transform(Source $s) +{ + foreach (State::$actions as $action) { + $action($s); + } +} + +function transformString($code) +{ + $source = new Source($code); + transform($source); + return (string) $source; +} + +function transformForEval($code) +{ + $prefix = "file), 'w', false); + Stream::fwrite($handle, $source); + Stream::fclose($handle); +} + +function availableCached($file) +{ + if (!cacheEnabled()) { + return false; + } + $cached = getCachedPath($file); + return file_exists($cached) && + filemtime($file) <= filemtime($cached) && + Config\getTimestamp() <= filemtime($cached); +} + +function internalToCache($file) +{ + if (!cacheEnabled()) { + return false; + } + return strpos($file, Config\getCachePath() . '/') === 0 + || strpos($file, Config\getCachePath() . DIRECTORY_SEPARATOR) === 0; +} + + +function getContents($file) +{ + $handle = Stream::fopen($file, 'r', true); + if ($handle === false) { + return false; + } + $contents = ''; + while (!Stream::feof($handle)) { + $contents .= Stream::fread($handle, 8192); + } + Stream::fclose($handle); + return $contents; +} + +function transformAndOpen($file) +{ + foreach (State::$importListeners as $listener) { + $listener($file); + } + if (!internalToCache($file) && availableCached($file)) { + return Stream::fopen(getCachedPath($file), 'r', false); + } + $code = getContents($file); + if ($code === false) { + return false; + } + $source = new Source($code); + $source->file = $file; + transform($source); + if (!internalToCache($file) && cacheEnabled()) { + storeInCache($source); + return transformAndOpen($file); + } + $resource = fopen(OUTPUT_DESTINATION, OUTPUT_ACCESS_MODE); + if ($resource) { + fwrite($resource, $source); + rewind($resource); + } + return $resource; +} + +function prime($file) +{ + Stream::fclose(transformAndOpen($file)); +} + +function shouldTransform($file) +{ + return !Config\isBlacklisted($file) || Config\isWhitelisted($file); +} + +function register($actions) +{ + State::$actions = array_merge(State::$actions, (array) $actions); +} + +function onImport($listeners) +{ + State::$importListeners = array_merge(State::$importListeners, (array) $listeners); +} + +class State +{ + static $actions = []; + static $importListeners = []; + static $cacheIndex = []; + static $cacheIndexFile; +} diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Arguments.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Arguments.php new file mode 100644 index 0000000..d0c9e77 --- /dev/null +++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Arguments.php @@ -0,0 +1,49 @@ + + * @copyright 2010-2021 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\CodeManipulation\Actions\Arguments; + +use Patchwork\CodeManipulation\Source; +use Patchwork\CodeManipulation\Actions\Generic; + +/** + * @since 2.1.13 + */ +function readNames(Source $s, $pos) +{ + $result = []; + $pos++; + while (!$s->is(Generic\RIGHT_ROUND, $pos)) { + if ($s->is([Generic\LEFT_ROUND, Generic\LEFT_SQUARE, Generic\LEFT_CURLY], $pos)) { + $pos = $s->match($pos); + } else { + if ($s->is(T_VARIABLE, $pos)) { + $result[] = $s->read($pos); + } elseif ($s->is(Generic\ELLIPSIS, $pos)) { + $pos = $s->skip(Source::junk(), $pos); + $result[] = '...' . $s->read($pos); + } + $pos++; + } + } + return $result; +} + +/** + * @since 2.1.13 + */ +function constructReferenceArray(array $names) +{ + $names = array_map(function($name) { + if ($name[0] === '.') { + return '], ' . substr($name, 3) . ', ['; + } + return '&' . $name; + }, $names); + return 'array_merge([' . join(', ', $names) . '])'; +} \ No newline at end of file diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/CallRerouting.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/CallRerouting.php new file mode 100644 index 0000000..f876ddc --- /dev/null +++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/CallRerouting.php @@ -0,0 +1,88 @@ + + * @link http://patchwork2.org/ + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\CodeManipulation\Actions\CallRerouting; + +use Patchwork\CodeManipulation\Actions\Generic; +use Patchwork\CallRerouting; +use Patchwork\Utils; + +const CALL_INTERCEPTION_CODE = ' + $__pwClosureName = __NAMESPACE__ ? __NAMESPACE__ . "\\\\{closure}" : "\\\\{closure}"; + $__pwClass = (__CLASS__ && __FUNCTION__ !== $__pwClosureName) ? __CLASS__ : ""; + if (!empty(\Patchwork\CallRerouting\State::$routes[$__pwClass][__FUNCTION__])) { + $__pwCalledClass = $__pwClass ? \get_called_class() : null; + $__pwFrame = \count(\debug_backtrace(0)); + $__pwRefs = %s; + $__pwRefOffset = 0; + if (\Patchwork\CallRerouting\dispatch($__pwClass, $__pwCalledClass, __FUNCTION__, $__pwFrame, $__pwResult, \array_merge(\array_slice($__pwRefs, $__pwRefOffset, \func_num_args()), \array_slice(\func_get_args(), \count($__pwRefs))))) { + return $__pwResult; + } + } + unset($__pwClass, $__pwCalledClass, $__pwResult, $__pwClosureName, $__pwFrame, $__pwRefs, $__pwRefOffset); +'; + +const CALL_INTERCEPTION_CODE_VOID_TYPED = ' + $__pwClosureName = __NAMESPACE__ ? __NAMESPACE__ . "\\\\{closure}" : "\\\\{closure}"; + $__pwClass = (__CLASS__ && __FUNCTION__ !== $__pwClosureName) ? __CLASS__ : ""; + if (!empty(\Patchwork\CallRerouting\State::$routes[$__pwClass][__FUNCTION__])) { + $__pwCalledClass = $__pwClass ? \get_called_class() : null; + $__pwFrame = \count(\debug_backtrace(0)); + $__pwRefs = %s; + $__pwRefOffset = 0; + if (\Patchwork\CallRerouting\dispatch($__pwClass, $__pwCalledClass, __FUNCTION__, $__pwFrame, $__pwResult, \array_merge(\array_slice($__pwRefs, $__pwRefOffset, \func_num_args()), \array_slice(\func_get_args(), \count($__pwRefs))))) { + if ($__pwResult !== null) { + throw new \Patchwork\Exceptions\NonNullToVoid; + } + return; + } + } + unset($__pwClass, $__pwCalledClass, $__pwResult, $__pwClosureName, $__pwFrame, $__pwRefOffset); +'; + +const CALL_INTERCEPTION_CODE_NEVER_TYPED = ' + $__pwClosureName = __NAMESPACE__ ? __NAMESPACE__ . "\\\\{closure}" : "\\\\{closure}"; + $__pwClass = (__CLASS__ && __FUNCTION__ !== $__pwClosureName) ? __CLASS__ : ""; + if (!empty(\Patchwork\CallRerouting\State::$routes[$__pwClass][__FUNCTION__])) { + $__pwCalledClass = $__pwClass ? \get_called_class() : null; + $__pwFrame = \count(\debug_backtrace(0)); + $__pwRefs = %s; + $__pwRefOffset = 0; + if (\Patchwork\CallRerouting\dispatch($__pwClass, $__pwCalledClass, __FUNCTION__, $__pwFrame, $__pwResult, \array_merge(\array_slice($__pwRefs, $__pwRefOffset, \func_num_args()), \array_slice(\func_get_args(), \count($__pwRefs))))) { + throw new \Patchwork\Exceptions\ReturnFromNever; + } + } + unset($__pwClass, $__pwCalledClass, $__pwResult, $__pwClosureName, $__pwFrame, $__pwRefOffset); +'; + +const QUEUE_DEPLOYMENT_CODE = '\Patchwork\CallRerouting\deployQueue()'; + +function markPreprocessedFiles() +{ + return Generic\markPreprocessedFiles(CallRerouting\State::$preprocessedFiles); +} + +function injectCallInterceptionCode() +{ + return Generic\prependCodeToFunctions( + Utils\condense(CALL_INTERCEPTION_CODE), + array( + 'void' => Utils\condense(CALL_INTERCEPTION_CODE_VOID_TYPED), + 'never' => Utils\condense(CALL_INTERCEPTION_CODE_NEVER_TYPED), + ), + true + ); +} + +function injectQueueDeploymentCode() +{ + return Generic\chain(array( + Generic\injectFalseExpressionAtBeginnings(QUEUE_DEPLOYMENT_CODE), + Generic\injectCodeAfterClassDefinitions(QUEUE_DEPLOYMENT_CODE . ';'), + )); +} diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/CodeManipulation.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/CodeManipulation.php new file mode 100644 index 0000000..cccd5c5 --- /dev/null +++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/CodeManipulation.php @@ -0,0 +1,33 @@ + + * @copyright 2010-2023 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\CodeManipulation\Actions\CodeManipulation; + +use Patchwork\CodeManipulation\Actions\Generic; +use Patchwork\CodeManipulation\Source; + +const EVAL_ARGUMENT_WRAPPER = '\Patchwork\CodeManipulation\transformForEval'; + +const STREAM_WRAPPER_REINSTATEMENT_CODE = '\Patchwork\CodeManipulation\Stream::reinstateWrapper();'; + +function propagateThroughEval() +{ + return Generic\wrapUnaryConstructArguments(T_EVAL, EVAL_ARGUMENT_WRAPPER); +} + +function injectStreamWrapperReinstatementCode() +{ + return Generic\injectCodeAtEnd(STREAM_WRAPPER_REINSTATEMENT_CODE); +} + +function flush() +{ + return function(Source $s) { + $s->flush(); + }; +} diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/ConflictPrevention.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/ConflictPrevention.php new file mode 100644 index 0000000..634296b --- /dev/null +++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/ConflictPrevention.php @@ -0,0 +1,33 @@ + + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\CodeManipulation\Actions\ConflictPrevention; + +use Patchwork\CodeManipulation\Source; + +/** + * @since 2.0.1 + * + * Serves to avoid "Cannot redeclare Patchwork\redefine()" errors. + */ +function preventImportingOtherCopiesOfPatchwork() +{ + return function(Source $s) { + $namespaceKeyword = $s->next(T_NAMESPACE, -1); + if ($namespaceKeyword === INF || $namespaceKeyword < 2) { + return; + } + if ($s->read($namespaceKeyword, 4) == 'namespace Patchwork;') { + $pattern = '/@copyright\s+2010(-\d+)? Ignas Rudaitis/'; + if (preg_match($pattern, $s->read($namespaceKeyword - 2))) { + # Clear the file completely (in memory) + $s->splice('', 0, count($s->tokens)); + } + } + }; +} diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Generic.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Generic.php new file mode 100644 index 0000000..b2de56e --- /dev/null +++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Generic.php @@ -0,0 +1,190 @@ + + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\CodeManipulation\Actions\Generic; + +use Patchwork\CodeManipulation\Actions\Arguments; +use Patchwork\CodeManipulation\Source; +use Patchwork\Utils; + +const LEFT_ROUND = '('; +const RIGHT_ROUND = ')'; +const LEFT_CURLY = '{'; +const RIGHT_CURLY = '}'; +const LEFT_SQUARE = '['; +const RIGHT_SQUARE = ']'; +const SEMICOLON = ';'; + +foreach (['NAME_FULLY_QUALIFIED', 'NAME_QUALIFIED', 'NAME_RELATIVE', 'ELLIPSIS', 'ATTRIBUTE', 'READONLY'] as $constant) { + if (defined('T_' . $constant)) { + define(__NAMESPACE__ . '\\' . $constant, constant('T_' . $constant)); + } else { + define(__NAMESPACE__ . '\\' . $constant, -1); + } +} + +function markPreprocessedFiles(&$target) +{ + return function($file) use (&$target) { + $target[$file] = true; + }; +} + +function prependCodeToFunctions($code, $typedVariants = array(), $fillArgRefs = false) +{ + if (!is_array($typedVariants)) { + $typedVariants = array( + 'void' => $typedVariants, + ); + } + return function(Source $s) use ($code, $typedVariants, $fillArgRefs) { + foreach ($s->all(T_FUNCTION) as $function) { + # Skip "use function" + $previous = $s->skipBack(Source::junk(), $function); + if ($s->is(T_USE, $previous)) { + continue; + } + $returnType = getDeclaredReturnType($s, $function); + $argRefs = null; + if ($fillArgRefs) { + $parenthesis = $s->next(LEFT_ROUND, $function); + $args = Arguments\readNames($s, $parenthesis); + $argRefs = Arguments\constructReferenceArray($args); + } + $bracket = $s->next(LEFT_CURLY, $function); + # Skip generators + $yield = $s->next(T_YIELD, $bracket); + if ($yield < $s->match($bracket)) { + continue; + } + $semicolon = $s->next(SEMICOLON, $function); + if ($bracket < $semicolon) { + $variant = $returnType && isset($typedVariants[$returnType]) ? $typedVariants[$returnType] : $code; + if ($fillArgRefs) { + $variant = sprintf($variant, $argRefs); + } + $s->splice($variant, $bracket + 1); + } + } + }; +} + +function getDeclaredReturnType(Source $s, $function) +{ + $parenthesis = $s->next(LEFT_ROUND, $function); + $next = $s->skip(Source::junk(), $s->match($parenthesis)); + if ($s->is(T_USE, $next)) { + $next = $s->skip(Source::junk(), $s->match($s->next(LEFT_ROUND, $next))); + } + if ($s->is(':', $next)) { + return $s->read($s->skip(Source::junk(), $next), 1); + } + return false; +} + +function wrapUnaryConstructArguments($construct, $wrapper) +{ + return function(Source $s) use ($construct, $wrapper) { + foreach ($s->all($construct) as $match) { + $pos = $s->next(LEFT_ROUND, $match); + $s->splice($wrapper . LEFT_ROUND, $pos + 1); + $s->splice(RIGHT_ROUND, $s->match($pos)); + } + }; +} + +function injectFalseExpressionAtBeginnings($expression) +{ + return function(Source $s) use ($expression) { + $openingTags = $s->all(T_OPEN_TAG); + $openingTagsWithEcho = $s->all(T_OPEN_TAG_WITH_ECHO); + if (empty($openingTags) && empty($openingTagsWithEcho)) { + return; + } + if (!empty($openingTags) && + (empty($openingTagsWithEcho) || reset($openingTags) < reset($openingTagsWithEcho))) { + $pos = reset($openingTags); + # Skip initial declare() statements + while ($s->read($s->skip(Source::junk(), $pos)) === 'declare') { + $pos = $s->next(SEMICOLON, $pos); + } + # Enter first namespace + $namespaceKeyword = $s->next(T_NAMESPACE, $pos); + if ($namespaceKeyword !== INF) { + $semicolon = $s->next(SEMICOLON, $namespaceKeyword); + $leftBracket = $s->next(LEFT_CURLY, $namespaceKeyword); + $pos = min($semicolon, $leftBracket); + } + $s->splice(' ' . $expression . ';', $pos + 1); + } else { + $openingTag = reset($openingTagsWithEcho); + $closingTag = $s->next(T_CLOSE_TAG, $openingTag); + $semicolon = $s->next(SEMICOLON, $openingTag); + $s->splice(' (' . $expression . ') ?: (', $openingTag + 1); + $s->splice(') ', min($closingTag, $semicolon)); + } + }; +} + +function injectCodeAfterClassDefinitions($code) +{ + return function(Source $s) use ($code) { + foreach ($s->all(T_CLASS) as $match) { + if ($s->is([LEFT_ROUND, LEFT_CURLY, T_EXTENDS, T_IMPLEMENTS], $s->skip(Source::junk(), $match))) { + # Not a proper class definition: anonymous class (with or without attribute) + continue; + } + if ($s->is(T_DOUBLE_COLON, $s->skipBack(Source::junk(), $match))) { + # Not a proper class definition: ::class syntax + continue; + } + $leftBracket = $s->next(LEFT_CURLY, $match); + if ($leftBracket === INF) { + continue; + } + $rightBracket = $s->match($leftBracket); + if ($rightBracket === INF) { + continue; + } + $s->splice($code, $rightBracket + 1); + } + }; +} + +function injectCodeAtEnd($code) +{ + return function(Source $s) use ($code) { + $openTags = $s->all(T_OPEN_TAG); + $lastOpenTag = end($openTags); + $closeTag = $s->next(T_CLOSE_TAG, $lastOpenTag); + $namespaceKeyword = $s->next(T_NAMESPACE, 0); + $extraSemicolon = ';'; + if ($namespaceKeyword !== INF) { + $semicolon = $s->next(SEMICOLON, $namespaceKeyword); + $leftBracket = $s->next(LEFT_CURLY, $namespaceKeyword); + if ($leftBracket < $semicolon) { + $code = "namespace { $code }"; + $extraSemicolon = ''; + } + } + if ($closeTag !== INF) { + $s->splice("tokens) - 1, 0, Source::APPEND); + } else { + $s->splice($extraSemicolon . $code, count($s->tokens) - 1, 0, Source::APPEND); + } + }; +} + +function chain(array $callbacks) +{ + return function(Source $s) use ($callbacks) { + foreach ($callbacks as $callback) { + $callback($s); + } + }; +} diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Namespaces.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Namespaces.php new file mode 100644 index 0000000..f254533 --- /dev/null +++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/Namespaces.php @@ -0,0 +1,185 @@ + + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\CodeManipulation\Actions\Namespaces; + +use Patchwork\CodeManipulation\Source; +use Patchwork\CodeManipulation\Actions\Generic; + +/** + * @since 2.1.0 + */ +function resolveName(Source $s, $pos, $type = 'class') +{ + $name = scanQualifiedName($s, $pos); + $pieces = explode('\\', $name); + if ($pieces[0] === '') { + return $name; + } + $uses = collectUseDeclarations($s, $pos); + if (isset($uses[$type][$name])) { + return '\\' . ltrim($uses[$type][$name], ' \\'); + } + if (isset($uses['class'][$pieces[0]])) { + $name = '\\' . ltrim($uses['class'][$pieces[0]] . '\\' . join('\\', array_slice($pieces, 1)), '\\'); + } else { + $name = '\\' . ltrim(getNamespaceAt($s, $pos) . '\\' . $name, '\\'); + } + return $name; +} + +/** + * @since 2.1.0 + */ +function getNamespaceAt(Source $s, $pos) +{ + foreach (collectNamespaceBoundaries($s) as $namespace => $boundaryPairs) { + foreach ($boundaryPairs as $boundaries) { + list($begin, $end) = $boundaries; + if ($begin <= $pos && $pos <= $end) { + return $namespace; + } + } + } + return ''; +} + +function collectNamespaceBoundaries(Source $s) +{ + return $s->cache([], function() { + if (!$this->has(T_NAMESPACE)) { + return ['' => [[0, INF]]]; + } + $result = []; + foreach ($this->all(T_NAMESPACE) as $keyword) { + if ($this->next(';', $keyword) < $this->next(Generic\LEFT_CURLY, $keyword)) { + return [scanQualifiedName($this, $keyword + 1) => [[0, INF]]]; + } + $begin = $this->next(Generic\LEFT_CURLY, $keyword) + 1; + $end = $this->match($begin - 1) - 1; + $name = scanQualifiedName($this, $keyword + 1); + if (!isset($result[$name])) { + $result[$name] = []; + } + $result[$name][] = [$begin, $end]; + } + return $result; + }); +} + +function collectUseDeclarations(Source $s, $begin) +{ + foreach (collectNamespaceBoundaries($s) as $boundaryPairs) { + foreach ($boundaryPairs as $boundaries) { + list($leftBoundary, $rightBoundary) = $boundaries; + if ($leftBoundary <= $begin && $begin <= $rightBoundary) { + $begin = $leftBoundary; + break; + } + } + } + return $s->cache([$begin], function($begin) { + $result = ['class' => [], 'function' => [], 'const' => []]; + # only tokens that are siblings bracket-wise are considered, + # so trait-use instances are not an issue + foreach ($this->siblings(T_USE, $begin) as $keyword) { + # skip if closure-use + $next = $this->skip(Source::junk(), $keyword); + if ($this->is(Generic\LEFT_ROUND, $next)) { + continue; + } + parseUseDeclaration($this, $next, $result); + } + return $result; + }); +} + +function parseUseDeclaration(Source $s, $pos, array &$aliases, $prefix = '', $type = 'class') +{ + $lastPart = null; + $whole = $prefix; + while (true) { + switch ($s->tokens[$pos][Source::TYPE_OFFSET]) { + case T_FUNCTION: + $type = 'function'; + break; + case T_CONST: + $type = 'const'; + break; + case T_NS_SEPARATOR: + if (!empty($whole)) { + $whole .= '\\'; + } + break; + case T_STRING: + case Generic\NAME_FULLY_QUALIFIED: + case Generic\NAME_QUALIFIED: + case Generic\NAME_RELATIVE: + $update = $s->tokens[$pos][Source::STRING_OFFSET]; + $parts = explode('\\', $update); + $whole .= $update; + $lastPart = end($parts); + break; + case T_AS: + $pos = $s->skip(Source::junk(), $pos); + $aliases[$type][$s->tokens[$pos][Source::STRING_OFFSET]] = $whole; + $lastPart = null; + $whole = $prefix; + break; + case ',': + if ($lastPart !== null) { + $aliases[$type][$lastPart] = $whole; + } + $lastPart = null; + $whole = $prefix; + $type = 'class'; + break; + case Generic\LEFT_CURLY: + parseUseDeclaration($s, $pos + 1, $aliases, $prefix . '\\', $type); + break; + case T_WHITESPACE: + case T_COMMENT: + case T_DOC_COMMENT: + break; + default: + if ($lastPart !== null) { + $aliases[$type][$lastPart] = $whole; + } + return; + } + $pos++; + } +} + +function scanQualifiedName(Source $s, $begin) +{ + $result = ''; + while (true) { + switch ($s->tokens[$begin][Source::TYPE_OFFSET]) { + case T_NS_SEPARATOR: + if (!empty($result)) { + $result .= '\\'; + } + # fall through + case T_STRING: + case Generic\NAME_FULLY_QUALIFIED: + case Generic\NAME_QUALIFIED: + case Generic\NAME_RELATIVE: + case T_STATIC: + $result .= $s->tokens[$begin][Source::STRING_OFFSET]; + break; + case T_WHITESPACE: + case T_COMMENT: + case T_DOC_COMMENT: + break; + default: + return str_replace('\\\\', '\\', $result); + } + $begin++; + } +} diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfInternals.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfInternals.php new file mode 100644 index 0000000..3a4f834 --- /dev/null +++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfInternals.php @@ -0,0 +1,142 @@ + + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\CodeManipulation\Actions\RedefinitionOfInternals; + +use Patchwork\Config; +use Patchwork\CallRerouting; +use Patchwork\CodeManipulation\Source; +use Patchwork\CodeManipulation\Actions\Generic; +use Patchwork\CodeManipulation\Actions\Namespaces; + +const DYNAMIC_CALL_REPLACEMENT = '\Patchwork\CallRerouting\dispatchDynamic(%s, \Patchwork\Utils\args(%s))'; + +function spliceNamedFunctionCalls() +{ + if (Config\getRedefinableInternals() === []) { + return function() {}; + } + $names = []; + foreach (Config\getRedefinableInternals() as $name) { + $names[strtolower($name)] = true; + } + return function(Source $s) use ($names) { + foreach (Namespaces\collectNamespaceBoundaries($s) as $namespace => $boundaryList) { + foreach ($boundaryList as $boundaries) { + list($begin, $end) = $boundaries; + $aliases = Namespaces\collectUseDeclarations($s, $begin)['function']; + # Receive all aliases, leave only those for redefinable internals + foreach ($aliases as $alias => $qualified) { + if (!isset($names[$qualified])) { + unset($aliases[$alias]); + } else { + $aliases[strtolower($alias)] = strtolower($qualified); + } + } + spliceNamedCallsWithin($s, $begin, $end, $names, $aliases); + } + } + }; +} + +function spliceNamedCallsWithin(Source $s, $begin, $end, array $names, array $aliases) +{ + foreach ($s->within([T_STRING, Generic\NAME_FULLY_QUALIFIED, Generic\NAME_QUALIFIED, Generic\NAME_RELATIVE], $begin, $end) as $string) { + $original = strtolower($s->read($string)); + if ($original[0] == '\\') { + $original = substr($original, 1); + } + if (isset($names[$original]) || isset($aliases[$original])) { + $previous = $s->skipBack(Source::junk(), $string); + $hadBackslash = false; + if ($s->is(T_NS_SEPARATOR, $previous) || $s->is(Generic\NAME_FULLY_QUALIFIED, $string)) { + if (!isset($names[$original])) { + # use-aliased name cannot have a leading backslash + continue; + } + if ($s->is(T_NS_SEPARATOR, $previous)) { + $s->splice('', $previous, 1); + $previous = $s->skipBack(Source::junk(), $previous); + } + $hadBackslash = true; + } + if ($s->is([T_FUNCTION, T_OBJECT_OPERATOR, T_DOUBLE_COLON, T_STRING, T_NEW, Generic\NAME_FULLY_QUALIFIED, Generic\NAME_QUALIFIED, Generic\NAME_RELATIVE], $previous)) { + continue; + } + $next = $s->skip(Source::junk(), $string); + if (!$s->is(Generic\LEFT_ROUND, $next)) { + continue; + } + if (isset($aliases[$original])) { + $original = $aliases[$original]; + } + $secondNext = $s->skip(Source::junk(), $next); + $splice = '\\' . CallRerouting\INTERNAL_REDEFINITION_NAMESPACE . '\\'; + $splice .= $original . Generic\LEFT_ROUND; + # prepend a namespace-of-origin argument to handle cases like Acme\time() vs time() + $splice .= !$hadBackslash ? '__NAMESPACE__' : '""'; + if (!$s->is(Generic\RIGHT_ROUND, $secondNext)) { + # right parenthesis doesn't follow immediately => there are arguments + $splice .= ', '; + } + $s->splice($splice, $string, $secondNext - $string); + } + } +} + +function spliceDynamicCalls() +{ + if (Config\getRedefinableInternals() === []) { + return function() {}; + } + return function(Source $s) { + spliceDynamicCallsWithin($s, 0, count($s->tokens) - 1); + }; +} + +function spliceDynamicCallsWithin(Source $s, $first, $last) +{ + $pos = $first; + $anchor = INF; + $suppress = false; + while ($pos <= $last) { + switch ($s->tokens[$pos][Source::TYPE_OFFSET]) { + case '$': + case T_VARIABLE: + $anchor = min($pos, $anchor); + break; + case Generic\LEFT_ROUND: + if ($anchor !== INF && !$suppress) { + $callable = $s->read($anchor, $pos - $anchor); + $arguments = $s->read($pos + 1, $s->match($pos) - $pos - 1); + $pos = $s->match($pos); + $replacement = sprintf(DYNAMIC_CALL_REPLACEMENT, $callable, $arguments); + $s->splice($replacement, $anchor, $pos - $anchor + 1); + } + break; + case Generic\LEFT_SQUARE: + case Generic\LEFT_CURLY: + spliceDynamicCallsWithin($s, $pos + 1, $s->match($pos) - 1); + $pos = $s->match($pos); + break; + case T_WHITESPACE: + case T_COMMENT: + case T_DOC_COMMENT: + break; + case T_OBJECT_OPERATOR: + case T_DOUBLE_COLON: + case T_NEW: + $suppress = true; + break; + default: + $suppress = false; + $anchor = INF; + } + $pos++; + } +} diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfLanguageConstructs.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfLanguageConstructs.php new file mode 100644 index 0000000..9ba5595 --- /dev/null +++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfLanguageConstructs.php @@ -0,0 +1,131 @@ + + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\CodeManipulation\Actions\RedefinitionOfLanguageConstructs; + +use Patchwork\CodeManipulation\Source; +use Patchwork\CodeManipulation\Actions\Generic; +use Patchwork\Exceptions; +use Patchwork\Config; + +const LANGUAGE_CONSTRUCT_PREFIX = 'Patchwork\Redefinitions\LanguageConstructs\_'; + +/** + * @since 2.0.5 + */ +function spliceAllConfiguredLanguageConstructs() +{ + $mapping = getMappingOfConstructs(); + $used = []; + $actions = []; + foreach (Config\getRedefinableLanguageConstructs() as $construct) { + if (isset($used[$mapping[$construct]])) { + continue; + } + $used[$mapping[$construct]] = true; + $actions[] = spliceLanguageConstruct($mapping[$construct]); + } + return Generic\chain($actions); +} + +function getMappingOfConstructs() +{ + return [ + 'echo' => T_ECHO, + 'print' => T_PRINT, + 'eval' => T_EVAL, + 'die' => T_EXIT, + 'exit' => T_EXIT, + 'isset' => T_ISSET, + 'unset' => T_UNSET, + 'empty' => T_EMPTY, + 'require' => T_REQUIRE, + 'require_once' => T_REQUIRE_ONCE, + 'include' => T_INCLUDE, + 'include_once' => T_INCLUDE_ONCE, + 'clone' => T_CLONE, + ]; +} + +function getInnerTokens() +{ + return [ + '$', + ',', + '"', + T_START_HEREDOC, + T_END_HEREDOC, + T_OBJECT_OPERATOR, + T_DOUBLE_COLON, + T_NS_SEPARATOR, + T_STRING, + T_LNUMBER, + T_DNUMBER, + T_WHITESPACE, + T_CONSTANT_ENCAPSED_STRING, + T_COMMENT, + T_DOC_COMMENT, + T_VARIABLE, + T_ENCAPSED_AND_WHITESPACE, + Generic\NAME_FULLY_QUALIFIED, + Generic\NAME_QUALIFIED, + Generic\NAME_RELATIVE, + ]; +} + +function getBracketTokens() +{ + return [ + Generic\LEFT_ROUND, + Generic\LEFT_SQUARE, + Generic\LEFT_CURLY, + T_CURLY_OPEN, + T_DOLLAR_OPEN_CURLY_BRACES, + Generic\ATTRIBUTE, + ]; +} + +function spliceLanguageConstruct($token) +{ + return function(Source $s) use ($token) { + foreach ($s->all($token) as $pos) { + $s->splice('\\' . LANGUAGE_CONSTRUCT_PREFIX, $pos, 0, Source::PREPEND); + if (lacksParentheses($s, $pos)) { + addParentheses($s, $pos); + } + } + }; +} + +function lacksParentheses(Source $s, $pos) +{ + if ($s->is(T_ECHO, $pos)) { + return true; + } + $next = $s->skip(Source::junk(), $pos); + return !$s->is(Generic\LEFT_ROUND, $next); +} + +function addParentheses(Source $s, $pos) +{ + $pos = $s->skip(Source::junk(), $pos); + $s->splice(Generic\LEFT_ROUND, $pos, 0, Source::PREPEND); + while ($pos < count($s->tokens)) { + if ($s->is(getInnerTokens(), $pos)) { + $pos++; + } elseif ($s->is(getBracketTokens(), $pos)) { + $pos = $s->match($pos) + 1; + } else { + break; + } + } + if ($s->is(Source::junk(), $pos)) { + $pos = $s->skipBack(Source::junk(), $pos); + } + $s->splice(Generic\RIGHT_ROUND, $pos, 0, Source::APPEND); +} diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfNew.php b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfNew.php new file mode 100644 index 0000000..03c7e50 --- /dev/null +++ b/vendor/antecedent/patchwork/src/CodeManipulation/Actions/RedefinitionOfNew.php @@ -0,0 +1,201 @@ + + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\CodeManipulation\Actions\RedefinitionOfNew; + +use Patchwork\CodeManipulation\Source; +use Patchwork\CodeManipulation\Actions\Generic; +use Patchwork\CodeManipulation\Actions\Namespaces; +use Patchwork\Config; + +const STATIC_INSTANTIATION_REPLACEMENT = '\Patchwork\CallRerouting\getInstantiator(\'%s\', %s)->instantiate(%s)'; +const DYNAMIC_INSTANTIATION_REPLACEMENT = '\Patchwork\CallRerouting\getInstantiator(%s, %s)->instantiate(%s)'; +const CALLED_CLASS = '((__CLASS__ && __FUNCTION__ !== (__NAMESPACE__ ? __NAMESPACE__ . "\\\\{closure}" : "\\\\{closure}")) ? \get_called_class() : null)'; + +const spliceAllInstantiations = 'Patchwork\CodeManipulation\Actions\RedefinitionOfNew\spliceAllInstantiations'; +const publicizeConstructors = 'Patchwork\CodeManipulation\Actions\RedefinitionOfNew\publicizeConstructors'; + +/** + * @since 2.1.0 + */ +function spliceAllInstantiations(Source $s) +{ + if (!State::$enabled || !Config\isNewKeywordRedefinable()) { + return; + } + foreach ($s->all(T_NEW) as $new) { + $begin = $s->skip(Source::junk(), $new); + if ($s->is([T_CLASS, Generic\READONLY, Generic\ATTRIBUTE], $begin)) { + # Anonymous class + continue; + } + $end = scanInnerTokens($s, $begin, $dynamic); + $afterEnd = $s->skip(Source::junk(), $end); + list($argsOpen, $argsClose) = [null, null]; + if ($s->is(Generic\LEFT_ROUND, $afterEnd)) { + list($argsOpen, $argsClose) = [$afterEnd, $s->match($afterEnd)]; + } + spliceInstantiation($s, $new, $begin, $end, $argsOpen, $argsClose, $dynamic); + if (hasExtraParentheses($s, $new)) { + removeExtraParentheses($s, $new); + } + } +} + +function publicizeConstructors(Source $s) +{ + if (!Config\isNewKeywordRedefinable()) { + return; + } + foreach ($s->all([T_PRIVATE, T_PROTECTED]) as $first) { + $second = $s->skip(Source::junk(), $first); + $third = $s->skip(Source::junk(), $second); + if ($s->is(T_FUNCTION, $second) && $s->read($third, 1) === '__construct') { + $s->splice('public', $first, 1); + } + } +} + +function spliceInstantiation(Source $s, $new, $begin, $end, $argsOpen, $argsClose, $dynamic) +{ + $class = $s->read($begin, $end - $begin + 1); + $args = ''; + $length = $end - $new + 1; + if ($argsOpen !== null) { + $args = $s->read($argsOpen + 1, $argsClose - $argsOpen - 1); + $length = $argsClose - $new + 1; + } + $replacement = DYNAMIC_INSTANTIATION_REPLACEMENT; + if (!$dynamic) { + $class = Namespaces\resolveName($s, $begin); + $replacement = STATIC_INSTANTIATION_REPLACEMENT; + } + $s->splice(sprintf($replacement, $class, CALLED_CLASS, $args), $new, $length); +} + +function getInnerTokens() +{ + return [ + '$', + T_OBJECT_OPERATOR, + T_DOUBLE_COLON, + T_NS_SEPARATOR, + T_STRING, + T_LNUMBER, + T_DNUMBER, + T_WHITESPACE, + T_CONSTANT_ENCAPSED_STRING, + T_COMMENT, + T_DOC_COMMENT, + T_VARIABLE, + T_ENCAPSED_AND_WHITESPACE, + T_STATIC, + Generic\NAME_FULLY_QUALIFIED, + Generic\NAME_QUALIFIED, + Generic\NAME_RELATIVE, + ]; +} + +function getBracketTokens() +{ + return [ + Generic\LEFT_SQUARE, + Generic\LEFT_CURLY, + T_CURLY_OPEN, + T_DOLLAR_OPEN_CURLY_BRACES, + Generic\ATTRIBUTE, + ]; +} + +function getDynamicTokens() +{ + return [ + '$', + T_OBJECT_OPERATOR, + T_DOUBLE_COLON, + T_LNUMBER, + T_DNUMBER, + T_CONSTANT_ENCAPSED_STRING, + T_VARIABLE, + T_ENCAPSED_AND_WHITESPACE, + ]; +} + +function scanInnerTokens(Source $s, $begin, &$dynamic = null) +{ + $dynamic = false; + $pos = $begin; + while ($s->is(getInnerTokens(), $pos) || $s->is(getBracketTokens(), $pos)) { + if ($s->is(getBracketTokens(), $pos)) { + $dynamic = true; + $pos = $s->match($pos) + 1; + } else { + if ($s->is(getDynamicTokens(), $pos)) { + $dynamic = true; + } + $pos++; + } + } + return $pos - 1; +} + +function hasExtraParentheses(Source $s, $new) +{ + $doNotRemoveAfter = [ + T_STRING, + T_STATIC, + T_VARIABLE, + T_FOREACH, + T_FOR, + T_IF, + T_ELSEIF, + T_WHILE, + T_ARRAY, + T_PRINT, + T_ECHO, + T_CLASS, + Generic\NAME_FULLY_QUALIFIED, + Generic\NAME_QUALIFIED, + Generic\NAME_RELATIVE, + Generic\RIGHT_ROUND, + Generic\RIGHT_SQUARE, + ]; + $left = $s->skipBack(Source::junk(), $new); + if (!$s->is(Generic\LEFT_ROUND, $left)) { + return false; + } + $beforeLeft = $s->skipBack(Source::junk(), $left); + return !$s->is($doNotRemoveAfter, $beforeLeft); +} + +function removeExtraParentheses(Source $s, $new) +{ + $left = $s->skipBack(Source::junk(), $new); + $s->splice('', $left, 1); + $s->splice('', $s->match($left), 1); +} + +function suspendFor(callable $function) +{ + State::$enabled = false; + $exception = null; + try { + $function(); + } catch (\Exception $e) { + $exception = $e; + } + State::$enabled = true; + if ($exception) { + throw $exception; + } +} + +class State +{ + static $enabled = true; +} diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Source.php b/vendor/antecedent/patchwork/src/CodeManipulation/Source.php new file mode 100644 index 0000000..f16bc12 --- /dev/null +++ b/vendor/antecedent/patchwork/src/CodeManipulation/Source.php @@ -0,0 +1,318 @@ + + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\CodeManipulation; + +use Patchwork\CodeManipulation\Actions\Generic; +use Patchwork\Utils; + +class Source +{ + const TYPE_OFFSET = 0; + const STRING_OFFSET = 1; + + const PREPEND = 'PREPEND'; + const APPEND = 'APPEND'; + const OVERWRITE = 'OVERWRITE'; + + const ANY = null; + + public $tokens; + public $tokensByType; + public $splices; + public $spliceLengths; + public $code; + public $file; + public $matchingBrackets; + public $levels; + public $levelBeginnings; + public $levelEndings; + public $tokensByLevel; + public $tokensByLevelAndType; + public $cache; + + function __construct($string) + { + $this->code = $string; + $this->initialize(); + } + + function initialize() + { + $this->tokens = Utils\tokenize($this->code); + $this->tokens[] = [T_WHITESPACE, ""]; + $this->indexTokensByType(); + $this->collectBracketMatchings(); + $this->collectLevelInfo(); + $this->splices = []; + $this->spliceLengths = []; + $this->cache = []; + } + + function indexTokensByType() + { + $this->tokensByType = []; + foreach ($this->tokens as $offset => $token) { + $this->tokensByType[$token[self::TYPE_OFFSET]][] = $offset; + } + } + + function collectBracketMatchings() + { + $this->matchingBrackets = []; + $stack = []; + foreach ($this->tokens as $offset => $token) { + $type = $token[self::TYPE_OFFSET]; + switch ($type) { + case '(': + case '[': + case '{': + case T_CURLY_OPEN: + case T_DOLLAR_OPEN_CURLY_BRACES: + case Generic\ATTRIBUTE: + $stack[] = $offset; + break; + case ')': + case ']': + case '}': + $top = array_pop($stack); + $this->matchingBrackets[$top] = $offset; + $this->matchingBrackets[$offset] = $top; + break; + } + } + } + + function collectLevelInfo() + { + $level = 0; + $this->levels = []; + $this->tokensByLevel = []; + $this->levelBeginnings = []; + $this->levelEndings = []; + $this->tokensByLevelAndType = []; + foreach ($this->tokens as $offset => $token) { + $type = $token[self::TYPE_OFFSET]; + switch ($type) { + case '(': + case '[': + case '{': + case T_CURLY_OPEN: + case T_DOLLAR_OPEN_CURLY_BRACES: + case Generic\ATTRIBUTE: + $level++; + Utils\appendUnder($this->levelBeginnings, $level, $offset); + break; + case ')': + case ']': + case '}': + Utils\appendUnder($this->levelEndings, $level, $offset); + $level--; + } + $this->levels[$offset] = $level; + Utils\appendUnder($this->tokensByLevel, $level, $offset); + Utils\appendUnder($this->tokensByLevelAndType, [$level, $type], $offset); + } + Utils\appendUnder($this->levelBeginnings, 0, 0); + Utils\appendUnder($this->levelEndings, 0, count($this->tokens) - 1); + } + + function has($types) + { + foreach ((array) $types as $type) { + if ($this->all($type) !== []) { + return true; + } + } + return false; + } + + function is($types, $offset) + { + foreach ((array) $types as $type) { + if ($this->tokens[$offset][self::TYPE_OFFSET] === $type) { + return true; + } + } + return false; + } + + function skip($types, $offset, $direction = 1) + { + $offset += $direction; + $types = (array) $types; + while ($offset < count($this->tokens) && $offset >= 0) { + if (!in_array($this->tokens[$offset][self::TYPE_OFFSET], $types)) { + return $offset; + } + $offset += $direction; + } + return ($direction > 0) ? INF : -1; + } + + function skipBack($types, $offset) + { + return $this->skip($types, $offset, -1); + } + + function within($types, $low, $high) + { + $result = []; + foreach ((array) $types as $type) { + $candidates = isset($this->tokensByType[$type]) ? $this->tokensByType[$type] : []; + $result = array_merge(Utils\allWithinRange($candidates, $low, $high), $result); + } + return $result; + } + + function read($offset, $count = 1) + { + $result = ''; + $pos = $offset; + while ($pos < $offset + $count) { + if (isset($this->tokens[$pos][self::STRING_OFFSET])) { + $result .= $this->tokens[$pos][self::STRING_OFFSET]; + } else { + $result .= $this->tokens[$pos]; + } + $pos++; + } + return $result; + } + + function siblings($types, $offset) + { + $level = $this->levels[$offset]; + $begin = Utils\lastNotGreaterThan(Utils\access($this->levelBeginnings, $level, []), $offset); + $end = Utils\firstGreaterThan(Utils\access($this->levelEndings, $level, []), $offset); + if ($types === self::ANY) { + return Utils\allWithinRange($this->tokensByLevel[$level], $begin, $end); + } else { + $result = []; + foreach ((array) $types as $type) { + $candidates = Utils\access($this->tokensByLevelAndType, [$level, $type], []); + $result = array_merge(Utils\allWithinRange($candidates, $begin, $end), $result); + } + return $result; + } + } + + function next($types, $offset) + { + if (!is_array($types)) { + $candidates = Utils\access($this->tokensByType, $types, []); + return Utils\firstGreaterThan($candidates, $offset); + } + $result = INF; + foreach ($types as $type) { + $result = min($this->next($type, $offset), $result); + } + return $result; + } + + function all($types) + { + if (!is_array($types)) { + return Utils\access($this->tokensByType, $types, []); + } + $result = []; + foreach ($types as $type) { + $result = array_merge($result, $this->all($type)); + } + sort($result); + return $result; + } + + function match($offset) + { + $offset = (string) $offset; + return isset($this->matchingBrackets[$offset]) ? $this->matchingBrackets[$offset] : INF; + } + + function splice($splice, $offset, $length = 0, $policy = self::OVERWRITE) + { + if ($policy === self::OVERWRITE) { + $this->splices[$offset] = $splice; + } elseif ($policy === self::PREPEND || $policy === self::APPEND) { + if (!isset($this->splices[$offset])) { + $this->splices[$offset] = ''; + } + if ($policy === self::PREPEND) { + $this->splices[$offset] = $splice . $this->splices[$offset]; + } elseif ($policy === self::APPEND) { + $this->splices[$offset] .= $splice; + } + } + if (!isset($this->spliceLengths[$offset])) { + $this->spliceLengths[$offset] = 0; + } + $this->spliceLengths[$offset] = max($length, $this->spliceLengths[$offset]); + $this->code = null; + } + + function createCodeFromTokens() + { + $splices = $this->splices; + $code = ""; + $count = count($this->tokens); + for ($offset = 0; $offset < $count; $offset++) { + if (isset($splices[$offset])) { + $code .= $splices[$offset]; + unset($splices[$offset]); + $offset += $this->spliceLengths[$offset] - 1; + } else { + $t = $this->tokens[$offset]; + $code .= isset($t[self::STRING_OFFSET]) ? $t[self::STRING_OFFSET] : $t; + } + } + $this->code = $code; + } + + static function junk() + { + return [T_WHITESPACE, T_COMMENT, T_DOC_COMMENT]; + } + + function __toString() + { + if ($this->code === null) { + $this->createCodeFromTokens(); + } + return (string) $this->code; + } + + function flush() + { + $this->initialize(Utils\tokenize($this)); + } + + /** + * @since 2.1.0 + */ + function cache(array $args, \Closure $function) + { + $found = true; + $trace = debug_backtrace()[1]; + $location = $trace['file'] . ':' . $trace['line']; + $result = &$this->cache; + foreach (array_merge([$location], $args) as $step) { + if (!is_scalar($step)) { + throw new \LogicException; + } + if (!isset($result[$step])) { + $result[$step] = []; + $found = false; + } + $result = &$result[$step]; + } + if (!$found) { + $result = call_user_func_array($function->bindTo($this), $args); + } + return $result; + } +} diff --git a/vendor/antecedent/patchwork/src/CodeManipulation/Stream.php b/vendor/antecedent/patchwork/src/CodeManipulation/Stream.php new file mode 100644 index 0000000..9167b99 --- /dev/null +++ b/vendor/antecedent/patchwork/src/CodeManipulation/Stream.php @@ -0,0 +1,362 @@ + + * @copyright 2010-2023 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\CodeManipulation; + +use Patchwork\Utils; + +class Stream +{ + const STREAM_OPEN_FOR_INCLUDE = 128; + const STAT_MTIME_NUMERIC_OFFSET = 9; + const STAT_MTIME_ASSOC_OFFSET = 'mtime'; + + protected static $protocols = ['file', 'phar']; + protected static $otherWrapperClass; + + public $context; + public $resource; + + public static function discoverOtherWrapper() + { + $handle = fopen(__FILE__, 'r'); + $meta = stream_get_meta_data($handle); + if ($meta && isset($meta['wrapper_data']) && is_object($meta['wrapper_data']) && !($meta['wrapper_data'] instanceof self)) { + static::$otherWrapperClass = get_class($meta['wrapper_data']); + } + } + + public static function wrap() + { + foreach (static::$protocols as $protocol) { + stream_wrapper_unregister($protocol); + stream_wrapper_register($protocol, get_called_class()); + } + } + + public static function unwrap() + { + foreach (static::$protocols as $protocol) { + set_error_handler(function() {}); + stream_wrapper_restore($protocol); + restore_error_handler(); + } + } + + public static function reinstateWrapper() + { + static::discoverOtherWrapper(); + static::unwrap(); + static::wrap(); + } + + public function stream_open($path, $mode, $options, &$openedPath) + { + $including = (bool) ($options & self::STREAM_OPEN_FOR_INCLUDE); + + // `parse_ini_file()` also sets STREAM_OPEN_FOR_INCLUDE. + if ($including) { + $frame = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]; + if (empty($frame['class']) && $frame['function'] === 'parse_ini_file') { + $including = false; + } + } + + if ($including && shouldTransform($path)) { + $this->resource = transformAndOpen($path); + return $this->resource !== false; + } + + $this->resource = static::fopen($path, $mode, $options, $this->context); + return $this->resource !== false; + } + + public static function getOtherWrapper($context) + { + if (isset(static::$otherWrapperClass)) { + $class = static::$otherWrapperClass; + $otherWrapper = new $class; + if ($context !== null) { + $otherWrapper->context = $context; + } + return $otherWrapper; + } + } + + public static function alternate(callable $internal, $resource, $wrapped, array $args = [], array $extraArgs = [], $context = null, $shouldReturnResource = false) + { + $shouldAddResourceArg = true; + if ($resource === null) { + $resource = static::getOtherWrapper($context); + $shouldAddResourceArg = false; + } + if (is_object($resource)) { + $args = array_merge($args, $extraArgs); + $ladder = function() use ($resource, $wrapped, $args) { + switch (count($args)) { + case 0: + return $resource->$wrapped(); + case 1: + return $resource->$wrapped($args[0]); + case 2: + return $resource->$wrapped($args[0], $args[1]); + default: + return call_user_func_array([$resource, $wrapped], $args); + } + }; + $result = $ladder(); + static::unwrap(); + static::wrap(); + } else { + if ($shouldAddResourceArg) { + array_unshift($args, $resource); + } + if ($context !== null) { + $args[] = $context; + } + $result = static::bypass(function() use ($internal, $args) { + switch (count($args)) { + case 0: + return $internal(); + case 1: + return $internal($args[0]); + case 2: + return $internal($args[0], $args[1]); + default: + return call_user_func_array($internal, $args); + } + }); + } + if ($shouldReturnResource) { + return ($result !== false) ? $resource : false; + } + return $result; + } + + public static function fopen($path, $mode, $options, $context = null) + { + $otherWrapper = static::getOtherWrapper($context); + if ($otherWrapper !== null) { + $openedPath = null; + $result = $otherWrapper->stream_open($path, $mode, $options, $openedPath); + return $result !== false ? $otherWrapper : false; + } + return static::bypass(function() use ($path, $mode, $options, $context) { + if ($context === null) { + return fopen($path, $mode, $options); + } + return fopen($path, $mode, $options, $context); + }); + } + + public function stream_close() + { + return static::fclose($this->resource); + } + + public static function fclose($resource) + { + return static::alternate('fclose', $resource, 'stream_close'); + } + + public static function fread($resource, $count) + { + return static::alternate('fread', $resource, 'stream_read', [$count]); + } + + public static function feof($resource) + { + return static::alternate('feof', $resource, 'stream_eof'); + } + + public function stream_eof() + { + return static::feof($this->resource); + } + + public function stream_flush() + { + return static::alternate('fflush', $this->resource, 'stream_flush'); + } + + public function stream_read($count) + { + return static::fread($this->resource, $count); + } + + public function stream_seek($offset, $whence = SEEK_SET) + { + if (is_object($this->resource)) { + return $this->resource->stream_seek($offset, $whence); + } + return fseek($this->resource, $offset, $whence) === 0; + } + + public function stream_stat() + { + if (is_object($this->resource)) { + return $this->resource->stream_stat(); + } + $result = fstat($this->resource); + if ($result) { + $result[self::STAT_MTIME_ASSOC_OFFSET]++; + $result[self::STAT_MTIME_NUMERIC_OFFSET]++; + } + return $result; + } + + public function stream_tell() + { + return static::alternate('ftell', $this->resource, 'stream_tell'); + } + + public static function bypass(callable $action) + { + static::unwrap(); + $result = $action(); + static::wrap(); + return $result; + } + + public function url_stat($path, $flags) + { + $internal = function($path, $flags) { + $func = ($flags & STREAM_URL_STAT_LINK) ? 'lstat' : 'stat'; + clearstatcache(); + if ($flags & STREAM_URL_STAT_QUIET) { + set_error_handler(function() {}); + try { + $result = call_user_func($func, $path); + } catch (\Exception $e) { + $result = null; + } + restore_error_handler(); + } else { + $result = call_user_func($func, $path); + } + clearstatcache(); + if ($result) { + $result[self::STAT_MTIME_ASSOC_OFFSET]++; + $result[self::STAT_MTIME_NUMERIC_OFFSET]++; + } + return $result; + }; + return static::alternate($internal, null, __FUNCTION__, [$path, $flags], [], $this->context); + } + + public function dir_closedir() + { + return static::alternate('closedir', $this->resource, 'dir_closedir') ?: true; + } + + public function dir_opendir($path, $options) + { + $this->resource = static::alternate('opendir', null, __FUNCTION__, [$path], [$options], $this->context); + return $this->resource !== false; + } + + public function dir_readdir() + { + return static::alternate('readdir', $this->resource, __FUNCTION__); + } + + public function dir_rewinddir() + { + return static::alternate('rewinddir', $this->resource, __FUNCTION__); + } + + public function mkdir($path, $mode, $options) + { + return static::alternate('mkdir', null, __FUNCTION__, [$path, $mode, $options], [], $this->context); + } + + public function rename($pathFrom, $pathTo) + { + return static::alternate('rename', null, __FUNCTION__, [$pathFrom, $pathTo], [], $this->context); + } + + public function rmdir($path, $options) + { + return static::alternate('rmdir', null, __FUNCTION__, [$path], [$options], $this->context); + } + + public function stream_cast($castAs) + { + return static::alternate(function() { + return $this->resource; + }, null, __FUNCTION__, [$castAs]); + } + + public function stream_lock($operation) + { + if ($operation === '0' || $operation === 0) { + $operation = LOCK_EX; + } + return static::alternate('flock', $this->resource, __FUNCTION__, [$operation]); + } + + public function stream_set_option($option, $arg1, $arg2) + { + $internal = function($option, $arg1, $arg2) { + switch ($option) { + case STREAM_OPTION_BLOCKING: + return stream_set_blocking($this->resource, $arg1); + case STREAM_OPTION_READ_TIMEOUT: + return stream_set_timeout($this->resource, $arg1, $arg2); + case STREAM_OPTION_WRITE_BUFFER: + return stream_set_write_buffer($this->resource, $arg1); + case STREAM_OPTION_READ_BUFFER: + return stream_set_read_buffer($this->resource, $arg1); + } + }; + return static::alternate($internal, $this->resource, __FUNCTION__, [$option, $arg1, $arg2]); + } + + public function stream_write($data) + { + return static::fwrite($this->resource, $data); + } + + public static function fwrite($resource, $data) + { + return static::alternate('fwrite', $resource, 'stream_write', [$data]); + } + + public function unlink($path) + { + return static::alternate('unlink', $this->resource, __FUNCTION__, [$path], [], $this->context); + } + + public function stream_metadata($path, $option, $value) + { + $internal = function($path, $option, $value) { + switch ($option) { + case STREAM_META_TOUCH: + if (empty($value)) { + return touch($path); + } else { + return touch($path, $value[0], $value[1]); + } + case STREAM_META_OWNER_NAME: + case STREAM_META_OWNER: + return chown($path, $value); + case STREAM_META_GROUP_NAME: + case STREAM_META_GROUP: + return chgrp($path, $value); + case STREAM_META_ACCESS: + return chmod($path, $value); + } + }; + return static::alternate($internal, null, __FUNCTION__, [$path, $option, $value]); + } + + public function stream_truncate($newSize) + { + return static::alternate('ftruncate', $this->resource, __FUNCTION__, [$newSize]); + } +} diff --git a/vendor/antecedent/patchwork/src/Config.php b/vendor/antecedent/patchwork/src/Config.php new file mode 100644 index 0000000..e055d07 --- /dev/null +++ b/vendor/antecedent/patchwork/src/Config.php @@ -0,0 +1,233 @@ + + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\Config; + +use Patchwork\Utils; +use Patchwork\Exceptions; +use Patchwork\CodeManipulation\Actions\RedefinitionOfLanguageConstructs; + +const FILE_NAME = 'patchwork.json'; + +function locate() +{ + $alreadyChecked = []; + $paths = array_map('dirname', get_included_files()); + $paths[] = dirname($_SERVER['PHP_SELF']); + $paths[] = getcwd(); + foreach ($paths as $path) { + while (dirname($path) !== $path) { + $file = $path . DIRECTORY_SEPARATOR . FILE_NAME; + if (!isset($alreadyChecked[$file]) && is_file($file)) { + read($file); + State::$timestamp = max(filemtime($file), State::$timestamp); + } + $alreadyChecked[$file] = true; + $path = dirname($path); + } + } +} + +function read($file) +{ + $data = json_decode(file_get_contents($file), true); + if (json_last_error() !== JSON_ERROR_NONE) { + $message = json_last_error_msg(); + throw new Exceptions\ConfigMalformed($file, $message); + } + set($data, $file); +} + +function set(array $data, $file) +{ + $keys = array_keys($data); + $list = ['blacklist', 'whitelist', 'cache-path', 'redefinable-internals', 'new-keyword-redefinable']; + $unknown = array_diff($keys, $list); + if ($unknown != []) { + throw new Exceptions\ConfigKeyNotRecognized(reset($unknown), $list, $file); + } + $root = dirname($file); + setBlacklist(get($data, 'blacklist'), $root); + setWhitelist(get($data, 'whitelist'), $root); + setCachePath(get($data, 'cache-path'), $root); + setRedefinableInternals(get($data, 'redefinable-internals'), $root); + setNewKeywordRedefinability(get($data, 'new-keyword-redefinable'), $root); +} + +function get(array $data, $key) +{ + return isset($data[$key]) ? $data[$key] : null; +} + +function setBlacklist($data, $root) +{ + merge(State::$blacklist, resolvePaths($data, $root)); +} + +function isListed($path, array $list) +{ + $path = rtrim($path, '\\/'); + foreach ($list as $item) { + if (!is_string($item)) { + $item = chr($item); + } + if (strpos($path, $item) === 0) { + return true; + } + } + return false; +} + +function isBlacklisted($path) +{ + return isListed($path, State::$blacklist); +} + +function setWhitelist($data, $root) +{ + merge(State::$whitelist, resolvePaths($data, $root)); +} + +function isWhitelisted($path) +{ + return isListed($path, State::$whitelist); +} + +function setCachePath($data, $root) +{ + if ($data === null) { + return; + } + $path = resolvePath($data, $root); + if (State::$cachePath !== null && State::$cachePath !== $path) { + throw new Exceptions\CachePathConflict(State::$cachePath, $path); + } + State::$cachePath = $path; +} + +function getDefaultRedefinableInternals() +{ + return [ + 'preg_replace_callback', + 'spl_autoload_register', + 'iterator_apply', + 'header_register_callback', + 'call_user_func', + 'call_user_func_array', + 'forward_static_call', + 'forward_static_call_array', + 'register_shutdown_function', + 'register_tick_function', + 'unregister_tick_function', + 'ob_start', + 'usort', + 'uasort', + 'uksort', + 'array_reduce', + 'array_intersect_ukey', + 'array_uintersect', + 'array_uintersect_assoc', + 'array_intersect_uassoc', + 'array_uintersect_uassoc', + 'array_uintersect_uassoc', + 'array_diff_ukey', + 'array_udiff', + 'array_udiff_assoc', + 'array_diff_uassoc', + 'array_udiff_uassoc', + 'array_udiff_uassoc', + 'array_filter', + 'array_map', + 'libxml_set_external_entity_loader', + ]; +} + +function getRedefinableInternals() +{ + if (!empty(State::$redefinableInternals)) { + return array_merge(State::$redefinableInternals, getDefaultRedefinableInternals()); + } + return []; +} + +function setRedefinableInternals($names) +{ + merge(State::$redefinableInternals, $names); + $constructs = array_intersect(State::$redefinableInternals, getSupportedLanguageConstructs()); + State::$redefinableLanguageConstructs = array_merge(State::$redefinableLanguageConstructs, $constructs); + State::$redefinableInternals = array_diff(State::$redefinableInternals, $constructs); +} + +function setNewKeywordRedefinability($value) +{ + State::$newKeywordRedefinable = State::$newKeywordRedefinable || $value; +} + +function getRedefinableLanguageConstructs() +{ + return State::$redefinableLanguageConstructs; +} + +function getSupportedLanguageConstructs() +{ + return array_keys(RedefinitionOfLanguageConstructs\getMappingOfConstructs()); +} + +function isNewKeywordRedefinable() +{ + return State::$newKeywordRedefinable; +} + +function getCachePath() +{ + return State::$cachePath; +} + +function resolvePath($path, $root) +{ + if ($path === null) { + return null; + } + if (file_exists($path) && realpath($path) === $path) { + return $path; + } + return realpath($root . '/' . $path); +} + +function resolvePaths($paths, $root) +{ + if ($paths === null) { + return []; + } + $result = []; + foreach ((array) $paths as $path) { + $result[] = resolvePath($path, $root); + } + return $result; +} + +function merge(array &$target, $source) +{ + $target = array_merge($target, (array) $source); +} + +function getTimestamp() +{ + return State::$timestamp; +} + +class State +{ + static $blacklist = []; + static $whitelist = []; + static $cachePath; + static $redefinableInternals = []; + static $redefinableLanguageConstructs = []; + static $newKeywordRedefinable = false; + static $timestamp = 0; +} diff --git a/vendor/antecedent/patchwork/src/Console.php b/vendor/antecedent/patchwork/src/Console.php new file mode 100644 index 0000000..a419503 --- /dev/null +++ b/vendor/antecedent/patchwork/src/Console.php @@ -0,0 +1,57 @@ + + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\Console; + +use Patchwork\CodeManipulation as CM; + +error_reporting(E_ALL); + +$argc > 2 && $argv[1] == 'prime' + or exit("\nUsage: php patchwork.phar prime DIR1 DIR2 ... DIRn\n" . + " (to recursively prime all PHP files under given directories)\n\n"); + +try { + CM\cacheEnabled() + or exit("\nError: no cache location set.\n\n"); +} catch (Patchwork\Exceptions\CachePathUnavailable $e) { + exit("\nError: " . $e->getMessage() . "\n\n"); +} + +echo "\nCounting files...\n"; + +$files = []; + +foreach (array_slice($argv, 2) as $path) { + $path = realpath($path); + foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path)) as $file) { + if (substr($file, -4) == '.php' && !CM\internalToCache($file) && !CM\availableCached($file)) { + $files[] = $file; + } + } +} + +$count = count($files); + +$count > 0 or exit("\nNothing to do.\n\n"); + +echo "\nPriming ($count files total):\n"; + +const CONSOLE_WIDTH = 80; + +$progress = 0; + +for ($i = 0; $i < $count; $i++) { + CM\prime($files[$i]->getRealPath()); + while ((int) (($i + 1) / $count * CONSOLE_WIDTH) > $progress) { + echo '.'; + $progress++; + } +} + +echo "\n\n"; diff --git a/vendor/antecedent/patchwork/src/Exceptions.php b/vendor/antecedent/patchwork/src/Exceptions.php new file mode 100644 index 0000000..5792867 --- /dev/null +++ b/vendor/antecedent/patchwork/src/Exceptions.php @@ -0,0 +1,129 @@ + + * @copyright 2010-2023 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\Exceptions; + +use Patchwork\Utils; + +abstract class Exception extends \Exception +{ +} + +class NoResult extends Exception +{ +} + +class StackEmpty extends Exception +{ + protected $message = "There are no calls in the dispatch stack"; +} + +abstract class CallbackException extends Exception +{ + function __construct($callback) + { + parent::__construct(sprintf($this->message, Utils\callableToString($callback))); + } +} + +class NotUserDefined extends CallbackException +{ + protected $message = 'Please include {"redefinable-internals": ["%s"]} in your patchwork.json.'; +} + +class DefinedTooEarly extends CallbackException +{ + + function __construct($callback) + { + $this->message = "The file that defines %s() was included earlier than Patchwork. " . + "Please reverse this order to be able to redefine the function in question."; + parent::__construct($callback); + } +} + +class InternalMethodsNotSupported extends CallbackException +{ + protected $message = "Methods of internal classes (such as %s) are not yet redefinable in Patchwork 2.1."; +} + +/** + * @deprecated 2.2.0 + */ +class InternalsNotSupportedOnHHVM extends CallbackException +{ + protected $message = "As of version 2.1, Patchwork cannot redefine internal functions and methods (such as %s) on HHVM."; +} + +class CachePathUnavailable extends Exception +{ + function __construct($location) + { + parent::__construct(sprintf( + "The specified cache path is nonexistent or read-only: %s", + $location + )); + } +} + +class ConfigException extends Exception +{ +} + +class ConfigMalformed extends ConfigException +{ + function __construct($file, $message) + { + parent::__construct(sprintf( + 'The configuration file %s is malformed: %s', + $file, + $message + )); + } +} + +class ConfigKeyNotRecognized extends ConfigException +{ + function __construct($key, $list, $file) + { + parent::__construct(sprintf( + "The key '%s' in the configuration file %s was not recognized. " . + "You might have meant one of these: %s", + $key, + $file, + join(', ', $list) + )); + } +} + +class CachePathConflict extends ConfigException +{ + function __construct($first, $second) + { + parent::__construct(sprintf( + "Detected configuration files provide conflicting cache paths: %s and %s", + $first, + $second + )); + } +} + +class NewKeywordNotRedefinable extends ConfigException +{ + protected $message = 'Please set {"new-keyword-redefinable": true} to redefine instantiations'; +} + +class NonNullToVoid extends Exception +{ + protected $message = 'A redefinition of a void-typed callable attempted to return a non-null result'; +} + +class ReturnFromNever extends Exception +{ + protected $message = 'A redefinition of a never-typed callable attempted to return'; +} diff --git a/vendor/antecedent/patchwork/src/Redefinitions/LanguageConstructs.php b/vendor/antecedent/patchwork/src/Redefinitions/LanguageConstructs.php new file mode 100644 index 0000000..6617266 --- /dev/null +++ b/vendor/antecedent/patchwork/src/Redefinitions/LanguageConstructs.php @@ -0,0 +1,76 @@ + + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\Redefinitions\LanguageConstructs; + +function _echo($string) +{ + foreach (func_get_args() as $argument) { + echo $argument; + } +} + +function _print($string) +{ + return print($string); +} + +function _eval($code) +{ + return eval($code); +} + +function _die($message = null) +{ + die($message); +} + +function _exit($message = null) +{ + exit($message); +} + +function _isset(&$lvalue) +{ + return isset($lvalue); +} + +function _unset(&$lvalue) +{ + unset($lvalue); +} + +function _empty(&$lvalue) +{ + return empty($lvalue); +} + +function _require($path) +{ + return require($path); +} + +function _require_once($path) +{ + return require_once($path); +} + +function _include($path) +{ + return include($path); +} + +function _include_once($path) +{ + return include_once($path); +} + +function _clone($object) +{ + return clone $object; +} diff --git a/vendor/antecedent/patchwork/src/Stack.php b/vendor/antecedent/patchwork/src/Stack.php new file mode 100644 index 0000000..a49d381 --- /dev/null +++ b/vendor/antecedent/patchwork/src/Stack.php @@ -0,0 +1,95 @@ + + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\Stack; + +use Patchwork\Exceptions; + +function push($offset, $calledClass, ?array $argsOverride = null) +{ + State::$items[] = [$offset, $calledClass, $argsOverride]; +} + +function pop() +{ + array_pop(State::$items); +} + +function pushFor($offset, $calledClass, $callback, ?array $argsOverride = null) +{ + push($offset, $calledClass, $argsOverride); + try { + $callback(); + } catch (\Exception $e) { + $exception = $e; + } + pop(); + if (isset($exception)) { + throw $exception; + } +} + +function top($property = null) +{ + $all = all(); + $frame = reset($all); + $argsOverride = topArgsOverride(); + if ($argsOverride !== null) { + $frame["args"] = $argsOverride; + } + if ($property) { + return isset($frame[$property]) ? $frame[$property] : null; + } + return $frame; +} + +function topOffset() +{ + if (empty(State::$items)) { + throw new Exceptions\StackEmpty; + } + list($offset, $calledClass) = end(State::$items); + return $offset; +} + +function topCalledClass() +{ + if (empty(State::$items)) { + throw new Exceptions\StackEmpty; + } + list($offset, $calledClass) = end(State::$items); + return $calledClass; +} + +function topArgsOverride() +{ + if (empty(State::$items)) { + throw new Exceptions\StackEmpty; + } + list($offset, $calledClass, $argsOverride) = end(State::$items); + return $argsOverride; +} + +function all() +{ + $backtrace = debug_backtrace(); + return array_slice($backtrace, count($backtrace) - topOffset()); +} + +function allCalledClasses() +{ + return array_map(function($item) { + list($offset, $calledClass) = $item; + return $calledClass; + }, State::$items); +} + +class State +{ + static $items = []; +} diff --git a/vendor/antecedent/patchwork/src/Utils.php b/vendor/antecedent/patchwork/src/Utils.php new file mode 100644 index 0000000..1d92dfb --- /dev/null +++ b/vendor/antecedent/patchwork/src/Utils.php @@ -0,0 +1,388 @@ + + * @copyright 2010-2018 Ignas Rudaitis + * @license http://www.opensource.org/licenses/mit-license.html + */ +namespace Patchwork\Utils; + +use Patchwork\Config; +use Patchwork\CallRerouting; +use Patchwork\CodeManipulation; + +const ALIASING_CODE = ' + namespace %s; + function %s() { + return call_user_func_array("%s", func_get_args()); + } +'; + +function clearOpcodeCaches() +{ + if (function_exists('opcache_reset')) { + opcache_reset(); + } + if (ini_get('wincache.ocenabled')) { + wincache_refresh_if_changed(); + } + if (ini_get('apc.enabled') && function_exists('apc_clear_cache')) { + apc_clear_cache(); + } +} + +/** + * @deprecated 2.2.0 + */ +function generatorsSupported() +{ + return version_compare(PHP_VERSION, "5.5", ">="); +} + +/** + * @deprecated 2.2.0 + */ +function runningOnHHVM() +{ + return defined("HHVM_VERSION"); +} + +function condense($string) +{ + return preg_replace('/\s+/', ' ', $string); +} + +function indexOfFirstGreaterThan(array $array, $value) +{ + $low = 0; + $high = count($array) - 1; + if (empty($array) || $array[$high] <= $value) { + return -1; + } + while ($low < $high) { + $mid = (int)(($low + $high) / 2); + if ($array[$mid] <= $value) { + $low = $mid + 1; + } else { + $high = $mid; + } + } + return $low; +} + +function indexOfLastNotGreaterThan(array $array, $value) +{ + if (empty($array)) { + return -1; + } + $result = indexOfFirstGreaterThan($array, $value); + if ($result === -1) { + $result = count($array) - 1; + } + while ($array[$result] > $value) { + $result--; + } + return $result; +} + +function firstGreaterThan(array $array, $value, $default = INF) +{ + $index = indexOfFirstGreaterThan($array, $value); + return ($index !== -1) ? $array[$index] : $default; +} + +function lastNotGreaterThan(array $array, $value, $default = INF) +{ + $index = indexOfLastNotGreaterThan($array, $value); + return ($index !== -1) ? $array[$index] : $default; +} + +function allWithinRange(array $array, $low, $high) +{ + $low--; + $high++; + $index = indexOfFirstGreaterThan($array, $low); + if ($index === -1) { + return []; + } + $result = []; + while ($index < count($array) && $array[$index] < $high) { + $result[] = $array[$index]; + $index++; + } + return $result; +} + +function interpretCallable($callback) +{ + if (is_object($callback)) { + return interpretCallable([$callback, "__invoke"]); + } + if (is_array($callback)) { + list($class, $method) = $callback; + $instance = null; + if (is_object($class)) { + $instance = $class; + $class = get_class($class); + } + $class = isset($class) ? ltrim($class, "\\") : ''; + return [$class, $method, $instance]; + } + if (substr($callback, 0, 4) === 'new ') { + return [ltrim(substr($callback, 4)), 'new', null]; + } + $callback = ltrim($callback, "\\"); + if (strpos($callback, "::")) { + list($class, $method) = explode("::", $callback); + return [$class, $method, null]; + } + return [null, $callback, null]; +} + +function callableDefined($callable, $shouldAutoload = false) +{ + list($class, $method, $instance) = interpretCallable($callable); + if ($instance !== null) { + return true; + } + if (isset($class)) { + return classOrTraitExists($class, $shouldAutoload) && + (method_exists($class, $method) || $method === 'new'); + } + return function_exists($method); +} + +function classOrTraitExists($classOrTrait, $shouldAutoload = true) +{ + return class_exists($classOrTrait, $shouldAutoload) + || trait_exists($classOrTrait, $shouldAutoload); +} + +function append(&$array, $value) +{ + $array[] = $value; + end($array); + return key($array); +} + +function appendUnder(&$array, $path, $value) +{ + foreach ((array) $path as $key) { + if (!isset($array[$key])) { + $array[$key] = []; + } + $array = &$array[$key]; + } + return append($array, $value); +} + +function access($array, $path, $default = null) +{ + foreach ((array) $path as $key) { + if (!isset($array[$key])) { + return $default; + } + $array = $array[$key]; + } + return $array; +} + +function normalizePath($path) +{ + return rtrim(strtr($path, "\\", "/"), "/"); +} + +function reflectCallable($callback) +{ + if ($callback instanceof \Closure) { + return new \ReflectionFunction($callback); + } + list($class, $method) = interpretCallable($callback); + if (isset($class)) { + return new \ReflectionMethod($class, $method); + } + return new \ReflectionFunction($method); +} + +function callableToString($callback) +{ + list($class, $method) = interpretCallable($callback); + if (isset($class)) { + return $class . "::" . $method; + } + return $method; +} + +function alias($namespace, array $mapping) +{ + foreach ($mapping as $original => $aliases) { + $original = ltrim(str_replace('\\', '\\\\', $namespace) . '\\\\' . $original, '\\'); + foreach ((array) $aliases as $alias) { + eval(sprintf(ALIASING_CODE, $namespace, $alias, $original)); + } + } +} + +function getUserDefinedCallables() +{ + return array_merge(get_defined_functions()['user'], getUserDefinedMethods()); +} + +function getRedefinableCallables() +{ + return array_merge(getUserDefinedCallables(), Config\getRedefinableInternals()); +} + +function getUserDefinedMethods() +{ + static $result = []; + static $classCount = 0; + static $traitCount = 0; + $classes = getUserDefinedClasses(); + $traits = getUserDefinedTraits(); + $newClasses = array_slice($classes, $classCount); + $newTraits = array_slice($traits, $traitCount); + foreach (array_merge($newClasses, $newTraits) as $newClass) { + foreach (get_class_methods($newClass) as $method) { + $result[] = $newClass . '::' . $method; + } + } + $classCount = count($classes); + $traitCount = count($traits); + return $result; +} + +function getUserDefinedClasses() +{ + static $classCutoff; + $classes = get_declared_classes(); + if (!isset($classCutoff)) { + $classCutoff = count($classes); + for ($i = 0; $i < count($classes); $i++) { + if ((new \ReflectionClass($classes[$i]))->isUserDefined()) { + $classCutoff = $i; + break; + } + } + } + return array_slice($classes, $classCutoff); +} + +function getUserDefinedTraits() +{ + static $traitCutoff; + $traits = get_declared_traits(); + if (!isset($traitCutoff)) { + $traitCutoff = count($traits); + for ($i = 0; $i < count($traits); $i++) { + $methods = get_class_methods($traits[$i]); + if (empty($methods)) { + continue; + } + list($first) = $methods; + if ((new \ReflectionMethod($traits[$i], $first))->isUserDefined()) { + $traitCutoff = $i; + break; + } + } + } + return array_slice($traits, $traitCutoff); +} + +function matchWildcard($wildcard, array $subjects) +{ + $table = ['*' => '.*', '{' => '(', '}' => ')', ' ' => '', '\\' => '\\\\']; + $pattern = '/' . strtr($wildcard, $table) . '/i'; + return preg_grep($pattern, $subjects); +} + +function wildcardMatches($wildcard, $subject) +{ + return matchWildcard($wildcard, [$subject]) == [$subject]; +} + +function isOwnName($name) +{ + return stripos((string) $name, 'Patchwork\\') === 0 + && stripos((string) $name, CallRerouting\INTERNAL_REDEFINITION_NAMESPACE . '\\') !== 0; +} + +function isForeignName($name) +{ + return !isOwnName($name); +} + +function markMissedCallables() +{ + State::$missedCallables = array_map('strtolower', getUserDefinedCallables()); +} + +function getMissedCallables() +{ + return State::$missedCallables; +} + +function callableWasMissed($name) +{ + return in_array(strtolower($name), getMissedCallables()); +} + +function endsWith($haystack, $needle) +{ + if (strlen($haystack) === strlen($needle)) { + return $haystack === $needle; + } + if (strlen($haystack) < strlen($needle)) { + return false; + } + return substr($haystack, -strlen($needle)) === $needle; +} + +function wasRunAsConsoleApp() +{ + global $argv; + return isset($argv) && ( + endsWith($argv[0], 'patchwork.phar') || endsWith($argv[0], 'Patchwork.php') + ); +} + +function getParameterAndArgumentLists(?\ReflectionMethod $reflection = null) +{ + $parameters = []; + $arguments = []; + if ($reflection) { + foreach ($reflection->getParameters() as $p) { + $parameter = '$' . $p->name; + if ($p->isOptional()) { + try { + $value = var_export($p->getDefaultValue(), true); + } catch (\ReflectionException $e) { + $value = var_export(CallRerouting\INSTANTIATOR_DEFAULT_ARGUMENT, true); + } + $parameter .= ' = ' . $value; + } + $parameters[] = $parameter; + $arguments[] = '$' . $p->name; + } + } + return [join(', ' , $parameters), join(', ', $arguments)]; +} + +function args() +{ + return func_get_args(); +} + +function tokenize($string) +{ + if (defined('TOKEN_PARSE')) { + return token_get_all($string, TOKEN_PARSE); + } + return token_get_all($string); +} + +class State +{ + static $missedCallables = []; +} diff --git a/vendor/bin/php-parse b/vendor/bin/php-parse new file mode 100755 index 0000000..61566e6 --- /dev/null +++ b/vendor/bin/php-parse @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse'); + } +} + +return include __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse'; diff --git a/vendor/bin/phpcbf b/vendor/bin/phpcbf new file mode 100755 index 0000000..1c0c79c --- /dev/null +++ b/vendor/bin/phpcbf @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/squizlabs/php_codesniffer/bin/phpcbf'); + } +} + +return include __DIR__ . '/..'.'/squizlabs/php_codesniffer/bin/phpcbf'; diff --git a/vendor/bin/phpcs b/vendor/bin/phpcs new file mode 100755 index 0000000..04e658c --- /dev/null +++ b/vendor/bin/phpcs @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/squizlabs/php_codesniffer/bin/phpcs'); + } +} + +return include __DIR__ . '/..'.'/squizlabs/php_codesniffer/bin/phpcs'; diff --git a/vendor/bin/phpstan b/vendor/bin/phpstan new file mode 100755 index 0000000..d76c0be --- /dev/null +++ b/vendor/bin/phpstan @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/phpstan/phpstan/phpstan'); + } +} + +return include __DIR__ . '/..'.'/phpstan/phpstan/phpstan'; diff --git a/vendor/bin/phpstan.phar b/vendor/bin/phpstan.phar new file mode 100755 index 0000000..fecf96f --- /dev/null +++ b/vendor/bin/phpstan.phar @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/phpstan/phpstan/phpstan.phar'); + } +} + +return include __DIR__ . '/..'.'/phpstan/phpstan/phpstan.phar'; diff --git a/vendor/bin/phpunit b/vendor/bin/phpunit new file mode 100755 index 0000000..b5b530a --- /dev/null +++ b/vendor/bin/phpunit @@ -0,0 +1,122 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = 'phpvfscomposer://'.$this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + $data = str_replace('__DIR__', var_export(dirname($this->realpath), true), $data); + $data = str_replace('__FILE__', var_export($this->realpath, true), $data); + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/phpunit/phpunit/phpunit'); + } +} + +return include __DIR__ . '/..'.'/phpunit/phpunit/phpunit'; diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 6b08efd..878aec3 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -136,4 +136,1178 @@ 'Carbon_Fields\\Widget' => $vendorDir . '/htmlburger/carbon-fields/core/Widget.php', 'Carbon_Fields\\Widget\\Widget' => $vendorDir . '/htmlburger/carbon-fields/core/Widget/Widget.php', 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', + 'DeepCopy\\DeepCopy' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/DeepCopy.php', + 'DeepCopy\\Exception\\CloneException' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php', + 'DeepCopy\\Exception\\PropertyException' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Exception/PropertyException.php', + 'DeepCopy\\Filter\\ChainableFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/ChainableFilter.php', + 'DeepCopy\\Filter\\Doctrine\\DoctrineCollectionFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php', + 'DeepCopy\\Filter\\Doctrine\\DoctrineEmptyCollectionFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php', + 'DeepCopy\\Filter\\Doctrine\\DoctrineProxyFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php', + 'DeepCopy\\Filter\\Filter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php', + 'DeepCopy\\Filter\\KeepFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php', + 'DeepCopy\\Filter\\ReplaceFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php', + 'DeepCopy\\Filter\\SetNullFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php', + 'DeepCopy\\Matcher\\Doctrine\\DoctrineProxyMatcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php', + 'DeepCopy\\Matcher\\Matcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php', + 'DeepCopy\\Matcher\\PropertyMatcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php', + 'DeepCopy\\Matcher\\PropertyNameMatcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php', + 'DeepCopy\\Matcher\\PropertyTypeMatcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php', + 'DeepCopy\\Reflection\\ReflectionHelper' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php', + 'DeepCopy\\TypeFilter\\Date\\DateIntervalFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php', + 'DeepCopy\\TypeFilter\\Date\\DatePeriodFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DatePeriodFilter.php', + 'DeepCopy\\TypeFilter\\ReplaceFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php', + 'DeepCopy\\TypeFilter\\ShallowCopyFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php', + 'DeepCopy\\TypeFilter\\Spl\\ArrayObjectFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php', + 'DeepCopy\\TypeFilter\\Spl\\SplDoublyLinkedList' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php', + 'DeepCopy\\TypeFilter\\Spl\\SplDoublyLinkedListFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedListFilter.php', + 'DeepCopy\\TypeFilter\\TypeFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php', + 'DeepCopy\\TypeMatcher\\TypeMatcher' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php', + 'Doctrine\\Instantiator\\Exception\\ExceptionInterface' => $vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php', + 'Doctrine\\Instantiator\\Exception\\InvalidArgumentException' => $vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php', + 'Doctrine\\Instantiator\\Exception\\UnexpectedValueException' => $vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php', + 'Doctrine\\Instantiator\\Instantiator' => $vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php', + 'Doctrine\\Instantiator\\InstantiatorInterface' => $vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php', + 'Hamcrest\\Arrays\\IsArray' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php', + 'Hamcrest\\Arrays\\IsArrayContaining' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php', + 'Hamcrest\\Arrays\\IsArrayContainingInAnyOrder' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php', + 'Hamcrest\\Arrays\\IsArrayContainingInOrder' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php', + 'Hamcrest\\Arrays\\IsArrayContainingKey' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php', + 'Hamcrest\\Arrays\\IsArrayContainingKeyValuePair' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php', + 'Hamcrest\\Arrays\\IsArrayWithSize' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php', + 'Hamcrest\\Arrays\\MatchingOnce' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/MatchingOnce.php', + 'Hamcrest\\Arrays\\SeriesMatchingOnce' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php', + 'Hamcrest\\AssertionError' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php', + 'Hamcrest\\BaseDescription' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseDescription.php', + 'Hamcrest\\BaseMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php', + 'Hamcrest\\Collection\\IsEmptyTraversable' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php', + 'Hamcrest\\Collection\\IsTraversableWithSize' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php', + 'Hamcrest\\Core\\AllOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AllOf.php', + 'Hamcrest\\Core\\AnyOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php', + 'Hamcrest\\Core\\CombinableMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php', + 'Hamcrest\\Core\\DescribedAs' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php', + 'Hamcrest\\Core\\Every' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php', + 'Hamcrest\\Core\\HasToString' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php', + 'Hamcrest\\Core\\Is' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php', + 'Hamcrest\\Core\\IsAnything' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php', + 'Hamcrest\\Core\\IsCollectionContaining' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php', + 'Hamcrest\\Core\\IsEqual' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php', + 'Hamcrest\\Core\\IsIdentical' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php', + 'Hamcrest\\Core\\IsInstanceOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php', + 'Hamcrest\\Core\\IsNot' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php', + 'Hamcrest\\Core\\IsNull' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php', + 'Hamcrest\\Core\\IsSame' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php', + 'Hamcrest\\Core\\IsTypeOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php', + 'Hamcrest\\Core\\Set' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php', + 'Hamcrest\\Core\\ShortcutCombination' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php', + 'Hamcrest\\Description' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php', + 'Hamcrest\\DiagnosingMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/DiagnosingMatcher.php', + 'Hamcrest\\FeatureMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php', + 'Hamcrest\\Internal\\SelfDescribingValue' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php', + 'Hamcrest\\Matcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php', + 'Hamcrest\\MatcherAssert' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php', + 'Hamcrest\\Matchers' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php', + 'Hamcrest\\NullDescription' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php', + 'Hamcrest\\Number\\IsCloseTo' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/IsCloseTo.php', + 'Hamcrest\\Number\\OrderingComparison' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php', + 'Hamcrest\\SelfDescribing' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php', + 'Hamcrest\\StringDescription' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/StringDescription.php', + 'Hamcrest\\Text\\IsEmptyString' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php', + 'Hamcrest\\Text\\IsEqualIgnoringCase' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php', + 'Hamcrest\\Text\\IsEqualIgnoringWhiteSpace' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php', + 'Hamcrest\\Text\\MatchesPattern' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php', + 'Hamcrest\\Text\\StringContains' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php', + 'Hamcrest\\Text\\StringContainsIgnoringCase' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php', + 'Hamcrest\\Text\\StringContainsInOrder' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php', + 'Hamcrest\\Text\\StringEndsWith' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php', + 'Hamcrest\\Text\\StringStartsWith' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php', + 'Hamcrest\\Text\\SubstringMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php', + 'Hamcrest\\TypeSafeDiagnosingMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeDiagnosingMatcher.php', + 'Hamcrest\\TypeSafeMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php', + 'Hamcrest\\Type\\IsArray' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php', + 'Hamcrest\\Type\\IsBoolean' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsBoolean.php', + 'Hamcrest\\Type\\IsCallable' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsCallable.php', + 'Hamcrest\\Type\\IsDouble' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsDouble.php', + 'Hamcrest\\Type\\IsInteger' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsInteger.php', + 'Hamcrest\\Type\\IsNumeric' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsNumeric.php', + 'Hamcrest\\Type\\IsObject' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php', + 'Hamcrest\\Type\\IsResource' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsResource.php', + 'Hamcrest\\Type\\IsScalar' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsScalar.php', + 'Hamcrest\\Type\\IsString' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsString.php', + 'Hamcrest\\Util' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php', + 'Hamcrest\\Xml\\HasXPath' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php', + 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegration' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php', + 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegrationAssertPostConditions' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditions.php', + 'Mockery\\Adapter\\Phpunit\\MockeryTestCase' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php', + 'Mockery\\Adapter\\Phpunit\\MockeryTestCaseSetUp' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUp.php', + 'Mockery\\Adapter\\Phpunit\\TestListener' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php', + 'Mockery\\Adapter\\Phpunit\\TestListenerTrait' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListenerTrait.php', + 'Mockery\\ClosureWrapper' => $vendorDir . '/mockery/mockery/library/Mockery/ClosureWrapper.php', + 'Mockery\\CompositeExpectation' => $vendorDir . '/mockery/mockery/library/Mockery/CompositeExpectation.php', + 'Mockery\\Configuration' => $vendorDir . '/mockery/mockery/library/Mockery/Configuration.php', + 'Mockery\\Container' => $vendorDir . '/mockery/mockery/library/Mockery/Container.php', + 'Mockery\\CountValidator\\AtLeast' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/AtLeast.php', + 'Mockery\\CountValidator\\AtMost' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/AtMost.php', + 'Mockery\\CountValidator\\CountValidatorAbstract' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php', + 'Mockery\\CountValidator\\CountValidatorInterface' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/CountValidatorInterface.php', + 'Mockery\\CountValidator\\Exact' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/Exact.php', + 'Mockery\\CountValidator\\Exception' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/Exception.php', + 'Mockery\\Exception' => $vendorDir . '/mockery/mockery/library/Mockery/Exception.php', + 'Mockery\\Exception\\BadMethodCallException' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/BadMethodCallException.php', + 'Mockery\\Exception\\InvalidArgumentException' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/InvalidArgumentException.php', + 'Mockery\\Exception\\InvalidCountException' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/InvalidCountException.php', + 'Mockery\\Exception\\InvalidOrderException' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php', + 'Mockery\\Exception\\MockeryExceptionInterface' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/MockeryExceptionInterface.php', + 'Mockery\\Exception\\NoMatchingExpectationException' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php', + 'Mockery\\Exception\\RuntimeException' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/RuntimeException.php', + 'Mockery\\Expectation' => $vendorDir . '/mockery/mockery/library/Mockery/Expectation.php', + 'Mockery\\ExpectationDirector' => $vendorDir . '/mockery/mockery/library/Mockery/ExpectationDirector.php', + 'Mockery\\ExpectationInterface' => $vendorDir . '/mockery/mockery/library/Mockery/ExpectationInterface.php', + 'Mockery\\ExpectsHigherOrderMessage' => $vendorDir . '/mockery/mockery/library/Mockery/ExpectsHigherOrderMessage.php', + 'Mockery\\Generator\\CachingGenerator' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/CachingGenerator.php', + 'Mockery\\Generator\\DefinedTargetClass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php', + 'Mockery\\Generator\\Generator' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/Generator.php', + 'Mockery\\Generator\\Method' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/Method.php', + 'Mockery\\Generator\\MockConfiguration' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/MockConfiguration.php', + 'Mockery\\Generator\\MockConfigurationBuilder' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php', + 'Mockery\\Generator\\MockDefinition' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/MockDefinition.php', + 'Mockery\\Generator\\MockNameBuilder' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/MockNameBuilder.php', + 'Mockery\\Generator\\Parameter' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/Parameter.php', + 'Mockery\\Generator\\StringManipulationGenerator' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\AvoidMethodClashPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\CallTypeHintPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\ClassAttributesPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassAttributesPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\ClassNamePass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\ClassPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\ConstantsPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ConstantsPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\InstanceMockPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\InterfacePass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\MagicMethodTypeHintsPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MagicMethodTypeHintsPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\MethodDefinitionPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\Pass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/Pass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\RemoveBuiltinMethodsThatAreFinalPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveBuiltinMethodsThatAreFinalPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\RemoveDestructorPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveDestructorPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\RemoveUnserializeForInternalSerializableClassesPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\TraitPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/TraitPass.php', + 'Mockery\\Generator\\TargetClassInterface' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/TargetClassInterface.php', + 'Mockery\\Generator\\UndefinedTargetClass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/UndefinedTargetClass.php', + 'Mockery\\HigherOrderMessage' => $vendorDir . '/mockery/mockery/library/Mockery/HigherOrderMessage.php', + 'Mockery\\Instantiator' => $vendorDir . '/mockery/mockery/library/Mockery/Instantiator.php', + 'Mockery\\LegacyMockInterface' => $vendorDir . '/mockery/mockery/library/Mockery/LegacyMockInterface.php', + 'Mockery\\Loader\\EvalLoader' => $vendorDir . '/mockery/mockery/library/Mockery/Loader/EvalLoader.php', + 'Mockery\\Loader\\Loader' => $vendorDir . '/mockery/mockery/library/Mockery/Loader/Loader.php', + 'Mockery\\Loader\\RequireLoader' => $vendorDir . '/mockery/mockery/library/Mockery/Loader/RequireLoader.php', + 'Mockery\\Matcher\\AndAnyOtherArgs' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/AndAnyOtherArgs.php', + 'Mockery\\Matcher\\Any' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Any.php', + 'Mockery\\Matcher\\AnyArgs' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/AnyArgs.php', + 'Mockery\\Matcher\\AnyOf' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/AnyOf.php', + 'Mockery\\Matcher\\ArgumentListMatcher' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/ArgumentListMatcher.php', + 'Mockery\\Matcher\\Closure' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Closure.php', + 'Mockery\\Matcher\\Contains' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Contains.php', + 'Mockery\\Matcher\\Ducktype' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Ducktype.php', + 'Mockery\\Matcher\\HasKey' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/HasKey.php', + 'Mockery\\Matcher\\HasValue' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/HasValue.php', + 'Mockery\\Matcher\\IsEqual' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/IsEqual.php', + 'Mockery\\Matcher\\IsSame' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/IsSame.php', + 'Mockery\\Matcher\\MatcherAbstract' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php', + 'Mockery\\Matcher\\MatcherInterface' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/MatcherInterface.php', + 'Mockery\\Matcher\\MultiArgumentClosure' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/MultiArgumentClosure.php', + 'Mockery\\Matcher\\MustBe' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/MustBe.php', + 'Mockery\\Matcher\\NoArgs' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/NoArgs.php', + 'Mockery\\Matcher\\Not' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Not.php', + 'Mockery\\Matcher\\NotAnyOf' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php', + 'Mockery\\Matcher\\Pattern' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Pattern.php', + 'Mockery\\Matcher\\Subset' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Subset.php', + 'Mockery\\Matcher\\Type' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Type.php', + 'Mockery\\MethodCall' => $vendorDir . '/mockery/mockery/library/Mockery/MethodCall.php', + 'Mockery\\Mock' => $vendorDir . '/mockery/mockery/library/Mockery/Mock.php', + 'Mockery\\MockInterface' => $vendorDir . '/mockery/mockery/library/Mockery/MockInterface.php', + 'Mockery\\QuickDefinitionsConfiguration' => $vendorDir . '/mockery/mockery/library/Mockery/QuickDefinitionsConfiguration.php', + 'Mockery\\ReceivedMethodCalls' => $vendorDir . '/mockery/mockery/library/Mockery/ReceivedMethodCalls.php', + 'Mockery\\Reflector' => $vendorDir . '/mockery/mockery/library/Mockery/Reflector.php', + 'Mockery\\Undefined' => $vendorDir . '/mockery/mockery/library/Mockery/Undefined.php', + 'Mockery\\VerificationDirector' => $vendorDir . '/mockery/mockery/library/Mockery/VerificationDirector.php', + 'Mockery\\VerificationExpectation' => $vendorDir . '/mockery/mockery/library/Mockery/VerificationExpectation.php', + 'PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin' => $vendorDir . '/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php', + 'PHPCSUtils\\AbstractSniffs\\AbstractArrayDeclarationSniff' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/AbstractSniffs/AbstractArrayDeclarationSniff.php', + 'PHPCSUtils\\BackCompat\\BCFile' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCFile.php', + 'PHPCSUtils\\BackCompat\\BCTokens' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCTokens.php', + 'PHPCSUtils\\BackCompat\\Helper' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/Helper.php', + 'PHPCSUtils\\Exceptions\\InvalidTokenArray' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/InvalidTokenArray.php', + 'PHPCSUtils\\Exceptions\\LogicException' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/LogicException.php', + 'PHPCSUtils\\Exceptions\\MissingArgumentError' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/MissingArgumentError.php', + 'PHPCSUtils\\Exceptions\\OutOfBoundsStackPtr' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/OutOfBoundsStackPtr.php', + 'PHPCSUtils\\Exceptions\\RuntimeException' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/RuntimeException.php', + 'PHPCSUtils\\Exceptions\\TestFileNotFound' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestFileNotFound.php', + 'PHPCSUtils\\Exceptions\\TestMarkerNotFound' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestMarkerNotFound.php', + 'PHPCSUtils\\Exceptions\\TestTargetNotFound' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestTargetNotFound.php', + 'PHPCSUtils\\Exceptions\\TypeError' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TypeError.php', + 'PHPCSUtils\\Exceptions\\UnexpectedTokenType' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/UnexpectedTokenType.php', + 'PHPCSUtils\\Exceptions\\ValueError' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/ValueError.php', + 'PHPCSUtils\\Fixers\\SpacesFixer' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Fixers/SpacesFixer.php', + 'PHPCSUtils\\Internal\\AttributeHelper' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/AttributeHelper.php', + 'PHPCSUtils\\Internal\\Cache' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/Cache.php', + 'PHPCSUtils\\Internal\\IsShortArrayOrList' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrList.php', + 'PHPCSUtils\\Internal\\IsShortArrayOrListWithCache' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrListWithCache.php', + 'PHPCSUtils\\Internal\\NoFileCache' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/NoFileCache.php', + 'PHPCSUtils\\Internal\\StableCollections' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/StableCollections.php', + 'PHPCSUtils\\TestUtils\\ConfigDouble' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/ConfigDouble.php', + 'PHPCSUtils\\TestUtils\\RulesetDouble' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/RulesetDouble.php', + 'PHPCSUtils\\TestUtils\\UtilityMethodTestCase' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/UtilityMethodTestCase.php', + 'PHPCSUtils\\Tokens\\Collections' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/Collections.php', + 'PHPCSUtils\\Tokens\\TokenHelper' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/TokenHelper.php', + 'PHPCSUtils\\Utils\\Arrays' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Arrays.php', + 'PHPCSUtils\\Utils\\AttributeBlock' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/AttributeBlock.php', + 'PHPCSUtils\\Utils\\Conditions' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Conditions.php', + 'PHPCSUtils\\Utils\\Constants' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Constants.php', + 'PHPCSUtils\\Utils\\Context' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Context.php', + 'PHPCSUtils\\Utils\\ControlStructures' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ControlStructures.php', + 'PHPCSUtils\\Utils\\FileInfo' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FileInfo.php', + 'PHPCSUtils\\Utils\\FilePath' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FilePath.php', + 'PHPCSUtils\\Utils\\FunctionDeclarations' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FunctionDeclarations.php', + 'PHPCSUtils\\Utils\\GetTokensAsString' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/GetTokensAsString.php', + 'PHPCSUtils\\Utils\\Lists' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Lists.php', + 'PHPCSUtils\\Utils\\MessageHelper' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/MessageHelper.php', + 'PHPCSUtils\\Utils\\Namespaces' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Namespaces.php', + 'PHPCSUtils\\Utils\\NamingConventions' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/NamingConventions.php', + 'PHPCSUtils\\Utils\\Numbers' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Numbers.php', + 'PHPCSUtils\\Utils\\ObjectDeclarations' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ObjectDeclarations.php', + 'PHPCSUtils\\Utils\\Operators' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Operators.php', + 'PHPCSUtils\\Utils\\Orthography' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Orthography.php', + 'PHPCSUtils\\Utils\\Parentheses' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Parentheses.php', + 'PHPCSUtils\\Utils\\PassedParameters' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/PassedParameters.php', + 'PHPCSUtils\\Utils\\Scopes' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Scopes.php', + 'PHPCSUtils\\Utils\\TextStrings' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/TextStrings.php', + 'PHPCSUtils\\Utils\\TypeString' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/TypeString.php', + 'PHPCSUtils\\Utils\\UseStatements' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/UseStatements.php', + 'PHPCSUtils\\Utils\\Variables' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Variables.php', + 'PHPUnit\\Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php', + 'PHPUnit\\Framework\\ActualValueIsNotAnObjectException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ActualValueIsNotAnObjectException.php', + 'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php', + 'PHPUnit\\Framework\\AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php', + 'PHPUnit\\Framework\\CodeCoverageException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php', + 'PHPUnit\\Framework\\ComparisonMethodDoesNotAcceptParameterTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotAcceptParameterTypeException.php', + 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareBoolReturnTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php', + 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareExactlyOneParameterException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php', + 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareParameterTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareParameterTypeException.php', + 'PHPUnit\\Framework\\ComparisonMethodDoesNotExistException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotExistException.php', + 'PHPUnit\\Framework\\Constraint\\ArrayHasKey' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php', + 'PHPUnit\\Framework\\Constraint\\BinaryOperator' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/BinaryOperator.php', + 'PHPUnit\\Framework\\Constraint\\Callback' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Callback.php', + 'PHPUnit\\Framework\\Constraint\\ClassHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasAttribute.php', + 'PHPUnit\\Framework\\Constraint\\ClassHasStaticAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasStaticAttribute.php', + 'PHPUnit\\Framework\\Constraint\\Constraint' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Constraint.php', + 'PHPUnit\\Framework\\Constraint\\Count' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php', + 'PHPUnit\\Framework\\Constraint\\DirectoryExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php', + 'PHPUnit\\Framework\\Constraint\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php', + 'PHPUnit\\Framework\\Constraint\\ExceptionCode' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php', + 'PHPUnit\\Framework\\Constraint\\ExceptionMessage' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessage.php', + 'PHPUnit\\Framework\\Constraint\\ExceptionMessageRegularExpression' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageRegularExpression.php', + 'PHPUnit\\Framework\\Constraint\\FileExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php', + 'PHPUnit\\Framework\\Constraint\\GreaterThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php', + 'PHPUnit\\Framework\\Constraint\\IsAnything' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', + 'PHPUnit\\Framework\\Constraint\\IsEmpty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php', + 'PHPUnit\\Framework\\Constraint\\IsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php', + 'PHPUnit\\Framework\\Constraint\\IsEqualCanonicalizing' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php', + 'PHPUnit\\Framework\\Constraint\\IsEqualIgnoringCase' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php', + 'PHPUnit\\Framework\\Constraint\\IsEqualWithDelta' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php', + 'PHPUnit\\Framework\\Constraint\\IsFalse' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsFalse.php', + 'PHPUnit\\Framework\\Constraint\\IsFinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Math/IsFinite.php', + 'PHPUnit\\Framework\\Constraint\\IsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', + 'PHPUnit\\Framework\\Constraint\\IsInfinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Math/IsInfinite.php', + 'PHPUnit\\Framework\\Constraint\\IsInstanceOf' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php', + 'PHPUnit\\Framework\\Constraint\\IsJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php', + 'PHPUnit\\Framework\\Constraint\\IsNan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Math/IsNan.php', + 'PHPUnit\\Framework\\Constraint\\IsNull' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Type/IsNull.php', + 'PHPUnit\\Framework\\Constraint\\IsReadable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php', + 'PHPUnit\\Framework\\Constraint\\IsTrue' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsTrue.php', + 'PHPUnit\\Framework\\Constraint\\IsType' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php', + 'PHPUnit\\Framework\\Constraint\\IsWritable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php', + 'PHPUnit\\Framework\\Constraint\\JsonMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', + 'PHPUnit\\Framework\\Constraint\\JsonMatchesErrorMessageProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php', + 'PHPUnit\\Framework\\Constraint\\LessThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php', + 'PHPUnit\\Framework\\Constraint\\LogicalAnd' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalAnd.php', + 'PHPUnit\\Framework\\Constraint\\LogicalNot' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php', + 'PHPUnit\\Framework\\Constraint\\LogicalOr' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalOr.php', + 'PHPUnit\\Framework\\Constraint\\LogicalXor' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php', + 'PHPUnit\\Framework\\Constraint\\ObjectEquals' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php', + 'PHPUnit\\Framework\\Constraint\\ObjectHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasAttribute.php', + 'PHPUnit\\Framework\\Constraint\\ObjectHasProperty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasProperty.php', + 'PHPUnit\\Framework\\Constraint\\Operator' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/Operator.php', + 'PHPUnit\\Framework\\Constraint\\RegularExpression' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php', + 'PHPUnit\\Framework\\Constraint\\SameSize' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/SameSize.php', + 'PHPUnit\\Framework\\Constraint\\StringContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php', + 'PHPUnit\\Framework\\Constraint\\StringEndsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringEndsWith.php', + 'PHPUnit\\Framework\\Constraint\\StringMatchesFormatDescription' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php', + 'PHPUnit\\Framework\\Constraint\\StringStartsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php', + 'PHPUnit\\Framework\\Constraint\\TraversableContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php', + 'PHPUnit\\Framework\\Constraint\\TraversableContainsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsEqual.php', + 'PHPUnit\\Framework\\Constraint\\TraversableContainsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsIdentical.php', + 'PHPUnit\\Framework\\Constraint\\TraversableContainsOnly' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php', + 'PHPUnit\\Framework\\Constraint\\UnaryOperator' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php', + 'PHPUnit\\Framework\\CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/CoveredCodeNotExecutedException.php', + 'PHPUnit\\Framework\\DataProviderTestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/DataProviderTestSuite.php', + 'PHPUnit\\Framework\\Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Error.php', + 'PHPUnit\\Framework\\ErrorTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/ErrorTestCase.php', + 'PHPUnit\\Framework\\Error\\Deprecated' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Deprecated.php', + 'PHPUnit\\Framework\\Error\\Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Error.php', + 'PHPUnit\\Framework\\Error\\Notice' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Notice.php', + 'PHPUnit\\Framework\\Error\\Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Warning.php', + 'PHPUnit\\Framework\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Exception.php', + 'PHPUnit\\Framework\\ExceptionWrapper' => $vendorDir . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php', + 'PHPUnit\\Framework\\ExecutionOrderDependency' => $vendorDir . '/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php', + 'PHPUnit\\Framework\\ExpectationFailedException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php', + 'PHPUnit\\Framework\\IncompleteTest' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTest.php', + 'PHPUnit\\Framework\\IncompleteTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php', + 'PHPUnit\\Framework\\IncompleteTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/IncompleteTestError.php', + 'PHPUnit\\Framework\\InvalidArgumentException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php', + 'PHPUnit\\Framework\\InvalidCoversTargetException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/InvalidCoversTargetException.php', + 'PHPUnit\\Framework\\InvalidDataProviderException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php', + 'PHPUnit\\Framework\\InvalidParameterGroupException' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidParameterGroupException.php', + 'PHPUnit\\Framework\\MissingCoversAnnotationException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/MissingCoversAnnotationException.php', + 'PHPUnit\\Framework\\MockObject\\Api' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Api/Api.php', + 'PHPUnit\\Framework\\MockObject\\BadMethodCallException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php', + 'PHPUnit\\Framework\\MockObject\\Builder\\Identity' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/Identity.php', + 'PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php', + 'PHPUnit\\Framework\\MockObject\\Builder\\InvocationStubber' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php', + 'PHPUnit\\Framework\\MockObject\\Builder\\MethodNameMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php', + 'PHPUnit\\Framework\\MockObject\\Builder\\ParametersMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php', + 'PHPUnit\\Framework\\MockObject\\Builder\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/Stub.php', + 'PHPUnit\\Framework\\MockObject\\CannotUseAddMethodsException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseAddMethodsException.php', + 'PHPUnit\\Framework\\MockObject\\CannotUseOnlyMethodsException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php', + 'PHPUnit\\Framework\\MockObject\\ClassAlreadyExistsException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassAlreadyExistsException.php', + 'PHPUnit\\Framework\\MockObject\\ClassIsFinalException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsFinalException.php', + 'PHPUnit\\Framework\\MockObject\\ClassIsReadonlyException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsReadonlyException.php', + 'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php', + 'PHPUnit\\Framework\\MockObject\\ConfigurableMethodsAlreadyInitializedException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ConfigurableMethodsAlreadyInitializedException.php', + 'PHPUnit\\Framework\\MockObject\\DuplicateMethodException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/DuplicateMethodException.php', + 'PHPUnit\\Framework\\MockObject\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php', + 'PHPUnit\\Framework\\MockObject\\Generator' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator.php', + 'PHPUnit\\Framework\\MockObject\\IncompatibleReturnValueException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php', + 'PHPUnit\\Framework\\MockObject\\InvalidMethodNameException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/InvalidMethodNameException.php', + 'PHPUnit\\Framework\\MockObject\\Invocation' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Invocation.php', + 'PHPUnit\\Framework\\MockObject\\InvocationHandler' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php', + 'PHPUnit\\Framework\\MockObject\\MatchBuilderNotFoundException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php', + 'PHPUnit\\Framework\\MockObject\\Matcher' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher.php', + 'PHPUnit\\Framework\\MockObject\\MatcherAlreadyRegisteredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php', + 'PHPUnit\\Framework\\MockObject\\Method' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Api/Method.php', + 'PHPUnit\\Framework\\MockObject\\MethodCannotBeConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php', + 'PHPUnit\\Framework\\MockObject\\MethodNameAlreadyConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameAlreadyConfiguredException.php', + 'PHPUnit\\Framework\\MockObject\\MethodNameConstraint' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php', + 'PHPUnit\\Framework\\MockObject\\MethodNameNotConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameNotConfiguredException.php', + 'PHPUnit\\Framework\\MockObject\\MethodParametersAlreadyConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodParametersAlreadyConfiguredException.php', + 'PHPUnit\\Framework\\MockObject\\MockBuilder' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php', + 'PHPUnit\\Framework\\MockObject\\MockClass' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockClass.php', + 'PHPUnit\\Framework\\MockObject\\MockMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockMethod.php', + 'PHPUnit\\Framework\\MockObject\\MockMethodSet' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockMethodSet.php', + 'PHPUnit\\Framework\\MockObject\\MockObject' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockObject.php', + 'PHPUnit\\Framework\\MockObject\\MockTrait' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockTrait.php', + 'PHPUnit\\Framework\\MockObject\\MockType' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockType.php', + 'PHPUnit\\Framework\\MockObject\\OriginalConstructorInvocationRequiredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/OriginalConstructorInvocationRequiredException.php', + 'PHPUnit\\Framework\\MockObject\\ReflectionException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReflectionException.php', + 'PHPUnit\\Framework\\MockObject\\ReturnValueNotConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\AnyInvokedCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyInvokedCount.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\AnyParameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyParameters.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\ConsecutiveParameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\InvocationOrder' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvocationOrder.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtIndex' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastOnce' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtMostCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\MethodName' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\Parameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\ParametersRule' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/ParametersRule.php', + 'PHPUnit\\Framework\\MockObject\\RuntimeException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php', + 'PHPUnit\\Framework\\MockObject\\SoapExtensionNotAvailableException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/SoapExtensionNotAvailableException.php', + 'PHPUnit\\Framework\\MockObject\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\ConsecutiveCalls' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnArgument' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnArgument.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnCallback' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnReference' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnSelf' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnStub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnValueMap' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnValueMap.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/Stub.php', + 'PHPUnit\\Framework\\MockObject\\UnknownClassException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownClassException.php', + 'PHPUnit\\Framework\\MockObject\\UnknownTraitException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTraitException.php', + 'PHPUnit\\Framework\\MockObject\\UnknownTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTypeException.php', + 'PHPUnit\\Framework\\MockObject\\Verifiable' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Verifiable.php', + 'PHPUnit\\Framework\\NoChildTestSuiteException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php', + 'PHPUnit\\Framework\\OutputError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/OutputError.php', + 'PHPUnit\\Framework\\PHPTAssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/PHPTAssertionFailedError.php', + 'PHPUnit\\Framework\\Reorderable' => $vendorDir . '/phpunit/phpunit/src/Framework/Reorderable.php', + 'PHPUnit\\Framework\\RiskyTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/RiskyTestError.php', + 'PHPUnit\\Framework\\SelfDescribing' => $vendorDir . '/phpunit/phpunit/src/Framework/SelfDescribing.php', + 'PHPUnit\\Framework\\SkippedTest' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTest.php', + 'PHPUnit\\Framework\\SkippedTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestCase.php', + 'PHPUnit\\Framework\\SkippedTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SkippedTestError.php', + 'PHPUnit\\Framework\\SkippedTestSuiteError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SkippedTestSuiteError.php', + 'PHPUnit\\Framework\\SyntheticError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SyntheticError.php', + 'PHPUnit\\Framework\\SyntheticSkippedError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SyntheticSkippedError.php', + 'PHPUnit\\Framework\\Test' => $vendorDir . '/phpunit/phpunit/src/Framework/Test.php', + 'PHPUnit\\Framework\\TestBuilder' => $vendorDir . '/phpunit/phpunit/src/Framework/TestBuilder.php', + 'PHPUnit\\Framework\\TestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/TestCase.php', + 'PHPUnit\\Framework\\TestFailure' => $vendorDir . '/phpunit/phpunit/src/Framework/TestFailure.php', + 'PHPUnit\\Framework\\TestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListener.php', + 'PHPUnit\\Framework\\TestListenerDefaultImplementation' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php', + 'PHPUnit\\Framework\\TestResult' => $vendorDir . '/phpunit/phpunit/src/Framework/TestResult.php', + 'PHPUnit\\Framework\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite.php', + 'PHPUnit\\Framework\\TestSuiteIterator' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php', + 'PHPUnit\\Framework\\UnintentionallyCoveredCodeError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/UnintentionallyCoveredCodeError.php', + 'PHPUnit\\Framework\\Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Warning.php', + 'PHPUnit\\Framework\\WarningTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/WarningTestCase.php', + 'PHPUnit\\Runner\\AfterIncompleteTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterIncompleteTestHook.php', + 'PHPUnit\\Runner\\AfterLastTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterLastTestHook.php', + 'PHPUnit\\Runner\\AfterRiskyTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterRiskyTestHook.php', + 'PHPUnit\\Runner\\AfterSkippedTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php', + 'PHPUnit\\Runner\\AfterSuccessfulTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php', + 'PHPUnit\\Runner\\AfterTestErrorHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestErrorHook.php', + 'PHPUnit\\Runner\\AfterTestFailureHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestFailureHook.php', + 'PHPUnit\\Runner\\AfterTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestHook.php', + 'PHPUnit\\Runner\\AfterTestWarningHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestWarningHook.php', + 'PHPUnit\\Runner\\BaseTestRunner' => $vendorDir . '/phpunit/phpunit/src/Runner/BaseTestRunner.php', + 'PHPUnit\\Runner\\BeforeFirstTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/BeforeFirstTestHook.php', + 'PHPUnit\\Runner\\BeforeTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/BeforeTestHook.php', + 'PHPUnit\\Runner\\DefaultTestResultCache' => $vendorDir . '/phpunit/phpunit/src/Runner/DefaultTestResultCache.php', + 'PHPUnit\\Runner\\Exception' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception.php', + 'PHPUnit\\Runner\\Extension\\ExtensionHandler' => $vendorDir . '/phpunit/phpunit/src/Runner/Extension/ExtensionHandler.php', + 'PHPUnit\\Runner\\Extension\\PharLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/Extension/PharLoader.php', + 'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php', + 'PHPUnit\\Runner\\Filter\\Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php', + 'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php', + 'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php', + 'PHPUnit\\Runner\\Filter\\NameFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php', + 'PHPUnit\\Runner\\Hook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/Hook.php', + 'PHPUnit\\Runner\\NullTestResultCache' => $vendorDir . '/phpunit/phpunit/src/Runner/NullTestResultCache.php', + 'PHPUnit\\Runner\\PhptTestCase' => $vendorDir . '/phpunit/phpunit/src/Runner/PhptTestCase.php', + 'PHPUnit\\Runner\\ResultCacheExtension' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCacheExtension.php', + 'PHPUnit\\Runner\\StandardTestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', + 'PHPUnit\\Runner\\TestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/TestHook.php', + 'PHPUnit\\Runner\\TestListenerAdapter' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php', + 'PHPUnit\\Runner\\TestResultCache' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResultCache.php', + 'PHPUnit\\Runner\\TestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', + 'PHPUnit\\Runner\\TestSuiteSorter' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteSorter.php', + 'PHPUnit\\Runner\\Version' => $vendorDir . '/phpunit/phpunit/src/Runner/Version.php', + 'PHPUnit\\TextUI\\CliArguments\\Builder' => $vendorDir . '/phpunit/phpunit/src/TextUI/CliArguments/Builder.php', + 'PHPUnit\\TextUI\\CliArguments\\Configuration' => $vendorDir . '/phpunit/phpunit/src/TextUI/CliArguments/Configuration.php', + 'PHPUnit\\TextUI\\CliArguments\\Exception' => $vendorDir . '/phpunit/phpunit/src/TextUI/CliArguments/Exception.php', + 'PHPUnit\\TextUI\\CliArguments\\Mapper' => $vendorDir . '/phpunit/phpunit/src/TextUI/CliArguments/Mapper.php', + 'PHPUnit\\TextUI\\Command' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command.php', + 'PHPUnit\\TextUI\\DefaultResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/DefaultResultPrinter.php', + 'PHPUnit\\TextUI\\Exception' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/Exception.php', + 'PHPUnit\\TextUI\\Help' => $vendorDir . '/phpunit/phpunit/src/TextUI/Help.php', + 'PHPUnit\\TextUI\\ReflectionException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/ReflectionException.php', + 'PHPUnit\\TextUI\\ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/ResultPrinter.php', + 'PHPUnit\\TextUI\\RuntimeException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/RuntimeException.php', + 'PHPUnit\\TextUI\\TestDirectoryNotFoundException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php', + 'PHPUnit\\TextUI\\TestFileNotFoundException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php', + 'PHPUnit\\TextUI\\TestRunner' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestRunner.php', + 'PHPUnit\\TextUI\\TestSuiteMapper' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestSuiteMapper.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/CodeCoverage.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\FilterMapper' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/FilterMapper.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\Directory' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/Directory.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\DirectoryCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\DirectoryCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Clover' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Clover.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Cobertura' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Cobertura.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Crap4j' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Crap4j.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Html' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Html.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Php' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Php.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Text' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Text.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Xml' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Xml.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Configuration' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Configuration.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Constant' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Constant.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\ConstantCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\ConstantCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\ConvertLogTypes' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/ConvertLogTypes.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCloverToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageCloverToReport.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCrap4jToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageCrap4jToReport.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageHtmlToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageHtmlToReport.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CoveragePhpToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoveragePhpToReport.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageTextToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageTextToReport.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageXmlToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageXmlToReport.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Directory' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/Directory.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\DirectoryCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\DirectoryCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Exception' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Exception.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Extension' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/Extension.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\ExtensionCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\ExtensionCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\File' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/File.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\FileCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\FileCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Generator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Generator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Group' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Group.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\GroupCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\GroupCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Groups' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Groups.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\IniSetting' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSetting.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\IniSettingCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\IniSettingCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\IntroduceCoverageElement' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/IntroduceCoverageElement.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Loader' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Loader.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\LogToReportMigration' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/LogToReportMigration.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Junit' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Junit.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Logging' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Logging.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TeamCity' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TeamCity.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Html' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Html.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Text' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Text.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Xml' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Xml.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Text' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Text.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Migration' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/Migration.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationBuilder' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilder.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationBuilderException' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilderException.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationException' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationException.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Migrator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromFilterWhitelistToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveAttributesFromFilterWhitelistToCoverage.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromRootToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveAttributesFromRootToCoverage.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistExcludesToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistExcludesToCoverage.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistIncludesToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistIncludesToCoverage.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\PHPUnit' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/PHPUnit.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Php' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Php.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\PhpHandler' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/PhpHandler.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveCacheTokensAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveCacheTokensAttribute.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveEmptyFilter' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveEmptyFilter.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveLogTypes' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveLogTypes.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectory' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectory.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectoryCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectoryCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestFile' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFile.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestFileCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestFileCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuite.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestSuiteCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestSuiteCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\UpdateSchemaLocationTo93' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/UpdateSchemaLocationTo93.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Variable' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Variable.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\VariableCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\VariableCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollectionIterator.php', + 'PHPUnit\\Util\\Annotation\\DocBlock' => $vendorDir . '/phpunit/phpunit/src/Util/Annotation/DocBlock.php', + 'PHPUnit\\Util\\Annotation\\Registry' => $vendorDir . '/phpunit/phpunit/src/Util/Annotation/Registry.php', + 'PHPUnit\\Util\\Blacklist' => $vendorDir . '/phpunit/phpunit/src/Util/Blacklist.php', + 'PHPUnit\\Util\\Cloner' => $vendorDir . '/phpunit/phpunit/src/Util/Cloner.php', + 'PHPUnit\\Util\\Color' => $vendorDir . '/phpunit/phpunit/src/Util/Color.php', + 'PHPUnit\\Util\\ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Util/ErrorHandler.php', + 'PHPUnit\\Util\\Exception' => $vendorDir . '/phpunit/phpunit/src/Util/Exception.php', + 'PHPUnit\\Util\\ExcludeList' => $vendorDir . '/phpunit/phpunit/src/Util/ExcludeList.php', + 'PHPUnit\\Util\\FileLoader' => $vendorDir . '/phpunit/phpunit/src/Util/FileLoader.php', + 'PHPUnit\\Util\\Filesystem' => $vendorDir . '/phpunit/phpunit/src/Util/Filesystem.php', + 'PHPUnit\\Util\\Filter' => $vendorDir . '/phpunit/phpunit/src/Util/Filter.php', + 'PHPUnit\\Util\\GlobalState' => $vendorDir . '/phpunit/phpunit/src/Util/GlobalState.php', + 'PHPUnit\\Util\\InvalidDataSetException' => $vendorDir . '/phpunit/phpunit/src/Util/InvalidDataSetException.php', + 'PHPUnit\\Util\\Json' => $vendorDir . '/phpunit/phpunit/src/Util/Json.php', + 'PHPUnit\\Util\\Log\\JUnit' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JUnit.php', + 'PHPUnit\\Util\\Log\\TeamCity' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TeamCity.php', + 'PHPUnit\\Util\\PHP\\AbstractPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php', + 'PHPUnit\\Util\\PHP\\DefaultPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php', + 'PHPUnit\\Util\\PHP\\WindowsPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php', + 'PHPUnit\\Util\\Printer' => $vendorDir . '/phpunit/phpunit/src/Util/Printer.php', + 'PHPUnit\\Util\\Reflection' => $vendorDir . '/phpunit/phpunit/src/Util/Reflection.php', + 'PHPUnit\\Util\\RegularExpression' => $vendorDir . '/phpunit/phpunit/src/Util/RegularExpression.php', + 'PHPUnit\\Util\\Test' => $vendorDir . '/phpunit/phpunit/src/Util/Test.php', + 'PHPUnit\\Util\\TestDox\\CliTestDoxPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php', + 'PHPUnit\\Util\\TestDox\\HtmlResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php', + 'PHPUnit\\Util\\TestDox\\NamePrettifier' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php', + 'PHPUnit\\Util\\TestDox\\ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php', + 'PHPUnit\\Util\\TestDox\\TestDoxPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/TestDoxPrinter.php', + 'PHPUnit\\Util\\TestDox\\TextResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/TextResultPrinter.php', + 'PHPUnit\\Util\\TestDox\\XmlResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php', + 'PHPUnit\\Util\\TextTestListRenderer' => $vendorDir . '/phpunit/phpunit/src/Util/TextTestListRenderer.php', + 'PHPUnit\\Util\\Type' => $vendorDir . '/phpunit/phpunit/src/Util/Type.php', + 'PHPUnit\\Util\\VersionComparisonOperator' => $vendorDir . '/phpunit/phpunit/src/Util/VersionComparisonOperator.php', + 'PHPUnit\\Util\\XdebugFilterScriptGenerator' => $vendorDir . '/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php', + 'PHPUnit\\Util\\Xml' => $vendorDir . '/phpunit/phpunit/src/Util/Xml.php', + 'PHPUnit\\Util\\XmlTestListRenderer' => $vendorDir . '/phpunit/phpunit/src/Util/XmlTestListRenderer.php', + 'PHPUnit\\Util\\Xml\\Exception' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/Exception.php', + 'PHPUnit\\Util\\Xml\\FailedSchemaDetectionResult' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/FailedSchemaDetectionResult.php', + 'PHPUnit\\Util\\Xml\\Loader' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/Loader.php', + 'PHPUnit\\Util\\Xml\\SchemaDetectionResult' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SchemaDetectionResult.php', + 'PHPUnit\\Util\\Xml\\SchemaDetector' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SchemaDetector.php', + 'PHPUnit\\Util\\Xml\\SchemaFinder' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SchemaFinder.php', + 'PHPUnit\\Util\\Xml\\SnapshotNodeList' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SnapshotNodeList.php', + 'PHPUnit\\Util\\Xml\\SuccessfulSchemaDetectionResult' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SuccessfulSchemaDetectionResult.php', + 'PHPUnit\\Util\\Xml\\ValidationResult' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/ValidationResult.php', + 'PHPUnit\\Util\\Xml\\Validator' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/Validator.php', + 'PharIo\\Manifest\\Application' => $vendorDir . '/phar-io/manifest/src/values/Application.php', + 'PharIo\\Manifest\\ApplicationName' => $vendorDir . '/phar-io/manifest/src/values/ApplicationName.php', + 'PharIo\\Manifest\\Author' => $vendorDir . '/phar-io/manifest/src/values/Author.php', + 'PharIo\\Manifest\\AuthorCollection' => $vendorDir . '/phar-io/manifest/src/values/AuthorCollection.php', + 'PharIo\\Manifest\\AuthorCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/AuthorCollectionIterator.php', + 'PharIo\\Manifest\\AuthorElement' => $vendorDir . '/phar-io/manifest/src/xml/AuthorElement.php', + 'PharIo\\Manifest\\AuthorElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/AuthorElementCollection.php', + 'PharIo\\Manifest\\BundledComponent' => $vendorDir . '/phar-io/manifest/src/values/BundledComponent.php', + 'PharIo\\Manifest\\BundledComponentCollection' => $vendorDir . '/phar-io/manifest/src/values/BundledComponentCollection.php', + 'PharIo\\Manifest\\BundledComponentCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/BundledComponentCollectionIterator.php', + 'PharIo\\Manifest\\BundlesElement' => $vendorDir . '/phar-io/manifest/src/xml/BundlesElement.php', + 'PharIo\\Manifest\\ComponentElement' => $vendorDir . '/phar-io/manifest/src/xml/ComponentElement.php', + 'PharIo\\Manifest\\ComponentElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ComponentElementCollection.php', + 'PharIo\\Manifest\\ContainsElement' => $vendorDir . '/phar-io/manifest/src/xml/ContainsElement.php', + 'PharIo\\Manifest\\CopyrightElement' => $vendorDir . '/phar-io/manifest/src/xml/CopyrightElement.php', + 'PharIo\\Manifest\\CopyrightInformation' => $vendorDir . '/phar-io/manifest/src/values/CopyrightInformation.php', + 'PharIo\\Manifest\\ElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ElementCollection.php', + 'PharIo\\Manifest\\ElementCollectionException' => $vendorDir . '/phar-io/manifest/src/exceptions/ElementCollectionException.php', + 'PharIo\\Manifest\\Email' => $vendorDir . '/phar-io/manifest/src/values/Email.php', + 'PharIo\\Manifest\\Exception' => $vendorDir . '/phar-io/manifest/src/exceptions/Exception.php', + 'PharIo\\Manifest\\ExtElement' => $vendorDir . '/phar-io/manifest/src/xml/ExtElement.php', + 'PharIo\\Manifest\\ExtElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ExtElementCollection.php', + 'PharIo\\Manifest\\Extension' => $vendorDir . '/phar-io/manifest/src/values/Extension.php', + 'PharIo\\Manifest\\ExtensionElement' => $vendorDir . '/phar-io/manifest/src/xml/ExtensionElement.php', + 'PharIo\\Manifest\\InvalidApplicationNameException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php', + 'PharIo\\Manifest\\InvalidEmailException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidEmailException.php', + 'PharIo\\Manifest\\InvalidUrlException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidUrlException.php', + 'PharIo\\Manifest\\Library' => $vendorDir . '/phar-io/manifest/src/values/Library.php', + 'PharIo\\Manifest\\License' => $vendorDir . '/phar-io/manifest/src/values/License.php', + 'PharIo\\Manifest\\LicenseElement' => $vendorDir . '/phar-io/manifest/src/xml/LicenseElement.php', + 'PharIo\\Manifest\\Manifest' => $vendorDir . '/phar-io/manifest/src/values/Manifest.php', + 'PharIo\\Manifest\\ManifestDocument' => $vendorDir . '/phar-io/manifest/src/xml/ManifestDocument.php', + 'PharIo\\Manifest\\ManifestDocumentException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentException.php', + 'PharIo\\Manifest\\ManifestDocumentLoadingException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php', + 'PharIo\\Manifest\\ManifestDocumentMapper' => $vendorDir . '/phar-io/manifest/src/ManifestDocumentMapper.php', + 'PharIo\\Manifest\\ManifestDocumentMapperException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php', + 'PharIo\\Manifest\\ManifestElement' => $vendorDir . '/phar-io/manifest/src/xml/ManifestElement.php', + 'PharIo\\Manifest\\ManifestElementException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestElementException.php', + 'PharIo\\Manifest\\ManifestLoader' => $vendorDir . '/phar-io/manifest/src/ManifestLoader.php', + 'PharIo\\Manifest\\ManifestLoaderException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php', + 'PharIo\\Manifest\\ManifestSerializer' => $vendorDir . '/phar-io/manifest/src/ManifestSerializer.php', + 'PharIo\\Manifest\\NoEmailAddressException' => $vendorDir . '/phar-io/manifest/src/exceptions/NoEmailAddressException.php', + 'PharIo\\Manifest\\PhpElement' => $vendorDir . '/phar-io/manifest/src/xml/PhpElement.php', + 'PharIo\\Manifest\\PhpExtensionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpExtensionRequirement.php', + 'PharIo\\Manifest\\PhpVersionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpVersionRequirement.php', + 'PharIo\\Manifest\\Requirement' => $vendorDir . '/phar-io/manifest/src/values/Requirement.php', + 'PharIo\\Manifest\\RequirementCollection' => $vendorDir . '/phar-io/manifest/src/values/RequirementCollection.php', + 'PharIo\\Manifest\\RequirementCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/RequirementCollectionIterator.php', + 'PharIo\\Manifest\\RequiresElement' => $vendorDir . '/phar-io/manifest/src/xml/RequiresElement.php', + 'PharIo\\Manifest\\Type' => $vendorDir . '/phar-io/manifest/src/values/Type.php', + 'PharIo\\Manifest\\Url' => $vendorDir . '/phar-io/manifest/src/values/Url.php', + 'PharIo\\Version\\AbstractVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AbstractVersionConstraint.php', + 'PharIo\\Version\\AndVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php', + 'PharIo\\Version\\AnyVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AnyVersionConstraint.php', + 'PharIo\\Version\\BuildMetaData' => $vendorDir . '/phar-io/version/src/BuildMetaData.php', + 'PharIo\\Version\\ExactVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/ExactVersionConstraint.php', + 'PharIo\\Version\\Exception' => $vendorDir . '/phar-io/version/src/exceptions/Exception.php', + 'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php', + 'PharIo\\Version\\InvalidPreReleaseSuffixException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php', + 'PharIo\\Version\\InvalidVersionException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidVersionException.php', + 'PharIo\\Version\\NoBuildMetaDataException' => $vendorDir . '/phar-io/version/src/exceptions/NoBuildMetaDataException.php', + 'PharIo\\Version\\NoPreReleaseSuffixException' => $vendorDir . '/phar-io/version/src/exceptions/NoPreReleaseSuffixException.php', + 'PharIo\\Version\\OrVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php', + 'PharIo\\Version\\PreReleaseSuffix' => $vendorDir . '/phar-io/version/src/PreReleaseSuffix.php', + 'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php', + 'PharIo\\Version\\SpecificMajorVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php', + 'PharIo\\Version\\UnsupportedVersionConstraintException' => $vendorDir . '/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php', + 'PharIo\\Version\\Version' => $vendorDir . '/phar-io/version/src/Version.php', + 'PharIo\\Version\\VersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/VersionConstraint.php', + 'PharIo\\Version\\VersionConstraintParser' => $vendorDir . '/phar-io/version/src/VersionConstraintParser.php', + 'PharIo\\Version\\VersionConstraintValue' => $vendorDir . '/phar-io/version/src/VersionConstraintValue.php', + 'PharIo\\Version\\VersionNumber' => $vendorDir . '/phar-io/version/src/VersionNumber.php', + 'PhpParser\\Builder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder.php', + 'PhpParser\\BuilderFactory' => $vendorDir . '/nikic/php-parser/lib/PhpParser/BuilderFactory.php', + 'PhpParser\\BuilderHelpers' => $vendorDir . '/nikic/php-parser/lib/PhpParser/BuilderHelpers.php', + 'PhpParser\\Builder\\ClassConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php', + 'PhpParser\\Builder\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Class_.php', + 'PhpParser\\Builder\\Declaration' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Declaration.php', + 'PhpParser\\Builder\\EnumCase' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php', + 'PhpParser\\Builder\\Enum_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Enum_.php', + 'PhpParser\\Builder\\FunctionLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php', + 'PhpParser\\Builder\\Function_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Function_.php', + 'PhpParser\\Builder\\Interface_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Interface_.php', + 'PhpParser\\Builder\\Method' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Method.php', + 'PhpParser\\Builder\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php', + 'PhpParser\\Builder\\Param' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Param.php', + 'PhpParser\\Builder\\Property' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Property.php', + 'PhpParser\\Builder\\TraitUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php', + 'PhpParser\\Builder\\TraitUseAdaptation' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php', + 'PhpParser\\Builder\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Trait_.php', + 'PhpParser\\Builder\\Use_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Builder/Use_.php', + 'PhpParser\\Comment' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Comment.php', + 'PhpParser\\Comment\\Doc' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Comment/Doc.php', + 'PhpParser\\ConstExprEvaluationException' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php', + 'PhpParser\\ConstExprEvaluator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php', + 'PhpParser\\Error' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Error.php', + 'PhpParser\\ErrorHandler' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler.php', + 'PhpParser\\ErrorHandler\\Collecting' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php', + 'PhpParser\\ErrorHandler\\Throwing' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php', + 'PhpParser\\Internal\\DiffElem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php', + 'PhpParser\\Internal\\Differ' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/Differ.php', + 'PhpParser\\Internal\\PrintableNewAnonClassNode' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php', + 'PhpParser\\Internal\\TokenPolyfill' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php', + 'PhpParser\\Internal\\TokenStream' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php', + 'PhpParser\\JsonDecoder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php', + 'PhpParser\\Lexer' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer.php', + 'PhpParser\\Lexer\\Emulative' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', + 'PhpParser\\Lexer\\TokenEmulator\\AsymmetricVisibilityTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\MatchTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\NullsafeTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\PipeOperatorEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\PropertyTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyFunctionTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\ReverseEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\TokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\VoidCastEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php', + 'PhpParser\\Modifiers' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Modifiers.php', + 'PhpParser\\NameContext' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NameContext.php', + 'PhpParser\\Node' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node.php', + 'PhpParser\\NodeAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', + 'PhpParser\\NodeDumper' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeDumper.php', + 'PhpParser\\NodeFinder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeFinder.php', + 'PhpParser\\NodeTraverser' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeTraverser.php', + 'PhpParser\\NodeTraverserInterface' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php', + 'PhpParser\\NodeVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php', + 'PhpParser\\NodeVisitorAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php', + 'PhpParser\\NodeVisitor\\CloningVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php', + 'PhpParser\\NodeVisitor\\CommentAnnotatingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php', + 'PhpParser\\NodeVisitor\\FindingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php', + 'PhpParser\\NodeVisitor\\FirstFindingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php', + 'PhpParser\\NodeVisitor\\NameResolver' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php', + 'PhpParser\\NodeVisitor\\NodeConnectingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php', + 'PhpParser\\NodeVisitor\\ParentConnectingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php', + 'PhpParser\\Node\\Arg' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', + 'PhpParser\\Node\\ArrayItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php', + 'PhpParser\\Node\\Attribute' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php', + 'PhpParser\\Node\\AttributeGroup' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php', + 'PhpParser\\Node\\ClosureUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php', + 'PhpParser\\Node\\ComplexType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php', + 'PhpParser\\Node\\Const_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', + 'PhpParser\\Node\\DeclareItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php', + 'PhpParser\\Node\\Expr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', + 'PhpParser\\Node\\Expr\\ArrayDimFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', + 'PhpParser\\Node\\Expr\\ArrayItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', + 'PhpParser\\Node\\Expr\\Array_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', + 'PhpParser\\Node\\Expr\\ArrowFunction' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php', + 'PhpParser\\Node\\Expr\\Assign' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', + 'PhpParser\\Node\\Expr\\AssignOp' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php', + 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php', + 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php', + 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Coalesce' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Concat' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Div' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Minus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Mod' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Mul' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Plus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Pow' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php', + 'PhpParser\\Node\\Expr\\AssignOp\\ShiftLeft' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php', + 'PhpParser\\Node\\Expr\\AssignOp\\ShiftRight' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php', + 'PhpParser\\Node\\Expr\\AssignRef' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php', + 'PhpParser\\Node\\Expr\\BinaryOp' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Coalesce' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Concat' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Div' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Equal' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Greater' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\GreaterOrEqual' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Identical' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Minus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Mod' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Mul' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\NotEqual' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\NotIdentical' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Pipe' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pipe.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Plus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Pow' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftLeft' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftRight' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Smaller' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\SmallerOrEqual' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Spaceship' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php', + 'PhpParser\\Node\\Expr\\BitwiseNot' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php', + 'PhpParser\\Node\\Expr\\BooleanNot' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php', + 'PhpParser\\Node\\Expr\\CallLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php', + 'PhpParser\\Node\\Expr\\Cast' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php', + 'PhpParser\\Node\\Expr\\Cast\\Array_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php', + 'PhpParser\\Node\\Expr\\Cast\\Bool_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php', + 'PhpParser\\Node\\Expr\\Cast\\Double' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php', + 'PhpParser\\Node\\Expr\\Cast\\Int_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php', + 'PhpParser\\Node\\Expr\\Cast\\Object_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php', + 'PhpParser\\Node\\Expr\\Cast\\String_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php', + 'PhpParser\\Node\\Expr\\Cast\\Unset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php', + 'PhpParser\\Node\\Expr\\Cast\\Void_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Void_.php', + 'PhpParser\\Node\\Expr\\ClassConstFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php', + 'PhpParser\\Node\\Expr\\Clone_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php', + 'PhpParser\\Node\\Expr\\Closure' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php', + 'PhpParser\\Node\\Expr\\ClosureUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php', + 'PhpParser\\Node\\Expr\\ConstFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php', + 'PhpParser\\Node\\Expr\\Empty_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php', + 'PhpParser\\Node\\Expr\\Error' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php', + 'PhpParser\\Node\\Expr\\ErrorSuppress' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php', + 'PhpParser\\Node\\Expr\\Eval_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php', + 'PhpParser\\Node\\Expr\\Exit_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php', + 'PhpParser\\Node\\Expr\\FuncCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php', + 'PhpParser\\Node\\Expr\\Include_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php', + 'PhpParser\\Node\\Expr\\Instanceof_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php', + 'PhpParser\\Node\\Expr\\Isset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php', + 'PhpParser\\Node\\Expr\\List_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php', + 'PhpParser\\Node\\Expr\\Match_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php', + 'PhpParser\\Node\\Expr\\MethodCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php', + 'PhpParser\\Node\\Expr\\New_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php', + 'PhpParser\\Node\\Expr\\NullsafeMethodCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php', + 'PhpParser\\Node\\Expr\\NullsafePropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php', + 'PhpParser\\Node\\Expr\\PostDec' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php', + 'PhpParser\\Node\\Expr\\PostInc' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php', + 'PhpParser\\Node\\Expr\\PreDec' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php', + 'PhpParser\\Node\\Expr\\PreInc' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php', + 'PhpParser\\Node\\Expr\\Print_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php', + 'PhpParser\\Node\\Expr\\PropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php', + 'PhpParser\\Node\\Expr\\ShellExec' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php', + 'PhpParser\\Node\\Expr\\StaticCall' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php', + 'PhpParser\\Node\\Expr\\StaticPropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php', + 'PhpParser\\Node\\Expr\\Ternary' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php', + 'PhpParser\\Node\\Expr\\Throw_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php', + 'PhpParser\\Node\\Expr\\UnaryMinus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php', + 'PhpParser\\Node\\Expr\\UnaryPlus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php', + 'PhpParser\\Node\\Expr\\Variable' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php', + 'PhpParser\\Node\\Expr\\YieldFrom' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php', + 'PhpParser\\Node\\Expr\\Yield_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', + 'PhpParser\\Node\\FunctionLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', + 'PhpParser\\Node\\Identifier' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php', + 'PhpParser\\Node\\InterpolatedStringPart' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php', + 'PhpParser\\Node\\IntersectionType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php', + 'PhpParser\\Node\\MatchArm' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php', + 'PhpParser\\Node\\Name' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name.php', + 'PhpParser\\Node\\Name\\FullyQualified' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php', + 'PhpParser\\Node\\Name\\Relative' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php', + 'PhpParser\\Node\\NullableType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php', + 'PhpParser\\Node\\Param' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Param.php', + 'PhpParser\\Node\\PropertyHook' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php', + 'PhpParser\\Node\\PropertyItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php', + 'PhpParser\\Node\\Scalar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php', + 'PhpParser\\Node\\Scalar\\DNumber' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php', + 'PhpParser\\Node\\Scalar\\Encapsed' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php', + 'PhpParser\\Node\\Scalar\\EncapsedStringPart' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php', + 'PhpParser\\Node\\Scalar\\Float_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php', + 'PhpParser\\Node\\Scalar\\Int_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php', + 'PhpParser\\Node\\Scalar\\InterpolatedString' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php', + 'PhpParser\\Node\\Scalar\\LNumber' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php', + 'PhpParser\\Node\\Scalar\\MagicConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Dir' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\File' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Function_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Line' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Method' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Property' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Property.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php', + 'PhpParser\\Node\\Scalar\\String_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php', + 'PhpParser\\Node\\StaticVar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/StaticVar.php', + 'PhpParser\\Node\\Stmt' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php', + 'PhpParser\\Node\\Stmt\\Block' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php', + 'PhpParser\\Node\\Stmt\\Break_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php', + 'PhpParser\\Node\\Stmt\\Case_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php', + 'PhpParser\\Node\\Stmt\\Catch_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php', + 'PhpParser\\Node\\Stmt\\ClassConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php', + 'PhpParser\\Node\\Stmt\\ClassLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php', + 'PhpParser\\Node\\Stmt\\ClassMethod' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php', + 'PhpParser\\Node\\Stmt\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php', + 'PhpParser\\Node\\Stmt\\Const_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php', + 'PhpParser\\Node\\Stmt\\Continue_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php', + 'PhpParser\\Node\\Stmt\\DeclareDeclare' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php', + 'PhpParser\\Node\\Stmt\\Declare_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php', + 'PhpParser\\Node\\Stmt\\Do_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php', + 'PhpParser\\Node\\Stmt\\Echo_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php', + 'PhpParser\\Node\\Stmt\\ElseIf_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php', + 'PhpParser\\Node\\Stmt\\Else_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php', + 'PhpParser\\Node\\Stmt\\EnumCase' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php', + 'PhpParser\\Node\\Stmt\\Enum_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php', + 'PhpParser\\Node\\Stmt\\Expression' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php', + 'PhpParser\\Node\\Stmt\\Finally_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php', + 'PhpParser\\Node\\Stmt\\For_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php', + 'PhpParser\\Node\\Stmt\\Foreach_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php', + 'PhpParser\\Node\\Stmt\\Function_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php', + 'PhpParser\\Node\\Stmt\\Global_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php', + 'PhpParser\\Node\\Stmt\\Goto_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php', + 'PhpParser\\Node\\Stmt\\GroupUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php', + 'PhpParser\\Node\\Stmt\\HaltCompiler' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php', + 'PhpParser\\Node\\Stmt\\If_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php', + 'PhpParser\\Node\\Stmt\\InlineHTML' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php', + 'PhpParser\\Node\\Stmt\\Interface_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php', + 'PhpParser\\Node\\Stmt\\Label' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php', + 'PhpParser\\Node\\Stmt\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php', + 'PhpParser\\Node\\Stmt\\Nop' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php', + 'PhpParser\\Node\\Stmt\\Property' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php', + 'PhpParser\\Node\\Stmt\\PropertyProperty' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php', + 'PhpParser\\Node\\Stmt\\Return_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php', + 'PhpParser\\Node\\Stmt\\StaticVar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php', + 'PhpParser\\Node\\Stmt\\Static_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php', + 'PhpParser\\Node\\Stmt\\Switch_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php', + 'PhpParser\\Node\\Stmt\\TraitUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php', + 'PhpParser\\Node\\Stmt\\TraitUseAdaptation' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php', + 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php', + 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Precedence' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php', + 'PhpParser\\Node\\Stmt\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php', + 'PhpParser\\Node\\Stmt\\TryCatch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php', + 'PhpParser\\Node\\Stmt\\Unset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php', + 'PhpParser\\Node\\Stmt\\UseUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php', + 'PhpParser\\Node\\Stmt\\Use_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php', + 'PhpParser\\Node\\Stmt\\While_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', + 'PhpParser\\Node\\UnionType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php', + 'PhpParser\\Node\\UseItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/UseItem.php', + 'PhpParser\\Node\\VarLikeIdentifier' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php', + 'PhpParser\\Node\\VariadicPlaceholder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php', + 'PhpParser\\Parser' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser.php', + 'PhpParser\\ParserAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', + 'PhpParser\\ParserFactory' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', + 'PhpParser\\Parser\\Php7' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php', + 'PhpParser\\Parser\\Php8' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php8.php', + 'PhpParser\\PhpVersion' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PhpVersion.php', + 'PhpParser\\PrettyPrinter' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinter.php', + 'PhpParser\\PrettyPrinterAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', + 'PhpParser\\PrettyPrinter\\Standard' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', + 'PhpParser\\Token' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Token.php', + 'SebastianBergmann\\CliParser\\AmbiguousOptionException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php', + 'SebastianBergmann\\CliParser\\Exception' => $vendorDir . '/sebastian/cli-parser/src/exceptions/Exception.php', + 'SebastianBergmann\\CliParser\\OptionDoesNotAllowArgumentException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php', + 'SebastianBergmann\\CliParser\\Parser' => $vendorDir . '/sebastian/cli-parser/src/Parser.php', + 'SebastianBergmann\\CliParser\\RequiredOptionArgumentMissingException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/RequiredOptionArgumentMissingException.php', + 'SebastianBergmann\\CliParser\\UnknownOptionException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/UnknownOptionException.php', + 'SebastianBergmann\\CodeCoverage\\BranchAndPathCoverageNotSupportedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/BranchAndPathCoverageNotSupportedException.php', + 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php', + 'SebastianBergmann\\CodeCoverage\\DeadCodeDetectionNotSupportedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/DeadCodeDetectionNotSupportedException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Driver.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\PathExistsButIsNotDirectoryException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\PcovDriver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/PcovDriver.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\PcovNotAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/PcovNotAvailableException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\PhpdbgDriver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/PhpdbgDriver.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\PhpdbgNotAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/PhpdbgNotAvailableException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\Selector' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Selector.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\WriteOperationFailedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/WriteOperationFailedException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\WrongXdebugVersionException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/WrongXdebugVersionException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug2Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Xdebug2Driver.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug2NotEnabledException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Xdebug2NotEnabledException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug3Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Xdebug3Driver.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug3NotEnabledException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Xdebug3NotEnabledException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugNotAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/XdebugNotAvailableException.php', + 'SebastianBergmann\\CodeCoverage\\Exception' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Exception.php', + 'SebastianBergmann\\CodeCoverage\\Filter' => $vendorDir . '/phpunit/php-code-coverage/src/Filter.php', + 'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php', + 'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverAvailableException.php', + 'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverWithPathCoverageSupportAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverWithPathCoverageSupportAvailableException.php', + 'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => $vendorDir . '/phpunit/php-code-coverage/src/Node/AbstractNode.php', + 'SebastianBergmann\\CodeCoverage\\Node\\Builder' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Builder.php', + 'SebastianBergmann\\CodeCoverage\\Node\\CrapIndex' => $vendorDir . '/phpunit/php-code-coverage/src/Node/CrapIndex.php', + 'SebastianBergmann\\CodeCoverage\\Node\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Directory.php', + 'SebastianBergmann\\CodeCoverage\\Node\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Node/File.php', + 'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Iterator.php', + 'SebastianBergmann\\CodeCoverage\\ParserException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/ParserException.php', + 'SebastianBergmann\\CodeCoverage\\ProcessedCodeCoverageData' => $vendorDir . '/phpunit/php-code-coverage/src/ProcessedCodeCoverageData.php', + 'SebastianBergmann\\CodeCoverage\\RawCodeCoverageData' => $vendorDir . '/phpunit/php-code-coverage/src/RawCodeCoverageData.php', + 'SebastianBergmann\\CodeCoverage\\ReflectionException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/ReflectionException.php', + 'SebastianBergmann\\CodeCoverage\\ReportAlreadyFinalizedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/ReportAlreadyFinalizedException.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Clover' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Clover.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Cobertura' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Cobertura.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Crap4j.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Facade.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php', + 'SebastianBergmann\\CodeCoverage\\Report\\PHP' => $vendorDir . '/phpunit/php-code-coverage/src/Report/PHP.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Text' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Text.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\BuildInformation' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/File.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Method.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Node.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Project.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Report.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Source' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Source.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysisCacheNotConfiguredException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CacheWarmer' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CodeUnitFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ExecutableLinesFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\FileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\IgnoredLinesFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php', + 'SebastianBergmann\\CodeCoverage\\TestIdMissingException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php', + 'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php', + 'SebastianBergmann\\CodeCoverage\\Util\\DirectoryCouldNotBeCreatedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php', + 'SebastianBergmann\\CodeCoverage\\Util\\Filesystem' => $vendorDir . '/phpunit/php-code-coverage/src/Util/Filesystem.php', + 'SebastianBergmann\\CodeCoverage\\Util\\Percentage' => $vendorDir . '/phpunit/php-code-coverage/src/Util/Percentage.php', + 'SebastianBergmann\\CodeCoverage\\Version' => $vendorDir . '/phpunit/php-code-coverage/src/Version.php', + 'SebastianBergmann\\CodeCoverage\\XmlException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/XmlException.php', + 'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => $vendorDir . '/sebastian/code-unit-reverse-lookup/src/Wizard.php', + 'SebastianBergmann\\CodeUnit\\ClassMethodUnit' => $vendorDir . '/sebastian/code-unit/src/ClassMethodUnit.php', + 'SebastianBergmann\\CodeUnit\\ClassUnit' => $vendorDir . '/sebastian/code-unit/src/ClassUnit.php', + 'SebastianBergmann\\CodeUnit\\CodeUnit' => $vendorDir . '/sebastian/code-unit/src/CodeUnit.php', + 'SebastianBergmann\\CodeUnit\\CodeUnitCollection' => $vendorDir . '/sebastian/code-unit/src/CodeUnitCollection.php', + 'SebastianBergmann\\CodeUnit\\CodeUnitCollectionIterator' => $vendorDir . '/sebastian/code-unit/src/CodeUnitCollectionIterator.php', + 'SebastianBergmann\\CodeUnit\\Exception' => $vendorDir . '/sebastian/code-unit/src/exceptions/Exception.php', + 'SebastianBergmann\\CodeUnit\\FunctionUnit' => $vendorDir . '/sebastian/code-unit/src/FunctionUnit.php', + 'SebastianBergmann\\CodeUnit\\InterfaceMethodUnit' => $vendorDir . '/sebastian/code-unit/src/InterfaceMethodUnit.php', + 'SebastianBergmann\\CodeUnit\\InterfaceUnit' => $vendorDir . '/sebastian/code-unit/src/InterfaceUnit.php', + 'SebastianBergmann\\CodeUnit\\InvalidCodeUnitException' => $vendorDir . '/sebastian/code-unit/src/exceptions/InvalidCodeUnitException.php', + 'SebastianBergmann\\CodeUnit\\Mapper' => $vendorDir . '/sebastian/code-unit/src/Mapper.php', + 'SebastianBergmann\\CodeUnit\\NoTraitException' => $vendorDir . '/sebastian/code-unit/src/exceptions/NoTraitException.php', + 'SebastianBergmann\\CodeUnit\\ReflectionException' => $vendorDir . '/sebastian/code-unit/src/exceptions/ReflectionException.php', + 'SebastianBergmann\\CodeUnit\\TraitMethodUnit' => $vendorDir . '/sebastian/code-unit/src/TraitMethodUnit.php', + 'SebastianBergmann\\CodeUnit\\TraitUnit' => $vendorDir . '/sebastian/code-unit/src/TraitUnit.php', + 'SebastianBergmann\\Comparator\\ArrayComparator' => $vendorDir . '/sebastian/comparator/src/ArrayComparator.php', + 'SebastianBergmann\\Comparator\\Comparator' => $vendorDir . '/sebastian/comparator/src/Comparator.php', + 'SebastianBergmann\\Comparator\\ComparisonFailure' => $vendorDir . '/sebastian/comparator/src/ComparisonFailure.php', + 'SebastianBergmann\\Comparator\\DOMNodeComparator' => $vendorDir . '/sebastian/comparator/src/DOMNodeComparator.php', + 'SebastianBergmann\\Comparator\\DateTimeComparator' => $vendorDir . '/sebastian/comparator/src/DateTimeComparator.php', + 'SebastianBergmann\\Comparator\\DoubleComparator' => $vendorDir . '/sebastian/comparator/src/DoubleComparator.php', + 'SebastianBergmann\\Comparator\\Exception' => $vendorDir . '/sebastian/comparator/src/exceptions/Exception.php', + 'SebastianBergmann\\Comparator\\ExceptionComparator' => $vendorDir . '/sebastian/comparator/src/ExceptionComparator.php', + 'SebastianBergmann\\Comparator\\Factory' => $vendorDir . '/sebastian/comparator/src/Factory.php', + 'SebastianBergmann\\Comparator\\MockObjectComparator' => $vendorDir . '/sebastian/comparator/src/MockObjectComparator.php', + 'SebastianBergmann\\Comparator\\NumericComparator' => $vendorDir . '/sebastian/comparator/src/NumericComparator.php', + 'SebastianBergmann\\Comparator\\ObjectComparator' => $vendorDir . '/sebastian/comparator/src/ObjectComparator.php', + 'SebastianBergmann\\Comparator\\ResourceComparator' => $vendorDir . '/sebastian/comparator/src/ResourceComparator.php', + 'SebastianBergmann\\Comparator\\RuntimeException' => $vendorDir . '/sebastian/comparator/src/exceptions/RuntimeException.php', + 'SebastianBergmann\\Comparator\\ScalarComparator' => $vendorDir . '/sebastian/comparator/src/ScalarComparator.php', + 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => $vendorDir . '/sebastian/comparator/src/SplObjectStorageComparator.php', + 'SebastianBergmann\\Comparator\\TypeComparator' => $vendorDir . '/sebastian/comparator/src/TypeComparator.php', + 'SebastianBergmann\\Complexity\\Calculator' => $vendorDir . '/sebastian/complexity/src/Calculator.php', + 'SebastianBergmann\\Complexity\\Complexity' => $vendorDir . '/sebastian/complexity/src/Complexity/Complexity.php', + 'SebastianBergmann\\Complexity\\ComplexityCalculatingVisitor' => $vendorDir . '/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php', + 'SebastianBergmann\\Complexity\\ComplexityCollection' => $vendorDir . '/sebastian/complexity/src/Complexity/ComplexityCollection.php', + 'SebastianBergmann\\Complexity\\ComplexityCollectionIterator' => $vendorDir . '/sebastian/complexity/src/Complexity/ComplexityCollectionIterator.php', + 'SebastianBergmann\\Complexity\\CyclomaticComplexityCalculatingVisitor' => $vendorDir . '/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php', + 'SebastianBergmann\\Complexity\\Exception' => $vendorDir . '/sebastian/complexity/src/Exception/Exception.php', + 'SebastianBergmann\\Complexity\\RuntimeException' => $vendorDir . '/sebastian/complexity/src/Exception/RuntimeException.php', + 'SebastianBergmann\\Diff\\Chunk' => $vendorDir . '/sebastian/diff/src/Chunk.php', + 'SebastianBergmann\\Diff\\ConfigurationException' => $vendorDir . '/sebastian/diff/src/Exception/ConfigurationException.php', + 'SebastianBergmann\\Diff\\Diff' => $vendorDir . '/sebastian/diff/src/Diff.php', + 'SebastianBergmann\\Diff\\Differ' => $vendorDir . '/sebastian/diff/src/Differ.php', + 'SebastianBergmann\\Diff\\Exception' => $vendorDir . '/sebastian/diff/src/Exception/Exception.php', + 'SebastianBergmann\\Diff\\InvalidArgumentException' => $vendorDir . '/sebastian/diff/src/Exception/InvalidArgumentException.php', + 'SebastianBergmann\\Diff\\Line' => $vendorDir . '/sebastian/diff/src/Line.php', + 'SebastianBergmann\\Diff\\LongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/LongestCommonSubsequenceCalculator.php', + 'SebastianBergmann\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php', + 'SebastianBergmann\\Diff\\Output\\AbstractChunkOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php', + 'SebastianBergmann\\Diff\\Output\\DiffOnlyOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php', + 'SebastianBergmann\\Diff\\Output\\DiffOutputBuilderInterface' => $vendorDir . '/sebastian/diff/src/Output/DiffOutputBuilderInterface.php', + 'SebastianBergmann\\Diff\\Output\\StrictUnifiedDiffOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php', + 'SebastianBergmann\\Diff\\Output\\UnifiedDiffOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php', + 'SebastianBergmann\\Diff\\Parser' => $vendorDir . '/sebastian/diff/src/Parser.php', + 'SebastianBergmann\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php', + 'SebastianBergmann\\Environment\\Console' => $vendorDir . '/sebastian/environment/src/Console.php', + 'SebastianBergmann\\Environment\\OperatingSystem' => $vendorDir . '/sebastian/environment/src/OperatingSystem.php', + 'SebastianBergmann\\Environment\\Runtime' => $vendorDir . '/sebastian/environment/src/Runtime.php', + 'SebastianBergmann\\Exporter\\Exporter' => $vendorDir . '/sebastian/exporter/src/Exporter.php', + 'SebastianBergmann\\FileIterator\\Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php', + 'SebastianBergmann\\FileIterator\\Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php', + 'SebastianBergmann\\FileIterator\\Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php', + 'SebastianBergmann\\GlobalState\\CodeExporter' => $vendorDir . '/sebastian/global-state/src/CodeExporter.php', + 'SebastianBergmann\\GlobalState\\Exception' => $vendorDir . '/sebastian/global-state/src/exceptions/Exception.php', + 'SebastianBergmann\\GlobalState\\ExcludeList' => $vendorDir . '/sebastian/global-state/src/ExcludeList.php', + 'SebastianBergmann\\GlobalState\\Restorer' => $vendorDir . '/sebastian/global-state/src/Restorer.php', + 'SebastianBergmann\\GlobalState\\RuntimeException' => $vendorDir . '/sebastian/global-state/src/exceptions/RuntimeException.php', + 'SebastianBergmann\\GlobalState\\Snapshot' => $vendorDir . '/sebastian/global-state/src/Snapshot.php', + 'SebastianBergmann\\Invoker\\Exception' => $vendorDir . '/phpunit/php-invoker/src/exceptions/Exception.php', + 'SebastianBergmann\\Invoker\\Invoker' => $vendorDir . '/phpunit/php-invoker/src/Invoker.php', + 'SebastianBergmann\\Invoker\\ProcessControlExtensionNotLoadedException' => $vendorDir . '/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php', + 'SebastianBergmann\\Invoker\\TimeoutException' => $vendorDir . '/phpunit/php-invoker/src/exceptions/TimeoutException.php', + 'SebastianBergmann\\LinesOfCode\\Counter' => $vendorDir . '/sebastian/lines-of-code/src/Counter.php', + 'SebastianBergmann\\LinesOfCode\\Exception' => $vendorDir . '/sebastian/lines-of-code/src/Exception/Exception.php', + 'SebastianBergmann\\LinesOfCode\\IllogicalValuesException' => $vendorDir . '/sebastian/lines-of-code/src/Exception/IllogicalValuesException.php', + 'SebastianBergmann\\LinesOfCode\\LineCountingVisitor' => $vendorDir . '/sebastian/lines-of-code/src/LineCountingVisitor.php', + 'SebastianBergmann\\LinesOfCode\\LinesOfCode' => $vendorDir . '/sebastian/lines-of-code/src/LinesOfCode.php', + 'SebastianBergmann\\LinesOfCode\\NegativeValueException' => $vendorDir . '/sebastian/lines-of-code/src/Exception/NegativeValueException.php', + 'SebastianBergmann\\LinesOfCode\\RuntimeException' => $vendorDir . '/sebastian/lines-of-code/src/Exception/RuntimeException.php', + 'SebastianBergmann\\ObjectEnumerator\\Enumerator' => $vendorDir . '/sebastian/object-enumerator/src/Enumerator.php', + 'SebastianBergmann\\ObjectEnumerator\\Exception' => $vendorDir . '/sebastian/object-enumerator/src/Exception.php', + 'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => $vendorDir . '/sebastian/object-enumerator/src/InvalidArgumentException.php', + 'SebastianBergmann\\ObjectReflector\\Exception' => $vendorDir . '/sebastian/object-reflector/src/Exception.php', + 'SebastianBergmann\\ObjectReflector\\InvalidArgumentException' => $vendorDir . '/sebastian/object-reflector/src/InvalidArgumentException.php', + 'SebastianBergmann\\ObjectReflector\\ObjectReflector' => $vendorDir . '/sebastian/object-reflector/src/ObjectReflector.php', + 'SebastianBergmann\\RecursionContext\\Context' => $vendorDir . '/sebastian/recursion-context/src/Context.php', + 'SebastianBergmann\\RecursionContext\\Exception' => $vendorDir . '/sebastian/recursion-context/src/Exception.php', + 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php', + 'SebastianBergmann\\ResourceOperations\\ResourceOperations' => $vendorDir . '/sebastian/resource-operations/src/ResourceOperations.php', + 'SebastianBergmann\\Template\\Exception' => $vendorDir . '/phpunit/php-text-template/src/exceptions/Exception.php', + 'SebastianBergmann\\Template\\InvalidArgumentException' => $vendorDir . '/phpunit/php-text-template/src/exceptions/InvalidArgumentException.php', + 'SebastianBergmann\\Template\\RuntimeException' => $vendorDir . '/phpunit/php-text-template/src/exceptions/RuntimeException.php', + 'SebastianBergmann\\Template\\Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php', + 'SebastianBergmann\\Timer\\Duration' => $vendorDir . '/phpunit/php-timer/src/Duration.php', + 'SebastianBergmann\\Timer\\Exception' => $vendorDir . '/phpunit/php-timer/src/exceptions/Exception.php', + 'SebastianBergmann\\Timer\\NoActiveTimerException' => $vendorDir . '/phpunit/php-timer/src/exceptions/NoActiveTimerException.php', + 'SebastianBergmann\\Timer\\ResourceUsageFormatter' => $vendorDir . '/phpunit/php-timer/src/ResourceUsageFormatter.php', + 'SebastianBergmann\\Timer\\TimeSinceStartOfRequestNotAvailableException' => $vendorDir . '/phpunit/php-timer/src/exceptions/TimeSinceStartOfRequestNotAvailableException.php', + 'SebastianBergmann\\Timer\\Timer' => $vendorDir . '/phpunit/php-timer/src/Timer.php', + 'SebastianBergmann\\Type\\CallableType' => $vendorDir . '/sebastian/type/src/type/CallableType.php', + 'SebastianBergmann\\Type\\Exception' => $vendorDir . '/sebastian/type/src/exception/Exception.php', + 'SebastianBergmann\\Type\\FalseType' => $vendorDir . '/sebastian/type/src/type/FalseType.php', + 'SebastianBergmann\\Type\\GenericObjectType' => $vendorDir . '/sebastian/type/src/type/GenericObjectType.php', + 'SebastianBergmann\\Type\\IntersectionType' => $vendorDir . '/sebastian/type/src/type/IntersectionType.php', + 'SebastianBergmann\\Type\\IterableType' => $vendorDir . '/sebastian/type/src/type/IterableType.php', + 'SebastianBergmann\\Type\\MixedType' => $vendorDir . '/sebastian/type/src/type/MixedType.php', + 'SebastianBergmann\\Type\\NeverType' => $vendorDir . '/sebastian/type/src/type/NeverType.php', + 'SebastianBergmann\\Type\\NullType' => $vendorDir . '/sebastian/type/src/type/NullType.php', + 'SebastianBergmann\\Type\\ObjectType' => $vendorDir . '/sebastian/type/src/type/ObjectType.php', + 'SebastianBergmann\\Type\\Parameter' => $vendorDir . '/sebastian/type/src/Parameter.php', + 'SebastianBergmann\\Type\\ReflectionMapper' => $vendorDir . '/sebastian/type/src/ReflectionMapper.php', + 'SebastianBergmann\\Type\\RuntimeException' => $vendorDir . '/sebastian/type/src/exception/RuntimeException.php', + 'SebastianBergmann\\Type\\SimpleType' => $vendorDir . '/sebastian/type/src/type/SimpleType.php', + 'SebastianBergmann\\Type\\StaticType' => $vendorDir . '/sebastian/type/src/type/StaticType.php', + 'SebastianBergmann\\Type\\TrueType' => $vendorDir . '/sebastian/type/src/type/TrueType.php', + 'SebastianBergmann\\Type\\Type' => $vendorDir . '/sebastian/type/src/type/Type.php', + 'SebastianBergmann\\Type\\TypeName' => $vendorDir . '/sebastian/type/src/TypeName.php', + 'SebastianBergmann\\Type\\UnionType' => $vendorDir . '/sebastian/type/src/type/UnionType.php', + 'SebastianBergmann\\Type\\UnknownType' => $vendorDir . '/sebastian/type/src/type/UnknownType.php', + 'SebastianBergmann\\Type\\VoidType' => $vendorDir . '/sebastian/type/src/type/VoidType.php', + 'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php', + 'SzepeViktor\\PHPStan\\WordPress\\ApplyFiltersDynamicFunctionReturnTypeExtension' => $vendorDir . '/szepeviktor/phpstan-wordpress/src/ApplyFiltersDynamicFunctionReturnTypeExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\AssertWpErrorTypeSpecifyingExtension' => $vendorDir . '/szepeviktor/phpstan-wordpress/src/AssertWpErrorTypeSpecifyingExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\EscSqlDynamicFunctionReturnTypeExtension' => $vendorDir . '/szepeviktor/phpstan-wordpress/src/EscSqlDynamicFunctionReturnTypeExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\HookCallbackRule' => $vendorDir . '/szepeviktor/phpstan-wordpress/src/HookCallbackRule.php', + 'SzepeViktor\\PHPStan\\WordPress\\HookDocBlock' => $vendorDir . '/szepeviktor/phpstan-wordpress/src/HookDocBlock.php', + 'SzepeViktor\\PHPStan\\WordPress\\HookDocsRule' => $vendorDir . '/szepeviktor/phpstan-wordpress/src/HookDocsRule.php', + 'SzepeViktor\\PHPStan\\WordPress\\HookDocsVisitor' => $vendorDir . '/szepeviktor/phpstan-wordpress/src/HookDocsVisitor.php', + 'SzepeViktor\\PHPStan\\WordPress\\NormalizeWhitespaceDynamicFunctionReturnTypeExtension' => $vendorDir . '/szepeviktor/phpstan-wordpress/src/NormalizeWhitespaceDynamicFunctionReturnTypeExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\NormalizedArguments' => $vendorDir . '/szepeviktor/phpstan-wordpress/src/NormalizedArguments.php', + 'SzepeViktor\\PHPStan\\WordPress\\ShortcodeAttsDynamicFunctionReturnTypeExtension' => $vendorDir . '/szepeviktor/phpstan-wordpress/src/ShortcodeAttsDynamicFunctionReturnTypeExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\SlashitFunctionsDynamicFunctionReturnTypeExtension' => $vendorDir . '/szepeviktor/phpstan-wordpress/src/SlashitFunctionsDynamicFunctionReturnTypeExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\StripslashesFromStringsOnlyDynamicFunctionReturnTypeExtension' => $vendorDir . '/szepeviktor/phpstan-wordpress/src/StripslashesFromStringsOnlyDynamicFunctionReturnTypeExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\WpConstantFetchRule' => $vendorDir . '/szepeviktor/phpstan-wordpress/src/WpConstantFetchRule.php', + 'SzepeViktor\\PHPStan\\WordPress\\WpParseUrlFunctionDynamicReturnTypeExtension' => $vendorDir . '/szepeviktor/phpstan-wordpress/src/WpParseUrlFunctionDynamicReturnTypeExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\WpSlashDynamicFunctionReturnTypeExtension' => $vendorDir . '/szepeviktor/phpstan-wordpress/src/WpSlashDynamicFunctionReturnTypeExtension.php', + 'TheSeer\\Tokenizer\\Exception' => $vendorDir . '/theseer/tokenizer/src/Exception.php', + 'TheSeer\\Tokenizer\\NamespaceUri' => $vendorDir . '/theseer/tokenizer/src/NamespaceUri.php', + 'TheSeer\\Tokenizer\\NamespaceUriException' => $vendorDir . '/theseer/tokenizer/src/NamespaceUriException.php', + 'TheSeer\\Tokenizer\\Token' => $vendorDir . '/theseer/tokenizer/src/Token.php', + 'TheSeer\\Tokenizer\\TokenCollection' => $vendorDir . '/theseer/tokenizer/src/TokenCollection.php', + 'TheSeer\\Tokenizer\\TokenCollectionException' => $vendorDir . '/theseer/tokenizer/src/TokenCollectionException.php', + 'TheSeer\\Tokenizer\\Tokenizer' => $vendorDir . '/theseer/tokenizer/src/Tokenizer.php', + 'TheSeer\\Tokenizer\\XMLSerializer' => $vendorDir . '/theseer/tokenizer/src/XMLSerializer.php', + 'WP_Mock' => $vendorDir . '/10up/wp_mock/php/WP_Mock.php', + 'WP_Mock\\Action' => $vendorDir . '/10up/wp_mock/php/WP_Mock/Action.php', + 'WP_Mock\\DeprecatedMethodListener' => $vendorDir . '/10up/wp_mock/php/WP_Mock/DeprecatedMethodListener.php', + 'WP_Mock\\EventManager' => $vendorDir . '/10up/wp_mock/php/WP_Mock/EventManager.php', + 'WP_Mock\\Filter' => $vendorDir . '/10up/wp_mock/php/WP_Mock/Filter.php', + 'WP_Mock\\Functions' => $vendorDir . '/10up/wp_mock/php/WP_Mock/Functions.php', + 'WP_Mock\\Functions\\Handler' => $vendorDir . '/10up/wp_mock/php/WP_Mock/Functions/Handler.php', + 'WP_Mock\\Functions\\ReturnSequence' => $vendorDir . '/10up/wp_mock/php/WP_Mock/Functions/ReturnSequence.php', + 'WP_Mock\\Hook' => $vendorDir . '/10up/wp_mock/php/WP_Mock/Hook.php', + 'WP_Mock\\HookedCallback' => $vendorDir . '/10up/wp_mock/php/WP_Mock/HookedCallback.php', + 'WP_Mock\\InvokedFilterValue' => $vendorDir . '/10up/wp_mock/php/WP_Mock/InvokedFilterValue.php', + 'WP_Mock\\Matcher\\AnyInstance' => $vendorDir . '/10up/wp_mock/php/WP_Mock/Matcher/AnyInstance.php', + 'WP_Mock\\Matcher\\FuzzyObject' => $vendorDir . '/10up/wp_mock/php/WP_Mock/Matcher/FuzzyObject.php', + 'WP_Mock\\Tools\\Constraints\\ExpectationsMet' => $vendorDir . '/10up/wp_mock/php/WP_Mock/Tools/Constraints/ExpectationsMet.php', + 'WP_Mock\\Tools\\Constraints\\IsEqualHtml' => $vendorDir . '/10up/wp_mock/php/WP_Mock/Tools/Constraints/IsEqualHtml.php', + 'WP_Mock\\Tools\\TestCase' => $vendorDir . '/10up/wp_mock/php/WP_Mock/Tools/TestCase.php', + 'WP_Mock\\Traits\\AccessInaccessibleClassMembersTrait' => $vendorDir . '/10up/wp_mock/php/WP_Mock/Traits/AccessInaccessibleClassMembersTrait.php', + 'WP_Mock\\Traits\\MockWordPressObjectsTrait' => $vendorDir . '/10up/wp_mock/php/WP_Mock/Traits/MockWordPressObjectsTrait.php', ); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php new file mode 100644 index 0000000..4eef990 --- /dev/null +++ b/vendor/composer/autoload_files.php @@ -0,0 +1,14 @@ + $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php', + 'c72349b1fe8d0deeedd3a52e8aa814d8' => $vendorDir . '/mockery/mockery/library/helpers.php', + 'ce9671a430e4846b44e1c68c7611f9f5' => $vendorDir . '/mockery/mockery/library/Mockery.php', + '9b38cf48e83f5d8f60375221cd213eee' => $vendorDir . '/phpstan/phpstan/bootstrap.php', + 'ec07570ca5a812141189b1fa81503674' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php', +); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index c5e9469..0386b13 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -6,5 +6,12 @@ $baseDir = dirname($vendorDir); return array( + 'WP_Mock\\' => array($vendorDir . '/10up/wp_mock/php/WP_Mock'), + 'SzepeViktor\\PHPStan\\WordPress\\' => array($vendorDir . '/szepeviktor/phpstan-wordpress/src'), + 'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'), + 'PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => array($vendorDir . '/dealerdirect/phpcodesniffer-composer-installer/src'), + 'Mockery\\' => array($vendorDir . '/mockery/mockery/library/Mockery'), + 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'), + 'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'), 'Carbon_Fields\\' => array($vendorDir . '/htmlburger/carbon-fields/core'), ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 7edbb4f..151ba58 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -33,6 +33,18 @@ public static function getLoader() $loader->register(true); + $filesToLoad = \Composer\Autoload\ComposerStaticInit0b792a27b5180427b3b38e761e2919e5::$files; + $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; + } + }, null, null); + foreach ($filesToLoad as $fileIdentifier => $file) { + $requireFile($fileIdentifier, $file); + } + return $loader; } } diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index a6b0a50..8d337b8 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -6,7 +6,37 @@ class ComposerStaticInit0b792a27b5180427b3b38e761e2919e5 { + public static $files = array ( + '6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php', + 'c72349b1fe8d0deeedd3a52e8aa814d8' => __DIR__ . '/..' . '/mockery/mockery/library/helpers.php', + 'ce9671a430e4846b44e1c68c7611f9f5' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery.php', + '9b38cf48e83f5d8f60375221cd213eee' => __DIR__ . '/..' . '/phpstan/phpstan/bootstrap.php', + 'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php', + ); + public static $prefixLengthsPsr4 = array ( + 'W' => + array ( + 'WP_Mock\\' => 8, + ), + 'S' => + array ( + 'SzepeViktor\\PHPStan\\WordPress\\' => 30, + ), + 'P' => + array ( + 'PhpParser\\' => 10, + 'PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => 57, + ), + 'M' => + array ( + 'Mockery\\' => 8, + ), + 'D' => + array ( + 'Doctrine\\Instantiator\\' => 22, + 'DeepCopy\\' => 9, + ), 'C' => array ( 'Carbon_Fields\\' => 14, @@ -14,6 +44,34 @@ class ComposerStaticInit0b792a27b5180427b3b38e761e2919e5 ); public static $prefixDirsPsr4 = array ( + 'WP_Mock\\' => + array ( + 0 => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock', + ), + 'SzepeViktor\\PHPStan\\WordPress\\' => + array ( + 0 => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src', + ), + 'PhpParser\\' => + array ( + 0 => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser', + ), + 'PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => + array ( + 0 => __DIR__ . '/..' . '/dealerdirect/phpcodesniffer-composer-installer/src', + ), + 'Mockery\\' => + array ( + 0 => __DIR__ . '/..' . '/mockery/mockery/library/Mockery', + ), + 'Doctrine\\Instantiator\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator', + ), + 'DeepCopy\\' => + array ( + 0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy', + ), 'Carbon_Fields\\' => array ( 0 => __DIR__ . '/..' . '/htmlburger/carbon-fields/core', @@ -151,6 +209,1180 @@ class ComposerStaticInit0b792a27b5180427b3b38e761e2919e5 'Carbon_Fields\\Widget' => __DIR__ . '/..' . '/htmlburger/carbon-fields/core/Widget.php', 'Carbon_Fields\\Widget\\Widget' => __DIR__ . '/..' . '/htmlburger/carbon-fields/core/Widget/Widget.php', 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'DeepCopy\\DeepCopy' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/DeepCopy.php', + 'DeepCopy\\Exception\\CloneException' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php', + 'DeepCopy\\Exception\\PropertyException' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Exception/PropertyException.php', + 'DeepCopy\\Filter\\ChainableFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/ChainableFilter.php', + 'DeepCopy\\Filter\\Doctrine\\DoctrineCollectionFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php', + 'DeepCopy\\Filter\\Doctrine\\DoctrineEmptyCollectionFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php', + 'DeepCopy\\Filter\\Doctrine\\DoctrineProxyFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php', + 'DeepCopy\\Filter\\Filter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php', + 'DeepCopy\\Filter\\KeepFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php', + 'DeepCopy\\Filter\\ReplaceFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php', + 'DeepCopy\\Filter\\SetNullFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php', + 'DeepCopy\\Matcher\\Doctrine\\DoctrineProxyMatcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php', + 'DeepCopy\\Matcher\\Matcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php', + 'DeepCopy\\Matcher\\PropertyMatcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php', + 'DeepCopy\\Matcher\\PropertyNameMatcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php', + 'DeepCopy\\Matcher\\PropertyTypeMatcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php', + 'DeepCopy\\Reflection\\ReflectionHelper' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php', + 'DeepCopy\\TypeFilter\\Date\\DateIntervalFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php', + 'DeepCopy\\TypeFilter\\Date\\DatePeriodFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DatePeriodFilter.php', + 'DeepCopy\\TypeFilter\\ReplaceFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php', + 'DeepCopy\\TypeFilter\\ShallowCopyFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php', + 'DeepCopy\\TypeFilter\\Spl\\ArrayObjectFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php', + 'DeepCopy\\TypeFilter\\Spl\\SplDoublyLinkedList' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php', + 'DeepCopy\\TypeFilter\\Spl\\SplDoublyLinkedListFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedListFilter.php', + 'DeepCopy\\TypeFilter\\TypeFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php', + 'DeepCopy\\TypeMatcher\\TypeMatcher' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php', + 'Doctrine\\Instantiator\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php', + 'Doctrine\\Instantiator\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php', + 'Doctrine\\Instantiator\\Exception\\UnexpectedValueException' => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php', + 'Doctrine\\Instantiator\\Instantiator' => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php', + 'Doctrine\\Instantiator\\InstantiatorInterface' => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php', + 'Hamcrest\\Arrays\\IsArray' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php', + 'Hamcrest\\Arrays\\IsArrayContaining' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php', + 'Hamcrest\\Arrays\\IsArrayContainingInAnyOrder' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php', + 'Hamcrest\\Arrays\\IsArrayContainingInOrder' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php', + 'Hamcrest\\Arrays\\IsArrayContainingKey' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php', + 'Hamcrest\\Arrays\\IsArrayContainingKeyValuePair' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php', + 'Hamcrest\\Arrays\\IsArrayWithSize' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php', + 'Hamcrest\\Arrays\\MatchingOnce' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/MatchingOnce.php', + 'Hamcrest\\Arrays\\SeriesMatchingOnce' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php', + 'Hamcrest\\AssertionError' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php', + 'Hamcrest\\BaseDescription' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseDescription.php', + 'Hamcrest\\BaseMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php', + 'Hamcrest\\Collection\\IsEmptyTraversable' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php', + 'Hamcrest\\Collection\\IsTraversableWithSize' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php', + 'Hamcrest\\Core\\AllOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AllOf.php', + 'Hamcrest\\Core\\AnyOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php', + 'Hamcrest\\Core\\CombinableMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php', + 'Hamcrest\\Core\\DescribedAs' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php', + 'Hamcrest\\Core\\Every' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php', + 'Hamcrest\\Core\\HasToString' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php', + 'Hamcrest\\Core\\Is' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php', + 'Hamcrest\\Core\\IsAnything' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php', + 'Hamcrest\\Core\\IsCollectionContaining' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php', + 'Hamcrest\\Core\\IsEqual' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php', + 'Hamcrest\\Core\\IsIdentical' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php', + 'Hamcrest\\Core\\IsInstanceOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php', + 'Hamcrest\\Core\\IsNot' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php', + 'Hamcrest\\Core\\IsNull' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php', + 'Hamcrest\\Core\\IsSame' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php', + 'Hamcrest\\Core\\IsTypeOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php', + 'Hamcrest\\Core\\Set' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php', + 'Hamcrest\\Core\\ShortcutCombination' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php', + 'Hamcrest\\Description' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php', + 'Hamcrest\\DiagnosingMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/DiagnosingMatcher.php', + 'Hamcrest\\FeatureMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php', + 'Hamcrest\\Internal\\SelfDescribingValue' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php', + 'Hamcrest\\Matcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php', + 'Hamcrest\\MatcherAssert' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php', + 'Hamcrest\\Matchers' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php', + 'Hamcrest\\NullDescription' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php', + 'Hamcrest\\Number\\IsCloseTo' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/IsCloseTo.php', + 'Hamcrest\\Number\\OrderingComparison' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php', + 'Hamcrest\\SelfDescribing' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php', + 'Hamcrest\\StringDescription' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/StringDescription.php', + 'Hamcrest\\Text\\IsEmptyString' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php', + 'Hamcrest\\Text\\IsEqualIgnoringCase' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php', + 'Hamcrest\\Text\\IsEqualIgnoringWhiteSpace' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php', + 'Hamcrest\\Text\\MatchesPattern' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php', + 'Hamcrest\\Text\\StringContains' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php', + 'Hamcrest\\Text\\StringContainsIgnoringCase' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php', + 'Hamcrest\\Text\\StringContainsInOrder' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php', + 'Hamcrest\\Text\\StringEndsWith' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php', + 'Hamcrest\\Text\\StringStartsWith' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php', + 'Hamcrest\\Text\\SubstringMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php', + 'Hamcrest\\TypeSafeDiagnosingMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeDiagnosingMatcher.php', + 'Hamcrest\\TypeSafeMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php', + 'Hamcrest\\Type\\IsArray' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php', + 'Hamcrest\\Type\\IsBoolean' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsBoolean.php', + 'Hamcrest\\Type\\IsCallable' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsCallable.php', + 'Hamcrest\\Type\\IsDouble' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsDouble.php', + 'Hamcrest\\Type\\IsInteger' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsInteger.php', + 'Hamcrest\\Type\\IsNumeric' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsNumeric.php', + 'Hamcrest\\Type\\IsObject' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php', + 'Hamcrest\\Type\\IsResource' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsResource.php', + 'Hamcrest\\Type\\IsScalar' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsScalar.php', + 'Hamcrest\\Type\\IsString' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsString.php', + 'Hamcrest\\Util' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php', + 'Hamcrest\\Xml\\HasXPath' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php', + 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegration' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php', + 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegrationAssertPostConditions' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditions.php', + 'Mockery\\Adapter\\Phpunit\\MockeryTestCase' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php', + 'Mockery\\Adapter\\Phpunit\\MockeryTestCaseSetUp' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUp.php', + 'Mockery\\Adapter\\Phpunit\\TestListener' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php', + 'Mockery\\Adapter\\Phpunit\\TestListenerTrait' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListenerTrait.php', + 'Mockery\\ClosureWrapper' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/ClosureWrapper.php', + 'Mockery\\CompositeExpectation' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CompositeExpectation.php', + 'Mockery\\Configuration' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Configuration.php', + 'Mockery\\Container' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Container.php', + 'Mockery\\CountValidator\\AtLeast' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/AtLeast.php', + 'Mockery\\CountValidator\\AtMost' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/AtMost.php', + 'Mockery\\CountValidator\\CountValidatorAbstract' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php', + 'Mockery\\CountValidator\\CountValidatorInterface' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/CountValidatorInterface.php', + 'Mockery\\CountValidator\\Exact' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/Exact.php', + 'Mockery\\CountValidator\\Exception' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/Exception.php', + 'Mockery\\Exception' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception.php', + 'Mockery\\Exception\\BadMethodCallException' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/BadMethodCallException.php', + 'Mockery\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/InvalidArgumentException.php', + 'Mockery\\Exception\\InvalidCountException' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/InvalidCountException.php', + 'Mockery\\Exception\\InvalidOrderException' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php', + 'Mockery\\Exception\\MockeryExceptionInterface' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/MockeryExceptionInterface.php', + 'Mockery\\Exception\\NoMatchingExpectationException' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php', + 'Mockery\\Exception\\RuntimeException' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/RuntimeException.php', + 'Mockery\\Expectation' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Expectation.php', + 'Mockery\\ExpectationDirector' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/ExpectationDirector.php', + 'Mockery\\ExpectationInterface' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/ExpectationInterface.php', + 'Mockery\\ExpectsHigherOrderMessage' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/ExpectsHigherOrderMessage.php', + 'Mockery\\Generator\\CachingGenerator' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/CachingGenerator.php', + 'Mockery\\Generator\\DefinedTargetClass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php', + 'Mockery\\Generator\\Generator' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/Generator.php', + 'Mockery\\Generator\\Method' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/Method.php', + 'Mockery\\Generator\\MockConfiguration' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/MockConfiguration.php', + 'Mockery\\Generator\\MockConfigurationBuilder' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php', + 'Mockery\\Generator\\MockDefinition' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/MockDefinition.php', + 'Mockery\\Generator\\MockNameBuilder' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/MockNameBuilder.php', + 'Mockery\\Generator\\Parameter' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/Parameter.php', + 'Mockery\\Generator\\StringManipulationGenerator' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\AvoidMethodClashPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\CallTypeHintPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\ClassAttributesPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassAttributesPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\ClassNamePass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\ClassPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\ConstantsPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ConstantsPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\InstanceMockPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\InterfacePass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\MagicMethodTypeHintsPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MagicMethodTypeHintsPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\MethodDefinitionPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\Pass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/Pass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\RemoveBuiltinMethodsThatAreFinalPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveBuiltinMethodsThatAreFinalPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\RemoveDestructorPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveDestructorPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\RemoveUnserializeForInternalSerializableClassesPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\TraitPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/TraitPass.php', + 'Mockery\\Generator\\TargetClassInterface' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/TargetClassInterface.php', + 'Mockery\\Generator\\UndefinedTargetClass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/UndefinedTargetClass.php', + 'Mockery\\HigherOrderMessage' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/HigherOrderMessage.php', + 'Mockery\\Instantiator' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Instantiator.php', + 'Mockery\\LegacyMockInterface' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/LegacyMockInterface.php', + 'Mockery\\Loader\\EvalLoader' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Loader/EvalLoader.php', + 'Mockery\\Loader\\Loader' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Loader/Loader.php', + 'Mockery\\Loader\\RequireLoader' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Loader/RequireLoader.php', + 'Mockery\\Matcher\\AndAnyOtherArgs' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/AndAnyOtherArgs.php', + 'Mockery\\Matcher\\Any' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Any.php', + 'Mockery\\Matcher\\AnyArgs' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/AnyArgs.php', + 'Mockery\\Matcher\\AnyOf' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/AnyOf.php', + 'Mockery\\Matcher\\ArgumentListMatcher' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/ArgumentListMatcher.php', + 'Mockery\\Matcher\\Closure' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Closure.php', + 'Mockery\\Matcher\\Contains' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Contains.php', + 'Mockery\\Matcher\\Ducktype' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Ducktype.php', + 'Mockery\\Matcher\\HasKey' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/HasKey.php', + 'Mockery\\Matcher\\HasValue' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/HasValue.php', + 'Mockery\\Matcher\\IsEqual' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/IsEqual.php', + 'Mockery\\Matcher\\IsSame' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/IsSame.php', + 'Mockery\\Matcher\\MatcherAbstract' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php', + 'Mockery\\Matcher\\MatcherInterface' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/MatcherInterface.php', + 'Mockery\\Matcher\\MultiArgumentClosure' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/MultiArgumentClosure.php', + 'Mockery\\Matcher\\MustBe' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/MustBe.php', + 'Mockery\\Matcher\\NoArgs' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/NoArgs.php', + 'Mockery\\Matcher\\Not' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Not.php', + 'Mockery\\Matcher\\NotAnyOf' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php', + 'Mockery\\Matcher\\Pattern' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Pattern.php', + 'Mockery\\Matcher\\Subset' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Subset.php', + 'Mockery\\Matcher\\Type' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Type.php', + 'Mockery\\MethodCall' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/MethodCall.php', + 'Mockery\\Mock' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Mock.php', + 'Mockery\\MockInterface' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/MockInterface.php', + 'Mockery\\QuickDefinitionsConfiguration' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/QuickDefinitionsConfiguration.php', + 'Mockery\\ReceivedMethodCalls' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/ReceivedMethodCalls.php', + 'Mockery\\Reflector' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Reflector.php', + 'Mockery\\Undefined' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Undefined.php', + 'Mockery\\VerificationDirector' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/VerificationDirector.php', + 'Mockery\\VerificationExpectation' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/VerificationExpectation.php', + 'PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin' => __DIR__ . '/..' . '/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php', + 'PHPCSUtils\\AbstractSniffs\\AbstractArrayDeclarationSniff' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/AbstractSniffs/AbstractArrayDeclarationSniff.php', + 'PHPCSUtils\\BackCompat\\BCFile' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCFile.php', + 'PHPCSUtils\\BackCompat\\BCTokens' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCTokens.php', + 'PHPCSUtils\\BackCompat\\Helper' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/Helper.php', + 'PHPCSUtils\\Exceptions\\InvalidTokenArray' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/InvalidTokenArray.php', + 'PHPCSUtils\\Exceptions\\LogicException' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/LogicException.php', + 'PHPCSUtils\\Exceptions\\MissingArgumentError' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/MissingArgumentError.php', + 'PHPCSUtils\\Exceptions\\OutOfBoundsStackPtr' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/OutOfBoundsStackPtr.php', + 'PHPCSUtils\\Exceptions\\RuntimeException' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/RuntimeException.php', + 'PHPCSUtils\\Exceptions\\TestFileNotFound' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestFileNotFound.php', + 'PHPCSUtils\\Exceptions\\TestMarkerNotFound' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestMarkerNotFound.php', + 'PHPCSUtils\\Exceptions\\TestTargetNotFound' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestTargetNotFound.php', + 'PHPCSUtils\\Exceptions\\TypeError' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TypeError.php', + 'PHPCSUtils\\Exceptions\\UnexpectedTokenType' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/UnexpectedTokenType.php', + 'PHPCSUtils\\Exceptions\\ValueError' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/ValueError.php', + 'PHPCSUtils\\Fixers\\SpacesFixer' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Fixers/SpacesFixer.php', + 'PHPCSUtils\\Internal\\AttributeHelper' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/AttributeHelper.php', + 'PHPCSUtils\\Internal\\Cache' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/Cache.php', + 'PHPCSUtils\\Internal\\IsShortArrayOrList' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrList.php', + 'PHPCSUtils\\Internal\\IsShortArrayOrListWithCache' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrListWithCache.php', + 'PHPCSUtils\\Internal\\NoFileCache' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/NoFileCache.php', + 'PHPCSUtils\\Internal\\StableCollections' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/StableCollections.php', + 'PHPCSUtils\\TestUtils\\ConfigDouble' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/ConfigDouble.php', + 'PHPCSUtils\\TestUtils\\RulesetDouble' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/RulesetDouble.php', + 'PHPCSUtils\\TestUtils\\UtilityMethodTestCase' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/UtilityMethodTestCase.php', + 'PHPCSUtils\\Tokens\\Collections' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/Collections.php', + 'PHPCSUtils\\Tokens\\TokenHelper' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/TokenHelper.php', + 'PHPCSUtils\\Utils\\Arrays' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Arrays.php', + 'PHPCSUtils\\Utils\\AttributeBlock' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/AttributeBlock.php', + 'PHPCSUtils\\Utils\\Conditions' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Conditions.php', + 'PHPCSUtils\\Utils\\Constants' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Constants.php', + 'PHPCSUtils\\Utils\\Context' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Context.php', + 'PHPCSUtils\\Utils\\ControlStructures' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ControlStructures.php', + 'PHPCSUtils\\Utils\\FileInfo' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FileInfo.php', + 'PHPCSUtils\\Utils\\FilePath' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FilePath.php', + 'PHPCSUtils\\Utils\\FunctionDeclarations' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FunctionDeclarations.php', + 'PHPCSUtils\\Utils\\GetTokensAsString' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/GetTokensAsString.php', + 'PHPCSUtils\\Utils\\Lists' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Lists.php', + 'PHPCSUtils\\Utils\\MessageHelper' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/MessageHelper.php', + 'PHPCSUtils\\Utils\\Namespaces' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Namespaces.php', + 'PHPCSUtils\\Utils\\NamingConventions' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/NamingConventions.php', + 'PHPCSUtils\\Utils\\Numbers' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Numbers.php', + 'PHPCSUtils\\Utils\\ObjectDeclarations' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ObjectDeclarations.php', + 'PHPCSUtils\\Utils\\Operators' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Operators.php', + 'PHPCSUtils\\Utils\\Orthography' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Orthography.php', + 'PHPCSUtils\\Utils\\Parentheses' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Parentheses.php', + 'PHPCSUtils\\Utils\\PassedParameters' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/PassedParameters.php', + 'PHPCSUtils\\Utils\\Scopes' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Scopes.php', + 'PHPCSUtils\\Utils\\TextStrings' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/TextStrings.php', + 'PHPCSUtils\\Utils\\TypeString' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/TypeString.php', + 'PHPCSUtils\\Utils\\UseStatements' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/UseStatements.php', + 'PHPCSUtils\\Utils\\Variables' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Variables.php', + 'PHPUnit\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php', + 'PHPUnit\\Framework\\ActualValueIsNotAnObjectException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ActualValueIsNotAnObjectException.php', + 'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php', + 'PHPUnit\\Framework\\AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php', + 'PHPUnit\\Framework\\CodeCoverageException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php', + 'PHPUnit\\Framework\\ComparisonMethodDoesNotAcceptParameterTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotAcceptParameterTypeException.php', + 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareBoolReturnTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php', + 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareExactlyOneParameterException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php', + 'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareParameterTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareParameterTypeException.php', + 'PHPUnit\\Framework\\ComparisonMethodDoesNotExistException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotExistException.php', + 'PHPUnit\\Framework\\Constraint\\ArrayHasKey' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php', + 'PHPUnit\\Framework\\Constraint\\BinaryOperator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/BinaryOperator.php', + 'PHPUnit\\Framework\\Constraint\\Callback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Callback.php', + 'PHPUnit\\Framework\\Constraint\\ClassHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasAttribute.php', + 'PHPUnit\\Framework\\Constraint\\ClassHasStaticAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasStaticAttribute.php', + 'PHPUnit\\Framework\\Constraint\\Constraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Constraint.php', + 'PHPUnit\\Framework\\Constraint\\Count' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php', + 'PHPUnit\\Framework\\Constraint\\DirectoryExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php', + 'PHPUnit\\Framework\\Constraint\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php', + 'PHPUnit\\Framework\\Constraint\\ExceptionCode' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php', + 'PHPUnit\\Framework\\Constraint\\ExceptionMessage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessage.php', + 'PHPUnit\\Framework\\Constraint\\ExceptionMessageRegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageRegularExpression.php', + 'PHPUnit\\Framework\\Constraint\\FileExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php', + 'PHPUnit\\Framework\\Constraint\\GreaterThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php', + 'PHPUnit\\Framework\\Constraint\\IsAnything' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', + 'PHPUnit\\Framework\\Constraint\\IsEmpty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php', + 'PHPUnit\\Framework\\Constraint\\IsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php', + 'PHPUnit\\Framework\\Constraint\\IsEqualCanonicalizing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php', + 'PHPUnit\\Framework\\Constraint\\IsEqualIgnoringCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php', + 'PHPUnit\\Framework\\Constraint\\IsEqualWithDelta' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php', + 'PHPUnit\\Framework\\Constraint\\IsFalse' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsFalse.php', + 'PHPUnit\\Framework\\Constraint\\IsFinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Math/IsFinite.php', + 'PHPUnit\\Framework\\Constraint\\IsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', + 'PHPUnit\\Framework\\Constraint\\IsInfinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Math/IsInfinite.php', + 'PHPUnit\\Framework\\Constraint\\IsInstanceOf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php', + 'PHPUnit\\Framework\\Constraint\\IsJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php', + 'PHPUnit\\Framework\\Constraint\\IsNan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Math/IsNan.php', + 'PHPUnit\\Framework\\Constraint\\IsNull' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Type/IsNull.php', + 'PHPUnit\\Framework\\Constraint\\IsReadable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php', + 'PHPUnit\\Framework\\Constraint\\IsTrue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsTrue.php', + 'PHPUnit\\Framework\\Constraint\\IsType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php', + 'PHPUnit\\Framework\\Constraint\\IsWritable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php', + 'PHPUnit\\Framework\\Constraint\\JsonMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', + 'PHPUnit\\Framework\\Constraint\\JsonMatchesErrorMessageProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php', + 'PHPUnit\\Framework\\Constraint\\LessThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php', + 'PHPUnit\\Framework\\Constraint\\LogicalAnd' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalAnd.php', + 'PHPUnit\\Framework\\Constraint\\LogicalNot' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php', + 'PHPUnit\\Framework\\Constraint\\LogicalOr' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalOr.php', + 'PHPUnit\\Framework\\Constraint\\LogicalXor' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php', + 'PHPUnit\\Framework\\Constraint\\ObjectEquals' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php', + 'PHPUnit\\Framework\\Constraint\\ObjectHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasAttribute.php', + 'PHPUnit\\Framework\\Constraint\\ObjectHasProperty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasProperty.php', + 'PHPUnit\\Framework\\Constraint\\Operator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/Operator.php', + 'PHPUnit\\Framework\\Constraint\\RegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php', + 'PHPUnit\\Framework\\Constraint\\SameSize' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/SameSize.php', + 'PHPUnit\\Framework\\Constraint\\StringContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php', + 'PHPUnit\\Framework\\Constraint\\StringEndsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringEndsWith.php', + 'PHPUnit\\Framework\\Constraint\\StringMatchesFormatDescription' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php', + 'PHPUnit\\Framework\\Constraint\\StringStartsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php', + 'PHPUnit\\Framework\\Constraint\\TraversableContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php', + 'PHPUnit\\Framework\\Constraint\\TraversableContainsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsEqual.php', + 'PHPUnit\\Framework\\Constraint\\TraversableContainsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsIdentical.php', + 'PHPUnit\\Framework\\Constraint\\TraversableContainsOnly' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php', + 'PHPUnit\\Framework\\Constraint\\UnaryOperator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php', + 'PHPUnit\\Framework\\CoveredCodeNotExecutedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/CoveredCodeNotExecutedException.php', + 'PHPUnit\\Framework\\DataProviderTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/DataProviderTestSuite.php', + 'PHPUnit\\Framework\\Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Error.php', + 'PHPUnit\\Framework\\ErrorTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ErrorTestCase.php', + 'PHPUnit\\Framework\\Error\\Deprecated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Deprecated.php', + 'PHPUnit\\Framework\\Error\\Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Error.php', + 'PHPUnit\\Framework\\Error\\Notice' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Notice.php', + 'PHPUnit\\Framework\\Error\\Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Warning.php', + 'PHPUnit\\Framework\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Exception.php', + 'PHPUnit\\Framework\\ExceptionWrapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php', + 'PHPUnit\\Framework\\ExecutionOrderDependency' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php', + 'PHPUnit\\Framework\\ExpectationFailedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php', + 'PHPUnit\\Framework\\IncompleteTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTest.php', + 'PHPUnit\\Framework\\IncompleteTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php', + 'PHPUnit\\Framework\\IncompleteTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/IncompleteTestError.php', + 'PHPUnit\\Framework\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php', + 'PHPUnit\\Framework\\InvalidCoversTargetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/InvalidCoversTargetException.php', + 'PHPUnit\\Framework\\InvalidDataProviderException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php', + 'PHPUnit\\Framework\\InvalidParameterGroupException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidParameterGroupException.php', + 'PHPUnit\\Framework\\MissingCoversAnnotationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/MissingCoversAnnotationException.php', + 'PHPUnit\\Framework\\MockObject\\Api' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Api/Api.php', + 'PHPUnit\\Framework\\MockObject\\BadMethodCallException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php', + 'PHPUnit\\Framework\\MockObject\\Builder\\Identity' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/Identity.php', + 'PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php', + 'PHPUnit\\Framework\\MockObject\\Builder\\InvocationStubber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php', + 'PHPUnit\\Framework\\MockObject\\Builder\\MethodNameMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php', + 'PHPUnit\\Framework\\MockObject\\Builder\\ParametersMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php', + 'PHPUnit\\Framework\\MockObject\\Builder\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/Stub.php', + 'PHPUnit\\Framework\\MockObject\\CannotUseAddMethodsException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseAddMethodsException.php', + 'PHPUnit\\Framework\\MockObject\\CannotUseOnlyMethodsException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php', + 'PHPUnit\\Framework\\MockObject\\ClassAlreadyExistsException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassAlreadyExistsException.php', + 'PHPUnit\\Framework\\MockObject\\ClassIsFinalException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsFinalException.php', + 'PHPUnit\\Framework\\MockObject\\ClassIsReadonlyException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsReadonlyException.php', + 'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php', + 'PHPUnit\\Framework\\MockObject\\ConfigurableMethodsAlreadyInitializedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ConfigurableMethodsAlreadyInitializedException.php', + 'PHPUnit\\Framework\\MockObject\\DuplicateMethodException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/DuplicateMethodException.php', + 'PHPUnit\\Framework\\MockObject\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php', + 'PHPUnit\\Framework\\MockObject\\Generator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator.php', + 'PHPUnit\\Framework\\MockObject\\IncompatibleReturnValueException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php', + 'PHPUnit\\Framework\\MockObject\\InvalidMethodNameException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/InvalidMethodNameException.php', + 'PHPUnit\\Framework\\MockObject\\Invocation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Invocation.php', + 'PHPUnit\\Framework\\MockObject\\InvocationHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php', + 'PHPUnit\\Framework\\MockObject\\MatchBuilderNotFoundException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php', + 'PHPUnit\\Framework\\MockObject\\Matcher' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher.php', + 'PHPUnit\\Framework\\MockObject\\MatcherAlreadyRegisteredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php', + 'PHPUnit\\Framework\\MockObject\\Method' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Api/Method.php', + 'PHPUnit\\Framework\\MockObject\\MethodCannotBeConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php', + 'PHPUnit\\Framework\\MockObject\\MethodNameAlreadyConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameAlreadyConfiguredException.php', + 'PHPUnit\\Framework\\MockObject\\MethodNameConstraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php', + 'PHPUnit\\Framework\\MockObject\\MethodNameNotConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameNotConfiguredException.php', + 'PHPUnit\\Framework\\MockObject\\MethodParametersAlreadyConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodParametersAlreadyConfiguredException.php', + 'PHPUnit\\Framework\\MockObject\\MockBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php', + 'PHPUnit\\Framework\\MockObject\\MockClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockClass.php', + 'PHPUnit\\Framework\\MockObject\\MockMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockMethod.php', + 'PHPUnit\\Framework\\MockObject\\MockMethodSet' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockMethodSet.php', + 'PHPUnit\\Framework\\MockObject\\MockObject' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockObject.php', + 'PHPUnit\\Framework\\MockObject\\MockTrait' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockTrait.php', + 'PHPUnit\\Framework\\MockObject\\MockType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockType.php', + 'PHPUnit\\Framework\\MockObject\\OriginalConstructorInvocationRequiredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/OriginalConstructorInvocationRequiredException.php', + 'PHPUnit\\Framework\\MockObject\\ReflectionException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReflectionException.php', + 'PHPUnit\\Framework\\MockObject\\ReturnValueNotConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\AnyInvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyInvokedCount.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\AnyParameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyParameters.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\ConsecutiveParameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\InvocationOrder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvocationOrder.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtIndex' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastOnce' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtMostCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\InvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\MethodName' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\Parameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php', + 'PHPUnit\\Framework\\MockObject\\Rule\\ParametersRule' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/ParametersRule.php', + 'PHPUnit\\Framework\\MockObject\\RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php', + 'PHPUnit\\Framework\\MockObject\\SoapExtensionNotAvailableException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/SoapExtensionNotAvailableException.php', + 'PHPUnit\\Framework\\MockObject\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\ConsecutiveCalls' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnArgument' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnArgument.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnCallback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnReference' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnSelf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnStub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnValueMap' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnValueMap.php', + 'PHPUnit\\Framework\\MockObject\\Stub\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/Stub.php', + 'PHPUnit\\Framework\\MockObject\\UnknownClassException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownClassException.php', + 'PHPUnit\\Framework\\MockObject\\UnknownTraitException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTraitException.php', + 'PHPUnit\\Framework\\MockObject\\UnknownTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTypeException.php', + 'PHPUnit\\Framework\\MockObject\\Verifiable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Verifiable.php', + 'PHPUnit\\Framework\\NoChildTestSuiteException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php', + 'PHPUnit\\Framework\\OutputError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/OutputError.php', + 'PHPUnit\\Framework\\PHPTAssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/PHPTAssertionFailedError.php', + 'PHPUnit\\Framework\\Reorderable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Reorderable.php', + 'PHPUnit\\Framework\\RiskyTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/RiskyTestError.php', + 'PHPUnit\\Framework\\SelfDescribing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SelfDescribing.php', + 'PHPUnit\\Framework\\SkippedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTest.php', + 'PHPUnit\\Framework\\SkippedTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestCase.php', + 'PHPUnit\\Framework\\SkippedTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SkippedTestError.php', + 'PHPUnit\\Framework\\SkippedTestSuiteError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SkippedTestSuiteError.php', + 'PHPUnit\\Framework\\SyntheticError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SyntheticError.php', + 'PHPUnit\\Framework\\SyntheticSkippedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SyntheticSkippedError.php', + 'PHPUnit\\Framework\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Test.php', + 'PHPUnit\\Framework\\TestBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestBuilder.php', + 'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestCase.php', + 'PHPUnit\\Framework\\TestFailure' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestFailure.php', + 'PHPUnit\\Framework\\TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListener.php', + 'PHPUnit\\Framework\\TestListenerDefaultImplementation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php', + 'PHPUnit\\Framework\\TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestResult.php', + 'PHPUnit\\Framework\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite.php', + 'PHPUnit\\Framework\\TestSuiteIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php', + 'PHPUnit\\Framework\\UnintentionallyCoveredCodeError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/UnintentionallyCoveredCodeError.php', + 'PHPUnit\\Framework\\Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Warning.php', + 'PHPUnit\\Framework\\WarningTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/WarningTestCase.php', + 'PHPUnit\\Runner\\AfterIncompleteTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterIncompleteTestHook.php', + 'PHPUnit\\Runner\\AfterLastTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterLastTestHook.php', + 'PHPUnit\\Runner\\AfterRiskyTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterRiskyTestHook.php', + 'PHPUnit\\Runner\\AfterSkippedTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php', + 'PHPUnit\\Runner\\AfterSuccessfulTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php', + 'PHPUnit\\Runner\\AfterTestErrorHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestErrorHook.php', + 'PHPUnit\\Runner\\AfterTestFailureHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestFailureHook.php', + 'PHPUnit\\Runner\\AfterTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestHook.php', + 'PHPUnit\\Runner\\AfterTestWarningHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestWarningHook.php', + 'PHPUnit\\Runner\\BaseTestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/BaseTestRunner.php', + 'PHPUnit\\Runner\\BeforeFirstTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/BeforeFirstTestHook.php', + 'PHPUnit\\Runner\\BeforeTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/BeforeTestHook.php', + 'PHPUnit\\Runner\\DefaultTestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/DefaultTestResultCache.php', + 'PHPUnit\\Runner\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception.php', + 'PHPUnit\\Runner\\Extension\\ExtensionHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Extension/ExtensionHandler.php', + 'PHPUnit\\Runner\\Extension\\PharLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Extension/PharLoader.php', + 'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php', + 'PHPUnit\\Runner\\Filter\\Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php', + 'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php', + 'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php', + 'PHPUnit\\Runner\\Filter\\NameFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php', + 'PHPUnit\\Runner\\Hook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/Hook.php', + 'PHPUnit\\Runner\\NullTestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/NullTestResultCache.php', + 'PHPUnit\\Runner\\PhptTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/PhptTestCase.php', + 'PHPUnit\\Runner\\ResultCacheExtension' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCacheExtension.php', + 'PHPUnit\\Runner\\StandardTestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', + 'PHPUnit\\Runner\\TestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/TestHook.php', + 'PHPUnit\\Runner\\TestListenerAdapter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php', + 'PHPUnit\\Runner\\TestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResultCache.php', + 'PHPUnit\\Runner\\TestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', + 'PHPUnit\\Runner\\TestSuiteSorter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteSorter.php', + 'PHPUnit\\Runner\\Version' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Version.php', + 'PHPUnit\\TextUI\\CliArguments\\Builder' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/CliArguments/Builder.php', + 'PHPUnit\\TextUI\\CliArguments\\Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/CliArguments/Configuration.php', + 'PHPUnit\\TextUI\\CliArguments\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/CliArguments/Exception.php', + 'PHPUnit\\TextUI\\CliArguments\\Mapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/CliArguments/Mapper.php', + 'PHPUnit\\TextUI\\Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command.php', + 'PHPUnit\\TextUI\\DefaultResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/DefaultResultPrinter.php', + 'PHPUnit\\TextUI\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/Exception.php', + 'PHPUnit\\TextUI\\Help' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Help.php', + 'PHPUnit\\TextUI\\ReflectionException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/ReflectionException.php', + 'PHPUnit\\TextUI\\ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/ResultPrinter.php', + 'PHPUnit\\TextUI\\RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/RuntimeException.php', + 'PHPUnit\\TextUI\\TestDirectoryNotFoundException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php', + 'PHPUnit\\TextUI\\TestFileNotFoundException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php', + 'PHPUnit\\TextUI\\TestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestRunner.php', + 'PHPUnit\\TextUI\\TestSuiteMapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestSuiteMapper.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/CodeCoverage.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\FilterMapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/FilterMapper.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\Directory' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/Directory.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\DirectoryCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\DirectoryCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Clover' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Clover.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Cobertura' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Cobertura.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Crap4j' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Crap4j.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Html' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Html.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Php' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Php.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Text.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Xml' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Xml.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Configuration.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Constant' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Constant.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\ConstantCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\ConstantCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\ConvertLogTypes' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/ConvertLogTypes.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCloverToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageCloverToReport.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCrap4jToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageCrap4jToReport.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageHtmlToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageHtmlToReport.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CoveragePhpToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoveragePhpToReport.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageTextToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageTextToReport.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\CoverageXmlToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageXmlToReport.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Directory' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/Directory.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\DirectoryCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\DirectoryCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Exception.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Extension' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/Extension.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\ExtensionCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\ExtensionCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\File' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/File.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\FileCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\FileCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Generator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Generator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Group' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Group.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\GroupCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\GroupCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Groups' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Groups.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\IniSetting' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSetting.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\IniSettingCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\IniSettingCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\IntroduceCoverageElement' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/IntroduceCoverageElement.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Loader' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Loader.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\LogToReportMigration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/LogToReportMigration.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Junit' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Junit.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Logging' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Logging.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TeamCity' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TeamCity.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Html' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Html.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Text.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Xml' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Xml.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Text.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Migration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/Migration.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilder.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationBuilderException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilderException.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MigrationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationException.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Migrator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromFilterWhitelistToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveAttributesFromFilterWhitelistToCoverage.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromRootToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveAttributesFromRootToCoverage.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistExcludesToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistExcludesToCoverage.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistIncludesToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistIncludesToCoverage.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\PHPUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/PHPUnit.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Php' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Php.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\PhpHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/PhpHandler.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveCacheTokensAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveCacheTokensAttribute.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveEmptyFilter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveEmptyFilter.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveLogTypes' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveLogTypes.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectory' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectory.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectoryCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectoryCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestFile' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFile.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestFileCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestFileCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuite.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestSuiteCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\TestSuiteCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollectionIterator.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\UpdateSchemaLocationTo93' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/UpdateSchemaLocationTo93.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\Variable' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Variable.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\VariableCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollection.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\VariableCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollectionIterator.php', + 'PHPUnit\\Util\\Annotation\\DocBlock' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Annotation/DocBlock.php', + 'PHPUnit\\Util\\Annotation\\Registry' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Annotation/Registry.php', + 'PHPUnit\\Util\\Blacklist' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Blacklist.php', + 'PHPUnit\\Util\\Cloner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Cloner.php', + 'PHPUnit\\Util\\Color' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Color.php', + 'PHPUnit\\Util\\ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ErrorHandler.php', + 'PHPUnit\\Util\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exception.php', + 'PHPUnit\\Util\\ExcludeList' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ExcludeList.php', + 'PHPUnit\\Util\\FileLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/FileLoader.php', + 'PHPUnit\\Util\\Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php', + 'PHPUnit\\Util\\Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php', + 'PHPUnit\\Util\\GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php', + 'PHPUnit\\Util\\InvalidDataSetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/InvalidDataSetException.php', + 'PHPUnit\\Util\\Json' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Json.php', + 'PHPUnit\\Util\\Log\\JUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JUnit.php', + 'PHPUnit\\Util\\Log\\TeamCity' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/TeamCity.php', + 'PHPUnit\\Util\\PHP\\AbstractPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php', + 'PHPUnit\\Util\\PHP\\DefaultPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php', + 'PHPUnit\\Util\\PHP\\WindowsPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php', + 'PHPUnit\\Util\\Printer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Printer.php', + 'PHPUnit\\Util\\Reflection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Reflection.php', + 'PHPUnit\\Util\\RegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/RegularExpression.php', + 'PHPUnit\\Util\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Test.php', + 'PHPUnit\\Util\\TestDox\\CliTestDoxPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php', + 'PHPUnit\\Util\\TestDox\\HtmlResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php', + 'PHPUnit\\Util\\TestDox\\NamePrettifier' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php', + 'PHPUnit\\Util\\TestDox\\ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php', + 'PHPUnit\\Util\\TestDox\\TestDoxPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/TestDoxPrinter.php', + 'PHPUnit\\Util\\TestDox\\TextResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/TextResultPrinter.php', + 'PHPUnit\\Util\\TestDox\\XmlResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php', + 'PHPUnit\\Util\\TextTestListRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TextTestListRenderer.php', + 'PHPUnit\\Util\\Type' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Type.php', + 'PHPUnit\\Util\\VersionComparisonOperator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/VersionComparisonOperator.php', + 'PHPUnit\\Util\\XdebugFilterScriptGenerator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php', + 'PHPUnit\\Util\\Xml' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml.php', + 'PHPUnit\\Util\\XmlTestListRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XmlTestListRenderer.php', + 'PHPUnit\\Util\\Xml\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/Exception.php', + 'PHPUnit\\Util\\Xml\\FailedSchemaDetectionResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/FailedSchemaDetectionResult.php', + 'PHPUnit\\Util\\Xml\\Loader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/Loader.php', + 'PHPUnit\\Util\\Xml\\SchemaDetectionResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SchemaDetectionResult.php', + 'PHPUnit\\Util\\Xml\\SchemaDetector' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SchemaDetector.php', + 'PHPUnit\\Util\\Xml\\SchemaFinder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SchemaFinder.php', + 'PHPUnit\\Util\\Xml\\SnapshotNodeList' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SnapshotNodeList.php', + 'PHPUnit\\Util\\Xml\\SuccessfulSchemaDetectionResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SuccessfulSchemaDetectionResult.php', + 'PHPUnit\\Util\\Xml\\ValidationResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/ValidationResult.php', + 'PHPUnit\\Util\\Xml\\Validator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/Validator.php', + 'PharIo\\Manifest\\Application' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Application.php', + 'PharIo\\Manifest\\ApplicationName' => __DIR__ . '/..' . '/phar-io/manifest/src/values/ApplicationName.php', + 'PharIo\\Manifest\\Author' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Author.php', + 'PharIo\\Manifest\\AuthorCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/AuthorCollection.php', + 'PharIo\\Manifest\\AuthorCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/AuthorCollectionIterator.php', + 'PharIo\\Manifest\\AuthorElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/AuthorElement.php', + 'PharIo\\Manifest\\AuthorElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/AuthorElementCollection.php', + 'PharIo\\Manifest\\BundledComponent' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponent.php', + 'PharIo\\Manifest\\BundledComponentCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponentCollection.php', + 'PharIo\\Manifest\\BundledComponentCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponentCollectionIterator.php', + 'PharIo\\Manifest\\BundlesElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/BundlesElement.php', + 'PharIo\\Manifest\\ComponentElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ComponentElement.php', + 'PharIo\\Manifest\\ComponentElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ComponentElementCollection.php', + 'PharIo\\Manifest\\ContainsElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ContainsElement.php', + 'PharIo\\Manifest\\CopyrightElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/CopyrightElement.php', + 'PharIo\\Manifest\\CopyrightInformation' => __DIR__ . '/..' . '/phar-io/manifest/src/values/CopyrightInformation.php', + 'PharIo\\Manifest\\ElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ElementCollection.php', + 'PharIo\\Manifest\\ElementCollectionException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ElementCollectionException.php', + 'PharIo\\Manifest\\Email' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Email.php', + 'PharIo\\Manifest\\Exception' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/Exception.php', + 'PharIo\\Manifest\\ExtElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtElement.php', + 'PharIo\\Manifest\\ExtElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtElementCollection.php', + 'PharIo\\Manifest\\Extension' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Extension.php', + 'PharIo\\Manifest\\ExtensionElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtensionElement.php', + 'PharIo\\Manifest\\InvalidApplicationNameException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php', + 'PharIo\\Manifest\\InvalidEmailException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidEmailException.php', + 'PharIo\\Manifest\\InvalidUrlException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidUrlException.php', + 'PharIo\\Manifest\\Library' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Library.php', + 'PharIo\\Manifest\\License' => __DIR__ . '/..' . '/phar-io/manifest/src/values/License.php', + 'PharIo\\Manifest\\LicenseElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/LicenseElement.php', + 'PharIo\\Manifest\\Manifest' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Manifest.php', + 'PharIo\\Manifest\\ManifestDocument' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestDocument.php', + 'PharIo\\Manifest\\ManifestDocumentException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentException.php', + 'PharIo\\Manifest\\ManifestDocumentLoadingException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php', + 'PharIo\\Manifest\\ManifestDocumentMapper' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestDocumentMapper.php', + 'PharIo\\Manifest\\ManifestDocumentMapperException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php', + 'PharIo\\Manifest\\ManifestElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestElement.php', + 'PharIo\\Manifest\\ManifestElementException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestElementException.php', + 'PharIo\\Manifest\\ManifestLoader' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestLoader.php', + 'PharIo\\Manifest\\ManifestLoaderException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php', + 'PharIo\\Manifest\\ManifestSerializer' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestSerializer.php', + 'PharIo\\Manifest\\NoEmailAddressException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/NoEmailAddressException.php', + 'PharIo\\Manifest\\PhpElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/PhpElement.php', + 'PharIo\\Manifest\\PhpExtensionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpExtensionRequirement.php', + 'PharIo\\Manifest\\PhpVersionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpVersionRequirement.php', + 'PharIo\\Manifest\\Requirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Requirement.php', + 'PharIo\\Manifest\\RequirementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/RequirementCollection.php', + 'PharIo\\Manifest\\RequirementCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/RequirementCollectionIterator.php', + 'PharIo\\Manifest\\RequiresElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/RequiresElement.php', + 'PharIo\\Manifest\\Type' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Type.php', + 'PharIo\\Manifest\\Url' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Url.php', + 'PharIo\\Version\\AbstractVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AbstractVersionConstraint.php', + 'PharIo\\Version\\AndVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php', + 'PharIo\\Version\\AnyVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AnyVersionConstraint.php', + 'PharIo\\Version\\BuildMetaData' => __DIR__ . '/..' . '/phar-io/version/src/BuildMetaData.php', + 'PharIo\\Version\\ExactVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/ExactVersionConstraint.php', + 'PharIo\\Version\\Exception' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/Exception.php', + 'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php', + 'PharIo\\Version\\InvalidPreReleaseSuffixException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php', + 'PharIo\\Version\\InvalidVersionException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidVersionException.php', + 'PharIo\\Version\\NoBuildMetaDataException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/NoBuildMetaDataException.php', + 'PharIo\\Version\\NoPreReleaseSuffixException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/NoPreReleaseSuffixException.php', + 'PharIo\\Version\\OrVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php', + 'PharIo\\Version\\PreReleaseSuffix' => __DIR__ . '/..' . '/phar-io/version/src/PreReleaseSuffix.php', + 'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php', + 'PharIo\\Version\\SpecificMajorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php', + 'PharIo\\Version\\UnsupportedVersionConstraintException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php', + 'PharIo\\Version\\Version' => __DIR__ . '/..' . '/phar-io/version/src/Version.php', + 'PharIo\\Version\\VersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/VersionConstraint.php', + 'PharIo\\Version\\VersionConstraintParser' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintParser.php', + 'PharIo\\Version\\VersionConstraintValue' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintValue.php', + 'PharIo\\Version\\VersionNumber' => __DIR__ . '/..' . '/phar-io/version/src/VersionNumber.php', + 'PhpParser\\Builder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder.php', + 'PhpParser\\BuilderFactory' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/BuilderFactory.php', + 'PhpParser\\BuilderHelpers' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/BuilderHelpers.php', + 'PhpParser\\Builder\\ClassConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php', + 'PhpParser\\Builder\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Class_.php', + 'PhpParser\\Builder\\Declaration' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Declaration.php', + 'PhpParser\\Builder\\EnumCase' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php', + 'PhpParser\\Builder\\Enum_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Enum_.php', + 'PhpParser\\Builder\\FunctionLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php', + 'PhpParser\\Builder\\Function_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Function_.php', + 'PhpParser\\Builder\\Interface_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Interface_.php', + 'PhpParser\\Builder\\Method' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Method.php', + 'PhpParser\\Builder\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php', + 'PhpParser\\Builder\\Param' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Param.php', + 'PhpParser\\Builder\\Property' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Property.php', + 'PhpParser\\Builder\\TraitUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php', + 'PhpParser\\Builder\\TraitUseAdaptation' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php', + 'PhpParser\\Builder\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Trait_.php', + 'PhpParser\\Builder\\Use_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Builder/Use_.php', + 'PhpParser\\Comment' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Comment.php', + 'PhpParser\\Comment\\Doc' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Comment/Doc.php', + 'PhpParser\\ConstExprEvaluationException' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php', + 'PhpParser\\ConstExprEvaluator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php', + 'PhpParser\\Error' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Error.php', + 'PhpParser\\ErrorHandler' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler.php', + 'PhpParser\\ErrorHandler\\Collecting' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php', + 'PhpParser\\ErrorHandler\\Throwing' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php', + 'PhpParser\\Internal\\DiffElem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php', + 'PhpParser\\Internal\\Differ' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/Differ.php', + 'PhpParser\\Internal\\PrintableNewAnonClassNode' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php', + 'PhpParser\\Internal\\TokenPolyfill' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php', + 'PhpParser\\Internal\\TokenStream' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php', + 'PhpParser\\JsonDecoder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php', + 'PhpParser\\Lexer' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer.php', + 'PhpParser\\Lexer\\Emulative' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', + 'PhpParser\\Lexer\\TokenEmulator\\AsymmetricVisibilityTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\MatchTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\NullsafeTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\PipeOperatorEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\PropertyTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyFunctionTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\ReverseEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\TokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\VoidCastEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php', + 'PhpParser\\Modifiers' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Modifiers.php', + 'PhpParser\\NameContext' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NameContext.php', + 'PhpParser\\Node' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node.php', + 'PhpParser\\NodeAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', + 'PhpParser\\NodeDumper' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeDumper.php', + 'PhpParser\\NodeFinder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeFinder.php', + 'PhpParser\\NodeTraverser' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeTraverser.php', + 'PhpParser\\NodeTraverserInterface' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php', + 'PhpParser\\NodeVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php', + 'PhpParser\\NodeVisitorAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php', + 'PhpParser\\NodeVisitor\\CloningVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php', + 'PhpParser\\NodeVisitor\\CommentAnnotatingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php', + 'PhpParser\\NodeVisitor\\FindingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php', + 'PhpParser\\NodeVisitor\\FirstFindingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php', + 'PhpParser\\NodeVisitor\\NameResolver' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php', + 'PhpParser\\NodeVisitor\\NodeConnectingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php', + 'PhpParser\\NodeVisitor\\ParentConnectingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php', + 'PhpParser\\Node\\Arg' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', + 'PhpParser\\Node\\ArrayItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php', + 'PhpParser\\Node\\Attribute' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php', + 'PhpParser\\Node\\AttributeGroup' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php', + 'PhpParser\\Node\\ClosureUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php', + 'PhpParser\\Node\\ComplexType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php', + 'PhpParser\\Node\\Const_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', + 'PhpParser\\Node\\DeclareItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php', + 'PhpParser\\Node\\Expr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', + 'PhpParser\\Node\\Expr\\ArrayDimFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', + 'PhpParser\\Node\\Expr\\ArrayItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', + 'PhpParser\\Node\\Expr\\Array_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', + 'PhpParser\\Node\\Expr\\ArrowFunction' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php', + 'PhpParser\\Node\\Expr\\Assign' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', + 'PhpParser\\Node\\Expr\\AssignOp' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php', + 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php', + 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php', + 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Coalesce' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Concat' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Div' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Minus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Mod' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Mul' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Plus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Pow' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php', + 'PhpParser\\Node\\Expr\\AssignOp\\ShiftLeft' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php', + 'PhpParser\\Node\\Expr\\AssignOp\\ShiftRight' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php', + 'PhpParser\\Node\\Expr\\AssignRef' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php', + 'PhpParser\\Node\\Expr\\BinaryOp' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BitwiseXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\BooleanOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Coalesce' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Concat' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Div' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Equal' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Greater' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\GreaterOrEqual' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Identical' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\LogicalXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Minus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Mod' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Mul' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\NotEqual' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\NotIdentical' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Pipe' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pipe.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Plus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Pow' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftLeft' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\ShiftRight' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Smaller' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\SmallerOrEqual' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php', + 'PhpParser\\Node\\Expr\\BinaryOp\\Spaceship' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php', + 'PhpParser\\Node\\Expr\\BitwiseNot' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php', + 'PhpParser\\Node\\Expr\\BooleanNot' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php', + 'PhpParser\\Node\\Expr\\CallLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php', + 'PhpParser\\Node\\Expr\\Cast' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php', + 'PhpParser\\Node\\Expr\\Cast\\Array_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php', + 'PhpParser\\Node\\Expr\\Cast\\Bool_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php', + 'PhpParser\\Node\\Expr\\Cast\\Double' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php', + 'PhpParser\\Node\\Expr\\Cast\\Int_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php', + 'PhpParser\\Node\\Expr\\Cast\\Object_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php', + 'PhpParser\\Node\\Expr\\Cast\\String_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php', + 'PhpParser\\Node\\Expr\\Cast\\Unset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php', + 'PhpParser\\Node\\Expr\\Cast\\Void_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Void_.php', + 'PhpParser\\Node\\Expr\\ClassConstFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php', + 'PhpParser\\Node\\Expr\\Clone_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php', + 'PhpParser\\Node\\Expr\\Closure' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php', + 'PhpParser\\Node\\Expr\\ClosureUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php', + 'PhpParser\\Node\\Expr\\ConstFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php', + 'PhpParser\\Node\\Expr\\Empty_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php', + 'PhpParser\\Node\\Expr\\Error' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php', + 'PhpParser\\Node\\Expr\\ErrorSuppress' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php', + 'PhpParser\\Node\\Expr\\Eval_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php', + 'PhpParser\\Node\\Expr\\Exit_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php', + 'PhpParser\\Node\\Expr\\FuncCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php', + 'PhpParser\\Node\\Expr\\Include_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php', + 'PhpParser\\Node\\Expr\\Instanceof_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php', + 'PhpParser\\Node\\Expr\\Isset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php', + 'PhpParser\\Node\\Expr\\List_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php', + 'PhpParser\\Node\\Expr\\Match_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php', + 'PhpParser\\Node\\Expr\\MethodCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php', + 'PhpParser\\Node\\Expr\\New_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php', + 'PhpParser\\Node\\Expr\\NullsafeMethodCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php', + 'PhpParser\\Node\\Expr\\NullsafePropertyFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php', + 'PhpParser\\Node\\Expr\\PostDec' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php', + 'PhpParser\\Node\\Expr\\PostInc' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php', + 'PhpParser\\Node\\Expr\\PreDec' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php', + 'PhpParser\\Node\\Expr\\PreInc' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php', + 'PhpParser\\Node\\Expr\\Print_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php', + 'PhpParser\\Node\\Expr\\PropertyFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php', + 'PhpParser\\Node\\Expr\\ShellExec' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php', + 'PhpParser\\Node\\Expr\\StaticCall' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php', + 'PhpParser\\Node\\Expr\\StaticPropertyFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php', + 'PhpParser\\Node\\Expr\\Ternary' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php', + 'PhpParser\\Node\\Expr\\Throw_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php', + 'PhpParser\\Node\\Expr\\UnaryMinus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php', + 'PhpParser\\Node\\Expr\\UnaryPlus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php', + 'PhpParser\\Node\\Expr\\Variable' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php', + 'PhpParser\\Node\\Expr\\YieldFrom' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php', + 'PhpParser\\Node\\Expr\\Yield_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', + 'PhpParser\\Node\\FunctionLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', + 'PhpParser\\Node\\Identifier' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php', + 'PhpParser\\Node\\InterpolatedStringPart' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php', + 'PhpParser\\Node\\IntersectionType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php', + 'PhpParser\\Node\\MatchArm' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php', + 'PhpParser\\Node\\Name' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name.php', + 'PhpParser\\Node\\Name\\FullyQualified' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php', + 'PhpParser\\Node\\Name\\Relative' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php', + 'PhpParser\\Node\\NullableType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php', + 'PhpParser\\Node\\Param' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Param.php', + 'PhpParser\\Node\\PropertyHook' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php', + 'PhpParser\\Node\\PropertyItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php', + 'PhpParser\\Node\\Scalar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php', + 'PhpParser\\Node\\Scalar\\DNumber' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php', + 'PhpParser\\Node\\Scalar\\Encapsed' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php', + 'PhpParser\\Node\\Scalar\\EncapsedStringPart' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php', + 'PhpParser\\Node\\Scalar\\Float_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php', + 'PhpParser\\Node\\Scalar\\Int_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php', + 'PhpParser\\Node\\Scalar\\InterpolatedString' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php', + 'PhpParser\\Node\\Scalar\\LNumber' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php', + 'PhpParser\\Node\\Scalar\\MagicConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Dir' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\File' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Function_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Line' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Method' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Property' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Property.php', + 'PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php', + 'PhpParser\\Node\\Scalar\\String_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php', + 'PhpParser\\Node\\StaticVar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/StaticVar.php', + 'PhpParser\\Node\\Stmt' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php', + 'PhpParser\\Node\\Stmt\\Block' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php', + 'PhpParser\\Node\\Stmt\\Break_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php', + 'PhpParser\\Node\\Stmt\\Case_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php', + 'PhpParser\\Node\\Stmt\\Catch_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php', + 'PhpParser\\Node\\Stmt\\ClassConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php', + 'PhpParser\\Node\\Stmt\\ClassLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php', + 'PhpParser\\Node\\Stmt\\ClassMethod' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php', + 'PhpParser\\Node\\Stmt\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php', + 'PhpParser\\Node\\Stmt\\Const_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php', + 'PhpParser\\Node\\Stmt\\Continue_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php', + 'PhpParser\\Node\\Stmt\\DeclareDeclare' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php', + 'PhpParser\\Node\\Stmt\\Declare_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php', + 'PhpParser\\Node\\Stmt\\Do_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php', + 'PhpParser\\Node\\Stmt\\Echo_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php', + 'PhpParser\\Node\\Stmt\\ElseIf_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php', + 'PhpParser\\Node\\Stmt\\Else_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php', + 'PhpParser\\Node\\Stmt\\EnumCase' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php', + 'PhpParser\\Node\\Stmt\\Enum_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php', + 'PhpParser\\Node\\Stmt\\Expression' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php', + 'PhpParser\\Node\\Stmt\\Finally_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php', + 'PhpParser\\Node\\Stmt\\For_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php', + 'PhpParser\\Node\\Stmt\\Foreach_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php', + 'PhpParser\\Node\\Stmt\\Function_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php', + 'PhpParser\\Node\\Stmt\\Global_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php', + 'PhpParser\\Node\\Stmt\\Goto_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php', + 'PhpParser\\Node\\Stmt\\GroupUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php', + 'PhpParser\\Node\\Stmt\\HaltCompiler' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php', + 'PhpParser\\Node\\Stmt\\If_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php', + 'PhpParser\\Node\\Stmt\\InlineHTML' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php', + 'PhpParser\\Node\\Stmt\\Interface_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php', + 'PhpParser\\Node\\Stmt\\Label' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php', + 'PhpParser\\Node\\Stmt\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php', + 'PhpParser\\Node\\Stmt\\Nop' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php', + 'PhpParser\\Node\\Stmt\\Property' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php', + 'PhpParser\\Node\\Stmt\\PropertyProperty' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php', + 'PhpParser\\Node\\Stmt\\Return_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php', + 'PhpParser\\Node\\Stmt\\StaticVar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php', + 'PhpParser\\Node\\Stmt\\Static_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php', + 'PhpParser\\Node\\Stmt\\Switch_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php', + 'PhpParser\\Node\\Stmt\\TraitUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php', + 'PhpParser\\Node\\Stmt\\TraitUseAdaptation' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php', + 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php', + 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Precedence' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php', + 'PhpParser\\Node\\Stmt\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php', + 'PhpParser\\Node\\Stmt\\TryCatch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php', + 'PhpParser\\Node\\Stmt\\Unset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php', + 'PhpParser\\Node\\Stmt\\UseUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php', + 'PhpParser\\Node\\Stmt\\Use_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php', + 'PhpParser\\Node\\Stmt\\While_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', + 'PhpParser\\Node\\UnionType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php', + 'PhpParser\\Node\\UseItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/UseItem.php', + 'PhpParser\\Node\\VarLikeIdentifier' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php', + 'PhpParser\\Node\\VariadicPlaceholder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php', + 'PhpParser\\Parser' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser.php', + 'PhpParser\\ParserAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', + 'PhpParser\\ParserFactory' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', + 'PhpParser\\Parser\\Php7' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php', + 'PhpParser\\Parser\\Php8' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php8.php', + 'PhpParser\\PhpVersion' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PhpVersion.php', + 'PhpParser\\PrettyPrinter' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinter.php', + 'PhpParser\\PrettyPrinterAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', + 'PhpParser\\PrettyPrinter\\Standard' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', + 'PhpParser\\Token' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Token.php', + 'SebastianBergmann\\CliParser\\AmbiguousOptionException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php', + 'SebastianBergmann\\CliParser\\Exception' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/Exception.php', + 'SebastianBergmann\\CliParser\\OptionDoesNotAllowArgumentException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php', + 'SebastianBergmann\\CliParser\\Parser' => __DIR__ . '/..' . '/sebastian/cli-parser/src/Parser.php', + 'SebastianBergmann\\CliParser\\RequiredOptionArgumentMissingException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/RequiredOptionArgumentMissingException.php', + 'SebastianBergmann\\CliParser\\UnknownOptionException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/UnknownOptionException.php', + 'SebastianBergmann\\CodeCoverage\\BranchAndPathCoverageNotSupportedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/BranchAndPathCoverageNotSupportedException.php', + 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php', + 'SebastianBergmann\\CodeCoverage\\DeadCodeDetectionNotSupportedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/DeadCodeDetectionNotSupportedException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Driver.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\PathExistsButIsNotDirectoryException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\PcovDriver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/PcovDriver.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\PcovNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/PcovNotAvailableException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\PhpdbgDriver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/PhpdbgDriver.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\PhpdbgNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/PhpdbgNotAvailableException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\Selector' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Selector.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\WriteOperationFailedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/WriteOperationFailedException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\WrongXdebugVersionException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/WrongXdebugVersionException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug2Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Xdebug2Driver.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug2NotEnabledException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Xdebug2NotEnabledException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug3Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Xdebug3Driver.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug3NotEnabledException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Xdebug3NotEnabledException.php', + 'SebastianBergmann\\CodeCoverage\\Driver\\XdebugNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/XdebugNotAvailableException.php', + 'SebastianBergmann\\CodeCoverage\\Exception' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Exception.php', + 'SebastianBergmann\\CodeCoverage\\Filter' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Filter.php', + 'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php', + 'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverAvailableException.php', + 'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverWithPathCoverageSupportAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverWithPathCoverageSupportAvailableException.php', + 'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/AbstractNode.php', + 'SebastianBergmann\\CodeCoverage\\Node\\Builder' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Builder.php', + 'SebastianBergmann\\CodeCoverage\\Node\\CrapIndex' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/CrapIndex.php', + 'SebastianBergmann\\CodeCoverage\\Node\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Directory.php', + 'SebastianBergmann\\CodeCoverage\\Node\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/File.php', + 'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Iterator.php', + 'SebastianBergmann\\CodeCoverage\\ParserException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/ParserException.php', + 'SebastianBergmann\\CodeCoverage\\ProcessedCodeCoverageData' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/ProcessedCodeCoverageData.php', + 'SebastianBergmann\\CodeCoverage\\RawCodeCoverageData' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/RawCodeCoverageData.php', + 'SebastianBergmann\\CodeCoverage\\ReflectionException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/ReflectionException.php', + 'SebastianBergmann\\CodeCoverage\\ReportAlreadyFinalizedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/ReportAlreadyFinalizedException.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Clover' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Clover.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Cobertura' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Cobertura.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Crap4j.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Facade.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php', + 'SebastianBergmann\\CodeCoverage\\Report\\PHP' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/PHP.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Text' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Text.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\BuildInformation' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/File.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Method.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Node.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Project.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Report.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Source' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Source.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php', + 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysisCacheNotConfiguredException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CacheWarmer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CodeUnitFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ExecutableLinesFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\FileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\IgnoredLinesFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php', + 'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php', + 'SebastianBergmann\\CodeCoverage\\TestIdMissingException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php', + 'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php', + 'SebastianBergmann\\CodeCoverage\\Util\\DirectoryCouldNotBeCreatedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php', + 'SebastianBergmann\\CodeCoverage\\Util\\Filesystem' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util/Filesystem.php', + 'SebastianBergmann\\CodeCoverage\\Util\\Percentage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util/Percentage.php', + 'SebastianBergmann\\CodeCoverage\\Version' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Version.php', + 'SebastianBergmann\\CodeCoverage\\XmlException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/XmlException.php', + 'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => __DIR__ . '/..' . '/sebastian/code-unit-reverse-lookup/src/Wizard.php', + 'SebastianBergmann\\CodeUnit\\ClassMethodUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/ClassMethodUnit.php', + 'SebastianBergmann\\CodeUnit\\ClassUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/ClassUnit.php', + 'SebastianBergmann\\CodeUnit\\CodeUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/CodeUnit.php', + 'SebastianBergmann\\CodeUnit\\CodeUnitCollection' => __DIR__ . '/..' . '/sebastian/code-unit/src/CodeUnitCollection.php', + 'SebastianBergmann\\CodeUnit\\CodeUnitCollectionIterator' => __DIR__ . '/..' . '/sebastian/code-unit/src/CodeUnitCollectionIterator.php', + 'SebastianBergmann\\CodeUnit\\Exception' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/Exception.php', + 'SebastianBergmann\\CodeUnit\\FunctionUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/FunctionUnit.php', + 'SebastianBergmann\\CodeUnit\\InterfaceMethodUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/InterfaceMethodUnit.php', + 'SebastianBergmann\\CodeUnit\\InterfaceUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/InterfaceUnit.php', + 'SebastianBergmann\\CodeUnit\\InvalidCodeUnitException' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/InvalidCodeUnitException.php', + 'SebastianBergmann\\CodeUnit\\Mapper' => __DIR__ . '/..' . '/sebastian/code-unit/src/Mapper.php', + 'SebastianBergmann\\CodeUnit\\NoTraitException' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/NoTraitException.php', + 'SebastianBergmann\\CodeUnit\\ReflectionException' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/ReflectionException.php', + 'SebastianBergmann\\CodeUnit\\TraitMethodUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/TraitMethodUnit.php', + 'SebastianBergmann\\CodeUnit\\TraitUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/TraitUnit.php', + 'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ArrayComparator.php', + 'SebastianBergmann\\Comparator\\Comparator' => __DIR__ . '/..' . '/sebastian/comparator/src/Comparator.php', + 'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__ . '/..' . '/sebastian/comparator/src/ComparisonFailure.php', + 'SebastianBergmann\\Comparator\\DOMNodeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DOMNodeComparator.php', + 'SebastianBergmann\\Comparator\\DateTimeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DateTimeComparator.php', + 'SebastianBergmann\\Comparator\\DoubleComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DoubleComparator.php', + 'SebastianBergmann\\Comparator\\Exception' => __DIR__ . '/..' . '/sebastian/comparator/src/exceptions/Exception.php', + 'SebastianBergmann\\Comparator\\ExceptionComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ExceptionComparator.php', + 'SebastianBergmann\\Comparator\\Factory' => __DIR__ . '/..' . '/sebastian/comparator/src/Factory.php', + 'SebastianBergmann\\Comparator\\MockObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/MockObjectComparator.php', + 'SebastianBergmann\\Comparator\\NumericComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/NumericComparator.php', + 'SebastianBergmann\\Comparator\\ObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ObjectComparator.php', + 'SebastianBergmann\\Comparator\\ResourceComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ResourceComparator.php', + 'SebastianBergmann\\Comparator\\RuntimeException' => __DIR__ . '/..' . '/sebastian/comparator/src/exceptions/RuntimeException.php', + 'SebastianBergmann\\Comparator\\ScalarComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ScalarComparator.php', + 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/SplObjectStorageComparator.php', + 'SebastianBergmann\\Comparator\\TypeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/TypeComparator.php', + 'SebastianBergmann\\Complexity\\Calculator' => __DIR__ . '/..' . '/sebastian/complexity/src/Calculator.php', + 'SebastianBergmann\\Complexity\\Complexity' => __DIR__ . '/..' . '/sebastian/complexity/src/Complexity/Complexity.php', + 'SebastianBergmann\\Complexity\\ComplexityCalculatingVisitor' => __DIR__ . '/..' . '/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php', + 'SebastianBergmann\\Complexity\\ComplexityCollection' => __DIR__ . '/..' . '/sebastian/complexity/src/Complexity/ComplexityCollection.php', + 'SebastianBergmann\\Complexity\\ComplexityCollectionIterator' => __DIR__ . '/..' . '/sebastian/complexity/src/Complexity/ComplexityCollectionIterator.php', + 'SebastianBergmann\\Complexity\\CyclomaticComplexityCalculatingVisitor' => __DIR__ . '/..' . '/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php', + 'SebastianBergmann\\Complexity\\Exception' => __DIR__ . '/..' . '/sebastian/complexity/src/Exception/Exception.php', + 'SebastianBergmann\\Complexity\\RuntimeException' => __DIR__ . '/..' . '/sebastian/complexity/src/Exception/RuntimeException.php', + 'SebastianBergmann\\Diff\\Chunk' => __DIR__ . '/..' . '/sebastian/diff/src/Chunk.php', + 'SebastianBergmann\\Diff\\ConfigurationException' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/ConfigurationException.php', + 'SebastianBergmann\\Diff\\Diff' => __DIR__ . '/..' . '/sebastian/diff/src/Diff.php', + 'SebastianBergmann\\Diff\\Differ' => __DIR__ . '/..' . '/sebastian/diff/src/Differ.php', + 'SebastianBergmann\\Diff\\Exception' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/Exception.php', + 'SebastianBergmann\\Diff\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/InvalidArgumentException.php', + 'SebastianBergmann\\Diff\\Line' => __DIR__ . '/..' . '/sebastian/diff/src/Line.php', + 'SebastianBergmann\\Diff\\LongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/LongestCommonSubsequenceCalculator.php', + 'SebastianBergmann\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php', + 'SebastianBergmann\\Diff\\Output\\AbstractChunkOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php', + 'SebastianBergmann\\Diff\\Output\\DiffOnlyOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php', + 'SebastianBergmann\\Diff\\Output\\DiffOutputBuilderInterface' => __DIR__ . '/..' . '/sebastian/diff/src/Output/DiffOutputBuilderInterface.php', + 'SebastianBergmann\\Diff\\Output\\StrictUnifiedDiffOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php', + 'SebastianBergmann\\Diff\\Output\\UnifiedDiffOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php', + 'SebastianBergmann\\Diff\\Parser' => __DIR__ . '/..' . '/sebastian/diff/src/Parser.php', + 'SebastianBergmann\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php', + 'SebastianBergmann\\Environment\\Console' => __DIR__ . '/..' . '/sebastian/environment/src/Console.php', + 'SebastianBergmann\\Environment\\OperatingSystem' => __DIR__ . '/..' . '/sebastian/environment/src/OperatingSystem.php', + 'SebastianBergmann\\Environment\\Runtime' => __DIR__ . '/..' . '/sebastian/environment/src/Runtime.php', + 'SebastianBergmann\\Exporter\\Exporter' => __DIR__ . '/..' . '/sebastian/exporter/src/Exporter.php', + 'SebastianBergmann\\FileIterator\\Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php', + 'SebastianBergmann\\FileIterator\\Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php', + 'SebastianBergmann\\FileIterator\\Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php', + 'SebastianBergmann\\GlobalState\\CodeExporter' => __DIR__ . '/..' . '/sebastian/global-state/src/CodeExporter.php', + 'SebastianBergmann\\GlobalState\\Exception' => __DIR__ . '/..' . '/sebastian/global-state/src/exceptions/Exception.php', + 'SebastianBergmann\\GlobalState\\ExcludeList' => __DIR__ . '/..' . '/sebastian/global-state/src/ExcludeList.php', + 'SebastianBergmann\\GlobalState\\Restorer' => __DIR__ . '/..' . '/sebastian/global-state/src/Restorer.php', + 'SebastianBergmann\\GlobalState\\RuntimeException' => __DIR__ . '/..' . '/sebastian/global-state/src/exceptions/RuntimeException.php', + 'SebastianBergmann\\GlobalState\\Snapshot' => __DIR__ . '/..' . '/sebastian/global-state/src/Snapshot.php', + 'SebastianBergmann\\Invoker\\Exception' => __DIR__ . '/..' . '/phpunit/php-invoker/src/exceptions/Exception.php', + 'SebastianBergmann\\Invoker\\Invoker' => __DIR__ . '/..' . '/phpunit/php-invoker/src/Invoker.php', + 'SebastianBergmann\\Invoker\\ProcessControlExtensionNotLoadedException' => __DIR__ . '/..' . '/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php', + 'SebastianBergmann\\Invoker\\TimeoutException' => __DIR__ . '/..' . '/phpunit/php-invoker/src/exceptions/TimeoutException.php', + 'SebastianBergmann\\LinesOfCode\\Counter' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Counter.php', + 'SebastianBergmann\\LinesOfCode\\Exception' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/Exception.php', + 'SebastianBergmann\\LinesOfCode\\IllogicalValuesException' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/IllogicalValuesException.php', + 'SebastianBergmann\\LinesOfCode\\LineCountingVisitor' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/LineCountingVisitor.php', + 'SebastianBergmann\\LinesOfCode\\LinesOfCode' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/LinesOfCode.php', + 'SebastianBergmann\\LinesOfCode\\NegativeValueException' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/NegativeValueException.php', + 'SebastianBergmann\\LinesOfCode\\RuntimeException' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/RuntimeException.php', + 'SebastianBergmann\\ObjectEnumerator\\Enumerator' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Enumerator.php', + 'SebastianBergmann\\ObjectEnumerator\\Exception' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Exception.php', + 'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/InvalidArgumentException.php', + 'SebastianBergmann\\ObjectReflector\\Exception' => __DIR__ . '/..' . '/sebastian/object-reflector/src/Exception.php', + 'SebastianBergmann\\ObjectReflector\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/object-reflector/src/InvalidArgumentException.php', + 'SebastianBergmann\\ObjectReflector\\ObjectReflector' => __DIR__ . '/..' . '/sebastian/object-reflector/src/ObjectReflector.php', + 'SebastianBergmann\\RecursionContext\\Context' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Context.php', + 'SebastianBergmann\\RecursionContext\\Exception' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Exception.php', + 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php', + 'SebastianBergmann\\ResourceOperations\\ResourceOperations' => __DIR__ . '/..' . '/sebastian/resource-operations/src/ResourceOperations.php', + 'SebastianBergmann\\Template\\Exception' => __DIR__ . '/..' . '/phpunit/php-text-template/src/exceptions/Exception.php', + 'SebastianBergmann\\Template\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/php-text-template/src/exceptions/InvalidArgumentException.php', + 'SebastianBergmann\\Template\\RuntimeException' => __DIR__ . '/..' . '/phpunit/php-text-template/src/exceptions/RuntimeException.php', + 'SebastianBergmann\\Template\\Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php', + 'SebastianBergmann\\Timer\\Duration' => __DIR__ . '/..' . '/phpunit/php-timer/src/Duration.php', + 'SebastianBergmann\\Timer\\Exception' => __DIR__ . '/..' . '/phpunit/php-timer/src/exceptions/Exception.php', + 'SebastianBergmann\\Timer\\NoActiveTimerException' => __DIR__ . '/..' . '/phpunit/php-timer/src/exceptions/NoActiveTimerException.php', + 'SebastianBergmann\\Timer\\ResourceUsageFormatter' => __DIR__ . '/..' . '/phpunit/php-timer/src/ResourceUsageFormatter.php', + 'SebastianBergmann\\Timer\\TimeSinceStartOfRequestNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-timer/src/exceptions/TimeSinceStartOfRequestNotAvailableException.php', + 'SebastianBergmann\\Timer\\Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php', + 'SebastianBergmann\\Type\\CallableType' => __DIR__ . '/..' . '/sebastian/type/src/type/CallableType.php', + 'SebastianBergmann\\Type\\Exception' => __DIR__ . '/..' . '/sebastian/type/src/exception/Exception.php', + 'SebastianBergmann\\Type\\FalseType' => __DIR__ . '/..' . '/sebastian/type/src/type/FalseType.php', + 'SebastianBergmann\\Type\\GenericObjectType' => __DIR__ . '/..' . '/sebastian/type/src/type/GenericObjectType.php', + 'SebastianBergmann\\Type\\IntersectionType' => __DIR__ . '/..' . '/sebastian/type/src/type/IntersectionType.php', + 'SebastianBergmann\\Type\\IterableType' => __DIR__ . '/..' . '/sebastian/type/src/type/IterableType.php', + 'SebastianBergmann\\Type\\MixedType' => __DIR__ . '/..' . '/sebastian/type/src/type/MixedType.php', + 'SebastianBergmann\\Type\\NeverType' => __DIR__ . '/..' . '/sebastian/type/src/type/NeverType.php', + 'SebastianBergmann\\Type\\NullType' => __DIR__ . '/..' . '/sebastian/type/src/type/NullType.php', + 'SebastianBergmann\\Type\\ObjectType' => __DIR__ . '/..' . '/sebastian/type/src/type/ObjectType.php', + 'SebastianBergmann\\Type\\Parameter' => __DIR__ . '/..' . '/sebastian/type/src/Parameter.php', + 'SebastianBergmann\\Type\\ReflectionMapper' => __DIR__ . '/..' . '/sebastian/type/src/ReflectionMapper.php', + 'SebastianBergmann\\Type\\RuntimeException' => __DIR__ . '/..' . '/sebastian/type/src/exception/RuntimeException.php', + 'SebastianBergmann\\Type\\SimpleType' => __DIR__ . '/..' . '/sebastian/type/src/type/SimpleType.php', + 'SebastianBergmann\\Type\\StaticType' => __DIR__ . '/..' . '/sebastian/type/src/type/StaticType.php', + 'SebastianBergmann\\Type\\TrueType' => __DIR__ . '/..' . '/sebastian/type/src/type/TrueType.php', + 'SebastianBergmann\\Type\\Type' => __DIR__ . '/..' . '/sebastian/type/src/type/Type.php', + 'SebastianBergmann\\Type\\TypeName' => __DIR__ . '/..' . '/sebastian/type/src/TypeName.php', + 'SebastianBergmann\\Type\\UnionType' => __DIR__ . '/..' . '/sebastian/type/src/type/UnionType.php', + 'SebastianBergmann\\Type\\UnknownType' => __DIR__ . '/..' . '/sebastian/type/src/type/UnknownType.php', + 'SebastianBergmann\\Type\\VoidType' => __DIR__ . '/..' . '/sebastian/type/src/type/VoidType.php', + 'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php', + 'SzepeViktor\\PHPStan\\WordPress\\ApplyFiltersDynamicFunctionReturnTypeExtension' => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src/ApplyFiltersDynamicFunctionReturnTypeExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\AssertWpErrorTypeSpecifyingExtension' => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src/AssertWpErrorTypeSpecifyingExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\EscSqlDynamicFunctionReturnTypeExtension' => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src/EscSqlDynamicFunctionReturnTypeExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\HookCallbackRule' => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src/HookCallbackRule.php', + 'SzepeViktor\\PHPStan\\WordPress\\HookDocBlock' => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src/HookDocBlock.php', + 'SzepeViktor\\PHPStan\\WordPress\\HookDocsRule' => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src/HookDocsRule.php', + 'SzepeViktor\\PHPStan\\WordPress\\HookDocsVisitor' => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src/HookDocsVisitor.php', + 'SzepeViktor\\PHPStan\\WordPress\\NormalizeWhitespaceDynamicFunctionReturnTypeExtension' => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src/NormalizeWhitespaceDynamicFunctionReturnTypeExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\NormalizedArguments' => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src/NormalizedArguments.php', + 'SzepeViktor\\PHPStan\\WordPress\\ShortcodeAttsDynamicFunctionReturnTypeExtension' => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src/ShortcodeAttsDynamicFunctionReturnTypeExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\SlashitFunctionsDynamicFunctionReturnTypeExtension' => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src/SlashitFunctionsDynamicFunctionReturnTypeExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\StripslashesFromStringsOnlyDynamicFunctionReturnTypeExtension' => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src/StripslashesFromStringsOnlyDynamicFunctionReturnTypeExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\WpConstantFetchRule' => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src/WpConstantFetchRule.php', + 'SzepeViktor\\PHPStan\\WordPress\\WpParseUrlFunctionDynamicReturnTypeExtension' => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src/WpParseUrlFunctionDynamicReturnTypeExtension.php', + 'SzepeViktor\\PHPStan\\WordPress\\WpSlashDynamicFunctionReturnTypeExtension' => __DIR__ . '/..' . '/szepeviktor/phpstan-wordpress/src/WpSlashDynamicFunctionReturnTypeExtension.php', + 'TheSeer\\Tokenizer\\Exception' => __DIR__ . '/..' . '/theseer/tokenizer/src/Exception.php', + 'TheSeer\\Tokenizer\\NamespaceUri' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUri.php', + 'TheSeer\\Tokenizer\\NamespaceUriException' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUriException.php', + 'TheSeer\\Tokenizer\\Token' => __DIR__ . '/..' . '/theseer/tokenizer/src/Token.php', + 'TheSeer\\Tokenizer\\TokenCollection' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollection.php', + 'TheSeer\\Tokenizer\\TokenCollectionException' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollectionException.php', + 'TheSeer\\Tokenizer\\Tokenizer' => __DIR__ . '/..' . '/theseer/tokenizer/src/Tokenizer.php', + 'TheSeer\\Tokenizer\\XMLSerializer' => __DIR__ . '/..' . '/theseer/tokenizer/src/XMLSerializer.php', + 'WP_Mock' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock.php', + 'WP_Mock\\Action' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/Action.php', + 'WP_Mock\\DeprecatedMethodListener' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/DeprecatedMethodListener.php', + 'WP_Mock\\EventManager' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/EventManager.php', + 'WP_Mock\\Filter' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/Filter.php', + 'WP_Mock\\Functions' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/Functions.php', + 'WP_Mock\\Functions\\Handler' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/Functions/Handler.php', + 'WP_Mock\\Functions\\ReturnSequence' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/Functions/ReturnSequence.php', + 'WP_Mock\\Hook' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/Hook.php', + 'WP_Mock\\HookedCallback' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/HookedCallback.php', + 'WP_Mock\\InvokedFilterValue' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/InvokedFilterValue.php', + 'WP_Mock\\Matcher\\AnyInstance' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/Matcher/AnyInstance.php', + 'WP_Mock\\Matcher\\FuzzyObject' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/Matcher/FuzzyObject.php', + 'WP_Mock\\Tools\\Constraints\\ExpectationsMet' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/Tools/Constraints/ExpectationsMet.php', + 'WP_Mock\\Tools\\Constraints\\IsEqualHtml' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/Tools/Constraints/IsEqualHtml.php', + 'WP_Mock\\Tools\\TestCase' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/Tools/TestCase.php', + 'WP_Mock\\Traits\\AccessInaccessibleClassMembersTrait' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/Traits/AccessInaccessibleClassMembersTrait.php', + 'WP_Mock\\Traits\\MockWordPressObjectsTrait' => __DIR__ . '/..' . '/10up/wp_mock/php/WP_Mock/Traits/MockWordPressObjectsTrait.php', ); public static function getInitializer(ClassLoader $loader) diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index de98136..1f6fdfd 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,5 +1,338 @@ { "packages": [ + { + "name": "10up/wp_mock", + "version": "1.1.0", + "version_normalized": "1.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/10up/wp_mock.git", + "reference": "f25b5895ed31bf5e7036fe0c666664364ae011c2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/10up/wp_mock/zipball/f25b5895ed31bf5e7036fe0c666664364ae011c2", + "reference": "f25b5895ed31bf5e7036fe0c666664364ae011c2", + "shasum": "" + }, + "require": { + "antecedent/patchwork": "^2.1", + "mockery/mockery": "^1.6", + "php": ">=7.4 < 9", + "phpunit/phpunit": "^9.6" + }, + "require-dev": { + "behat/behat": "^v3.11.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "friendsofphp/php-cs-fixer": "^3.4", + "php-coveralls/php-coveralls": "^v2.7", + "php-stubs/wordpress-globals": "^0.2", + "php-stubs/wordpress-stubs": "^6.3", + "phpcompatibility/php-compatibility": "^9.3", + "phpstan/phpstan": "^1.10", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "sebastian/comparator": "^4.0.8", + "sempro/phpunit-pretty-print": "^1.4" + }, + "time": "2025-03-12T00:36:13+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "WP_Mock\\": "./php/WP_Mock" + }, + "classmap": [ + "php/WP_Mock.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "A mocking library to take the pain out of unit testing for WordPress", + "support": { + "issues": "https://github.com/10up/wp_mock/issues", + "source": "https://github.com/10up/wp_mock/tree/1.1.0" + }, + "install-path": "../10up/wp_mock" + }, + { + "name": "antecedent/patchwork", + "version": "2.2.3", + "version_normalized": "2.2.3.0", + "source": { + "type": "git", + "url": "https://github.com/antecedent/patchwork.git", + "reference": "8b6b235f405af175259c8f56aea5fc23ab9f03ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/antecedent/patchwork/zipball/8b6b235f405af175259c8f56aea5fc23ab9f03ce", + "reference": "8b6b235f405af175259c8f56aea5fc23ab9f03ce", + "shasum": "" + }, + "require": { + "php": ">=7.1.0" + }, + "require-dev": { + "phpunit/phpunit": ">=4" + }, + "time": "2025-09-17T09:00:56+00:00", + "type": "library", + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignas Rudaitis", + "email": "ignas.rudaitis@gmail.com" + } + ], + "description": "Method redefinition (monkey-patching) functionality for PHP.", + "homepage": "https://antecedent.github.io/patchwork/", + "keywords": [ + "aop", + "aspect", + "interception", + "monkeypatching", + "redefinition", + "runkit", + "testing" + ], + "support": { + "issues": "https://github.com/antecedent/patchwork/issues", + "source": "https://github.com/antecedent/patchwork/tree/2.2.3" + }, + "install-path": "../antecedent/patchwork" + }, + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v1.2.0", + "version_normalized": "1.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/composer-installer.git", + "reference": "845eb62303d2ca9b289ef216356568ccc075ffd1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/845eb62303d2ca9b289ef216356568ccc075ffd1", + "reference": "845eb62303d2ca9b289ef216356568ccc075ffd1", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.2", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.1.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "^2.2", + "ext-json": "*", + "ext-zip": "*", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcompatibility/php-compatibility": "^9.0 || ^10.0.0@dev", + "yoast/phpunit-polyfills": "^1.0" + }, + "time": "2025-11-11T04:32:07+00:00", + "type": "composer-plugin", + "extra": { + "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "opensource@frenck.dev", + "homepage": "https://frenck.dev", + "role": "Open source developer" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcbf", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "security": "https://github.com/PHPCSStandards/composer-installer/security/policy", + "source": "https://github.com/PHPCSStandards/composer-installer" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "install-path": "../dealerdirect/phpcodesniffer-composer-installer" + }, + { + "name": "doctrine/instantiator", + "version": "2.1.0", + "version_normalized": "2.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "23da848e1a2308728fe5fdddabf4be17ff9720c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/23da848e1a2308728fe5fdddabf4be17ff9720c7", + "reference": "23da848e1a2308728fe5fdddabf4be17ff9720c7", + "shasum": "" + }, + "require": { + "php": "^8.4" + }, + "require-dev": { + "doctrine/coding-standard": "^14", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^10.5.58" + }, + "time": "2026-01-05T06:47:08+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/2.1.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "install-path": "../doctrine/instantiator" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.1.1", + "version_normalized": "2.1.1.0", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0 || ^3.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "time": "2025-04-30T06:54:44+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.1.1" + }, + "install-path": "../hamcrest/hamcrest-php" + }, { "name": "htmlburger/carbon-fields", "version": "v3.6.9", @@ -142,8 +475,2452 @@ "source": "https://github.com/htmlburger/carbon-fields" }, "install-path": "../htmlburger/carbon-fields" + }, + { + "name": "mockery/mockery", + "version": "1.6.12", + "version_normalized": "1.6.12.0", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": ">=7.3" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.6.17", + "symplify/easy-coding-standard": "^12.1.14" + }, + "time": "2024-05-16T03:13:13+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], + "psr-4": { + "Mockery\\": "library/Mockery" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "https://github.com/padraic", + "role": "Author" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "docs": "https://docs.mockery.io/", + "issues": "https://github.com/mockery/mockery/issues", + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" + }, + "install-path": "../mockery/mockery" + }, + { + "name": "myclabs/deep-copy", + "version": "1.13.4", + "version_normalized": "1.13.4.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "time": "2025-08-01T08:46:24+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "install-path": "../myclabs/deep-copy" + }, + { + "name": "nikic/php-parser", + "version": "v5.7.0", + "version_normalized": "5.7.0.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "time": "2025-12-06T11:56:16+00:00", + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-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" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" + }, + "install-path": "../nikic/php-parser" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "version_normalized": "2.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "time": "2024-03-03T12:33:53+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "install-path": "../phar-io/manifest" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "version_normalized": "3.2.1.0", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "time": "2022-02-21T01:04:05+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "install-path": "../phar-io/version" + }, + { + "name": "php-stubs/wordpress-stubs", + "version": "v6.9.1", + "version_normalized": "6.9.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-stubs/wordpress-stubs.git", + "reference": "f12220f303e0d7c0844c0e5e957b0c3cee48d2f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/f12220f303e0d7c0844c0e5e957b0c3cee48d2f7", + "reference": "f12220f303e0d7c0844c0e5e957b0c3cee48d2f7", + "shasum": "" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "5.6.1" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "nikic/php-parser": "^5.5", + "php": "^7.4 || ^8.0", + "php-stubs/generator": "^0.8.3", + "phpdocumentor/reflection-docblock": "^6.0", + "phpstan/phpstan": "^2.1", + "phpunit/phpunit": "^9.5", + "symfony/polyfill-php80": "*", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.1.1", + "wp-coding-standards/wpcs": "3.1.0 as 2.3.0" + }, + "suggest": { + "paragonie/sodium_compat": "Pure PHP implementation of libsodium", + "symfony/polyfill-php80": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" + }, + "time": "2026-02-03T19:29:21+00:00", + "type": "library", + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "WordPress function and class declaration stubs for static analysis.", + "homepage": "https://github.com/php-stubs/wordpress-stubs", + "keywords": [ + "PHPStan", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/php-stubs/wordpress-stubs/issues", + "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.9.1" + }, + "install-path": "../php-stubs/wordpress-stubs" + }, + { + "name": "phpcsstandards/phpcsextra", + "version": "1.5.0", + "version_normalized": "1.5.0.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", + "reference": "b598aa890815b8df16363271b659d73280129101" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/b598aa890815b8df16363271b659d73280129101", + "reference": "b598aa890815b8df16363271b659d73280129101", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "phpcsstandards/phpcsutils": "^1.2.0", + "squizlabs/php_codesniffer": "^3.13.5 || ^4.0.1" + }, + "require-dev": { + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcsstandards/phpcsdevcs": "^1.2.0", + "phpcsstandards/phpcsdevtools": "^1.2.1", + "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + }, + "time": "2025-11-12T23:06:57+00:00", + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors" + } + ], + "description": "A collection of sniffs and standards for use with PHP_CodeSniffer.", + "keywords": [ + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues", + "security": "https://github.com/PHPCSStandards/PHPCSExtra/security/policy", + "source": "https://github.com/PHPCSStandards/PHPCSExtra" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "install-path": "../phpcsstandards/phpcsextra" + }, + { + "name": "phpcsstandards/phpcsutils", + "version": "1.2.2", + "version_normalized": "1.2.2.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", + "reference": "c216317e96c8b3f5932808f9b0f1f7a14e3bbf55" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/c216317e96c8b3f5932808f9b0f1f7a14e3bbf55", + "reference": "c216317e96c8b3f5932808f9b0f1f7a14e3bbf55", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.13.5 || ^4.0.1" + }, + "require-dev": { + "ext-filter": "*", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcsstandards/phpcsdevcs": "^1.2.0", + "yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0 || ^3.0.0" + }, + "time": "2025-12-08T14:27:58+00:00", + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "PHPCSUtils/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors" + } + ], + "description": "A suite of utility functions for use with PHP_CodeSniffer", + "homepage": "https://phpcsutils.com/", + "keywords": [ + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", + "phpcs", + "phpcs3", + "phpcs4", + "standards", + "static analysis", + "tokens", + "utility" + ], + "support": { + "docs": "https://phpcsutils.com/", + "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues", + "security": "https://github.com/PHPCSStandards/PHPCSUtils/security/policy", + "source": "https://github.com/PHPCSStandards/PHPCSUtils" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "install-path": "../phpcsstandards/phpcsutils" + }, + { + "name": "phpstan/phpstan", + "version": "2.1.50", + "version_normalized": "2.1.50.0", + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d452086fb4cf648c6b2d8cf3b639351f79e4f3e2", + "reference": "d452086fb4cf648c6b2d8cf3b639351f79e4f3e2", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "time": "2026-04-17T13:10:32+00:00", + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "install-path": "../phpstan/phpstan" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.32", + "version_normalized": "9.2.32.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.19.1 || ^5.1.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.6" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "time": "2024-08-22T04:23:01+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "9.2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../phpunit/php-code-coverage" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "version_normalized": "3.0.6.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "time": "2021-12-02T12:48:52+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../phpunit/php-file-iterator" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "version_normalized": "3.1.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "time": "2020-09-28T05:58:55+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../phpunit/php-invoker" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "version_normalized": "2.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "time": "2020-10-26T05:33:50+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../phpunit/php-text-template" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "version_normalized": "5.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "time": "2020-10-26T13:16:10+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../phpunit/php-timer" + }, + { + "name": "phpunit/phpunit", + "version": "9.6.34", + "version_normalized": "9.6.34.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "b36f02317466907a230d3aa1d34467041271ef4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b36f02317466907a230d3aa1d34467041271ef4a", + "reference": "b36f02317466907a230d3aa1d34467041271ef4a", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.5.0 || ^2", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.13.4", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.32", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", + "sebastian/comparator": "^4.0.10", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.8", + "sebastian/global-state": "^5.0.8", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "time": "2026-01-27T05:45:00+00:00", + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.34" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "install-path": "../phpunit/phpunit" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.2", + "version_normalized": "1.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "time": "2024-03-02T06:27:43+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../sebastian/cli-parser" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "version_normalized": "1.0.8.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "time": "2020-10-26T13:08:54+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../sebastian/code-unit" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "version_normalized": "2.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "time": "2020-09-28T05:30:19+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../sebastian/code-unit-reverse-lookup" + }, + { + "name": "sebastian/comparator", + "version": "4.0.10", + "version_normalized": "4.0.10.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "e4df00b9b3571187db2831ae9aada2c6efbd715d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e4df00b9b3571187db2831ae9aada2c6efbd715d", + "reference": "e4df00b9b3571187db2831ae9aada2c6efbd715d", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "time": "2026-01-24T09:22:56+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.10" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", + "type": "tidelift" + } + ], + "install-path": "../sebastian/comparator" + }, + { + "name": "sebastian/complexity", + "version": "2.0.3", + "version_normalized": "2.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "time": "2023-12-22T06:19:30+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../sebastian/complexity" + }, + { + "name": "sebastian/diff", + "version": "4.0.6", + "version_normalized": "4.0.6.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "time": "2024-03-02T06:30:58+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../sebastian/diff" + }, + { + "name": "sebastian/environment", + "version": "5.1.5", + "version_normalized": "5.1.5.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "time": "2023-02-03T06:03:51+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../sebastian/environment" + }, + { + "name": "sebastian/exporter", + "version": "4.0.8", + "version_normalized": "4.0.8.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/14c6ba52f95a36c3d27c835d65efc7123c446e8c", + "reference": "14c6ba52f95a36c3d27c835d65efc7123c446e8c", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "time": "2025-09-24T06:03:27+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" + } + ], + "install-path": "../sebastian/exporter" + }, + { + "name": "sebastian/global-state", + "version": "5.0.8", + "version_normalized": "5.0.8.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/b6781316bdcd28260904e7cc18ec983d0d2ef4f6", + "reference": "b6781316bdcd28260904e7cc18ec983d0d2ef4f6", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "time": "2025-08-10T07:10:35+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/global-state", + "type": "tidelift" + } + ], + "install-path": "../sebastian/global-state" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.4", + "version_normalized": "1.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "time": "2023-12-22T06:20:34+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../sebastian/lines-of-code" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "version_normalized": "4.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "time": "2020-10-26T13:12:34+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../sebastian/object-enumerator" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "version_normalized": "2.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "time": "2020-10-26T13:14:26+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../sebastian/object-reflector" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.6", + "version_normalized": "4.0.6.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "539c6691e0623af6dc6f9c20384c120f963465a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/539c6691e0623af6dc6f9c20384c120f963465a0", + "reference": "539c6691e0623af6dc6f9c20384c120f963465a0", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "time": "2025-08-10T06:57:39+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", + "type": "tidelift" + } + ], + "install-path": "../sebastian/recursion-context" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.4", + "version_normalized": "3.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "time": "2024-03-14T16:00:52+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../sebastian/resource-operations" + }, + { + "name": "sebastian/type", + "version": "3.2.1", + "version_normalized": "3.2.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "time": "2023-02-03T06:13:03+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../sebastian/type" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "version_normalized": "3.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "time": "2020-09-28T06:39:44+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "install-path": "../sebastian/version" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.13.5", + "version_normalized": "3.13.5.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4", + "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + }, + "time": "2025-11-04T16:30:35+00:00", + "bin": [ + "bin/phpcbf", + "bin/phpcs" + ], + "type": "library", + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "install-path": "../squizlabs/php_codesniffer" + }, + { + "name": "szepeviktor/phpstan-wordpress", + "version": "v2.0.3", + "version_normalized": "2.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/szepeviktor/phpstan-wordpress.git", + "reference": "aa722f037b2d034828cd6c55ebe9e5c74961927e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/aa722f037b2d034828cd6c55ebe9e5c74961927e", + "reference": "aa722f037b2d034828cd6c55ebe9e5c74961927e", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "php-stubs/wordpress-stubs": "^6.6.2", + "phpstan/phpstan": "^2.0" + }, + "require-dev": { + "composer/composer": "^2.1.14", + "composer/semver": "^3.4", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.0", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.0", + "wp-coding-standards/wpcs": "3.1.0 as 2.3.0" + }, + "suggest": { + "swissspidy/phpstan-no-private": "Detect usage of internal core functions, classes and methods" + }, + "time": "2025-09-14T02:58:22+00:00", + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "SzepeViktor\\PHPStan\\WordPress\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "WordPress extensions for PHPStan", + "keywords": [ + "PHPStan", + "code analyse", + "code analysis", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/szepeviktor/phpstan-wordpress/issues", + "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v2.0.3" + }, + "install-path": "../szepeviktor/phpstan-wordpress" + }, + { + "name": "theseer/tokenizer", + "version": "1.3.1", + "version_normalized": "1.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "time": "2025-11-17T20:03:58+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.3.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "install-path": "../theseer/tokenizer" + }, + { + "name": "wp-coding-standards/wpcs", + "version": "3.3.0", + "version_normalized": "3.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", + "reference": "7795ec6fa05663d716a549d0b44e47ffc8b0d4a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7795ec6fa05663d716a549d0b44e47ffc8b0d4a6", + "reference": "7795ec6fa05663d716a549d0b44e47ffc8b0d4a6", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "ext-libxml": "*", + "ext-tokenizer": "*", + "ext-xmlreader": "*", + "php": ">=7.2", + "phpcsstandards/phpcsextra": "^1.5.0", + "phpcsstandards/phpcsutils": "^1.1.0", + "squizlabs/php_codesniffer": "^3.13.4" + }, + "require-dev": { + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcompatibility/php-compatibility": "^10.0.0@dev", + "phpcsstandards/phpcsdevtools": "^1.2.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "suggest": { + "ext-iconv": "For improved results", + "ext-mbstring": "For improved results" + }, + "time": "2025-11-25T12:08:04+00:00", + "type": "phpcodesniffer-standard", + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", + "keywords": [ + "phpcs", + "standards", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues", + "source": "https://github.com/WordPress/WordPress-Coding-Standards", + "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" + }, + "funding": [ + { + "url": "https://opencollective.com/php_codesniffer", + "type": "custom" + } + ], + "install-path": "../wp-coding-standards/wpcs" } ], "dev": true, - "dev-package-names": [] + "dev-package-names": [ + "10up/wp_mock", + "antecedent/patchwork", + "dealerdirect/phpcodesniffer-composer-installer", + "doctrine/instantiator", + "hamcrest/hamcrest-php", + "mockery/mockery", + "myclabs/deep-copy", + "nikic/php-parser", + "phar-io/manifest", + "phar-io/version", + "php-stubs/wordpress-stubs", + "phpcsstandards/phpcsextra", + "phpcsstandards/phpcsutils", + "phpstan/phpstan", + "phpunit/php-code-coverage", + "phpunit/php-file-iterator", + "phpunit/php-invoker", + "phpunit/php-text-template", + "phpunit/php-timer", + "phpunit/phpunit", + "sebastian/cli-parser", + "sebastian/code-unit", + "sebastian/code-unit-reverse-lookup", + "sebastian/comparator", + "sebastian/complexity", + "sebastian/diff", + "sebastian/environment", + "sebastian/exporter", + "sebastian/global-state", + "sebastian/lines-of-code", + "sebastian/object-enumerator", + "sebastian/object-reflector", + "sebastian/recursion-context", + "sebastian/resource-operations", + "sebastian/type", + "sebastian/version", + "squizlabs/php_codesniffer", + "szepeviktor/phpstan-wordpress", + "theseer/tokenizer", + "wp-coding-standards/wpcs" + ] } diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index eb6bf33..aff3429 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,24 +1,81 @@ array( 'name' => 'daimpad/open-data-wizard', - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'reference' => '5b5b09e4fdaa80d42f975adbe02d61c48c0f8d87', + 'pretty_version' => 'dev-main', + 'version' => 'dev-main', + 'reference' => '37541a5f11b6105f39e324b87b496d58e8b0b919', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => true, ), 'versions' => array( + '10up/wp_mock' => array( + 'pretty_version' => '1.1.0', + 'version' => '1.1.0.0', + 'reference' => 'f25b5895ed31bf5e7036fe0c666664364ae011c2', + 'type' => 'library', + 'install_path' => __DIR__ . '/../10up/wp_mock', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'antecedent/patchwork' => array( + 'pretty_version' => '2.2.3', + 'version' => '2.2.3.0', + 'reference' => '8b6b235f405af175259c8f56aea5fc23ab9f03ce', + 'type' => 'library', + 'install_path' => __DIR__ . '/../antecedent/patchwork', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'cordoval/hamcrest-php' => array( + 'dev_requirement' => true, + 'replaced' => array( + 0 => '*', + ), + ), 'daimpad/open-data-wizard' => array( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'reference' => '5b5b09e4fdaa80d42f975adbe02d61c48c0f8d87', + 'pretty_version' => 'dev-main', + 'version' => 'dev-main', + 'reference' => '37541a5f11b6105f39e324b87b496d58e8b0b919', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), + 'davedevelopment/hamcrest-php' => array( + 'dev_requirement' => true, + 'replaced' => array( + 0 => '*', + ), + ), + 'dealerdirect/phpcodesniffer-composer-installer' => array( + 'pretty_version' => 'v1.2.0', + 'version' => '1.2.0.0', + 'reference' => '845eb62303d2ca9b289ef216356568ccc075ffd1', + 'type' => 'composer-plugin', + 'install_path' => __DIR__ . '/../dealerdirect/phpcodesniffer-composer-installer', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'doctrine/instantiator' => array( + 'pretty_version' => '2.1.0', + 'version' => '2.1.0.0', + 'reference' => '23da848e1a2308728fe5fdddabf4be17ff9720c7', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/instantiator', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'hamcrest/hamcrest-php' => array( + 'pretty_version' => 'v2.1.1', + 'version' => '2.1.1.0', + 'reference' => 'f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487', + 'type' => 'library', + 'install_path' => __DIR__ . '/../hamcrest/hamcrest-php', + 'aliases' => array(), + 'dev_requirement' => true, + ), 'htmlburger/carbon-fields' => array( 'pretty_version' => 'v3.6.9', 'version' => '3.6.9.0', @@ -28,5 +85,326 @@ 'aliases' => array(), 'dev_requirement' => false, ), + 'kodova/hamcrest-php' => array( + 'dev_requirement' => true, + 'replaced' => array( + 0 => '*', + ), + ), + 'mockery/mockery' => array( + 'pretty_version' => '1.6.12', + 'version' => '1.6.12.0', + 'reference' => '1f4efdd7d3beafe9807b08156dfcb176d18f1699', + 'type' => 'library', + 'install_path' => __DIR__ . '/../mockery/mockery', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'myclabs/deep-copy' => array( + 'pretty_version' => '1.13.4', + 'version' => '1.13.4.0', + 'reference' => '07d290f0c47959fd5eed98c95ee5602db07e0b6a', + 'type' => 'library', + 'install_path' => __DIR__ . '/../myclabs/deep-copy', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'nikic/php-parser' => array( + 'pretty_version' => 'v5.7.0', + 'version' => '5.7.0.0', + 'reference' => 'dca41cd15c2ac9d055ad70dbfd011130757d1f82', + 'type' => 'library', + 'install_path' => __DIR__ . '/../nikic/php-parser', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phar-io/manifest' => array( + 'pretty_version' => '2.0.4', + 'version' => '2.0.4.0', + 'reference' => '54750ef60c58e43759730615a392c31c80e23176', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phar-io/manifest', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phar-io/version' => array( + 'pretty_version' => '3.2.1', + 'version' => '3.2.1.0', + 'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phar-io/version', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'php-stubs/wordpress-stubs' => array( + 'pretty_version' => 'v6.9.1', + 'version' => '6.9.1.0', + 'reference' => 'f12220f303e0d7c0844c0e5e957b0c3cee48d2f7', + 'type' => 'library', + 'install_path' => __DIR__ . '/../php-stubs/wordpress-stubs', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpcsstandards/phpcsextra' => array( + 'pretty_version' => '1.5.0', + 'version' => '1.5.0.0', + 'reference' => 'b598aa890815b8df16363271b659d73280129101', + 'type' => 'phpcodesniffer-standard', + 'install_path' => __DIR__ . '/../phpcsstandards/phpcsextra', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpcsstandards/phpcsutils' => array( + 'pretty_version' => '1.2.2', + 'version' => '1.2.2.0', + 'reference' => 'c216317e96c8b3f5932808f9b0f1f7a14e3bbf55', + 'type' => 'phpcodesniffer-standard', + 'install_path' => __DIR__ . '/../phpcsstandards/phpcsutils', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpstan/phpstan' => array( + 'pretty_version' => '2.1.50', + 'version' => '2.1.50.0', + 'reference' => 'd452086fb4cf648c6b2d8cf3b639351f79e4f3e2', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpstan/phpstan', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/php-code-coverage' => array( + 'pretty_version' => '9.2.32', + 'version' => '9.2.32.0', + 'reference' => '85402a822d1ecf1db1096959413d35e1c37cf1a5', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/php-code-coverage', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/php-file-iterator' => array( + 'pretty_version' => '3.0.6', + 'version' => '3.0.6.0', + 'reference' => 'cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/php-file-iterator', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/php-invoker' => array( + 'pretty_version' => '3.1.1', + 'version' => '3.1.1.0', + 'reference' => '5a10147d0aaf65b58940a0b72f71c9ac0423cc67', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/php-invoker', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/php-text-template' => array( + 'pretty_version' => '2.0.4', + 'version' => '2.0.4.0', + 'reference' => '5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/php-text-template', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/php-timer' => array( + 'pretty_version' => '5.0.3', + 'version' => '5.0.3.0', + 'reference' => '5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/php-timer', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'phpunit/phpunit' => array( + 'pretty_version' => '9.6.34', + 'version' => '9.6.34.0', + 'reference' => 'b36f02317466907a230d3aa1d34467041271ef4a', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpunit/phpunit', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/cli-parser' => array( + 'pretty_version' => '1.0.2', + 'version' => '1.0.2.0', + 'reference' => '2b56bea83a09de3ac06bb18b92f068e60cc6f50b', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/cli-parser', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/code-unit' => array( + 'pretty_version' => '1.0.8', + 'version' => '1.0.8.0', + 'reference' => '1fc9f64c0927627ef78ba436c9b17d967e68e120', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/code-unit', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/code-unit-reverse-lookup' => array( + 'pretty_version' => '2.0.3', + 'version' => '2.0.3.0', + 'reference' => 'ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/code-unit-reverse-lookup', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/comparator' => array( + 'pretty_version' => '4.0.10', + 'version' => '4.0.10.0', + 'reference' => 'e4df00b9b3571187db2831ae9aada2c6efbd715d', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/comparator', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/complexity' => array( + 'pretty_version' => '2.0.3', + 'version' => '2.0.3.0', + 'reference' => '25f207c40d62b8b7aa32f5ab026c53561964053a', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/complexity', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/diff' => array( + 'pretty_version' => '4.0.6', + 'version' => '4.0.6.0', + 'reference' => 'ba01945089c3a293b01ba9badc29ad55b106b0bc', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/diff', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/environment' => array( + 'pretty_version' => '5.1.5', + 'version' => '5.1.5.0', + 'reference' => '830c43a844f1f8d5b7a1f6d6076b784454d8b7ed', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/environment', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/exporter' => array( + 'pretty_version' => '4.0.8', + 'version' => '4.0.8.0', + 'reference' => '14c6ba52f95a36c3d27c835d65efc7123c446e8c', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/exporter', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/global-state' => array( + 'pretty_version' => '5.0.8', + 'version' => '5.0.8.0', + 'reference' => 'b6781316bdcd28260904e7cc18ec983d0d2ef4f6', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/global-state', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/lines-of-code' => array( + 'pretty_version' => '1.0.4', + 'version' => '1.0.4.0', + 'reference' => 'e1e4a170560925c26d424b6a03aed157e7dcc5c5', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/lines-of-code', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/object-enumerator' => array( + 'pretty_version' => '4.0.4', + 'version' => '4.0.4.0', + 'reference' => '5c9eeac41b290a3712d88851518825ad78f45c71', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/object-enumerator', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/object-reflector' => array( + 'pretty_version' => '2.0.4', + 'version' => '2.0.4.0', + 'reference' => 'b4f479ebdbf63ac605d183ece17d8d7fe49c15c7', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/object-reflector', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/recursion-context' => array( + 'pretty_version' => '4.0.6', + 'version' => '4.0.6.0', + 'reference' => '539c6691e0623af6dc6f9c20384c120f963465a0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/recursion-context', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/resource-operations' => array( + 'pretty_version' => '3.0.4', + 'version' => '3.0.4.0', + 'reference' => '05d5692a7993ecccd56a03e40cd7e5b09b1d404e', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/resource-operations', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/type' => array( + 'pretty_version' => '3.2.1', + 'version' => '3.2.1.0', + 'reference' => '75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/type', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'sebastian/version' => array( + 'pretty_version' => '3.0.2', + 'version' => '3.0.2.0', + 'reference' => 'c6c1022351a901512170118436c764e473f6de8c', + 'type' => 'library', + 'install_path' => __DIR__ . '/../sebastian/version', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'squizlabs/php_codesniffer' => array( + 'pretty_version' => '3.13.5', + 'version' => '3.13.5.0', + 'reference' => '0ca86845ce43291e8f5692c7356fccf3bcf02bf4', + 'type' => 'library', + 'install_path' => __DIR__ . '/../squizlabs/php_codesniffer', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'szepeviktor/phpstan-wordpress' => array( + 'pretty_version' => 'v2.0.3', + 'version' => '2.0.3.0', + 'reference' => 'aa722f037b2d034828cd6c55ebe9e5c74961927e', + 'type' => 'phpstan-extension', + 'install_path' => __DIR__ . '/../szepeviktor/phpstan-wordpress', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'theseer/tokenizer' => array( + 'pretty_version' => '1.3.1', + 'version' => '1.3.1.0', + 'reference' => 'b7489ce515e168639d17feec34b8847c326b0b3c', + 'type' => 'library', + 'install_path' => __DIR__ . '/../theseer/tokenizer', + 'aliases' => array(), + 'dev_requirement' => true, + ), + 'wp-coding-standards/wpcs' => array( + 'pretty_version' => '3.3.0', + 'version' => '3.3.0.0', + 'reference' => '7795ec6fa05663d716a549d0b44e47ffc8b0d4a6', + 'type' => 'phpcodesniffer-standard', + 'install_path' => __DIR__ . '/../wp-coding-standards/wpcs', + 'aliases' => array(), + 'dev_requirement' => true, + ), ), ); diff --git a/vendor/dealerdirect/phpcodesniffer-composer-installer/CHANGELOG.md b/vendor/dealerdirect/phpcodesniffer-composer-installer/CHANGELOG.md new file mode 100644 index 0000000..6794ef6 --- /dev/null +++ b/vendor/dealerdirect/phpcodesniffer-composer-installer/CHANGELOG.md @@ -0,0 +1,587 @@ +# Change Log for the Composer Installer for PHP CodeSniffer + +All notable changes to this project will be documented in this file. + +This projects adheres to [Keep a CHANGELOG](https://keepachangelog.com/) and uses [Semantic Versioning](https://semver.org/). + + +## [Unreleased] + +_Nothing yet._ + + +## [v1.2.0] - 2025-11-11 + +### Changed +- Various housekeeping, including improvements to the documentation and tests. + +### Removed +- Drop support for PHP_CodeSniffer 2.x. Thanks [@jrfnl] ! [#261] + +[#261]: https://github.com/PHPCSStandards/composer-installer/pull/261 + + +## [v1.1.2] - 2025-07-17 + +### Changed +- General housekeeping. + +### Fixed +- [#247]: Potential fatal error when the Composer EventDispatcher is called programmatically from an integration. Thanks [@jrfnl] ! [#248] + +[#247]: https://github.com/PHPCSStandards/composer-installer/issues/247 +[#248]: https://github.com/PHPCSStandards/composer-installer/pull/248 + + +## [v1.1.1] - 2025-06-27 + +### Changed +- Various housekeeping, including improvements to the documentation. + +### Fixed +- [#239]: The PHP_CodeSniffer package could not be always found when running the plugin in a Drupal or Magento setup. Thanks [@jrfnl] ! [#245] + +[#239]: https://github.com/PHPCSStandards/composer-installer/issues/239 +[#245]: https://github.com/PHPCSStandards/composer-installer/pull/245 + + +## [v1.1.0] - 2025-06-24 + +### Changed +- Various housekeeping, including improvements to the documentation and tests. Thanks [@SplotyCode], [@fredden] for contributing! + +### Removed +- Drop support for Composer v1.x. Thanks [@fredden] ! [#230] + +[#230]: https://github.com/PHPCSStandards/composer-installer/pull/230 + + +## [v1.0.0] - 2023-01-05 + +### Breaking changes +- Rename namespace prefix from Dealerdirect to PHPCSStandards by [@jrfnl] in [#191] +- Drop support for PHP 5.3 by [@jrfnl] in [#147] + +### Changed +- Correct grammar in error message by [@fredden] in [#189] +- .gitattributes: sync with current repo state by [@jrfnl] in [#198] +- PHPCSVersions: update URL references by [@jrfnl] in [#161] +- README: remove references to Scrutinizer by [@jrfnl] in [#157] +- Rename references to master branch by [@Potherca] in [#201] +- Update repo references by [@jrfnl] in [#158] +- GH Actions: add builds against Composer 2.2 for PHP 7.2 - 8.x by [@jrfnl] in [#172] +- GH Actions: bust the cache semi-regularly by [@jrfnl] in [#192] +- GH Actions: fix builds on Windows with PHP 8.2 by [@jrfnl] in [#180] +- GH Actions: fix up fail-fast for setup-php by [@jrfnl] in [#195] +- GH Actions: run integration tests against Composer snapshot by [@jrfnl] in [#163] +- GH Actions: run linting against against ubuntu-latest by [@jrfnl] in [#184] +- GH Actions/Securitycheck: update the security checker download by [@jrfnl] in [#178] +- GH Actions/Securitycheck: update the security checker download by [@jrfnl] in [#186] +- GH Actions/Securitycheck: update the security checker download by [@jrfnl] in [#190] +- GH Actions: selectively use fail-fast with setup-php by [@jrfnl] in [#194] +- GH Actions: stop running tests against PHP 5.5/Composer 1.x on Windows (and remove work-arounds) by [@jrfnl] in [#183] +- GH Actions: various tweaks / PHP 8.2 not allowed to fail by [@jrfnl] in [#193] +- GH Actions: version update for various predefined actions by [@jrfnl] in [#170] +- Update YamLint by [@Potherca] in [#173] +- Add initial integration test setup and first few tests by [@jrfnl] in [#153] +- BaseLineTest: stabilize the message checks by [@jrfnl] in [#162] +- PlayNiceWithScriptsTest: wrap output expectation in condition by [@jrfnl] in [#179] +- RegisterExternalStandardsTest: add new tests by [@jrfnl] in [#165] +- RegisterExternalStandardsTest: stabilize test for Composer v1 on Windows with PHP 5.5 by [@jrfnl] in [#171] +- TestCase::executeCliCommand(): retry Composer commands on a particular exception by [@jrfnl] in [#164] +- Tests: add new InstalledPathsOrderTest by [@jrfnl] in [#176] +- Tests: add new InstallUpdateEventsTest and NonInstallUpdateEventsTest by [@jrfnl] in [#174] +- Tests: add new InvalidPackagesTest by [@jrfnl] in [#168] +- Tests: add new PlayNiceWithScriptsTest by [@jrfnl] in [#169] +- Tests: add new PreexistingPHPCSConfigTest by [@jrfnl] in [#166] +- Tests: add new PreexistingPHPCSInstalledPathsConfigTest + bug fix by [@jrfnl] in [#167] +- Tests: add new RemovePluginTest by [@jrfnl] in [#177] +- Tests: add new RootPackageHandlingTest + bugfix by [@jrfnl] in [#175] + +### Fixed +- Plugin: improve feedback by [@jrfnl] in [#182] + +[#147]: https://github.com/PHPCSStandards/composer-installer/pull/147 +[#153]: https://github.com/PHPCSStandards/composer-installer/pull/153 +[#157]: https://github.com/PHPCSStandards/composer-installer/pull/157 +[#158]: https://github.com/PHPCSStandards/composer-installer/pull/158 +[#161]: https://github.com/PHPCSStandards/composer-installer/pull/161 +[#162]: https://github.com/PHPCSStandards/composer-installer/pull/162 +[#163]: https://github.com/PHPCSStandards/composer-installer/pull/163 +[#164]: https://github.com/PHPCSStandards/composer-installer/pull/164 +[#165]: https://github.com/PHPCSStandards/composer-installer/pull/165 +[#166]: https://github.com/PHPCSStandards/composer-installer/pull/166 +[#167]: https://github.com/PHPCSStandards/composer-installer/pull/167 +[#168]: https://github.com/PHPCSStandards/composer-installer/pull/168 +[#169]: https://github.com/PHPCSStandards/composer-installer/pull/169 +[#170]: https://github.com/PHPCSStandards/composer-installer/pull/170 +[#171]: https://github.com/PHPCSStandards/composer-installer/pull/171 +[#172]: https://github.com/PHPCSStandards/composer-installer/pull/172 +[#173]: https://github.com/PHPCSStandards/composer-installer/pull/173 +[#174]: https://github.com/PHPCSStandards/composer-installer/pull/174 +[#175]: https://github.com/PHPCSStandards/composer-installer/pull/175 +[#176]: https://github.com/PHPCSStandards/composer-installer/pull/176 +[#177]: https://github.com/PHPCSStandards/composer-installer/pull/177 +[#178]: https://github.com/PHPCSStandards/composer-installer/pull/178 +[#179]: https://github.com/PHPCSStandards/composer-installer/pull/179 +[#180]: https://github.com/PHPCSStandards/composer-installer/pull/180 +[#182]: https://github.com/PHPCSStandards/composer-installer/pull/182 +[#183]: https://github.com/PHPCSStandards/composer-installer/pull/183 +[#184]: https://github.com/PHPCSStandards/composer-installer/pull/184 +[#186]: https://github.com/PHPCSStandards/composer-installer/pull/186 +[#189]: https://github.com/PHPCSStandards/composer-installer/pull/189 +[#190]: https://github.com/PHPCSStandards/composer-installer/pull/190 +[#191]: https://github.com/PHPCSStandards/composer-installer/pull/191 +[#192]: https://github.com/PHPCSStandards/composer-installer/pull/192 +[#193]: https://github.com/PHPCSStandards/composer-installer/pull/193 +[#194]: https://github.com/PHPCSStandards/composer-installer/pull/194 +[#195]: https://github.com/PHPCSStandards/composer-installer/pull/195 +[#198]: https://github.com/PHPCSStandards/composer-installer/pull/198 +[#201]: https://github.com/PHPCSStandards/composer-installer/pull/201 + + +## [v0.7.2] - 2022-02-04 + +### Changed +- Add details regarding QA automation in CONTRIBUTING.md file. by [@Potherca] in [#133] +- Add mention of Composer and PHP compatibility to project README. by [@Potherca] in [#132] +- Composer: tweak PHPCS version constraint by [@jrfnl] in [#152] +- CONTRIBUTING: remove duplicate code of conduct by [@jrfnl] in [#148] +- Document release process by [@Potherca] in [#118] +- Plugin::loadInstalledPaths(): config-show always shows all by [@jrfnl] in [#154] +- README: minor tweaks by [@jrfnl] in [#149] +- README: update with information about Composer >= 2.2 by [@jrfnl] in [#141] +- Replace deprecated Sensiolabs security checker by [@paras-malhotra] in [#130] +- Stabilize a condition by [@jrfnl] in [#127] +- Update copyright year by [@jrfnl] in [#138] +- Various minor tweaks by [@jrfnl] in [#151] +- Change YamlLint config to prevent "truthy" warning. by [@Potherca] in [#144] +- GH Actions: PHP 8.1 has been released by [@jrfnl] in [#139] +- Travis: line length tweaks by [@jrfnl] in [#128] +- CI: Switch to GH Actions by [@jrfnl] in [#137] +- CI: various updates by [@jrfnl] in [#140] + +[#118]: https://github.com/PHPCSStandards/composer-installer/pull/118 +[#127]: https://github.com/PHPCSStandards/composer-installer/pull/127 +[#128]: https://github.com/PHPCSStandards/composer-installer/pull/128 +[#130]: https://github.com/PHPCSStandards/composer-installer/pull/130 +[#132]: https://github.com/PHPCSStandards/composer-installer/pull/132 +[#133]: https://github.com/PHPCSStandards/composer-installer/pull/133 +[#137]: https://github.com/PHPCSStandards/composer-installer/pull/137 +[#138]: https://github.com/PHPCSStandards/composer-installer/pull/138 +[#139]: https://github.com/PHPCSStandards/composer-installer/pull/139 +[#140]: https://github.com/PHPCSStandards/composer-installer/pull/140 +[#141]: https://github.com/PHPCSStandards/composer-installer/pull/141 +[#144]: https://github.com/PHPCSStandards/composer-installer/pull/144 +[#148]: https://github.com/PHPCSStandards/composer-installer/pull/148 +[#149]: https://github.com/PHPCSStandards/composer-installer/pull/149 +[#151]: https://github.com/PHPCSStandards/composer-installer/pull/151 +[#152]: https://github.com/PHPCSStandards/composer-installer/pull/152 +[#154]: https://github.com/PHPCSStandards/composer-installer/pull/154 + + +## [v0.7.1] - 2020-12-07 + +### Closed issues +- Order of installed_paths inconsistent between runs [#125] +- Maintaining this project and Admin rights [#113] + +### Changed +- Sort list of installed paths before saving for consistency by [@kevinfodness] in [#126] +- Update code of conduct by [@Potherca] in [#117] +- Add remark configuration by [@Potherca] in [#122] +- Travis: add build against PHP 8.0 by [@jrfnl] in [#124] + +### Fixed +- Fixed v4 constraint by [@GrahamCampbell] in [#115] + +[#113]: https://github.com/PHPCSStandards/composer-installer/issues/113 +[#115]: https://github.com/PHPCSStandards/composer-installer/pull/115 +[#117]: https://github.com/PHPCSStandards/composer-installer/pull/117 +[#122]: https://github.com/PHPCSStandards/composer-installer/pull/122 +[#124]: https://github.com/PHPCSStandards/composer-installer/pull/124 +[#125]: https://github.com/PHPCSStandards/composer-installer/issues/125 +[#126]: https://github.com/PHPCSStandards/composer-installer/pull/126 + + +## [v0.7.0] - 2020-06-25 + +### Closed issues +- Composer 2.x compatibility [#108] +- Add link to Packagist on main page [#110] +- Switch from Travis CI .org to .com [#112] + +### Added +- Allow installation on PHP 8 by [@jrfnl] in [#106] +- Support Composer 2.0 by [@jrfnl] in [#111] + +### Changed +- Test with PHPCS 4.x and allow installation when using PHPCS 4.x by [@jrfnl] in [#107] +- Fix case of class name by [@Seldaek] in [#109] + +[#106]: https://github.com/PHPCSStandards/composer-installer/pull/106 +[#107]: https://github.com/PHPCSStandards/composer-installer/pull/107 +[#108]: https://github.com/PHPCSStandards/composer-installer/issues/108 +[#109]: https://github.com/PHPCSStandards/composer-installer/pull/109 +[#110]: https://github.com/PHPCSStandards/composer-installer/issues/110 +[#111]: https://github.com/PHPCSStandards/composer-installer/pull/111 +[#112]: https://github.com/PHPCSStandards/composer-installer/issues/112 + + +## [v0.6.2] - 2020-01-29 + +### Fixed +- Composer scripts/commands broken in 0.6.0 update by [@BrianHenryIE] in [#105] + +[#105]: https://github.com/PHPCSStandards/composer-installer/pull/105 + +## [v0.6.1] - 2020-01-27 + +### Closed issues +- Do not exit with code 1 on uninstall (--no-dev) [#103] + +### Changed +- Readme: minor tweak now 0.6.0 has been released [#102] ([@jrfnl]) + +### Fixed +- [#103]: Fix for issue #103 [#104] ([@Potherca]) + +[#102]: https://github.com/PHPCSStandards/composer-installer/pull/102 +[#103]: https://github.com/PHPCSStandards/composer-installer/issues/103 +[#104]: https://github.com/PHPCSStandards/composer-installer/pull/104 + + +## [v0.6.0] - 2020-01-19 + +### Closed issues +- Composer PHP version appears not to be respected [#79] +- Allow a string value for extra.phpcodesniffer-search-depth [#82] +- Add [@jrfnl] as (co)maintainer to this project [#87] + +### Added +- Add support for a string phpcodesniffer-search-depth config value set via composer config by [@TravisCarden] in [#85] +- Send an exit code when the script terminates by [@jrfnl] in [#93] +- Verify the installed_paths after save by [@jrfnl] in [#97] + +### Changed +- CS: fix compliance with PSR12 by [@jrfnl] in [#88] +- Improve GH issue template by [@jrfnl] in [#94] +- Readme: add section about including this plugin from an external PHPCS standard by [@jrfnl] in [#95] +- Bug report template: further enhancement by [@jrfnl] in [#99] +- Update copyright year. by [@Potherca] in [#101] +- Adding linting jobs in github action by [@mjrider] in [#96] +- GH Actions: minor tweaks: by [@jrfnl] in [#100] +- Travis: disable Xdebug by [@jrfnl] in [#89] +- Travis: test against PHP 7.4, not snapshot by [@jrfnl] in [#90] +- Travis: use a mix of PHPCS versions in the matrix by [@jrfnl] in [#91] +- Update Travis file and fix build by [@Potherca] in [#86] + +### Fixed +- [#79]: Respect PHP version used by Composer and provide better feedback on failure by [@jrfnl] in [#80] +- Bug fix: loadInstalledPaths() very very broken since PHPCS 3.1.0 by [@jrfnl] in [#98] + +[#79]: https://github.com/PHPCSStandards/composer-installer/issues/79 +[#80]: https://github.com/PHPCSStandards/composer-installer/issues/80 +[#82]: https://github.com/PHPCSStandards/composer-installer/issues/82 +[#85]: https://github.com/PHPCSStandards/composer-installer/pull/85 +[#86]: https://github.com/PHPCSStandards/composer-installer/pull/86 +[#87]: https://github.com/PHPCSStandards/composer-installer/issues/87 +[#88]: https://github.com/PHPCSStandards/composer-installer/pull/88 +[#89]: https://github.com/PHPCSStandards/composer-installer/pull/89 +[#90]: https://github.com/PHPCSStandards/composer-installer/pull/90 +[#91]: https://github.com/PHPCSStandards/composer-installer/pull/91 +[#93]: https://github.com/PHPCSStandards/composer-installer/pull/93 +[#94]: https://github.com/PHPCSStandards/composer-installer/pull/94 +[#95]: https://github.com/PHPCSStandards/composer-installer/pull/95 +[#96]: https://github.com/PHPCSStandards/composer-installer/pull/96 +[#97]: https://github.com/PHPCSStandards/composer-installer/pull/97 +[#98]: https://github.com/PHPCSStandards/composer-installer/issues/98 +[#99]: https://github.com/PHPCSStandards/composer-installer/pull/99 +[#100]: https://github.com/PHPCSStandards/composer-installer/pull/100 +[#101]: https://github.com/PHPCSStandards/composer-installer/pull/101 + + +## [v0.5.0] - 2018-10-26 + +### Closed issues +- Scan depth as parameter [#45] +- phpcs: Exit Code: 127 (Command not found) on every Composer command [#48] +- The composer plugin implementation seems to be breaking the composer lifecycle [#49] +- Installation error [#53] +- Broke composer commands when used with wp-cli/package-command [#59] +- Getting a new stable release [#60] +- Support PHP CodeSniffer standards in packages installed outside of the vendor directory [#63] + +### Added +- Adds the ability to set the max depth from the composer.json file by [@Potherca] in [#46] + +### Changed +- Build/PHPCS: update PHPCompatibility repo name by [@jrfnl] in [#54] +- README: remove VersionEye badge by [@jrfnl] in [#55] +- README: replace maintenance badge by [@jrfnl] in [#56] +- Execute phpcs and security-checker from vendor/bin by [@gapple] in [#52] +- PHPCS: various minor tweaks by [@jrfnl] in [#57] +- Travis: various tweaks by [@jrfnl] in [#58] +- Use PHPCompatibility 9.0.0 by [@jrfnl] in [#61] +- Build/Travis: test builds against PHP 7.3 by [@jrfnl] in [#62] +- Updates copyright year by [@frenck] in [#67] +- Enforces PSR12 by [@frenck] in [#66] +- Updates contact information by [@frenck] in [#68] +- Updates README, spelling/grammar, removed Working section by [@frenck] in [#69] +- Replaces ProcessBuilder by ProcessExecutor by [@frenck] in [#70] +- Refactors relative path logic by [@frenck] in [#71] +- Removes suggested packages by [@frenck] in [#72] +- Ensures absolute paths during detection phase by [@frenck] in [#73] +- Trivial code cleanup by [@frenck] in [#74] +- Fixes duplicate declaration of cwd by [@frenck] in [#75] +- Removes HHVM from TravisCI by [@frenck] in [#76] +- Adds PHP_CodeSniffer version constraints by [@frenck] in [#77] + +### Fixed +- [#49]: Move loadInstalledPaths from init to onDependenciesChangedEvent by [@gapple] in [#51] + +[#45]: https://github.com/PHPCSStandards/composer-installer/issues/45 +[#46]: https://github.com/PHPCSStandards/composer-installer/pull/46 +[#48]: https://github.com/PHPCSStandards/composer-installer/issues/48 +[#49]: https://github.com/PHPCSStandards/composer-installer/issues/49 +[#51]: https://github.com/PHPCSStandards/composer-installer/pull/51 +[#52]: https://github.com/PHPCSStandards/composer-installer/pull/52 +[#53]: https://github.com/PHPCSStandards/composer-installer/issues/53 +[#54]: https://github.com/PHPCSStandards/composer-installer/pull/54 +[#55]: https://github.com/PHPCSStandards/composer-installer/pull/55 +[#56]: https://github.com/PHPCSStandards/composer-installer/pull/56 +[#57]: https://github.com/PHPCSStandards/composer-installer/pull/57 +[#58]: https://github.com/PHPCSStandards/composer-installer/pull/58 +[#59]: https://github.com/PHPCSStandards/composer-installer/issues/59 +[#60]: https://github.com/PHPCSStandards/composer-installer/issues/60 +[#61]: https://github.com/PHPCSStandards/composer-installer/pull/61 +[#62]: https://github.com/PHPCSStandards/composer-installer/pull/62 +[#63]: https://github.com/PHPCSStandards/composer-installer/issues/63 +[#66]: https://github.com/PHPCSStandards/composer-installer/pull/66 +[#67]: https://github.com/PHPCSStandards/composer-installer/pull/67 +[#68]: https://github.com/PHPCSStandards/composer-installer/pull/68 +[#69]: https://github.com/PHPCSStandards/composer-installer/pull/69 +[#70]: https://github.com/PHPCSStandards/composer-installer/pull/70 +[#71]: https://github.com/PHPCSStandards/composer-installer/pull/71 +[#72]: https://github.com/PHPCSStandards/composer-installer/pull/72 +[#73]: https://github.com/PHPCSStandards/composer-installer/pull/73 +[#74]: https://github.com/PHPCSStandards/composer-installer/pull/74 +[#75]: https://github.com/PHPCSStandards/composer-installer/pull/75 +[#76]: https://github.com/PHPCSStandards/composer-installer/pull/76 +[#77]: https://github.com/PHPCSStandards/composer-installer/pull/77 + + +## [v0.4.4] - 2017-12-06 + +### Closed issues +- PHP 7.2 compatibility issue [#43] + +### Changed +- Update Travis CI svg badge and link URLs [#42] ([@ntwb]) +- Add PHP 7.2 to Travis CI [#41] ([@ntwb]) +- Docs: Fix link to releases [#40] ([@GaryJones]) + +[#40]: https://github.com/PHPCSStandards/composer-installer/pull/40 +[#41]: https://github.com/PHPCSStandards/composer-installer/pull/41 +[#42]: https://github.com/PHPCSStandards/composer-installer/pull/42 +[#43]: https://github.com/PHPCSStandards/composer-installer/issues/43 + + +## [v0.4.3] - 2017-09-18 + +### Changed +- CS: Add PHP 5.3 compatibility [#39] ([@GaryJones]) +- Local PHPCS [#38] ([@GaryJones]) + +[#38]: https://github.com/PHPCSStandards/composer-installer/pull/38 +[#39]: https://github.com/PHPCSStandards/composer-installer/pull/39 + + +## [v0.4.2] - 2017-08-16 + +### Changed +- Docs: Rename example script [#35] ([@GaryJones]) +- Update README.md [#36] ([@jrfnl]) +- Documentation update. [#37] ([@frenck]) + +[#35]: https://github.com/PHPCSStandards/composer-installer/pull/35 +[#36]: https://github.com/PHPCSStandards/composer-installer/pull/36 +[#37]: https://github.com/PHPCSStandards/composer-installer/pull/37 + + +## [v0.4.1] - 2017-08-01 + +### Closed issues +- Incorrect relative paths for WPCS [#33] + +### Fixed +- [#33]: Changes the way the installed_paths are set. [#34] ([@frenck]) + +[#33]: https://github.com/PHPCSStandards/composer-installer/issues/33 +[#34]: https://github.com/PHPCSStandards/composer-installer/pull/34 + + +## [v0.4.0] - 2017-05-11 + +### Closed issues +- Add support for code standards in root of repository for PHP_CodeSniffer 3.x [#26] +- Config codings styles in composer.json from project [#23] +- Check the root package for sniffs to install [#20] +- Document the ability to execute the main plugin functionality directly [#18] +- Add a CHANGELOG.md [#17] +- Install sniffs with relative paths in CodeSniffer.conf [#14] + +### Added +- Support for coding standard in the root repository for PHP_CodeSniffer v3.x [#30] ([@frenck]) +- Added support for having coding standards in the root package [#25] ([@frenck]) + +### Changed +- Local projects uses relative paths to their coding standards [#28] ([@frenck]) +- Docs: Updated README. [#31] ([@frenck]) +- Docs: Adds reference to calling the script directly in the README. [#29] ([@Potherca]) +- Adds Travis-CI configuration file. [#27] ([@Potherca]) + + +[#14]: https://github.com/PHPCSStandards/composer-installer/issues/14 +[#17]: https://github.com/PHPCSStandards/composer-installer/issues/17 +[#18]: https://github.com/PHPCSStandards/composer-installer/issues/18 +[#20]: https://github.com/PHPCSStandards/composer-installer/issues/20 +[#23]: https://github.com/PHPCSStandards/composer-installer/issues/23 +[#25]: https://github.com/PHPCSStandards/composer-installer/pull/25 +[#26]: https://github.com/PHPCSStandards/composer-installer/issues/26 +[#27]: https://github.com/PHPCSStandards/composer-installer/pull/27 +[#28]: https://github.com/PHPCSStandards/composer-installer/pull/28 +[#29]: https://github.com/PHPCSStandards/composer-installer/pull/29 +[#31]: https://github.com/PHPCSStandards/composer-installer/pull/31 + + +## [v0.3.2] - 2017-03-29 + +### Closed issues +- Coding Standard tries itself to install with installPath when it's the root package [#19] + +### Changed +- Improvements to the documentation [#22] ([@Potherca]) +- Added instanceof check to prevent root package from being installed [#21] ([@bastianschwarz]) + +### Fixed +- [#13]: Incorrect coding standards search depth [#15] ([@frenck]) + +[#19]: https://github.com/PHPCSStandards/composer-installer/issues/19 +[#21]: https://github.com/PHPCSStandards/composer-installer/pull/21 +[#22]: https://github.com/PHPCSStandards/composer-installer/pull/22 + + +## [v0.3.1] - 2017-02-17 + +### Closed issues +- Plugin not working correctly when sniffs install depth is equal to "1" [#13] +- Create new stable release version to support wider use [#11] + +### Fixed +- [#13]: Incorrect coding standards search depth [#15] ([@frenck]) + +[#11]: https://github.com/PHPCSStandards/composer-installer/issues/11 +[#13]: https://github.com/PHPCSStandards/composer-installer/issues/13 +[#15]: https://github.com/PHPCSStandards/composer-installer/pull/15 + + +## [v0.3.0] - 2017-02-15 + +### Implemented enhancements +- Install Plugin provides no feedback [#7] +- Installing coding standards when executing Composer with --no-scripts [#4] +- Github contribution templates [#10] ([@christopher-hopper]) +- Show config actions and a result as Console output [#8] ([@christopher-hopper]) +- Adds static function to call the Plugin::onDependenciesChangedEvent() method [#5] ([@Potherca]) + +### Added +- Support existing standards packages with subfolders [#6] ([@christopher-hopper]) + +### Changed +- Improved documentation [#12] ([@frenck]) +- Removal of lgtm.co [#3] ([@frenck]) + +[#3]: https://github.com/PHPCSStandards/composer-installer/pull/3 +[#4]: https://github.com/PHPCSStandards/composer-installer/issues/4 +[#5]: https://github.com/PHPCSStandards/composer-installer/pull/5 +[#6]: https://github.com/PHPCSStandards/composer-installer/pull/6 +[#7]: https://github.com/PHPCSStandards/composer-installer/issues/7 +[#8]: https://github.com/PHPCSStandards/composer-installer/pull/8 +[#10]: https://github.com/PHPCSStandards/composer-installer/pull/10 +[#12]: https://github.com/PHPCSStandards/composer-installer/pull/12 + + +## [v0.2.1] - 2016-11-01 + +Fixes an issue with having this plugin installed globally within composer, but using your global composer installation on a local repository without PHP_CodeSniffer installed. + +### Fixed +- Bugfix: Plugin fails when PHP_CodeSniffer is not installed [#2] ([@frenck]) + +[#2]: https://github.com/PHPCSStandards/composer-installer/pull/2 + + +## [v0.2.0] - 2016-11-01 + +For this version on, this installer no longer messes with the installation paths of composer libraries, but instead, it configures PHP_CodeSniffer to look into other directories for coding standards. + +### Changed +- PHPCS Configuration management [#1] ([@frenck]) + +[#1]: https://github.com/PHPCSStandards/composer-installer/pull/1 + + +## [v0.1.1] - 2016-10-24 + +### Changed +- Standard name mapping improvements + + +## v0.1.0 - 2016-10-23 + +First useable release. + +[v1.2.0]: https://github.com/PHPCSStandards/composer-installer/compare/v1.1.2...v1.2.0 +[v1.1.2]: https://github.com/PHPCSStandards/composer-installer/compare/v1.1.1...v1.1.2 +[v1.1.1]: https://github.com/PHPCSStandards/composer-installer/compare/v1.1.0...v1.1.1 +[v1.1.0]: https://github.com/PHPCSStandards/composer-installer/compare/v1.0.0...v1.1.0 +[v1.0.0]: https://github.com/PHPCSStandards/composer-installer/compare/v0.7.2...v1.0.0 +[v0.7.2]: https://github.com/PHPCSStandards/composer-installer/compare/v0.7.1...v0.7.2 +[v0.7.1]: https://github.com/PHPCSStandards/composer-installer/compare/v0.7.0...v0.7.1 +[v0.7.0]: https://github.com/PHPCSStandards/composer-installer/compare/v0.6.2...v0.7.0 +[v0.6.2]: https://github.com/PHPCSStandards/composer-installer/compare/v0.6.1...v0.6.2 +[v0.6.1]: https://github.com/PHPCSStandards/composer-installer/compare/v0.6.0...v0.6.1 +[v0.6.0]: https://github.com/PHPCSStandards/composer-installer/compare/v0.5.0...v0.6.0 +[v0.5.0]: https://github.com/PHPCSStandards/composer-installer/compare/v0.4.4...v0.5.0 +[v0.4.4]: https://github.com/PHPCSStandards/composer-installer/compare/v0.4.3...v0.4.4 +[v0.4.3]: https://github.com/PHPCSStandards/composer-installer/compare/v0.4.2...v0.4.3 +[v0.4.2]: https://github.com/PHPCSStandards/composer-installer/compare/v0.4.1...v0.4.2 +[v0.4.1]: https://github.com/PHPCSStandards/composer-installer/compare/v0.4.0...v0.4.1 +[v0.4.0]: https://github.com/PHPCSStandards/composer-installer/compare/v0.3.2...v0.4.0 +[v0.3.2]: https://github.com/PHPCSStandards/composer-installer/compare/v0.3.1...v0.3.2 +[v0.3.1]: https://github.com/PHPCSStandards/composer-installer/compare/v0.3.0...v0.3.1 +[v0.3.0]: https://github.com/PHPCSStandards/composer-installer/compare/v0.2.1...v0.3.0 +[v0.2.1]: https://github.com/PHPCSStandards/composer-installer/compare/v0.2.0...v0.2.1 +[v0.2.0]: https://github.com/PHPCSStandards/composer-installer/compare/v0.1.1...v0.2.0 +[v0.1.1]: https://github.com/PHPCSStandards/composer-installer/compare/v0.1.0...v0.1.1 + +[PHP_CodeSniffer]: https://github.com/PHPCSStandards/PHP_CodeSniffer + +[@bastianschwarz]: https://github.com/bastianschwarz +[@BrianHenryIE]: https://github.com/BrianHenryIE +[@christopher-hopper]: https://github.com/christopher-hopper +[@fredden]: https://github.com/fredden +[@frenck]: https://github.com/frenck +[@gapple]: https://github.com/gapple +[@GaryJones]: https://github.com/GaryJones +[@GrahamCampbell]: https://github.com/GrahamCampbell +[@jrfnl]: https://github.com/jrfnl +[@kevinfodness]: https://github.com/kevinfodness +[@mjrider]: https://github.com/mjrider +[@ntwb]: https://github.com/ntwb +[@paras-malhotra]: https://github.com/paras-malhotra +[@Potherca]: https://github.com/Potherca +[@Seldaek]: https://github.com/Seldaek +[@SplotyCode]: https://github.com/SplotyCode +[@TravisCarden]: https://github.com/TravisCarden diff --git a/vendor/dealerdirect/phpcodesniffer-composer-installer/LICENSE.md b/vendor/dealerdirect/phpcodesniffer-composer-installer/LICENSE.md new file mode 100644 index 0000000..9bc8806 --- /dev/null +++ b/vendor/dealerdirect/phpcodesniffer-composer-installer/LICENSE.md @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2016-2022 Dealerdirect B.V. and contributors +Copyright (c) 2022 PHPCSStandards and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/dealerdirect/phpcodesniffer-composer-installer/README.md b/vendor/dealerdirect/phpcodesniffer-composer-installer/README.md new file mode 100644 index 0000000..fb6851a --- /dev/null +++ b/vendor/dealerdirect/phpcodesniffer-composer-installer/README.md @@ -0,0 +1,278 @@ +# PHP_CodeSniffer Standards Composer Installer Plugin + +![Last Commit][last-updated-shield] +![Awesome][awesome-shield] +[![License][license-shield]](LICENSE.md) + +[![Tests][ghactionstest-shield]][ghactions] +[![Latest Version on Packagist][packagist-version-shield]][packagist-version] +[![Packagist][packagist-shield]][packagist] + +[![Contributor Covenant][code-of-conduct-shield]][code-of-conduct] + +This composer installer plugin makes installation of [PHP_CodeSniffer][codesniffer] coding standards (rulesets) straight-forward. + +No more symbolic linking of directories, checking out repositories on specific locations or manually changing the `phpcs` configuration. + +## Usage + +Installation can be done with [Composer][composer], by requiring this package as a development dependency: + +```bash +composer require --dev dealerdirect/phpcodesniffer-composer-installer:"^1.0" +``` + +Since Composer 2.2, Composer will [ask for your permission](https://blog.packagist.com/composer-2-2/#more-secure-plugin-execution) to allow this plugin to execute code. For this plugin to be functional, permission needs to be granted. + +When permission has been granted, the following snippet will automatically be added to your `composer.json` file by Composer: +```json +{ + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + } +} +``` + +You can safely add the permission flag (to avoid Composer needing to ask), by running: +```bash +composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true +``` + +That's it. + +### Compatibility + +This plugin is compatible with: + +- PHP **5.4+**, **7.x**, and **8.x** (Support for PHP v8 is available since [`v0.7.0`][v0.7]) +- [Composer][composer] **2.2+** (Support for Composer v2 is available since [`v0.7.0`][v0.7]; support for Composer < 2.2 was dropped in [`v1.1.0`][v1.1]) +- [PHP_CodeSniffer][codesniffer] **3.x** and **4.x**(Support for PHP_CodeSniffer v4 is available since [`v0.7.0`][v0.7], support for PHP_CodeSniffer v2 was dropped in [`v1.2.0`][v1.2]) + +### How it works + +Basically, this plugin executes the following steps: + +- This plugin searches for [`phpcodesniffer-standard` packages][] in all of your currently installed Composer packages. +- Matching packages and the project itself are scanned for PHP_CodeSniffer rulesets. +- The plugin will call PHP_CodeSniffer and configure the `installed_paths` option. + +### Example project + +The following is an example Composer project and has included +multiple `phpcodesniffer-standard` packages. + +```json +{ + "name": "example/project", + "description": "Just an example project", + "type": "project", + "require": {}, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "*", + "phpcompatibility/php-compatibility": "*", + "wp-coding-standards/wpcs": "*" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + } +} +``` + +After running `composer install` PHP_CodeSniffer just works: + +```bash +$ ./vendor/bin/phpcs -i +The installed coding standards are PEAR, PSR1, PSR2, PSR12, Squiz, Zend, PHPCompatibility, Modernize, +NormalizedArrays, Universal, PHPCSUtils, WordPress, WordPress-Core, WordPress-Docs and WordPress-Extra +``` + +### Calling the plugin directly + +In some circumstances, it is desirable to call this plugin's functionality +directly. For instance, during development or in [CI][definition-ci] environments. + +As the plugin requires Composer to work, direct calls need to be wired through a +project's `composer.json`. + +This is done by adding a call to the `Plugin::run` function in the `script` +section of the `composer.json`: + +```json +{ + "scripts": { + "install-codestandards": [ + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run" + ] + } +} +``` + +The command can then be called using `composer run-script install-codestandards` or +referenced from other script configurations, as follows: + +```json +{ + "scripts": { + "install-codestandards": [ + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run" + ], + "post-install-cmd": [ + "@install-codestandards" + ] + } +} +``` + +For more details about Composer scripts, please refer to [the section on scripts +in the Composer manual][composer-manual-scripts]. + +### Changing the Coding Standards search depth + +By default, this plugin searches up for Coding Standards up to three directories +deep. In most cases, this should be sufficient. However, this plugin allows +you to customize the search depth setting if needed. + +```json +{ + "extra": { + "phpcodesniffer-search-depth": 5 + } +} +``` + +### Caveats + +When this plugin is installed globally, composer will load the _global_ plugin rather +than the one from the local repository. Despite [this behavior being documented +in the composer manual][using-composer-plugins], it could potentially confuse +as another version of the plugin could be run and not the one specified by the project. + +## Developing Coding Standards + +Coding standard can be developed normally, as documented by [PHP_CodeSniffer][codesniffer], in the [Coding Standard Tutorial][tutorial]. + +Create a composer package of your coding standard by adding a `composer.json` file. + +```json +{ + "name" : "acme/phpcodesniffer-our-standards", + "description" : "Package contains all coding standards of the Acme company", + "require" : { + "php" : ">=5.4.0", + "squizlabs/php_codesniffer" : "^3.13" + }, + "type" : "phpcodesniffer-standard" +} +``` + +Requirements: +* The repository may contain one or more standards. +* Each standard can have a separate directory no deeper than 3 levels from the repository root. +* The package `type` must be `phpcodesniffer-standard`. Without this, the plugin will not trigger. + +### Requiring the plugin from within your coding standard + +If your coding standard itself depends on additional external PHPCS standards, this plugin can +make life easier on your end-users by taking care of the installation of all standards - yours +and your dependencies - for them. + +This can help reduce the number of support questions about setting the `installed_paths`, as well +as simplify your standard's installation instructions. + +For this to work, make sure your external standard adds this plugin to the `composer.json` config +via `require`, **not** `require-dev`. + +> :warning: Your end-user may already `require-dev` this plugin and/or other external standards used +> by your end-users may require this plugin as well. +> +> To prevent your end-users getting into "_dependency hell_", make sure to make the version requirement +> for this plugin flexible. +> +> Remember that [Composer treats unstable minors as majors][composer-manual-caret] and will not be able to resolve +> one config requiring this plugin at version `^0.7`, while another requires it at version `^1.0`. +> Either allow multiple minors or use `*` as the version requirement. +> +> Some examples of flexible requirements which can be used: +> ```bash +> composer require dealerdirect/phpcodesniffer-composer-installer:"*" +> composer require dealerdirect/phpcodesniffer-composer-installer:"^0.4.1 || ^0.5 || ^0.6 || ^0.7 || ^1.0" +> ``` + +## Contributing + +This is an active open-source project. We are always open to people who want to +use the code or contribute to it. + +We've set up a separate document for our [contribution guidelines][contributing-guidelines]. + +Thank you for being involved! :heart_eyes: + +## Authors & contributors + +The original idea and setup of this repository is by [Franck Nijhof][frenck], employee @ Dealerdirect. + +For a full list of all authors and/or contributors, check [the contributors page][contributors]. + +## Funding + +This project is included in the projects supported via the [PHP_CodeSniffer Open Collective][phpcs-open-collective]. + +If you use this plugin, financial contributions to the Open Collective are encouraged and appreciated. + +## License + +The MIT License (MIT) + +Copyright (c) 2016-2022 Dealerdirect B.V. and contributors +Copyright (c) 2022- PHPCSStandards and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +[awesome-shield]: https://img.shields.io/badge/awesome%3F-yes-brightgreen.svg +[code-of-conduct-shield]: https://img.shields.io/badge/Contributor%20Covenant-v2.0-ff69b4.svg +[code-of-conduct]: CODE_OF_CONDUCT.md +[codesniffer]: https://github.com/PHPCSStandards/PHP_CodeSniffer +[composer-manual-scripts]: https://getcomposer.org/doc/articles/scripts.md +[composer-manual-caret]: https://getcomposer.org/doc/articles/versions.md#caret-version-range- +[composer]: https://getcomposer.org/ +[contributing-guidelines]: CONTRIBUTING.md +[contributors]: https://github.com/PHPCSStandards/composer-installer/graphs/contributors +[definition-ci]: https://en.wikipedia.org/wiki/Continuous_integration +[frenck]: https://github.com/frenck +[last-updated-shield]: https://img.shields.io/github/last-commit/PHPCSStandards/composer-installer.svg +[license-shield]: https://img.shields.io/github/license/PHPCSStandards/composer-installer.svg +[packagist-shield]: https://img.shields.io/packagist/dt/dealerdirect/phpcodesniffer-composer-installer.svg +[packagist-version-shield]: https://img.shields.io/packagist/v/dealerdirect/phpcodesniffer-composer-installer.svg +[packagist-version]: https://packagist.org/packages/dealerdirect/phpcodesniffer-composer-installer +[packagist]: https://packagist.org/packages/dealerdirect/phpcodesniffer-composer-installer +[`phpcodesniffer-standard` packages]: https://packagist.org/explore/?type=phpcodesniffer-standard +[phpcs-open-collective]: https://opencollective.com/php_codesniffer +[scrutinizer-shield]: https://img.shields.io/scrutinizer/g/dealerdirect/phpcodesniffer-composer-installer.svg +[scrutinizer]: https://scrutinizer-ci.com/g/dealerdirect/phpcodesniffer-composer-installer/ +[ghactionstest-shield]: https://github.com/PHPCSStandards/composer-installer/actions/workflows/integrationtest.yml/badge.svg +[ghactions]: https://github.com/PHPCSStandards/composer-installer/actions/workflows/integrationtest.yml +[tutorial]: https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Coding-Standard-Tutorial +[using-composer-plugins]: https://getcomposer.org/doc/articles/plugins.md#using-plugins +[v0.7]: https://github.com/PHPCSStandards/composer-installer/releases/tag/v0.7.0 +[v1.1]: https://github.com/PHPCSStandards/composer-installer/releases/tag/v1.1.0 +[v1.2]: https://github.com/PHPCSStandards/composer-installer/releases/tag/v1.2.0 diff --git a/vendor/dealerdirect/phpcodesniffer-composer-installer/composer.json b/vendor/dealerdirect/phpcodesniffer-composer-installer/composer.json new file mode 100644 index 0000000..ba3fbff --- /dev/null +++ b/vendor/dealerdirect/phpcodesniffer-composer-installer/composer.json @@ -0,0 +1,74 @@ +{ + "name": "dealerdirect/phpcodesniffer-composer-installer", + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "type": "composer-plugin", + "keywords": [ + "composer", "installer", "plugin", + "phpcs", "phpcbf", "codesniffer", "phpcodesniffer", "php_codesniffer", + "standard", "standards", "style guide", "stylecheck", + "qa", "quality", "code quality", "tests" + ], + "license": "MIT", + "authors": [ + { + "name": "Franck Nijhof", + "email": "opensource@frenck.dev", + "homepage": "https://frenck.dev", + "role": "Open source developer" + }, + { + "name" : "Contributors", + "homepage" : "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" + } + ], + "support": { + "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "source": "https://github.com/PHPCSStandards/composer-installer", + "security": "https://github.com/PHPCSStandards/composer-installer/security/policy" + }, + "require": { + "php": ">=5.4", + "composer-plugin-api": "^2.2", + "squizlabs/php_codesniffer": "^3.1.0 || ^4.0" + }, + "require-dev": { + "ext-json": "*", + "ext-zip": "*", + "composer/composer": "^2.2", + "phpcompatibility/php-compatibility": "^9.0 || ^10.0.0@dev", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "yoast/phpunit-polyfills": "^1.0" + }, + "minimum-stability": "dev", + "prefer-stable": true, + "autoload": { + "psr-4": { + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Tests\\": "tests/" + } + }, + "config": { + "lock": false + }, + "extra": { + "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "scripts": { + "install-codestandards": [ + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run" + ], + "lint": [ + "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude .git" + ], + "test": [ + "@php ./vendor/phpunit/phpunit/phpunit --no-coverage" + ], + "coverage": [ + "@php ./vendor/phpunit/phpunit/phpunit" + ] + } +} diff --git a/vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php b/vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php new file mode 100644 index 0000000..03f9b54 --- /dev/null +++ b/vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php @@ -0,0 +1,635 @@ + + */ +class Plugin implements PluginInterface, EventSubscriberInterface +{ + const KEY_MAX_DEPTH = 'phpcodesniffer-search-depth'; + + const MESSAGE_ERROR_WRONG_MAX_DEPTH = + 'The value of "%s" (in the composer.json "extra".section) must be an integer larger than %d, %s given.'; + + const MESSAGE_NOT_INSTALLED = 'PHPCodeSniffer is not installed'; + const MESSAGE_NOTHING_TO_INSTALL = 'No PHPCS standards to install or update'; + const MESSAGE_PLUGIN_UNINSTALLED = 'PHPCodeSniffer Composer Installer is uninstalled'; + const MESSAGE_RUNNING_INSTALLER = 'Running PHPCodeSniffer Composer Installer'; + + const PACKAGE_NAME = 'squizlabs/php_codesniffer'; + const PACKAGE_TYPE = 'phpcodesniffer-standard'; + + const PHPCS_CONFIG_REGEX = '`%s:[^\r\n]+`'; + const PHPCS_CONFIG_KEY = 'installed_paths'; + + const PLUGIN_NAME = 'dealerdirect/phpcodesniffer-composer-installer'; + + /** + * @var Composer + */ + private $composer; + + /** + * @var string + */ + private $cwd; + + /** + * @var Filesystem + */ + private $filesystem; + + /** + * @var array + */ + private $installedPaths; + + /** + * @var IOInterface + */ + private $io; + + /** + * @var ProcessExecutor + */ + private $processExecutor; + + /** + * Triggers the plugin's main functionality. + * + * Makes it possible to run the plugin as a custom command. + * + * @param Event $event + * + * @throws \InvalidArgumentException + * @throws \RuntimeException + * @throws LogicException + * @throws ProcessFailedException + * @throws RuntimeException + */ + public static function run(Event $event) + { + $io = $event->getIO(); + $composer = $event->getComposer(); + + $instance = new static(); + + $instance->io = $io; + $instance->composer = $composer; + $instance->init(); + $instance->onDependenciesChangedEvent(); + } + + /** + * {@inheritDoc} + * + * @throws \RuntimeException + * @throws LogicException + * @throws ProcessFailedException + * @throws RuntimeException + */ + public function activate(Composer $composer, IOInterface $io) + { + $this->composer = $composer; + $this->io = $io; + + $this->init(); + } + + /** + * {@inheritDoc} + */ + public function deactivate(Composer $composer, IOInterface $io) + { + } + + /** + * {@inheritDoc} + */ + public function uninstall(Composer $composer, IOInterface $io) + { + } + + /** + * Prepares the plugin so it's main functionality can be run. + * + * @throws \RuntimeException + * @throws LogicException + * @throws ProcessFailedException + * @throws RuntimeException + */ + private function init() + { + $this->cwd = getcwd(); + $this->installedPaths = array(); + + $this->processExecutor = new ProcessExecutor($this->io); + $this->filesystem = new Filesystem($this->processExecutor); + } + + /** + * {@inheritDoc} + */ + public static function getSubscribedEvents() + { + return array( + ScriptEvents::POST_INSTALL_CMD => array( + array('onDependenciesChangedEvent', 0), + ), + ScriptEvents::POST_UPDATE_CMD => array( + array('onDependenciesChangedEvent', 0), + ), + ); + } + + /** + * Entry point for post install and post update events. + * + * @throws \InvalidArgumentException + * @throws LogicException + * @throws ProcessFailedException + * @throws RuntimeException + */ + public function onDependenciesChangedEvent() + { + $io = $this->io; + $isVerbose = $io->isVerbose(); + $exitCode = 0; + + if ($isVerbose) { + $io->write(sprintf('%s', self::MESSAGE_RUNNING_INSTALLER)); + } + + if ($this->isPHPCodeSnifferInstalled() === true) { + $this->loadInstalledPaths(); + $installPathCleaned = $this->cleanInstalledPaths(); + $installPathUpdated = $this->updateInstalledPaths(); + + if ($installPathCleaned === true || $installPathUpdated === true) { + $exitCode = $this->saveInstalledPaths(); + } elseif ($isVerbose) { + $io->write(sprintf('%s', self::MESSAGE_NOTHING_TO_INSTALL)); + } + } else { + $pluginPackage = $this + ->composer + ->getRepositoryManager() + ->getLocalRepository() + ->findPackages(self::PLUGIN_NAME) + ; + + $isPluginUninstalled = count($pluginPackage) === 0; + + if ($isPluginUninstalled) { + if ($isVerbose) { + $io->write(sprintf('%s', self::MESSAGE_PLUGIN_UNINSTALLED)); + } + } else { + $exitCode = 1; + if ($isVerbose) { + $io->write(sprintf('%s', self::MESSAGE_NOT_INSTALLED)); + } + } + } + + return $exitCode; + } + + /** + * Load all paths from PHP_CodeSniffer into an array. + * + * @throws LogicException + * @throws ProcessFailedException + * @throws RuntimeException + */ + private function loadInstalledPaths() + { + if ($this->isPHPCodeSnifferInstalled() === true) { + $this->processExecutor->execute( + $this->getPhpcsCommand() . ' --config-show', + $output, + $this->getPHPCodeSnifferInstallPath() + ); + + $regex = sprintf(self::PHPCS_CONFIG_REGEX, self::PHPCS_CONFIG_KEY); + if (preg_match($regex, $output, $match) === 1) { + $phpcsInstalledPaths = str_replace(self::PHPCS_CONFIG_KEY . ': ', '', $match[0]); + $phpcsInstalledPaths = trim($phpcsInstalledPaths); + + if ($phpcsInstalledPaths !== '') { + $this->installedPaths = explode(',', $phpcsInstalledPaths); + } + } + } + } + + /** + * Save all coding standard paths back into PHP_CodeSniffer + * + * @throws LogicException + * @throws ProcessFailedException + * @throws RuntimeException + * + * @return int Exit code. 0 for success, 1 or higher for failure. + */ + private function saveInstalledPaths() + { + // Check if we found installed paths to set. + if (count($this->installedPaths) !== 0) { + sort($this->installedPaths); + $paths = implode(',', $this->installedPaths); + $arguments = array('--config-set', self::PHPCS_CONFIG_KEY, $paths); + $configMessage = sprintf( + 'PHP CodeSniffer Config %s set to %s', + self::PHPCS_CONFIG_KEY, + $paths + ); + } else { + // Delete the installed paths if none were found. + $arguments = array('--config-delete', self::PHPCS_CONFIG_KEY); + $configMessage = sprintf( + 'PHP CodeSniffer Config %s delete', + self::PHPCS_CONFIG_KEY + ); + } + + // Prepare message in case of failure + $failMessage = sprintf( + 'Failed to set PHP CodeSniffer %s Config', + self::PHPCS_CONFIG_KEY + ); + + // Okay, lets rock! + $command = vsprintf( + '%s %s', + array( + 'phpcs command' => $this->getPhpcsCommand(), + 'arguments' => implode(' ', $arguments), + ) + ); + + $exitCode = $this->processExecutor->execute($command, $configResult, $this->getPHPCodeSnifferInstallPath()); + if ($exitCode === 0) { + $exitCode = $this->verifySaveSuccess(); + } + + if ($exitCode === 0) { + $this->io->write($configMessage); + } else { + $this->io->write($failMessage); + } + + if ($this->io->isVerbose() && !empty($configResult)) { + $this->io->write(sprintf('%s', $configResult)); + } + + return $exitCode; + } + + /** + * Verify that the paths which were expected to be saved, have been. + * + * @return int Exit code. 0 for success, 1 for failure. + */ + private function verifySaveSuccess() + { + $exitCode = 1; + $expectedPaths = $this->installedPaths; + + // Request the currently set installed paths after the save. + $this->loadInstalledPaths(); + + $registeredPaths = array_intersect($this->installedPaths, $expectedPaths); + $registeredCount = count($registeredPaths); + $expectedCount = count($expectedPaths); + + if ($expectedCount === $registeredCount) { + $exitCode = 0; + } + + if ($exitCode === 1 && $this->io->isVerbose()) { + $verificationMessage = sprintf( + "Paths to external standards found by the plugin: %s\n" + . 'Actual paths registered with PHPCS: %s', + implode(', ', $expectedPaths), + implode(', ', $this->installedPaths) + ); + $this->io->write($verificationMessage); + } + + return $exitCode; + } + + /** + * Get the command to call PHPCS. + */ + protected function getPhpcsCommand() + { + return vsprintf( + '%s %s', + array( + 'php executable' => $this->getPhpExecCommand(), + 'phpcs executable' => './bin/phpcs', + ) + ); + } + + /** + * Get the path to the current PHP version being used. + * + * Duplicate of the same in the EventDispatcher class in Composer itself. + */ + protected function getPhpExecCommand() + { + $finder = new PhpExecutableFinder(); + + $phpPath = $finder->find(false); + + if ($phpPath === false) { + throw new \RuntimeException('Failed to locate PHP binary to execute ' . $phpPath); + } + + $phpArgs = $finder->findArguments(); + $phpArgs = $phpArgs + ? ' ' . implode(' ', $phpArgs) + : '' + ; + + $command = ProcessExecutor::escape($phpPath) . + $phpArgs . + ' -d allow_url_fopen=' . ProcessExecutor::escape(ini_get('allow_url_fopen')) . + ' -d disable_functions=' . ProcessExecutor::escape(ini_get('disable_functions')) . + ' -d memory_limit=' . ProcessExecutor::escape(ini_get('memory_limit')) + ; + + return $command; + } + + /** + * Iterate trough all known paths and check if they are still valid. + * + * If path does not exists, is not an directory or isn't readable, the path + * is removed from the list. + * + * @return bool True if changes where made, false otherwise + */ + private function cleanInstalledPaths() + { + $changes = false; + foreach ($this->installedPaths as $key => $path) { + // This might be a relative path as well + $alternativePath = realpath($this->getPHPCodeSnifferInstallPath() . \DIRECTORY_SEPARATOR . $path); + + if ( + (is_dir($path) === false || is_readable($path) === false) && + ( + $alternativePath === false || + is_dir($alternativePath) === false || + is_readable($alternativePath) === false + ) + ) { + unset($this->installedPaths[$key]); + $changes = true; + } + } + return $changes; + } + + /** + * Check all installed packages (including the root package) against + * the installed paths from PHP_CodeSniffer and add the missing ones. + * + * @return bool True if changes where made, false otherwise + * + * @throws \InvalidArgumentException + * @throws \RuntimeException + */ + private function updateInstalledPaths() + { + $changes = false; + $searchPaths = array(); + + // Add root package only if it has the expected package type. + if ( + $this->composer->getPackage() instanceof RootPackageInterface + && $this->composer->getPackage()->getType() === self::PACKAGE_TYPE + ) { + $searchPaths[] = $this->cwd; + } + + $codingStandardPackages = $this->getPHPCodingStandardPackages(); + foreach ($codingStandardPackages as $package) { + $installPath = $this->composer->getInstallationManager()->getInstallPath($package); + if ($this->filesystem->isAbsolutePath($installPath) === false) { + $installPath = $this->filesystem->normalizePath( + $this->cwd . \DIRECTORY_SEPARATOR . $installPath + ); + } + $searchPaths[] = $installPath; + } + + // Nothing to do. + if ($searchPaths === array()) { + return false; + } + + $finder = new Finder(); + $finder->files() + ->depth('<= ' . $this->getMaxDepth()) + ->depth('>= ' . $this->getMinDepth()) + ->ignoreUnreadableDirs() + ->ignoreVCS(true) + ->in($searchPaths) + ->name('ruleset.xml'); + + // Process each found possible ruleset. + foreach ($finder as $ruleset) { + $standardsPath = $ruleset->getPath(); + + // Pick the directory above the directory containing the standard, unless this is the project root. + if ($standardsPath !== $this->cwd) { + $standardsPath = dirname($standardsPath); + } + + // Use relative paths for local project repositories. + if ($this->isRunningGlobally() === false) { + $standardsPath = $this->filesystem->findShortestPath( + $this->getPHPCodeSnifferInstallPath(), + $standardsPath, + true + ); + } + + // De-duplicate and add when directory is not configured. + if (in_array($standardsPath, $this->installedPaths, true) === false) { + $this->installedPaths[] = $standardsPath; + $changes = true; + } + } + + return $changes; + } + + /** + * Iterates through Composers' local repository looking for valid Coding + * Standard packages. + * + * @return array Composer packages containing coding standard(s) + */ + private function getPHPCodingStandardPackages() + { + $codingStandardPackages = array_filter( + $this->composer->getRepositoryManager()->getLocalRepository()->getPackages(), + function (PackageInterface $package) { + if ($package instanceof AliasPackage) { + return false; + } + return $package->getType() === Plugin::PACKAGE_TYPE; + } + ); + + return $codingStandardPackages; + } + + /** + * Searches for the installed PHP_CodeSniffer Composer package + * + * @param null|string|\Composer\Semver\Constraint\ConstraintInterface $versionConstraint to match against + * + * @return PackageInterface|null + */ + private function getPHPCodeSnifferPackage($versionConstraint = null) + { + $packages = $this + ->composer + ->getRepositoryManager() + ->getLocalRepository() + ->findPackages(self::PACKAGE_NAME, $versionConstraint); + + return array_shift($packages); + } + + /** + * Returns the path to the PHP_CodeSniffer package installation location + * + * {@internal Do NOT try to modernize via the Composer 2.2 API (`InstalledVersions::getInstallPath()`). + * Doing so doesn't play nice with other plugins. + * {@link https://github.com/PHPCSStandards/composer-installer/issues/239}} + * + * @return string + */ + private function getPHPCodeSnifferInstallPath() + { + return $this->composer->getInstallationManager()->getInstallPath($this->getPHPCodeSnifferPackage()); + } + + /** + * Simple check if PHP_CodeSniffer is installed. + * + * {@internal Do NOT try to modernize via the Composer 2.2 API (`InstalledVersions::isInstalled()`). + * Doing so doesn't play nice with integrations calling the Composer EventDispatcher programmatically. + * {@link https://github.com/PHPCSStandards/composer-installer/issues/247}} + * + * @param null|string|\Composer\Semver\Constraint\ConstraintInterface $versionConstraint to match against + * + * @return bool Whether PHP_CodeSniffer is installed + */ + private function isPHPCodeSnifferInstalled($versionConstraint = null) + { + return ($this->getPHPCodeSnifferPackage($versionConstraint) !== null); + } + + /** + * Test if composer is running "global" + * This check kinda dirty, but it is the "Composer Way" + * + * @return bool Whether Composer is running "globally" + * + * @throws \RuntimeException + */ + private function isRunningGlobally() + { + return ($this->composer->getConfig()->get('home') === $this->cwd); + } + + /** + * Determines the maximum search depth when searching for Coding Standards. + * + * @return int + * + * @throws \InvalidArgumentException + */ + private function getMaxDepth() + { + $maxDepth = 3; + + $extra = $this->composer->getPackage()->getExtra(); + + if (array_key_exists(self::KEY_MAX_DEPTH, $extra)) { + $maxDepth = $extra[self::KEY_MAX_DEPTH]; + $minDepth = $this->getMinDepth(); + + if ( + (string) (int) $maxDepth !== (string) $maxDepth /* Must be an integer or cleanly castable to one */ + || $maxDepth <= $minDepth /* Larger than the minimum */ + || is_float($maxDepth) === true /* Within the boundaries of integer */ + ) { + $message = vsprintf( + self::MESSAGE_ERROR_WRONG_MAX_DEPTH, + array( + 'key' => self::KEY_MAX_DEPTH, + 'min' => $minDepth, + 'given' => var_export($maxDepth, true), + ) + ); + + throw new \InvalidArgumentException($message); + } + } + + return (int) $maxDepth; + } + + /** + * Returns the minimal search depth for Coding Standard packages. + * + * Usually this is 0, unless PHP_CodeSniffer >= 3 is used. + * + * @return int + */ + private function getMinDepth() + { + if ($this->isPHPCodeSnifferInstalled('>= 3.0.0') !== true) { + return 1; + } + return 0; + } +} diff --git a/vendor/doctrine/instantiator/LICENSE b/vendor/doctrine/instantiator/LICENSE new file mode 100644 index 0000000..4d983d1 --- /dev/null +++ b/vendor/doctrine/instantiator/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 Doctrine Project + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/doctrine/instantiator/README.md b/vendor/doctrine/instantiator/README.md new file mode 100644 index 0000000..d4bfaec --- /dev/null +++ b/vendor/doctrine/instantiator/README.md @@ -0,0 +1,38 @@ +# Doctrine Instantiator + +This library provides a way of avoiding usage of constructors when instantiating PHP classes. + +[![Build Status](https://travis-ci.org/doctrine/instantiator.svg?branch=master)](https://travis-ci.org/doctrine/instantiator) +[![Code Coverage](https://codecov.io/gh/doctrine/instantiator/branch/master/graph/badge.svg)](https://codecov.io/gh/doctrine/instantiator/branch/master) +[![Dependency Status](https://www.versioneye.com/package/php--doctrine--instantiator/badge.svg)](https://www.versioneye.com/package/php--doctrine--instantiator) + +[![Latest Stable Version](https://poser.pugx.org/doctrine/instantiator/v/stable.png)](https://packagist.org/packages/doctrine/instantiator) +[![Latest Unstable Version](https://poser.pugx.org/doctrine/instantiator/v/unstable.png)](https://packagist.org/packages/doctrine/instantiator) + +## Installation + +The suggested installation method is via [composer](https://getcomposer.org/): + +```sh +composer require doctrine/instantiator +``` + +## Usage + +The instantiator is able to create new instances of any class without using the constructor or any API of the class +itself: + +```php +$instantiator = new \Doctrine\Instantiator\Instantiator(); + +$instance = $instantiator->instantiate(\My\ClassName\Here::class); +``` + +## Contributing + +Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out! + +## Credits + +This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which +has been donated to the doctrine organization, and which is now deprecated in favour of this package. diff --git a/vendor/doctrine/instantiator/composer.json b/vendor/doctrine/instantiator/composer.json new file mode 100644 index 0000000..2fc7724 --- /dev/null +++ b/vendor/doctrine/instantiator/composer.json @@ -0,0 +1,47 @@ +{ + "name": "doctrine/instantiator", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "type": "library", + "license": "MIT", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "instantiate", + "constructor" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "require": { + "php": "^8.4" + }, + "require-dev": { + "ext-phar": "*", + "ext-pdo": "*", + "doctrine/coding-standard": "^14", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^10.5.58" + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "autoload-dev": { + "psr-0": { + "DoctrineTest\\InstantiatorPerformance\\": "tests", + "DoctrineTest\\InstantiatorTest\\": "tests", + "DoctrineTest\\InstantiatorTestAsset\\": "tests" + } + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + } +} diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php new file mode 100644 index 0000000..1e59192 --- /dev/null +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php @@ -0,0 +1,14 @@ + $reflectionClass + * + * @template T of object + */ + public static function fromAbstractClass(ReflectionClass $reflectionClass): self + { + return new self(sprintf( + 'The provided class "%s" is abstract, and cannot be instantiated', + $reflectionClass->getName(), + )); + } + + public static function fromEnum(string $className): self + { + return new self(sprintf( + 'The provided class "%s" is an enum, and cannot be instantiated', + $className, + )); + } +} diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php new file mode 100644 index 0000000..4f70ded --- /dev/null +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php @@ -0,0 +1,61 @@ + $reflectionClass + * + * @template T of object + */ + public static function fromSerializationTriggeredException( + ReflectionClass $reflectionClass, + Exception $exception, + ): self { + return new self( + sprintf( + 'An exception was raised while trying to instantiate an instance of "%s" via un-serialization', + $reflectionClass->getName(), + ), + 0, + $exception, + ); + } + + /** + * @phpstan-param ReflectionClass $reflectionClass + * + * @template T of object + */ + public static function fromUncleanUnSerialization( + ReflectionClass $reflectionClass, + string $errorString, + int $errorCode, + string $errorFile, + int $errorLine, + ): self { + return new self( + sprintf( + 'Could not produce an instance of "%s" via un-serialization, since an error was triggered ' + . 'in file "%s" at line "%d"', + $reflectionClass->getName(), + $errorFile, + $errorLine, + ), + 0, + new Exception($errorString, $errorCode), + ); + } +} diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php new file mode 100644 index 0000000..0642d44 --- /dev/null +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php @@ -0,0 +1,253 @@ + + */ + private static array $cachedInstantiators = []; + + /** + * Array of objects that can directly be cloned, indexed by class name. + * + * @var object[] + */ + private static array $cachedCloneables = []; + + /** + * @phpstan-param class-string $className + * + * @phpstan-return T + * + * @throws ExceptionInterface + * + * @template T of object + */ + public function instantiate(string $className): object + { + if (isset(self::$cachedCloneables[$className])) { + /** @phpstan-var T */ + $cachedCloneable = self::$cachedCloneables[$className]; + + return clone $cachedCloneable; + } + + if (isset(self::$cachedInstantiators[$className])) { + $factory = self::$cachedInstantiators[$className]; + + return $factory(); + } + + return $this->buildAndCacheFromFactory($className); + } + + /** + * Builds the requested object and caches it in static properties for performance + * + * @phpstan-param class-string $className + * + * @phpstan-return T + * + * @template T of object + */ + private function buildAndCacheFromFactory(string $className): object + { + $factory = self::$cachedInstantiators[$className] = $this->buildFactory($className); + $instance = $factory(); + + if ($this->isSafeToClone(new ReflectionClass($instance))) { + self::$cachedCloneables[$className] = clone $instance; + } + + return $instance; + } + + /** + * Builds a callable capable of instantiating the given $className without + * invoking its constructor. + * + * @phpstan-param class-string $className + * + * @phpstan-return callable(): T + * + * @throws InvalidArgumentException + * @throws UnexpectedValueException + * @throws ReflectionException + * + * @template T of object + */ + private function buildFactory(string $className): callable + { + $reflectionClass = $this->getReflectionClass($className); + + if ($this->isInstantiableViaReflection($reflectionClass)) { + return [$reflectionClass, 'newInstanceWithoutConstructor']; + } + + $serializedString = sprintf( + '%s:%d:"%s":0:{}', + is_subclass_of($className, Serializable::class) ? self::SERIALIZATION_FORMAT_USE_UNSERIALIZER : self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER, + strlen($className), + $className, + ); + + $this->checkIfUnSerializationIsSupported($reflectionClass, $serializedString); + + return static fn () => unserialize($serializedString); + } + + /** + * @phpstan-param class-string $className + * + * @phpstan-return ReflectionClass + * + * @throws InvalidArgumentException + * @throws ReflectionException + * + * @template T of object + */ + private function getReflectionClass(string $className): ReflectionClass + { + if (! class_exists($className)) { + throw InvalidArgumentException::fromNonExistingClass($className); + } + + if (enum_exists($className, false)) { + throw InvalidArgumentException::fromEnum($className); + } + + $reflection = new ReflectionClass($className); + + if ($reflection->isAbstract()) { + throw InvalidArgumentException::fromAbstractClass($reflection); + } + + return $reflection; + } + + /** + * @phpstan-param ReflectionClass $reflectionClass + * + * @throws UnexpectedValueException + * + * @template T of object + */ + private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, string $serializedString): void + { + set_error_handler(static function (int $code, string $message, string $file, int $line) use ($reflectionClass, &$error): bool { + $error = UnexpectedValueException::fromUncleanUnSerialization( + $reflectionClass, + $message, + $code, + $file, + $line, + ); + + return true; + }); + + try { + $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString); + } finally { + restore_error_handler(); + } + + if ($error) { + throw $error; + } + } + + /** + * @phpstan-param ReflectionClass $reflectionClass + * + * @throws UnexpectedValueException + * + * @template T of object + */ + private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, string $serializedString): void + { + try { + unserialize($serializedString); + } catch (Exception $exception) { + throw UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $exception); + } + } + + /** + * @phpstan-param ReflectionClass $reflectionClass + * + * @template T of object + */ + private function isInstantiableViaReflection(ReflectionClass $reflectionClass): bool + { + return ! ($this->hasInternalAncestors($reflectionClass) && $reflectionClass->isFinal()); + } + + /** + * Verifies whether the given class is to be considered internal + * + * @phpstan-param ReflectionClass $reflectionClass + * + * @template T of object + */ + private function hasInternalAncestors(ReflectionClass $reflectionClass): bool + { + do { + if ($reflectionClass->isInternal()) { + return true; + } + + $reflectionClass = $reflectionClass->getParentClass(); + } while ($reflectionClass); + + return false; + } + + /** + * Checks if a class is cloneable + * + * Classes implementing `__clone` cannot be safely cloned, as that may cause side-effects. + * + * @phpstan-param ReflectionClass $reflectionClass + * + * @template T of object + */ + private function isSafeToClone(ReflectionClass $reflectionClass): bool + { + return $reflectionClass->isCloneable() + && ! $reflectionClass->hasMethod('__clone') + && ! $reflectionClass->isSubclassOf(ArrayIterator::class); + } +} diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php new file mode 100644 index 0000000..c6ebe35 --- /dev/null +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php @@ -0,0 +1,24 @@ + $className + * + * @phpstan-return T + * + * @throws ExceptionInterface + * + * @template T of object + */ + public function instantiate(string $className): object; +} diff --git a/vendor/hamcrest/hamcrest-php/.gitattributes b/vendor/hamcrest/hamcrest-php/.gitattributes new file mode 100644 index 0000000..bcf3af0 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/.gitattributes @@ -0,0 +1,6 @@ +/.coveralls.yml export-ignore +/.gush.yml export-ignore +/.travis.yml export-ignore +/.github export-ignore +/tests export-ignore + diff --git a/vendor/hamcrest/hamcrest-php/.gitignore b/vendor/hamcrest/hamcrest-php/.gitignore new file mode 100644 index 0000000..7611d84 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/.gitignore @@ -0,0 +1,3 @@ +composer.lock +tests/.phpunit.result.cache +vendor diff --git a/vendor/hamcrest/hamcrest-php/CHANGES.txt b/vendor/hamcrest/hamcrest-php/CHANGES.txt new file mode 100644 index 0000000..230e584 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/CHANGES.txt @@ -0,0 +1,181 @@ +== Version 2.1.1: Released Apr 30 2025 == + +* Fix implicitly nullable via default value null for PHP 8.4 (#85) + +== Version 2.1.0: Released Apr 29 2025 == + +* Dropped support for PHP <=7.3 + +== Version 2.0.1: Released Jul 09 2020 == + +* Added support for PHP 8 + + +== Version 2.0: Released Feb 26 2016 == + +* Removed automatic loading of global functions + + +== Version 1.1.0: Released Feb 2 2012 == + +Issues Fixed: 121, 138, 147 + +* Added non-empty matchers to complement the emptiness-matching forms. + + - nonEmptyString() + - nonEmptyArray() + - nonEmptyTraversable() + +* Added ability to pass variable arguments to several array-based matcher + factory methods so they work like allOf() et al. + + - anArray() + - arrayContainingInAnyOrder(), containsInAnyOrder() + - arrayContaining(), contains() + - stringContainsInOrder() + +* Matchers that accept an array of matchers now also accept variable arguments. + Any non-matcher arguments are wrapped by IsEqual. + +* Added noneOf() as a shortcut for not(anyOf()). + + +== Version 1.0.0: Released Jan 20 2012 == + +Issues Fixed: 119, 136, 139, 141, 148, 149, 172 + +* Moved hamcrest.php into Hamcrest folder and renamed to Hamcrest.php. + This is more in line with PEAR packaging standards. + +* Renamed callable() to callableValue() for compatibility with PHP 5.4. + +* Added Hamcrest_Text_StringContainsIgnoringCase to assert using stripos(). + + assertThat('fOObAr', containsStringIgnoringCase('oba')); + assertThat('fOObAr', containsString('oba')->ignoringCase()); + +* Fixed Hamcrest_Core_IsInstanceOf to return false for native types. + +* Moved string-based matchers to Hamcrest_Text package. + StringContains, StringEndsWith, StringStartsWith, and SubstringMatcher + +* Hamcrest.php and Hamcrest_Matchers.php are now built from @factory doctags. + Added @factory doctag to every static factory method. + +* Hamcrest_Matchers and Hamcrest.php now import each matcher as-needed + and Hamcrest.php calls the matchers directly instead of Hamcrest_Matchers. + + +== Version 0.3.0: Released Jul 26 2010 == + +* Added running count to Hamcrest_MatcherAssert with methods to get and reset it. + This can be used by unit testing frameworks for reporting. + +* Added Hamcrest_Core_HasToString to assert return value of toString() or __toString(). + + assertThat($anObject, hasToString('foo')); + +* Added Hamcrest_Type_IsScalar to assert is_scalar(). + Matches values of type bool, int, float, double, and string. + + assertThat($count, scalarValue()); + assertThat('foo', scalarValue()); + +* Added Hamcrest_Collection package. + + - IsEmptyTraversable + - IsTraversableWithSize + + assertThat($iterator, emptyTraversable()); + assertThat($iterator, traversableWithSize(5)); + +* Added Hamcrest_Xml_HasXPath to assert XPath expressions or the content of nodes in an XML/HTML DOM. + + assertThat($dom, hasXPath('books/book/title')); + assertThat($dom, hasXPath('books/book[contains(title, "Alice")]', 3)); + assertThat($dom, hasXPath('books/book/title', 'Alice in Wonderland')); + assertThat($dom, hasXPath('count(books/book)', greaterThan(10))); + +* Added aliases to match the Java API. + + hasEntry() -> hasKeyValuePair() + hasValue() -> hasItemInArray() + contains() -> arrayContaining() + containsInAnyOrder() -> arrayContainingInAnyOrder() + +* Added optional subtype to Hamcrest_TypeSafeMatcher to enforce object class or resource type. + +* Hamcrest_TypeSafeDiagnosingMatcher now extends Hamcrest_TypeSafeMatcher. + + +== Version 0.2.0: Released Jul 14 2010 == + +Issues Fixed: 109, 111, 114, 115 + +* Description::appendValues() and appendValueList() accept Iterator and IteratorAggregate. [111] + BaseDescription::appendValue() handles IteratorAggregate. + +* assertThat() accepts a single boolean parameter and + wraps any non-Matcher third parameter with equalTo(). + +* Removed null return value from assertThat(). [114] + +* Fixed wrong variable name in contains(). [109] + +* Added Hamcrest_Core_IsSet to assert isset(). + + assertThat(array('foo' => 'bar'), set('foo')); + assertThat(array('foo' => 'bar'), notSet('bar')); + +* Added Hamcrest_Core_IsTypeOf to assert built-in types with gettype(). [115] + Types: array, boolean, double, integer, null, object, resource, and string. + Note that gettype() returns "double" for float values. + + assertThat($count, typeOf('integer')); + assertThat(3.14159, typeOf('double')); + assertThat(array('foo', 'bar'), typeOf('array')); + assertThat(new stdClass(), typeOf('object')); + +* Added type-specific matchers in new Hamcrest_Type package. + + - IsArray + - IsBoolean + - IsDouble (includes float values) + - IsInteger + - IsObject + - IsResource + - IsString + + assertThat($count, integerValue()); + assertThat(3.14159, floatValue()); + assertThat('foo', stringValue()); + +* Added Hamcrest_Type_IsNumeric to assert is_numeric(). + Matches values of type int and float/double or strings that are formatted as numbers. + + assertThat(5, numericValue()); + assertThat('-5e+3', numericValue()); + +* Added Hamcrest_Type_IsCallable to assert is_callable(). + + assertThat('preg_match', callable()); + assertThat(array('SomeClass', 'SomeMethod'), callable()); + assertThat(array($object, 'SomeMethod'), callable()); + assertThat($object, callable()); + assertThat(function ($x, $y) { return $x + $y; }, callable()); + +* Added Hamcrest_Text_MatchesPattern for regex matching with preg_match(). + + assertThat('foobar', matchesPattern('/o+b/')); + +* Added aliases: + - atLeast() for greaterThanOrEqualTo() + - atMost() for lessThanOrEqualTo() + + +== Version 0.1.0: Released Jul 7 2010 == + +* Created PEAR package + +* Core matchers + diff --git a/vendor/hamcrest/hamcrest-php/CONTRIBUTING.md b/vendor/hamcrest/hamcrest-php/CONTRIBUTING.md new file mode 100644 index 0000000..5df55df --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/CONTRIBUTING.md @@ -0,0 +1,32 @@ +# Contributing +hamcrest-php is an open source, community-driven project. If you'd like to contribute, feel free to do this, but remember to follow these few simple rules: + +## Asking Questions +Feel free to ask any questions and share your experiences in the [Issue tracking system](https://github.com/hamcrest/hamcrest-php/issues/) and help to improve the documentation. + +## Submitting an issues +- A reproducible example is required for every bug report, otherwise it will most probably be __closed without warning__. +- If you are going to make a big, substantial change, let's discuss it first. + +## Working with Pull Requests +1. Create your feature addition or a bug fix branch based on __`master`__ branch in your repository's fork. +2. Make necessary changes, but __don't mix__ code reformatting with code changes on topic. +3. Add tests for those changes (please look into `tests/` folder for some examples). This is important so we don't break it in a future version unintentionally. +4. Check your code using "Coding Standard" (see below). +5. Commit your code. +6. Squash your commits by topic to preserve a clean and readable log. +7. Create Pull Request. + +## Running the Tests + +### Installation/Configuration + +1. Using `git clone https://github.com/hamcrest/hamcrest-php` to clone this repository. +2. Using the `composer update` to update the dependencies to support your development environment. +3. Using `vendor/bin/phpunit -c tests/phpunit.xml.dist` command to do unit test works. + +## Contributor Code of Conduct + +Please note that this project is released with a [Contributor Code of +Conduct](http://contributor-covenant.org/). By participating in this project +you agree to abide by its terms. See [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) file. diff --git a/vendor/hamcrest/hamcrest-php/LICENSE.txt b/vendor/hamcrest/hamcrest-php/LICENSE.txt new file mode 100644 index 0000000..22e0c4b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/LICENSE.txt @@ -0,0 +1,27 @@ +BSD License + +Copyright (c) 2000-2025, www.hamcrest.org +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of +conditions and the following disclaimer. Redistributions in binary form must reproduce +the above copyright notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the distribution. + +Neither the name of Hamcrest nor the names of its contributors may be used to endorse +or promote products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/vendor/hamcrest/hamcrest-php/README.md b/vendor/hamcrest/hamcrest-php/README.md new file mode 100644 index 0000000..2bbd896 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/README.md @@ -0,0 +1,488 @@ +This is the PHP port of Hamcrest Matchers +========================================= + +[![tests](https://github.com/hamcrest/hamcrest-php/actions/workflows/tests.yml/badge.svg)](https://github.com/hamcrest/hamcrest-php/actions/workflows/tests.yml) + +Hamcrest is a matching library originally written for Java, but +subsequently ported to many other languages. hamcrest-php is the +official PHP port of Hamcrest and essentially follows a literal +translation of the original Java API for Hamcrest, with a few +Exceptions, mostly down to PHP language barriers: + + 1. `instanceOf($theClass)` is actually `anInstanceOf($theClass)` + + 2. `both(containsString('a'))->and(containsString('b'))` + is actually `both(containsString('a'))->andAlso(containsString('b'))` + + 3. `either(containsString('a'))->or(containsString('b'))` + is actually `either(containsString('a'))->orElse(containsString('b'))` + + 4. Unless it would be non-semantic for a matcher to do so, hamcrest-php + allows dynamic typing for it's input, in "the PHP way". Exception are + where semantics surrounding the type itself would suggest otherwise, + such as stringContains() and greaterThan(). + + 5. Several official matchers have not been ported because they don't + make sense or don't apply in PHP: + + - `typeCompatibleWith($theClass)` + - `eventFrom($source)` + - `hasProperty($name)` ** + - `samePropertyValuesAs($obj)` ** + + 6. When most of the collections matchers are finally ported, PHP-specific + aliases will probably be created due to a difference in naming + conventions between Java's Arrays, Collections, Sets and Maps compared + with PHP's Arrays. + +--- +** [Unless we consider POPO's (Plain Old PHP Objects) akin to JavaBeans] + - The POPO thing is a joke. Java devs coin the term POJO's (Plain Old + Java Objects). + + +Usage +----- + +Hamcrest matchers are easy to use as: + +```php +Hamcrest_MatcherAssert::assertThat('a', Hamcrest_Matchers::equalToIgnoringCase('A')); +``` + +Alternatively, you can use the global proxy-functions: + +```php +$result = true; +// with an identifier +assertThat("result should be true", $result, equalTo(true)); + +// without an identifier +assertThat($result, equalTo(true)); + +// evaluate a boolean expression +assertThat($result === true); + +// with syntactic sugar is() +assertThat(true, is(true)); +``` + +:warning: **NOTE:** the global proxy-functions aren't autoloaded by default, so you will need to load them first: + +```php +\Hamcrest\Util::registerGlobalFunctions(); +``` + +For brevity, all of the examples below use the proxy-functions. + + +Documentation +------------- +A tutorial can be found on the [Hamcrest site](https://code.google.com/archive/p/hamcrest/wikis/TutorialPHP.wiki). + + +Available Matchers +------------------ +* [Array](../master/README.md#array) +* [Collection](../master/README.md#collection) +* [Object](../master/README.md#object) +* [Numbers](../master/README.md#numbers) +* [Type checking](../master/README.md#type-checking) +* [XML](../master/README.md#xml) + + +### Array + +* `anArray` - evaluates an array +```php +assertThat([], anArray()); +``` + +* `hasItemInArray` - check if item exists in array +```php +$list = range(2, 7, 2); +$item = 4; +assertThat($list, hasItemInArray($item)); +``` + +* `hasValue` - alias of hasItemInArray + +* `arrayContainingInAnyOrder` - check if array contains elements in any order +```php +assertThat([2, 4, 6], arrayContainingInAnyOrder([6, 4, 2])); +assertThat([2, 4, 6], arrayContainingInAnyOrder([4, 2, 6])); +``` + +* `containsInAnyOrder` - alias of arrayContainingInAnyOrder + +* `arrayContaining` - An array with elements that match the given matchers in the same order. +```php +assertThat([2, 4, 6], arrayContaining([2, 4, 6])); +assertthat([2, 4, 6], not(arrayContaining([6, 4, 2]))); +``` + +* `contains` - check array in same order +```php +assertThat([2, 4, 6], contains([2, 4, 6])); +``` + +* `hasKeyInArray` - check if array has given key +```php +assertThat(['name'=> 'foobar'], hasKeyInArray('name')); +``` + +* `hasKey` - alias of hasKeyInArray + +* `hasKeyValuePair` - check if array has given key, value pair +```php +assertThat(['name'=> 'foobar'], hasKeyValuePair('name', 'foobar')); +``` +* `hasEntry` - same as hasKeyValuePair + +* `arrayWithSize` - check array has given size +```php +assertthat([2, 4, 6], arrayWithSize(3)); +``` +* `emptyArray` - check if array is empty +```php +assertThat([], emptyArray()); +``` + +* `nonEmptyArray` +```php +assertThat([1], nonEmptyArray()); +``` + +### Collection + +* `emptyTraversable` - check if traversable is empty +```php +$empty_it = new EmptyIterator; +assertThat($empty_it, emptyTraversable()); +``` + +* `nonEmptyTraversable` - check if traversable isn't empty +```php +$non_empty_it = new ArrayIterator(range(1, 10)); +assertThat($non_empty_it, nonEmptyTraversable()); +a +``` + +* `traversableWithSize` +```php +$non_empty_it = new ArrayIterator(range(1, 10)); +assertThat($non_empty_it, traversableWithSize(count(range(1, 10)))); +` +``` + +### Core + +* `allOf` - Evaluates to true only if ALL of the passed in matchers evaluate to true. +```php +assertThat([2,4,6], allOf(hasValue(2), arrayWithSize(3))); +``` + +* `anyOf` - Evaluates to true if ANY of the passed in matchers evaluate to true. +```php +assertThat([2, 4, 6], anyOf(hasValue(8), hasValue(2))); +``` + +* `noneOf` - Evaluates to false if ANY of the passed in matchers evaluate to true. +```php +assertThat([2, 4, 6], noneOf(hasValue(1), hasValue(3))); +``` + +* `both` + `andAlso` - This is useful for fluently combining matchers that must both pass. +```php +assertThat([2, 4, 6], both(hasValue(2))->andAlso(hasValue(4))); +``` + +* `either` + `orElse` - This is useful for fluently combining matchers where either may pass, +```php +assertThat([2, 4, 6], either(hasValue(2))->orElse(hasValue(4))); +``` + +* `describedAs` - Wraps an existing matcher and overrides the description when it fails. +```php +$expected = "Dog"; +$found = null; +// this assertion would result error message as Expected: is not null but: was null +//assertThat("Expected {$expected}, got {$found}", $found, is(notNullValue())); +// and this assertion would result error message as Expected: Dog but: was null +//assertThat($found, describedAs($expected, notNullValue())); +``` + +* `everyItem` - A matcher to apply to every element in an array. +```php +assertThat([2, 4, 6], everyItem(notNullValue())); +``` + +* `hasItem` - check array has given item, it can take a matcher argument +```php +assertThat([2, 4, 6], hasItem(equalTo(2))); +``` + +* `hasItems` - check array has given items, it can take multiple matcher as arguments +```php +assertThat([1, 3, 5], hasItems(equalTo(1), equalTo(3))); +``` + +### Object + +* `hasToString` - check `__toString` or `toString` method +```php +class Foo { + public $name = null; + + public function __toString() { + return "[Foo]Instance"; + } +} +$foo = new Foo; +assertThat($foo, hasToString(equalTo("[Foo]Instance"))); +``` + +* `equalTo` - compares two instances using comparison operator '==' +```php +$foo = new Foo; +$foo2 = new Foo; +assertThat($foo, equalTo($foo2)); +``` + +* `identicalTo` - compares two instances using identity operator '===' +```php +assertThat($foo, is(not(identicalTo($foo2)))); +``` + +* `anInstanceOf` - check instance is an instance|sub-class of given class +```php +assertThat($foo, anInstanceOf(Foo::class)); +``` + +* `any` - alias of `anInstanceOf` + +* `nullValue` check null +```php +assertThat(null, is(nullValue())); +``` + +* `notNullValue` check not null +```php +assertThat("", notNullValue()); +``` + +* `sameInstance` - check for same instance +```php +assertThat($foo, is(not(sameInstance($foo2)))); +assertThat($foo, is(sameInstance($foo))); +``` + +* `typeOf`- check type +```php +assertThat(1, typeOf("integer")); +``` + +* `notSet` - check if instance property is not set +```php +assertThat($foo, notSet("name")); +``` + +* `set` - check if instance property is set +```php +$foo->name = "bar"; +assertThat($foo, set("name")); +``` + +### Numbers + +* `closeTo` - check value close to a range +```php +assertThat(3, closeTo(3, 0.5)); +``` + +* `comparesEqualTo` - check with '==' +```php +assertThat(2, comparesEqualTo(2)); +``` + +* `greaterThan` - check '>' +``` +assertThat(2, greaterThan(1)); +``` + +* `greaterThanOrEqualTo` +```php +assertThat(2, greaterThanOrEqualTo(2)); +``` + +* `atLeast` - The value is >= given value +```php +assertThat(3, atLeast(2)); +``` +* `lessThan` +```php +assertThat(2, lessThan(3)); +``` + +* `lessThanOrEqualTo` +```php +assertThat(2, lessThanOrEqualTo(3)); +``` + +* `atMost` - The value is <= given value +```php +assertThat(2, atMost(3)); +``` + +### String + +* `emptyString` - check for empty string +```php +assertThat("", emptyString()); +``` + +* `isEmptyOrNullString` +```php +assertThat(null, isEmptyOrNullString()); +``` + +* `nullOrEmptyString` +```php +assertThat("", nullOrEmptyString()); +``` + +* `isNonEmptyString` +```php +assertThat("foo", isNonEmptyString()); +``` + +* `nonEmptyString` +```php +assertThat("foo", nonEmptyString()); +``` + +* `equalToIgnoringCase` +```php +assertThat("Foo", equalToIgnoringCase("foo")); +``` +* `equalToIgnoringWhiteSpace` +```php +assertThat(" Foo ", equalToIgnoringWhiteSpace("Foo")); +``` + +* `matchesPattern` - matches with regex pattern +```php +assertThat("foobarbaz", matchesPattern('/(foo)(bar)(baz)/')); +``` + +* `containsString` - check for substring +```php +assertThat("foobar", containsString("foo")); +``` + +* `containsStringIgnoringCase` +```php +assertThat("fooBar", containsStringIgnoringCase("bar")); +``` + +* `stringContainsInOrder` +```php +assertThat("foo", stringContainsInOrder("foo")); +``` + +* `endsWith` - check string that ends with given value +```php +assertThat("foo", endsWith("oo")); +``` + +* `startsWith` - check string that starts with given value +```php +assertThat("bar", startsWith("ba")); +``` + +### Type-checking + +* `arrayValue` - check array type +```php +assertThat([], arrayValue()); +``` + +* `booleanValue` +```php +assertThat(true, booleanValue()); +``` +* `boolValue` - alias of booleanValue + +* `callableValue` - check if value is callable +```php +$func = function () {}; +assertThat($func, callableValue()); +``` +* `doubleValue` +```php +assertThat(3.14, doubleValue()); +``` + +* `floatValue` +```php +assertThat(3.14, floatValue()); +``` + +* `integerValue` +```php +assertThat(1, integerValue()); +``` + +* `intValue` - alias of `integerValue` + +* `numericValue` - check if value is numeric +```php +assertThat("123", numericValue()); +``` + +* `objectValue` - check for object +```php +$obj = new stdClass; +assertThat($obj, objectValue()); +``` +* `anObject` +```php +assertThat($obj, anObject()); +``` + +* `resourceValue` - check resource type +```php +$fp = fopen("/tmp/foo", "w+"); +assertThat($fp, resourceValue()); +``` + +* `scalarValue` - check for scalar value +```php +assertThat(1, scalarValue()); +``` + +* `stringValue` +```php +assertThat("", stringValue()); +``` + +### XML + +* `hasXPath` - check xml with a xpath +```php +$xml = << + + 1 + + + 2 + + +XML; + +$doc = new DOMDocument; +$doc->loadXML($xml); +assertThat($doc, hasXPath("book", 2)); +``` + diff --git a/vendor/hamcrest/hamcrest-php/composer.json b/vendor/hamcrest/hamcrest-php/composer.json new file mode 100644 index 0000000..ddffd19 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/composer.json @@ -0,0 +1,37 @@ +{ + "name": "hamcrest/hamcrest-php", + "type": "library", + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": ["test"], + "license": "BSD-3-Clause", + "authors": [ + ], + + "autoload": { + "classmap": ["hamcrest"] + }, + "autoload-dev": { + "classmap": ["tests", "generator"] + }, + + "require": { + "php": "^7.4|^8.0" + }, + + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0 || ^3.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + + "replace": { + "kodova/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "cordoval/hamcrest-php": "*" + }, + + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php b/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php new file mode 100644 index 0000000..83965b2 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryCall.php @@ -0,0 +1,41 @@ +method = $method; + $this->name = $name; + } + + public function getMethod() + { + return $this->method; + } + + public function getName() + { + return $this->name; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php b/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php new file mode 100644 index 0000000..a09cb73 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryClass.php @@ -0,0 +1,71 @@ +file = $file; + $this->reflector = $class; + $this->extractFactoryMethods(); + } + + public function extractFactoryMethods() + { + $this->methods = array(); + foreach ($this->getPublicStaticMethods() as $method) { + if ($method->isFactory()) { + $this->methods[] = $method; + } + } + } + + public function getPublicStaticMethods() + { + $methods = array(); + foreach ($this->reflector->getMethods(ReflectionMethod::IS_STATIC) as $method) { + if ($method->isPublic() && $method->getDeclaringClass() == $this->reflector) { + $methods[] = new FactoryMethod($this, $method); + } + } + return $methods; + } + + public function getFile() + { + return $this->file; + } + + public function getName() + { + return $this->reflector->name; + } + + public function isFactory() + { + return !empty($this->methods); + } + + public function getMethods() + { + return $this->methods; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php b/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php new file mode 100644 index 0000000..dd6109b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryFile.php @@ -0,0 +1,121 @@ +file = $file; + $this->indent = $indent; + } + + abstract public function addCall(FactoryCall $call); + + abstract public function build(); + + public function addFileHeader() + { + $this->code = ''; + $this->addPart('file_header'); + } + + public function addPart($name) + { + $this->addCode($this->readPart($name)); + } + + public function addCode($code) + { + $this->code .= $code; + } + + public function readPart($name) + { + return file_get_contents(__DIR__ . "/parts/$name.txt"); + } + + public function generateFactoryCall(FactoryCall $call) + { + $method = $call->getMethod(); + $code = $method->getComment($this->indent) . "\n"; + $code .= $this->generateDeclaration($call->getName(), $method); + $code .= $this->generateCall($method); + $code .= $this->generateClosing(); + return $code; + } + + public function generateDeclaration($name, FactoryMethod $method) + { + $code = $this->indent . $this->getDeclarationModifiers() + . 'function ' . $name . '(' + . $this->generateDeclarationArguments($method) + . ')' . "\n" . $this->indent . '{' . "\n"; + return $code; + } + + public function getDeclarationModifiers() + { + return ''; + } + + public function generateDeclarationArguments(FactoryMethod $method) + { + if ($method->acceptsVariableArguments()) { + return '/* args... */'; + } else { + return $method->getParameterDeclarations(); + } + } + + public function generateImport(FactoryMethod $method) + { + return $this->indent . self::INDENT . "require_once '" . $method->getClass()->getFile() . "';" . "\n"; + } + + public function generateCall(FactoryMethod $method) + { + $code = ''; + if ($method->acceptsVariableArguments()) { + $code .= $this->indent . self::INDENT . '$args = func_get_args();' . "\n"; + } + + $code .= $this->indent . self::INDENT . 'return '; + if ($method->acceptsVariableArguments()) { + $code .= 'call_user_func_array(array(\'' + . '\\' . $method->getClassName() . '\', \'' + . $method->getName() . '\'), $args);' . "\n"; + } else { + $code .= '\\' . $method->getClassName() . '::' + . $method->getName() . '(' + . $method->getParameterInvocations() . ');' . "\n"; + } + + return $code; + } + + public function generateClosing() + { + return $this->indent . '}' . "\n"; + } + + public function write() + { + file_put_contents($this->file, $this->code); + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php b/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php new file mode 100644 index 0000000..242875a --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php @@ -0,0 +1,124 @@ +path = $path; + $this->factoryFiles = array(); + } + + public function addFactoryFile(FactoryFile $factoryFile) + { + $this->factoryFiles[] = $factoryFile; + } + + public function generate() + { + $classes = $this->getClassesWithFactoryMethods(); + foreach ($classes as $class) { + foreach ($class->getMethods() as $method) { + foreach ($method->getCalls() as $call) { + foreach ($this->factoryFiles as $file) { + $file->addCall($call); + } + } + } + } + } + + public function write() + { + foreach ($this->factoryFiles as $file) { + $file->build(); + $file->write(); + } + } + + public function getClassesWithFactoryMethods() + { + $classes = array(); + $files = $this->getSortedFiles(); + foreach ($files as $file) { + $class = $this->getFactoryClass($file); + if ($class !== null) { + $classes[] = $class; + } + } + + return $classes; + } + + public function getSortedFiles() + { + $iter = $this->getFileIterator(); + $files = array(); + foreach ($iter as $file) { + $files[] = $file; + } + sort($files, SORT_STRING); + + return $files; + } + + private function getFileIterator() + { + $factoryClass = class_exists('File_Iterator_Factory') ? 'File_Iterator_Factory' : 'SebastianBergmann\FileIterator\Factory'; + + $factory = new $factoryClass(); + + return $factory->getFileIterator($this->path, '.php'); + } + + public function getFactoryClass($file) + { + $name = $this->getFactoryClassName($file); + if ($name !== null) { + require_once $file; + + if (class_exists($name)) { + $class = new FactoryClass(substr($file, strpos($file, 'Hamcrest/')), new ReflectionClass($name)); + if ($class->isFactory()) { + return $class; + } + } + } + + return null; + } + + public function getFactoryClassName($file) + { + $content = file_get_contents($file); + if (preg_match('/namespace\s+(.+);/', $content, $namespace) + && preg_match('/\n\s*class\s+(\w+)\s+extends\b/', $content, $className) + && preg_match('/@factory\b/', $content) + ) { + return $namespace[1] . '\\' . $className[1]; + } + + return null; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php b/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php new file mode 100644 index 0000000..8a05371 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php @@ -0,0 +1,231 @@ +class = $class; + $this->reflector = $reflector; + $this->extractCommentWithoutLeadingShashesAndStars(); + $this->extractFactoryNamesFromComment(); + $this->extractParameters(); + } + + public function extractCommentWithoutLeadingShashesAndStars() + { + $this->comment = explode("\n", $this->reflector->getDocComment()); + foreach ($this->comment as &$line) { + $line = preg_replace('#^\s*(/\\*+|\\*+/|\\*)\s?#', '', $line); + } + $this->trimLeadingBlankLinesFromComment(); + $this->trimTrailingBlankLinesFromComment(); + } + + public function trimLeadingBlankLinesFromComment() + { + while (count($this->comment) > 0) { + $line = array_shift($this->comment); + if (trim($line) != '') { + array_unshift($this->comment, $line); + break; + } + } + } + + public function trimTrailingBlankLinesFromComment() + { + while (count($this->comment) > 0) { + $line = array_pop($this->comment); + if (trim($line) != '') { + array_push($this->comment, $line); + break; + } + } + } + + public function extractFactoryNamesFromComment() + { + $this->calls = array(); + for ($i = 0; $i < count($this->comment); $i++) { + if ($this->extractFactoryNamesFromLine($this->comment[$i])) { + unset($this->comment[$i]); + } + } + $this->trimTrailingBlankLinesFromComment(); + } + + public function extractFactoryNamesFromLine($line) + { + if (preg_match('/^\s*@factory(\s+(.+))?$/', $line, $match)) { + $this->createCalls( + $this->extractFactoryNamesFromAnnotation( + isset($match[2]) ? trim($match[2]) : null + ) + ); + return true; + } + return false; + } + + public function extractFactoryNamesFromAnnotation($value) + { + $primaryName = $this->reflector->getName(); + if (empty($value)) { + return array($primaryName); + } + preg_match_all('/(\.{3}|-|[a-zA-Z_][a-zA-Z_0-9]*)/', $value, $match); + $names = $match[0]; + if (in_array('...', $names)) { + $this->isVarArgs = true; + } + if (!in_array('-', $names) && !in_array($primaryName, $names)) { + array_unshift($names, $primaryName); + } + return $names; + } + + public function createCalls(array $names) + { + $names = array_unique($names); + foreach ($names as $name) { + if ($name != '-' && $name != '...') { + $this->calls[] = new FactoryCall($this, $name); + } + } + } + + public function extractParameters() + { + $this->parameters = array(); + if (!$this->isVarArgs) { + foreach ($this->reflector->getParameters() as $parameter) { + $this->parameters[] = new FactoryParameter($this, $parameter); + } + } + } + + public function getParameterDeclarations() + { + if ($this->isVarArgs || !$this->hasParameters()) { + return ''; + } + $params = array(); + foreach ($this->parameters as /** @var $parameter FactoryParameter */ + $parameter) { + $params[] = $parameter->getDeclaration(); + } + return implode(', ', $params); + } + + public function getParameterInvocations() + { + if ($this->isVarArgs) { + return ''; + } + $params = array(); + foreach ($this->parameters as $parameter) { + $params[] = $parameter->getInvocation(); + } + return implode(', ', $params); + } + + + public function getClass() + { + return $this->class; + } + + public function getClassName() + { + return $this->class->getName(); + } + + public function getName() + { + return $this->reflector->name; + } + + public function isFactory() + { + return count($this->calls) > 0; + } + + public function getCalls() + { + return $this->calls; + } + + public function acceptsVariableArguments() + { + return $this->isVarArgs; + } + + public function hasParameters() + { + return !empty($this->parameters); + } + + public function getParameters() + { + return $this->parameters; + } + + public function getFullName() + { + return $this->getClassName() . '::' . $this->getName(); + } + + public function getCommentText() + { + return implode("\n", $this->comment); + } + + public function getComment($indent = '') + { + $comment = $indent . '/**'; + foreach ($this->comment as $line) { + $comment .= "\n" . rtrim($indent . ' * ' . $line); + } + $comment .= "\n" . $indent . ' */'; + return $comment; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php b/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php new file mode 100644 index 0000000..2e5cb9e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php @@ -0,0 +1,131 @@ +method = $method; + $this->reflector = $reflector; + } + + /** + * Compute the declaration code. + * + * @return string + */ + public function getDeclaration() + { + $code = $this->getTypeCode() . $this->getInvocation(); + + if ($this->reflector->isOptional()) { + $default = $this->reflector->getDefaultValue(); + if (is_null($default)) { + $default = 'null'; + } elseif (is_bool($default)) { + $default = $default ? 'true' : 'false'; + } elseif (is_string($default)) { + $default = "'" . $default . "'"; + } elseif (is_numeric($default)) { + $default = strval($default); + } elseif (is_array($default)) { + $default = 'array()'; + } else { + echo 'Warning: unknown default type for ' . $this->getMethod()->getFullName() . "\n"; + var_dump($default); + $default = 'null'; + } + $code .= ' = ' . $default; + } + return $code; + } + + /** + * Compute the type code for the parameter. + * + * @return string + */ + private function getTypeCode() + { + // Handle PHP 5 separately + if (PHP_VERSION_ID < 70000) { + if ($this->reflector->isArray()) { + return 'array'; + } + + $class = $this->reflector->getClass(); + + return $class ? sprintf('\\%s ', $class->getName()) : ''; + } + + if (!$this->reflector->hasType()) { + return ''; + } + + $type = $this->reflector->getType(); + $name = self::getQualifiedName($type); + + // PHP 7.1+ supports nullable types via a leading question mark + return (PHP_VERSION_ID >= 70100 && $type->allowsNull()) ? sprintf('?%s ', $name) : sprintf('%s ', $name); + } + + /** + * Compute qualified name for the given type. + * + * This function knows how to prefix class names with a leading slash and + * also how to handle PHP 8's union types. + * + * @param ReflectionType $type + * + * @return string + */ + private static function getQualifiedName(ReflectionType $type) + { + // PHP 8 union types can be recursively processed + if ($type instanceof ReflectionUnionType) { + return implode('|', array_map(function (ReflectionType $type) { + // The "self::" call within a Closure is fine here because this + // code will only ever be executed on PHP 7.0+ + return self::getQualifiedName($type); + }, $type->getTypes())); + } + + // PHP 7.0 doesn't have named types, but 7.1+ does + $name = $type instanceof ReflectionNamedType ? $type->getName() : (string) $type; + + return $type->isBuiltin() ? $name : sprintf('\\%s', $name); + } + + /** + * Compute the invocation code. + * + * @return string + */ + public function getInvocation() + { + return sprintf('$%s', $this->reflector->getName()); + } + + /** + * Compute the method name. + * + * @return string + */ + public function getMethod() + { + return $this->method; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php b/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php new file mode 100644 index 0000000..ec8b1b3 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php @@ -0,0 +1,42 @@ +functions = ''; + } + + public function addCall(FactoryCall $call) + { + $this->functions .= "\n" . $this->generateFactoryCall($call); + } + + public function build() + { + $this->addFileHeader(); + $this->addPart('functions_imports'); + $this->addPart('functions_header'); + $this->addCode($this->functions); + $this->addPart('functions_footer'); + } + + public function generateFactoryCall(FactoryCall $call) + { + $code = "if (!function_exists('{$call->getName()}')) {\n"; + $code.= parent::generateFactoryCall($call); + $code.= "}\n"; + + return $code; + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php b/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php new file mode 100644 index 0000000..44cec02 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php @@ -0,0 +1,38 @@ +methods = ''; + } + + public function addCall(FactoryCall $call) + { + $this->methods .= PHP_EOL . $this->generateFactoryCall($call); + } + + public function getDeclarationModifiers() + { + return 'public static '; + } + + public function build() + { + $this->addFileHeader(); + $this->addPart('matchers_imports'); + $this->addPart('matchers_header'); + $this->addCode($this->methods); + $this->addPart('matchers_footer'); + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt b/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt new file mode 100644 index 0000000..7b352e4 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt @@ -0,0 +1,7 @@ + + * //With an identifier + * assertThat("assertion identifier", $apple->flavour(), equalTo("tasty")); + * //Without an identifier + * assertThat($apple->flavour(), equalTo("tasty")); + * //Evaluating a boolean expression + * assertThat("some error", $a > $b); + * + */ + function assertThat() + { + $args = func_get_args(); + call_user_func_array( + array('Hamcrest\MatcherAssert', 'assertThat'), + $args + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/functions_imports.txt b/vendor/hamcrest/hamcrest-php/generator/parts/functions_imports.txt new file mode 100644 index 0000000..e69de29 diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt new file mode 100644 index 0000000..5c34318 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_footer.txt @@ -0,0 +1 @@ +} diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt new file mode 100644 index 0000000..4f8bb2b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_header.txt @@ -0,0 +1,7 @@ + + +/** + * A series of static factories for all hamcrest matchers. + */ +class Matchers +{ diff --git a/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt new file mode 100644 index 0000000..7dd6849 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/parts/matchers_imports.txt @@ -0,0 +1,2 @@ + +namespace Hamcrest; \ No newline at end of file diff --git a/vendor/hamcrest/hamcrest-php/generator/run.php b/vendor/hamcrest/hamcrest-php/generator/run.php new file mode 100644 index 0000000..924d752 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/generator/run.php @@ -0,0 +1,37 @@ +addFactoryFile(new StaticMethodFile(STATIC_MATCHERS_FILE)); +$generator->addFactoryFile(new GlobalFunctionFile(GLOBAL_FUNCTIONS_FILE)); +$generator->generate(); +$generator->write(); diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php new file mode 100644 index 0000000..55a2dd8 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php @@ -0,0 +1,882 @@ + + * //With an identifier + * assertThat("assertion identifier", $apple->flavour(), equalTo("tasty")); + * //Without an identifier + * assertThat($apple->flavour(), equalTo("tasty")); + * //Evaluating a boolean expression + * assertThat("some error", $a > $b); + * + */ + function assertThat() + { + $args = func_get_args(); + call_user_func_array( + array('Hamcrest\MatcherAssert', 'assertThat'), + $args + ); + } +} + +if (!function_exists('anArray')) { + /** + * Evaluates to true only if each $matcher[$i] is satisfied by $array[$i]. + */ + function anArray(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Arrays\IsArray', 'anArray'), $args); + } +} + +if (!function_exists('hasItemInArray')) { + /** + * Evaluates to true if any item in an array satisfies the given matcher. + * + * @param mixed $item as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContaining + */ + function hasItemInArray($item) + { + return \Hamcrest\Arrays\IsArrayContaining::hasItemInArray($item); + } +} + +if (!function_exists('hasValue')) { + /** + * Evaluates to true if any item in an array satisfies the given matcher. + * + * @param mixed $item as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContaining + */ + function hasValue($item) + { + return \Hamcrest\Arrays\IsArrayContaining::hasItemInArray($item); + } +} + +if (!function_exists('arrayContainingInAnyOrder')) { + /** + * An array with elements that match the given matchers. + */ + function arrayContainingInAnyOrder(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInAnyOrder', 'arrayContainingInAnyOrder'), $args); + } +} + +if (!function_exists('containsInAnyOrder')) { + /** + * An array with elements that match the given matchers. + */ + function containsInAnyOrder(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInAnyOrder', 'arrayContainingInAnyOrder'), $args); + } +} + +if (!function_exists('arrayContaining')) { + /** + * An array with elements that match the given matchers in the same order. + */ + function arrayContaining(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInOrder', 'arrayContaining'), $args); + } +} + +if (!function_exists('contains')) { + /** + * An array with elements that match the given matchers in the same order. + */ + function contains(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInOrder', 'arrayContaining'), $args); + } +} + +if (!function_exists('hasKeyInArray')) { + /** + * Evaluates to true if any key in an array matches the given matcher. + * + * @param mixed $key as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContainingKey + */ + function hasKeyInArray($key) + { + return \Hamcrest\Arrays\IsArrayContainingKey::hasKeyInArray($key); + } +} + +if (!function_exists('hasKey')) { + /** + * Evaluates to true if any key in an array matches the given matcher. + * + * @param mixed $key as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContainingKey + */ + function hasKey($key) + { + return \Hamcrest\Arrays\IsArrayContainingKey::hasKeyInArray($key); + } +} + +if (!function_exists('hasKeyValuePair')) { + /** + * Test if an array has both an key and value in parity with each other. + */ + function hasKeyValuePair($key, $value) + { + return \Hamcrest\Arrays\IsArrayContainingKeyValuePair::hasKeyValuePair($key, $value); + } +} + +if (!function_exists('hasEntry')) { + /** + * Test if an array has both an key and value in parity with each other. + */ + function hasEntry($key, $value) + { + return \Hamcrest\Arrays\IsArrayContainingKeyValuePair::hasKeyValuePair($key, $value); + } +} + +if (!function_exists('arrayWithSize')) { + /** + * Does array size satisfy a given matcher? + * + * @param \Hamcrest\Matcher|int $size as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayWithSize + */ + function arrayWithSize($size) + { + return \Hamcrest\Arrays\IsArrayWithSize::arrayWithSize($size); + } +} + +if (!function_exists('emptyArray')) { + /** + * Matches an empty array. + */ + function emptyArray() + { + return \Hamcrest\Arrays\IsArrayWithSize::emptyArray(); + } +} + +if (!function_exists('nonEmptyArray')) { + /** + * Matches an empty array. + */ + function nonEmptyArray() + { + return \Hamcrest\Arrays\IsArrayWithSize::nonEmptyArray(); + } +} + +if (!function_exists('emptyTraversable')) { + /** + * Returns true if traversable is empty. + */ + function emptyTraversable() + { + return \Hamcrest\Collection\IsEmptyTraversable::emptyTraversable(); + } +} + +if (!function_exists('nonEmptyTraversable')) { + /** + * Returns true if traversable is not empty. + */ + function nonEmptyTraversable() + { + return \Hamcrest\Collection\IsEmptyTraversable::nonEmptyTraversable(); + } +} + +if (!function_exists('traversableWithSize')) { + /** + * Does traversable size satisfy a given matcher? + */ + function traversableWithSize($size) + { + return \Hamcrest\Collection\IsTraversableWithSize::traversableWithSize($size); + } +} + +if (!function_exists('allOf')) { + /** + * Evaluates to true only if ALL of the passed in matchers evaluate to true. + */ + function allOf(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\AllOf', 'allOf'), $args); + } +} + +if (!function_exists('anyOf')) { + /** + * Evaluates to true if ANY of the passed in matchers evaluate to true. + */ + function anyOf(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\AnyOf', 'anyOf'), $args); + } +} + +if (!function_exists('noneOf')) { + /** + * Evaluates to false if ANY of the passed in matchers evaluate to true. + */ + function noneOf(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\AnyOf', 'noneOf'), $args); + } +} + +if (!function_exists('both')) { + /** + * This is useful for fluently combining matchers that must both pass. + * For example: + *
+     *   assertThat($string, both(containsString("a"))->andAlso(containsString("b")));
+     * 
+ */ + function both(\Hamcrest\Matcher $matcher) + { + return \Hamcrest\Core\CombinableMatcher::both($matcher); + } +} + +if (!function_exists('either')) { + /** + * This is useful for fluently combining matchers where either may pass, + * for example: + *
+     *   assertThat($string, either(containsString("a"))->orElse(containsString("b")));
+     * 
+ */ + function either(\Hamcrest\Matcher $matcher) + { + return \Hamcrest\Core\CombinableMatcher::either($matcher); + } +} + +if (!function_exists('describedAs')) { + /** + * Wraps an existing matcher and overrides the description when it fails. + */ + function describedAs(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\DescribedAs', 'describedAs'), $args); + } +} + +if (!function_exists('everyItem')) { + /** + * @param Matcher $itemMatcher + * A matcher to apply to every element in an array. + * + * @return \Hamcrest\Core\Every + * Evaluates to TRUE for a collection in which every item matches $itemMatcher + */ + function everyItem(\Hamcrest\Matcher $itemMatcher) + { + return \Hamcrest\Core\Every::everyItem($itemMatcher); + } +} + +if (!function_exists('hasToString')) { + /** + * Does array size satisfy a given matcher? + */ + function hasToString($matcher) + { + return \Hamcrest\Core\HasToString::hasToString($matcher); + } +} + +if (!function_exists('is')) { + /** + * Decorates another Matcher, retaining the behavior but allowing tests + * to be slightly more expressive. + * + * For example: assertThat($cheese, equalTo($smelly)) + * vs. assertThat($cheese, is(equalTo($smelly))) + */ + function is($value) + { + return \Hamcrest\Core\Is::is($value); + } +} + +if (!function_exists('anything')) { + /** + * This matcher always evaluates to true. + * + * @param string $description A meaningful string used when describing itself. + * + * @return \Hamcrest\Core\IsAnything + */ + function anything($description = 'ANYTHING') + { + return \Hamcrest\Core\IsAnything::anything($description); + } +} + +if (!function_exists('hasItem')) { + /** + * Test if the value is an array containing this matcher. + * + * Example: + *
+     * assertThat(array('a', 'b'), hasItem(equalTo('b')));
+     * //Convenience defaults to equalTo()
+     * assertThat(array('a', 'b'), hasItem('b'));
+     * 
+ */ + function hasItem(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItem'), $args); + } +} + +if (!function_exists('hasItems')) { + /** + * Test if the value is an array containing elements that match all of these + * matchers. + * + * Example: + *
+     * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
+     * 
+ */ + function hasItems(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItems'), $args); + } +} + +if (!function_exists('equalTo')) { + /** + * Is the value equal to another value, as tested by the use of the "==" + * comparison operator? + */ + function equalTo($item) + { + return \Hamcrest\Core\IsEqual::equalTo($item); + } +} + +if (!function_exists('identicalTo')) { + /** + * Tests of the value is identical to $value as tested by the "===" operator. + */ + function identicalTo($value) + { + return \Hamcrest\Core\IsIdentical::identicalTo($value); + } +} + +if (!function_exists('anInstanceOf')) { + /** + * Is the value an instance of a particular type? + * This version assumes no relationship between the required type and + * the signature of the method that sets it up, for example in + * assertThat($anObject, anInstanceOf('Thing')); + */ + function anInstanceOf($theClass) + { + return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); + } +} + +if (!function_exists('any')) { + /** + * Is the value an instance of a particular type? + * This version assumes no relationship between the required type and + * the signature of the method that sets it up, for example in + * assertThat($anObject, anInstanceOf('Thing')); + */ + function any($theClass) + { + return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); + } +} + +if (!function_exists('not')) { + /** + * Matches if value does not match $value. + */ + function not($value) + { + return \Hamcrest\Core\IsNot::not($value); + } +} + +if (!function_exists('nullValue')) { + /** + * Matches if value is null. + */ + function nullValue() + { + return \Hamcrest\Core\IsNull::nullValue(); + } +} + +if (!function_exists('notNullValue')) { + /** + * Matches if value is not null. + */ + function notNullValue() + { + return \Hamcrest\Core\IsNull::notNullValue(); + } +} + +if (!function_exists('sameInstance')) { + /** + * Creates a new instance of IsSame. + * + * @param mixed $object + * The predicate evaluates to true only when the argument is + * this object. + * + * @return \Hamcrest\Core\IsSame + */ + function sameInstance($object) + { + return \Hamcrest\Core\IsSame::sameInstance($object); + } +} + +if (!function_exists('typeOf')) { + /** + * Is the value a particular built-in type? + */ + function typeOf($theType) + { + return \Hamcrest\Core\IsTypeOf::typeOf($theType); + } +} + +if (!function_exists('set')) { + /** + * Matches if value (class, object, or array) has named $property. + */ + function set($property) + { + return \Hamcrest\Core\Set::set($property); + } +} + +if (!function_exists('notSet')) { + /** + * Matches if value (class, object, or array) does not have named $property. + */ + function notSet($property) + { + return \Hamcrest\Core\Set::notSet($property); + } +} + +if (!function_exists('closeTo')) { + /** + * Matches if value is a number equal to $value within some range of + * acceptable error $delta. + */ + function closeTo($value, $delta) + { + return \Hamcrest\Number\IsCloseTo::closeTo($value, $delta); + } +} + +if (!function_exists('comparesEqualTo')) { + /** + * The value is not > $value, nor < $value. + */ + function comparesEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::comparesEqualTo($value); + } +} + +if (!function_exists('greaterThan')) { + /** + * The value is > $value. + */ + function greaterThan($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThan($value); + } +} + +if (!function_exists('greaterThanOrEqualTo')) { + /** + * The value is >= $value. + */ + function greaterThanOrEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); + } +} + +if (!function_exists('atLeast')) { + /** + * The value is >= $value. + */ + function atLeast($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); + } +} + +if (!function_exists('lessThan')) { + /** + * The value is < $value. + */ + function lessThan($value) + { + return \Hamcrest\Number\OrderingComparison::lessThan($value); + } +} + +if (!function_exists('lessThanOrEqualTo')) { + /** + * The value is <= $value. + */ + function lessThanOrEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); + } +} + +if (!function_exists('atMost')) { + /** + * The value is <= $value. + */ + function atMost($value) + { + return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); + } +} + +if (!function_exists('isEmptyString')) { + /** + * Matches if value is a zero-length string. + */ + function isEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyString(); + } +} + +if (!function_exists('emptyString')) { + /** + * Matches if value is a zero-length string. + */ + function emptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyString(); + } +} + +if (!function_exists('isEmptyOrNullString')) { + /** + * Matches if value is null or a zero-length string. + */ + function isEmptyOrNullString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); + } +} + +if (!function_exists('nullOrEmptyString')) { + /** + * Matches if value is null or a zero-length string. + */ + function nullOrEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); + } +} + +if (!function_exists('isNonEmptyString')) { + /** + * Matches if value is a non-zero-length string. + */ + function isNonEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); + } +} + +if (!function_exists('nonEmptyString')) { + /** + * Matches if value is a non-zero-length string. + */ + function nonEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); + } +} + +if (!function_exists('equalToIgnoringCase')) { + /** + * Matches if value is a string equal to $string, regardless of the case. + */ + function equalToIgnoringCase($string) + { + return \Hamcrest\Text\IsEqualIgnoringCase::equalToIgnoringCase($string); + } +} + +if (!function_exists('equalToIgnoringWhiteSpace')) { + /** + * Matches if value is a string equal to $string, regardless of whitespace. + */ + function equalToIgnoringWhiteSpace($string) + { + return \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace($string); + } +} + +if (!function_exists('matchesPattern')) { + /** + * Matches if value is a string that matches regular expression $pattern. + */ + function matchesPattern($pattern) + { + return \Hamcrest\Text\MatchesPattern::matchesPattern($pattern); + } +} + +if (!function_exists('containsString')) { + /** + * Matches if value is a string that contains $substring. + */ + function containsString($substring) + { + return \Hamcrest\Text\StringContains::containsString($substring); + } +} + +if (!function_exists('containsStringIgnoringCase')) { + /** + * Matches if value is a string that contains $substring regardless of the case. + */ + function containsStringIgnoringCase($substring) + { + return \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase($substring); + } +} + +if (!function_exists('stringContainsInOrder')) { + /** + * Matches if value contains $substrings in a constrained order. + */ + function stringContainsInOrder(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Text\StringContainsInOrder', 'stringContainsInOrder'), $args); + } +} + +if (!function_exists('endsWith')) { + /** + * Matches if value is a string that ends with $substring. + */ + function endsWith($substring) + { + return \Hamcrest\Text\StringEndsWith::endsWith($substring); + } +} + +if (!function_exists('startsWith')) { + /** + * Matches if value is a string that starts with $substring. + */ + function startsWith($substring) + { + return \Hamcrest\Text\StringStartsWith::startsWith($substring); + } +} + +if (!function_exists('arrayValue')) { + /** + * Is the value an array? + */ + function arrayValue() + { + return \Hamcrest\Type\IsArray::arrayValue(); + } +} + +if (!function_exists('booleanValue')) { + /** + * Is the value a boolean? + */ + function booleanValue() + { + return \Hamcrest\Type\IsBoolean::booleanValue(); + } +} + +if (!function_exists('boolValue')) { + /** + * Is the value a boolean? + */ + function boolValue() + { + return \Hamcrest\Type\IsBoolean::booleanValue(); + } +} + +if (!function_exists('callableValue')) { + /** + * Is the value callable? + */ + function callableValue() + { + return \Hamcrest\Type\IsCallable::callableValue(); + } +} + +if (!function_exists('doubleValue')) { + /** + * Is the value a float/double? + */ + function doubleValue() + { + return \Hamcrest\Type\IsDouble::doubleValue(); + } +} + +if (!function_exists('floatValue')) { + /** + * Is the value a float/double? + */ + function floatValue() + { + return \Hamcrest\Type\IsDouble::doubleValue(); + } +} + +if (!function_exists('integerValue')) { + /** + * Is the value an integer? + */ + function integerValue() + { + return \Hamcrest\Type\IsInteger::integerValue(); + } +} + +if (!function_exists('intValue')) { + /** + * Is the value an integer? + */ + function intValue() + { + return \Hamcrest\Type\IsInteger::integerValue(); + } +} + +if (!function_exists('numericValue')) { + /** + * Is the value a numeric? + */ + function numericValue() + { + return \Hamcrest\Type\IsNumeric::numericValue(); + } +} + +if (!function_exists('objectValue')) { + /** + * Is the value an object? + */ + function objectValue() + { + return \Hamcrest\Type\IsObject::objectValue(); + } +} + +if (!function_exists('anObject')) { + /** + * Is the value an object? + */ + function anObject() + { + return \Hamcrest\Type\IsObject::objectValue(); + } +} + +if (!function_exists('resourceValue')) { + /** + * Is the value a resource? + */ + function resourceValue() + { + return \Hamcrest\Type\IsResource::resourceValue(); + } +} + +if (!function_exists('scalarValue')) { + /** + * Is the value a scalar (boolean, integer, double, or string)? + */ + function scalarValue() + { + return \Hamcrest\Type\IsScalar::scalarValue(); + } +} + +if (!function_exists('stringValue')) { + /** + * Is the value a string? + */ + function stringValue() + { + return \Hamcrest\Type\IsString::stringValue(); + } +} + +if (!function_exists('hasXPath')) { + /** + * Wraps $matcher with {@link Hamcrest\Core\IsEqual) + * if it's not a matcher and the XPath in count() + * if it's an integer. + */ + function hasXPath($xpath, $matcher = null) + { + return \Hamcrest\Xml\HasXPath::hasXPath($xpath, $matcher); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php new file mode 100644 index 0000000..9ea5697 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php @@ -0,0 +1,118 @@ +_elementMatchers = $elementMatchers; + } + + protected function matchesSafely($array) + { + if (array_keys($array) != array_keys($this->_elementMatchers)) { + return false; + } + + /** @var $matcher \Hamcrest\Matcher */ + foreach ($this->_elementMatchers as $k => $matcher) { + if (!$matcher->matches($array[$k])) { + return false; + } + } + + return true; + } + + protected function describeMismatchSafely($actual, Description $mismatchDescription) + { + if (count($actual) != count($this->_elementMatchers)) { + $mismatchDescription->appendText('array length was ' . count($actual)); + + return; + } elseif (array_keys($actual) != array_keys($this->_elementMatchers)) { + $mismatchDescription->appendText('array keys were ') + ->appendValueList( + $this->descriptionStart(), + $this->descriptionSeparator(), + $this->descriptionEnd(), + array_keys($actual) + ) + ; + + return; + } + + /** @var $matcher \Hamcrest\Matcher */ + foreach ($this->_elementMatchers as $k => $matcher) { + if (!$matcher->matches($actual[$k])) { + $mismatchDescription->appendText('element ')->appendValue($k) + ->appendText(' was ')->appendValue($actual[$k]); + + return; + } + } + } + + public function describeTo(Description $description) + { + $description->appendList( + $this->descriptionStart(), + $this->descriptionSeparator(), + $this->descriptionEnd(), + $this->_elementMatchers + ); + } + + /** + * Evaluates to true only if each $matcher[$i] is satisfied by $array[$i]. + * + * @factory ... + */ + public static function anArray(/* args... */) + { + $args = func_get_args(); + + return new self(Util::createMatcherArray($args)); + } + + // -- Protected Methods + + protected function descriptionStart() + { + return '['; + } + + protected function descriptionSeparator() + { + return ', '; + } + + protected function descriptionEnd() + { + return ']'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php new file mode 100644 index 0000000..0e4a1ed --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php @@ -0,0 +1,63 @@ +_elementMatcher = $elementMatcher; + } + + protected function matchesSafely($array) + { + foreach ($array as $element) { + if ($this->_elementMatcher->matches($element)) { + return true; + } + } + + return false; + } + + protected function describeMismatchSafely($array, Description $mismatchDescription) + { + $mismatchDescription->appendText('was ')->appendValue($array); + } + + public function describeTo(Description $description) + { + $description + ->appendText('an array containing ') + ->appendDescriptionOf($this->_elementMatcher) + ; + } + + /** + * Evaluates to true if any item in an array satisfies the given matcher. + * + * @param mixed $item as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContaining + * @factory hasValue + */ + public static function hasItemInArray($item) + { + return new self(Util::wrapValueWithIsEqual($item)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php new file mode 100644 index 0000000..9009026 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php @@ -0,0 +1,59 @@ +_elementMatchers = $elementMatchers; + } + + protected function matchesSafelyWithDiagnosticDescription($array, Description $mismatchDescription) + { + $matching = new MatchingOnce($this->_elementMatchers, $mismatchDescription); + + foreach ($array as $element) { + if (!$matching->matches($element)) { + return false; + } + } + + return $matching->isFinished($array); + } + + public function describeTo(Description $description) + { + $description->appendList('[', ', ', ']', $this->_elementMatchers) + ->appendText(' in any order') + ; + } + + /** + * An array with elements that match the given matchers. + * + * @factory containsInAnyOrder ... + */ + public static function arrayContainingInAnyOrder(/* args... */) + { + $args = func_get_args(); + + return new self(Util::createMatcherArray($args)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php new file mode 100644 index 0000000..6115740 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php @@ -0,0 +1,57 @@ +_elementMatchers = $elementMatchers; + } + + protected function matchesSafelyWithDiagnosticDescription($array, Description $mismatchDescription) + { + $series = new SeriesMatchingOnce($this->_elementMatchers, $mismatchDescription); + + foreach ($array as $element) { + if (!$series->matches($element)) { + return false; + } + } + + return $series->isFinished(); + } + + public function describeTo(Description $description) + { + $description->appendList('[', ', ', ']', $this->_elementMatchers); + } + + /** + * An array with elements that match the given matchers in the same order. + * + * @factory contains ... + */ + public static function arrayContaining(/* args... */) + { + $args = func_get_args(); + + return new self(Util::createMatcherArray($args)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php new file mode 100644 index 0000000..523477e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php @@ -0,0 +1,75 @@ +_keyMatcher = $keyMatcher; + } + + protected function matchesSafely($array) + { + foreach ($array as $key => $element) { + if ($this->_keyMatcher->matches($key)) { + return true; + } + } + + return false; + } + + protected function describeMismatchSafely($array, Description $mismatchDescription) + { + //Not using appendValueList() so that keys can be shown + $mismatchDescription->appendText('array was ') + ->appendText('[') + ; + $loop = false; + foreach ($array as $key => $value) { + if ($loop) { + $mismatchDescription->appendText(', '); + } + $mismatchDescription->appendValue($key)->appendText(' => ')->appendValue($value); + $loop = true; + } + $mismatchDescription->appendText(']'); + } + + public function describeTo(Description $description) + { + $description + ->appendText('array with key ') + ->appendDescriptionOf($this->_keyMatcher) + ; + } + + /** + * Evaluates to true if any key in an array matches the given matcher. + * + * @param mixed $key as a {@link Hamcrest\Matcher} or a value. + * + * @return \Hamcrest\Arrays\IsArrayContainingKey + * @factory hasKey + */ + public static function hasKeyInArray($key) + { + return new self(Util::wrapValueWithIsEqual($key)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php new file mode 100644 index 0000000..9ac3eba --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php @@ -0,0 +1,80 @@ +_keyMatcher = $keyMatcher; + $this->_valueMatcher = $valueMatcher; + } + + protected function matchesSafely($array) + { + foreach ($array as $key => $value) { + if ($this->_keyMatcher->matches($key) && $this->_valueMatcher->matches($value)) { + return true; + } + } + + return false; + } + + protected function describeMismatchSafely($array, Description $mismatchDescription) + { + //Not using appendValueList() so that keys can be shown + $mismatchDescription->appendText('array was ') + ->appendText('[') + ; + $loop = false; + foreach ($array as $key => $value) { + if ($loop) { + $mismatchDescription->appendText(', '); + } + $mismatchDescription->appendValue($key)->appendText(' => ')->appendValue($value); + $loop = true; + } + $mismatchDescription->appendText(']'); + } + + public function describeTo(Description $description) + { + $description->appendText('array containing [') + ->appendDescriptionOf($this->_keyMatcher) + ->appendText(' => ') + ->appendDescriptionOf($this->_valueMatcher) + ->appendText(']') + ; + } + + /** + * Test if an array has both an key and value in parity with each other. + * + * @factory hasEntry + */ + public static function hasKeyValuePair($key, $value) + { + return new self( + Util::wrapValueWithIsEqual($key), + Util::wrapValueWithIsEqual($value) + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php new file mode 100644 index 0000000..074375c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php @@ -0,0 +1,73 @@ +_elementMatchers = $elementMatchers; + $this->_mismatchDescription = $mismatchDescription; + } + + public function matches($item) + { + return $this->_isNotSurplus($item) && $this->_isMatched($item); + } + + public function isFinished($items) + { + if (empty($this->_elementMatchers)) { + return true; + } + + $this->_mismatchDescription + ->appendText('No item matches: ')->appendList('', ', ', '', $this->_elementMatchers) + ->appendText(' in ')->appendValueList('[', ', ', ']', $items) + ; + + return false; + } + + // -- Private Methods + + private function _isNotSurplus($item) + { + if (empty($this->_elementMatchers)) { + $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item); + + return false; + } + + return true; + } + + private function _isMatched($item) + { + /** @var $matcher \Hamcrest\Matcher */ + foreach ($this->_elementMatchers as $i => $matcher) { + if ($matcher->matches($item)) { + unset($this->_elementMatchers[$i]); + + return true; + } + } + + $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item); + + return false; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php new file mode 100644 index 0000000..12a912d --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php @@ -0,0 +1,75 @@ +_elementMatchers = $elementMatchers; + $this->_keys = array_keys($elementMatchers); + $this->_mismatchDescription = $mismatchDescription; + } + + public function matches($item) + { + return $this->_isNotSurplus($item) && $this->_isMatched($item); + } + + public function isFinished() + { + if (!empty($this->_elementMatchers)) { + $nextMatcher = current($this->_elementMatchers); + $this->_mismatchDescription->appendText('No item matched: ')->appendDescriptionOf($nextMatcher); + + return false; + } + + return true; + } + + // -- Private Methods + + private function _isNotSurplus($item) + { + if (empty($this->_elementMatchers)) { + $this->_mismatchDescription->appendText('Not matched: ')->appendValue($item); + + return false; + } + + return true; + } + + private function _isMatched($item) + { + $this->_nextMatchKey = array_shift($this->_keys); + $nextMatcher = array_shift($this->_elementMatchers); + + if (!$nextMatcher->matches($item)) { + $this->_describeMismatch($nextMatcher, $item); + + return false; + } + + return true; + } + + private function _describeMismatch(Matcher $matcher, $item) + { + $this->_mismatchDescription->appendText('item with key ' . $this->_nextMatchKey . ': '); + $matcher->describeMismatch($item, $this->_mismatchDescription); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php new file mode 100644 index 0000000..3a2a0e7 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php @@ -0,0 +1,10 @@ +append($text); + + return $this; + } + + public function appendDescriptionOf(SelfDescribing $value) + { + $value->describeTo($this); + + return $this; + } + + public function appendValue($value) + { + if (is_null($value)) { + $this->append('null'); + } elseif (is_string($value)) { + $this->_toPhpSyntax($value); + } elseif (is_float($value)) { + $this->append('<'); + $this->append($value); + $this->append('F>'); + } elseif (is_bool($value)) { + $this->append('<'); + $this->append($value ? 'true' : 'false'); + $this->append('>'); + } elseif (is_array($value) || $value instanceof \Iterator || $value instanceof \IteratorAggregate) { + $this->appendValueList('[', ', ', ']', $value); + } elseif (is_object($value) && !method_exists($value, '__toString')) { + $this->append('<'); + $this->append(get_class($value)); + $this->append('>'); + } else { + $this->append('<'); + $this->append($value); + $this->append('>'); + } + + return $this; + } + + public function appendValueList($start, $separator, $end, $values) + { + $list = array(); + foreach ($values as $v) { + $list[] = new SelfDescribingValue($v); + } + + $this->appendList($start, $separator, $end, $list); + + return $this; + } + + public function appendList($start, $separator, $end, $values) + { + $this->append($start); + + $separate = false; + + foreach ($values as $value) { + /*if (!($value instanceof Hamcrest\SelfDescribing)) { + $value = new Hamcrest\Internal\SelfDescribingValue($value); + }*/ + + if ($separate) { + $this->append($separator); + } + + $this->appendDescriptionOf($value); + + $separate = true; + } + + $this->append($end); + + return $this; + } + + // -- Protected Methods + + /** + * Append the String $str to the description. + */ + abstract protected function append($str); + + // -- Private Methods + + private function _toPhpSyntax($value) + { + $str = '"'; + for ($i = 0, $len = strlen($value); $i < $len; ++$i) { + switch ($value[$i]) { + case '"': + $str .= '\\"'; + break; + + case "\t": + $str .= '\\t'; + break; + + case "\r": + $str .= '\\r'; + break; + + case "\n": + $str .= '\\n'; + break; + + default: + $str .= $value[$i]; + } + } + $str .= '"'; + $this->append($str); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php new file mode 100644 index 0000000..0605569 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php @@ -0,0 +1,30 @@ +appendText('was ')->appendValue($item); + } + + public function __toString() + { + return StringDescription::toString($this); + } + + public function __invoke() + { + return call_user_func_array(array($this, 'matches'), func_get_args()); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php new file mode 100644 index 0000000..8ab58ea --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php @@ -0,0 +1,71 @@ +_empty = $empty; + } + + public function matches($item) + { + if (!$item instanceof \Traversable) { + return false; + } + + foreach ($item as $value) { + return !$this->_empty; + } + + return $this->_empty; + } + + public function describeTo(Description $description) + { + $description->appendText($this->_empty ? 'an empty traversable' : 'a non-empty traversable'); + } + + /** + * Returns true if traversable is empty. + * + * @factory + */ + public static function emptyTraversable() + { + if (!self::$_INSTANCE) { + self::$_INSTANCE = new self; + } + + return self::$_INSTANCE; + } + + /** + * Returns true if traversable is not empty. + * + * @factory + */ + public static function nonEmptyTraversable() + { + if (!self::$_NOT_INSTANCE) { + self::$_NOT_INSTANCE = new self(false); + } + + return self::$_NOT_INSTANCE; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php new file mode 100644 index 0000000..c95edc5 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php @@ -0,0 +1,47 @@ +false. + */ +class AllOf extends DiagnosingMatcher +{ + + private $_matchers; + + public function __construct(array $matchers) + { + Util::checkAllAreMatchers($matchers); + + $this->_matchers = $matchers; + } + + public function matchesWithDiagnosticDescription($item, Description $mismatchDescription) + { + /** @var $matcher \Hamcrest\Matcher */ + foreach ($this->_matchers as $matcher) { + if (!$matcher->matches($item)) { + $mismatchDescription->appendDescriptionOf($matcher)->appendText(' '); + $matcher->describeMismatch($item, $mismatchDescription); + + return false; + } + } + + return true; + } + + public function describeTo(Description $description) + { + $description->appendList('(', ' and ', ')', $this->_matchers); + } + + /** + * Evaluates to true only if ALL of the passed in matchers evaluate to true. + * + * @factory ... + */ + public static function allOf(/* args... */) + { + $args = func_get_args(); + + return new self(Util::createMatcherArray($args)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php new file mode 100644 index 0000000..4504279 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php @@ -0,0 +1,58 @@ +true. + */ +class AnyOf extends ShortcutCombination +{ + + public function __construct(array $matchers) + { + parent::__construct($matchers); + } + + public function matches($item) + { + return $this->matchesWithShortcut($item, true); + } + + public function describeTo(Description $description) + { + $this->describeToWithOperator($description, 'or'); + } + + /** + * Evaluates to true if ANY of the passed in matchers evaluate to true. + * + * @factory ... + */ + public static function anyOf(/* args... */) + { + $args = func_get_args(); + + return new self(Util::createMatcherArray($args)); + } + + /** + * Evaluates to false if ANY of the passed in matchers evaluate to true. + * + * @factory ... + */ + public static function noneOf(/* args... */) + { + $args = func_get_args(); + + return IsNot::not( + new self(Util::createMatcherArray($args)) + ); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php new file mode 100644 index 0000000..e3b4aa7 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php @@ -0,0 +1,78 @@ +_matcher = $matcher; + } + + public function matches($item) + { + return $this->_matcher->matches($item); + } + + public function describeTo(Description $description) + { + $description->appendDescriptionOf($this->_matcher); + } + + /** Diversion from Hamcrest-Java... Logical "and" not permitted */ + public function andAlso(Matcher $other) + { + return new self(new AllOf($this->_templatedListWith($other))); + } + + /** Diversion from Hamcrest-Java... Logical "or" not permitted */ + public function orElse(Matcher $other) + { + return new self(new AnyOf($this->_templatedListWith($other))); + } + + /** + * This is useful for fluently combining matchers that must both pass. + * For example: + *
+     *   assertThat($string, both(containsString("a"))->andAlso(containsString("b")));
+     * 
+ * + * @factory + */ + public static function both(Matcher $matcher) + { + return new self($matcher); + } + + /** + * This is useful for fluently combining matchers where either may pass, + * for example: + *
+     *   assertThat($string, either(containsString("a"))->orElse(containsString("b")));
+     * 
+ * + * @factory + */ + public static function either(Matcher $matcher) + { + return new self($matcher); + } + + // -- Private Methods + + private function _templatedListWith(Matcher $other) + { + return array($this->_matcher, $other); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php new file mode 100644 index 0000000..5b2583f --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php @@ -0,0 +1,68 @@ +_descriptionTemplate = $descriptionTemplate; + $this->_matcher = $matcher; + $this->_values = $values; + } + + public function matches($item) + { + return $this->_matcher->matches($item); + } + + public function describeTo(Description $description) + { + $textStart = 0; + while (preg_match(self::ARG_PATTERN, $this->_descriptionTemplate, $matches, PREG_OFFSET_CAPTURE, $textStart)) { + $text = $matches[0][0]; + $index = $matches[1][0]; + $offset = $matches[0][1]; + + $description->appendText(substr($this->_descriptionTemplate, $textStart, $offset - $textStart)); + $description->appendValue($this->_values[$index]); + + $textStart = $offset + strlen($text); + } + + if ($textStart < strlen($this->_descriptionTemplate)) { + $description->appendText(substr($this->_descriptionTemplate, $textStart)); + } + } + + /** + * Wraps an existing matcher and overrides the description when it fails. + * + * @factory ... + */ + public static function describedAs(/* $description, Hamcrest\Matcher $matcher, $values... */) + { + $args = func_get_args(); + $description = array_shift($args); + $matcher = array_shift($args); + $values = $args; + + return new self($description, $matcher, $values); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php new file mode 100644 index 0000000..d686f8d --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php @@ -0,0 +1,56 @@ +_matcher = $matcher; + } + + protected function matchesSafelyWithDiagnosticDescription($items, Description $mismatchDescription) + { + foreach ($items as $item) { + if (!$this->_matcher->matches($item)) { + $mismatchDescription->appendText('an item '); + $this->_matcher->describeMismatch($item, $mismatchDescription); + + return false; + } + } + + return true; + } + + public function describeTo(Description $description) + { + $description->appendText('every item is ')->appendDescriptionOf($this->_matcher); + } + + /** + * @param Matcher $itemMatcher + * A matcher to apply to every element in an array. + * + * @return \Hamcrest\Core\Every + * Evaluates to TRUE for a collection in which every item matches $itemMatcher + * + * @factory + */ + public static function everyItem(Matcher $itemMatcher) + { + return new self($itemMatcher); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php new file mode 100644 index 0000000..45bd910 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php @@ -0,0 +1,56 @@ +toString(); + } + + return (string) $actual; + } + + /** + * Does array size satisfy a given matcher? + * + * @factory + */ + public static function hasToString($matcher) + { + return new self(Util::wrapValueWithIsEqual($matcher)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php new file mode 100644 index 0000000..41266dc --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php @@ -0,0 +1,57 @@ +_matcher = $matcher; + } + + public function matches($arg) + { + return $this->_matcher->matches($arg); + } + + public function describeTo(Description $description) + { + $description->appendText('is ')->appendDescriptionOf($this->_matcher); + } + + public function describeMismatch($item, Description $mismatchDescription) + { + $this->_matcher->describeMismatch($item, $mismatchDescription); + } + + /** + * Decorates another Matcher, retaining the behavior but allowing tests + * to be slightly more expressive. + * + * For example: assertThat($cheese, equalTo($smelly)) + * vs. assertThat($cheese, is(equalTo($smelly))) + * + * @factory + */ + public static function is($value) + { + return new self(Util::wrapValueWithIsEqual($value)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php new file mode 100644 index 0000000..f20e6c0 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php @@ -0,0 +1,45 @@ +true. + */ +class IsAnything extends BaseMatcher +{ + + private $_message; + + public function __construct($message = 'ANYTHING') + { + $this->_message = $message; + } + + public function matches($item) + { + return true; + } + + public function describeTo(Description $description) + { + $description->appendText($this->_message); + } + + /** + * This matcher always evaluates to true. + * + * @param string $description A meaningful string used when describing itself. + * + * @return \Hamcrest\Core\IsAnything + * @factory + */ + public static function anything($description = 'ANYTHING') + { + return new self($description); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php new file mode 100644 index 0000000..5e60426 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php @@ -0,0 +1,93 @@ +_elementMatcher = $elementMatcher; + } + + protected function matchesSafely($items) + { + foreach ($items as $item) { + if ($this->_elementMatcher->matches($item)) { + return true; + } + } + + return false; + } + + protected function describeMismatchSafely($items, Description $mismatchDescription) + { + $mismatchDescription->appendText('was ')->appendValue($items); + } + + public function describeTo(Description $description) + { + $description + ->appendText('a collection containing ') + ->appendDescriptionOf($this->_elementMatcher) + ; + } + + /** + * Test if the value is an array containing this matcher. + * + * Example: + *
+     * assertThat(array('a', 'b'), hasItem(equalTo('b')));
+     * //Convenience defaults to equalTo()
+     * assertThat(array('a', 'b'), hasItem('b'));
+     * 
+ * + * @factory ... + */ + public static function hasItem() + { + $args = func_get_args(); + $firstArg = array_shift($args); + + return new self(Util::wrapValueWithIsEqual($firstArg)); + } + + /** + * Test if the value is an array containing elements that match all of these + * matchers. + * + * Example: + *
+     * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
+     * 
+ * + * @factory ... + */ + public static function hasItems(/* args... */) + { + $args = func_get_args(); + $matchers = array(); + + foreach ($args as $arg) { + $matchers[] = self::hasItem($arg); + } + + return AllOf::allOf($matchers); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php new file mode 100644 index 0000000..523fba0 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php @@ -0,0 +1,44 @@ +_item = $item; + } + + public function matches($arg) + { + return (($arg == $this->_item) && ($this->_item == $arg)); + } + + public function describeTo(Description $description) + { + $description->appendValue($this->_item); + } + + /** + * Is the value equal to another value, as tested by the use of the "==" + * comparison operator? + * + * @factory + */ + public static function equalTo($item) + { + return new self($item); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php new file mode 100644 index 0000000..28f7b36 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php @@ -0,0 +1,38 @@ +_value = $value; + } + + public function describeTo(Description $description) + { + $description->appendValue($this->_value); + } + + /** + * Tests of the value is identical to $value as tested by the "===" operator. + * + * @factory + */ + public static function identicalTo($value) + { + return new self($value); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php new file mode 100644 index 0000000..7a5c92a --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php @@ -0,0 +1,67 @@ +_theClass = $theClass; + } + + protected function matchesWithDiagnosticDescription($item, Description $mismatchDescription) + { + if (!is_object($item)) { + $mismatchDescription->appendText('was ')->appendValue($item); + + return false; + } + + if (!($item instanceof $this->_theClass)) { + $mismatchDescription->appendText('[' . get_class($item) . '] ') + ->appendValue($item); + + return false; + } + + return true; + } + + public function describeTo(Description $description) + { + $description->appendText('an instance of ') + ->appendText($this->_theClass) + ; + } + + /** + * Is the value an instance of a particular type? + * This version assumes no relationship between the required type and + * the signature of the method that sets it up, for example in + * assertThat($anObject, anInstanceOf('Thing')); + * + * @factory any + */ + public static function anInstanceOf($theClass) + { + return new self($theClass); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php new file mode 100644 index 0000000..167f0d0 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php @@ -0,0 +1,44 @@ +_matcher = $matcher; + } + + public function matches($arg) + { + return !$this->_matcher->matches($arg); + } + + public function describeTo(Description $description) + { + $description->appendText('not ')->appendDescriptionOf($this->_matcher); + } + + /** + * Matches if value does not match $value. + * + * @factory + */ + public static function not($value) + { + return new self(Util::wrapValueWithIsEqual($value)); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php new file mode 100644 index 0000000..91a454c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php @@ -0,0 +1,56 @@ +appendText('null'); + } + + /** + * Matches if value is null. + * + * @factory + */ + public static function nullValue() + { + if (!self::$_INSTANCE) { + self::$_INSTANCE = new self(); + } + + return self::$_INSTANCE; + } + + /** + * Matches if value is not null. + * + * @factory + */ + public static function notNullValue() + { + if (!self::$_NOT_INSTANCE) { + self::$_NOT_INSTANCE = IsNot::not(self::nullValue()); + } + + return self::$_NOT_INSTANCE; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php new file mode 100644 index 0000000..8107870 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php @@ -0,0 +1,51 @@ +_object = $object; + } + + public function matches($object) + { + return ($object === $this->_object) && ($this->_object === $object); + } + + public function describeTo(Description $description) + { + $description->appendText('sameInstance(') + ->appendValue($this->_object) + ->appendText(')') + ; + } + + /** + * Creates a new instance of IsSame. + * + * @param mixed $object + * The predicate evaluates to true only when the argument is + * this object. + * + * @return \Hamcrest\Core\IsSame + * @factory + */ + public static function sameInstance($object) + { + return new self($object); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php new file mode 100644 index 0000000..d24f0f9 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php @@ -0,0 +1,71 @@ +_theType = strtolower($theType); + } + + public function matches($item) + { + return strtolower(gettype($item)) == $this->_theType; + } + + public function describeTo(Description $description) + { + $description->appendText(self::getTypeDescription($this->_theType)); + } + + public function describeMismatch($item, Description $description) + { + if ($item === null) { + $description->appendText('was null'); + } else { + $description->appendText('was ') + ->appendText(self::getTypeDescription(strtolower(gettype($item)))) + ->appendText(' ') + ->appendValue($item) + ; + } + } + + public static function getTypeDescription($type) + { + if ($type == 'null') { + return 'null'; + } + + return (strpos('aeiou', substr($type, 0, 1)) === false ? 'a ' : 'an ') + . $type; + } + + /** + * Is the value a particular built-in type? + * + * @factory + */ + public static function typeOf($theType) + { + return new self($theType); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php new file mode 100644 index 0000000..cdc45d5 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php @@ -0,0 +1,95 @@ + + * assertThat(array('a', 'b'), set('b')); + * assertThat($foo, set('bar')); + * assertThat('Server', notSet('defaultPort')); + * + * + * @todo Replace $property with a matcher and iterate all property names. + */ +class Set extends BaseMatcher +{ + + private $_property; + private $_not; + + public function __construct($property, $not = false) + { + $this->_property = $property; + $this->_not = $not; + } + + public function matches($item) + { + if ($item === null) { + return false; + } + $property = $this->_property; + if (is_array($item)) { + $result = isset($item[$property]); + } elseif (is_object($item)) { + $result = isset($item->$property); + } elseif (is_string($item)) { + $result = isset($item::$$property); + } else { + throw new \InvalidArgumentException('Must pass an object, array, or class name'); + } + + return $this->_not ? !$result : $result; + } + + public function describeTo(Description $description) + { + $description->appendText($this->_not ? 'unset property ' : 'set property ')->appendText($this->_property); + } + + public function describeMismatch($item, Description $description) + { + $value = ''; + if (!$this->_not) { + $description->appendText('was not set'); + } else { + $property = $this->_property; + if (is_array($item)) { + $value = $item[$property]; + } elseif (is_object($item)) { + $value = $item->$property; + } elseif (is_string($item)) { + $value = $item::$$property; + } + parent::describeMismatch($value, $description); + } + } + + /** + * Matches if value (class, object, or array) has named $property. + * + * @factory + */ + public static function set($property) + { + return new self($property); + } + + /** + * Matches if value (class, object, or array) does not have named $property. + * + * @factory + */ + public static function notSet($property) + { + return new self($property, true); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php new file mode 100644 index 0000000..d93db74 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php @@ -0,0 +1,43 @@ + + */ + private $_matchers; + + public function __construct(array $matchers) + { + Util::checkAllAreMatchers($matchers); + + $this->_matchers = $matchers; + } + + protected function matchesWithShortcut($item, $shortcut) + { + /** @var $matcher \Hamcrest\Matcher */ + foreach ($this->_matchers as $matcher) { + if ($matcher->matches($item) == $shortcut) { + return $shortcut; + } + } + + return !$shortcut; + } + + public function describeToWithOperator(Description $description, $operator) + { + $description->appendList('(', ' ' . $operator . ' ', ')', $this->_matchers); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php new file mode 100644 index 0000000..266bc1c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php @@ -0,0 +1,70 @@ +matchesWithDiagnosticDescription($item, new NullDescription()); + } + + public function describeMismatch($item, Description $mismatchDescription) + { + $this->matchesWithDiagnosticDescription($item, $mismatchDescription); + } + + abstract protected function matchesWithDiagnosticDescription($item, Description $mismatchDescription); +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php new file mode 100644 index 0000000..59f6cc7 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php @@ -0,0 +1,67 @@ +featureValueOf() in a subclass to pull out the feature to be + * matched against. + */ +abstract class FeatureMatcher extends TypeSafeDiagnosingMatcher +{ + + private $_subMatcher; + private $_featureDescription; + private $_featureName; + + /** + * Constructor. + * + * @param string $type + * @param string $subtype + * @param \Hamcrest\Matcher $subMatcher The matcher to apply to the feature + * @param string $featureDescription Descriptive text to use in describeTo + * @param string $featureName Identifying text for mismatch message + */ + public function __construct($type, $subtype, Matcher $subMatcher, $featureDescription, $featureName) + { + parent::__construct($type, $subtype); + + $this->_subMatcher = $subMatcher; + $this->_featureDescription = $featureDescription; + $this->_featureName = $featureName; + } + + /** + * Implement this to extract the interesting feature. + * + * @param mixed $actual the target object + * + * @return mixed the feature to be matched + */ + abstract protected function featureValueOf($actual); + + public function matchesSafelyWithDiagnosticDescription($actual, Description $mismatchDescription) + { + $featureValue = $this->featureValueOf($actual); + + if (!$this->_subMatcher->matches($featureValue)) { + $mismatchDescription->appendText($this->_featureName) + ->appendText(' was ')->appendValue($featureValue); + + return false; + } + + return true; + } + + final public function describeTo(Description $description) + { + $description->appendText($this->_featureDescription)->appendText(' ') + ->appendDescriptionOf($this->_subMatcher) + ; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php new file mode 100644 index 0000000..995da71 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php @@ -0,0 +1,27 @@ +_value = $value; + } + + public function describeTo(Description $description) + { + $description->appendValue($this->_value); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php new file mode 100644 index 0000000..e5dcf09 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php @@ -0,0 +1,50 @@ + + * Matcher implementations should NOT directly implement this interface. + * Instead, extend the {@link Hamcrest\BaseMatcher} abstract class, + * which will ensure that the Matcher API can grow to support + * new features and remain compatible with all Matcher implementations. + *

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

+     *   assertThat($string, either(containsString("a"))->orElse(containsString("b")));
+     * 
+ */ + public static function either(\Hamcrest\Matcher $matcher) + { + return \Hamcrest\Core\CombinableMatcher::either($matcher); + } + + /** + * Wraps an existing matcher and overrides the description when it fails. + */ + public static function describedAs(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\DescribedAs', 'describedAs'), $args); + } + + /** + * @param Matcher $itemMatcher + * A matcher to apply to every element in an array. + * + * @return \Hamcrest\Core\Every + * Evaluates to TRUE for a collection in which every item matches $itemMatcher + */ + public static function everyItem(\Hamcrest\Matcher $itemMatcher) + { + return \Hamcrest\Core\Every::everyItem($itemMatcher); + } + + /** + * Does array size satisfy a given matcher? + */ + public static function hasToString($matcher) + { + return \Hamcrest\Core\HasToString::hasToString($matcher); + } + + /** + * Decorates another Matcher, retaining the behavior but allowing tests + * to be slightly more expressive. + * + * For example: assertThat($cheese, equalTo($smelly)) + * vs. assertThat($cheese, is(equalTo($smelly))) + */ + public static function is($value) + { + return \Hamcrest\Core\Is::is($value); + } + + /** + * This matcher always evaluates to true. + * + * @param string $description A meaningful string used when describing itself. + * + * @return \Hamcrest\Core\IsAnything + */ + public static function anything($description = 'ANYTHING') + { + return \Hamcrest\Core\IsAnything::anything($description); + } + + /** + * Test if the value is an array containing this matcher. + * + * Example: + *
+     * assertThat(array('a', 'b'), hasItem(equalTo('b')));
+     * //Convenience defaults to equalTo()
+     * assertThat(array('a', 'b'), hasItem('b'));
+     * 
+ */ + public static function hasItem(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItem'), $args); + } + + /** + * Test if the value is an array containing elements that match all of these + * matchers. + * + * Example: + *
+     * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
+     * 
+ */ + public static function hasItems(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItems'), $args); + } + + /** + * Is the value equal to another value, as tested by the use of the "==" + * comparison operator? + */ + public static function equalTo($item) + { + return \Hamcrest\Core\IsEqual::equalTo($item); + } + + /** + * Tests of the value is identical to $value as tested by the "===" operator. + */ + public static function identicalTo($value) + { + return \Hamcrest\Core\IsIdentical::identicalTo($value); + } + + /** + * Is the value an instance of a particular type? + * This version assumes no relationship between the required type and + * the signature of the method that sets it up, for example in + * assertThat($anObject, anInstanceOf('Thing')); + */ + public static function anInstanceOf($theClass) + { + return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); + } + + /** + * Is the value an instance of a particular type? + * This version assumes no relationship between the required type and + * the signature of the method that sets it up, for example in + * assertThat($anObject, anInstanceOf('Thing')); + */ + public static function any($theClass) + { + return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass); + } + + /** + * Matches if value does not match $value. + */ + public static function not($value) + { + return \Hamcrest\Core\IsNot::not($value); + } + + /** + * Matches if value is null. + */ + public static function nullValue() + { + return \Hamcrest\Core\IsNull::nullValue(); + } + + /** + * Matches if value is not null. + */ + public static function notNullValue() + { + return \Hamcrest\Core\IsNull::notNullValue(); + } + + /** + * Creates a new instance of IsSame. + * + * @param mixed $object + * The predicate evaluates to true only when the argument is + * this object. + * + * @return \Hamcrest\Core\IsSame + */ + public static function sameInstance($object) + { + return \Hamcrest\Core\IsSame::sameInstance($object); + } + + /** + * Is the value a particular built-in type? + */ + public static function typeOf($theType) + { + return \Hamcrest\Core\IsTypeOf::typeOf($theType); + } + + /** + * Matches if value (class, object, or array) has named $property. + */ + public static function set($property) + { + return \Hamcrest\Core\Set::set($property); + } + + /** + * Matches if value (class, object, or array) does not have named $property. + */ + public static function notSet($property) + { + return \Hamcrest\Core\Set::notSet($property); + } + + /** + * Matches if value is a number equal to $value within some range of + * acceptable error $delta. + */ + public static function closeTo($value, $delta) + { + return \Hamcrest\Number\IsCloseTo::closeTo($value, $delta); + } + + /** + * The value is not > $value, nor < $value. + */ + public static function comparesEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::comparesEqualTo($value); + } + + /** + * The value is > $value. + */ + public static function greaterThan($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThan($value); + } + + /** + * The value is >= $value. + */ + public static function greaterThanOrEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); + } + + /** + * The value is >= $value. + */ + public static function atLeast($value) + { + return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value); + } + + /** + * The value is < $value. + */ + public static function lessThan($value) + { + return \Hamcrest\Number\OrderingComparison::lessThan($value); + } + + /** + * The value is <= $value. + */ + public static function lessThanOrEqualTo($value) + { + return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); + } + + /** + * The value is <= $value. + */ + public static function atMost($value) + { + return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value); + } + + /** + * Matches if value is a zero-length string. + */ + public static function isEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyString(); + } + + /** + * Matches if value is a zero-length string. + */ + public static function emptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyString(); + } + + /** + * Matches if value is null or a zero-length string. + */ + public static function isEmptyOrNullString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); + } + + /** + * Matches if value is null or a zero-length string. + */ + public static function nullOrEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString(); + } + + /** + * Matches if value is a non-zero-length string. + */ + public static function isNonEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); + } + + /** + * Matches if value is a non-zero-length string. + */ + public static function nonEmptyString() + { + return \Hamcrest\Text\IsEmptyString::isNonEmptyString(); + } + + /** + * Matches if value is a string equal to $string, regardless of the case. + */ + public static function equalToIgnoringCase($string) + { + return \Hamcrest\Text\IsEqualIgnoringCase::equalToIgnoringCase($string); + } + + /** + * Matches if value is a string equal to $string, regardless of whitespace. + */ + public static function equalToIgnoringWhiteSpace($string) + { + return \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace($string); + } + + /** + * Matches if value is a string that matches regular expression $pattern. + */ + public static function matchesPattern($pattern) + { + return \Hamcrest\Text\MatchesPattern::matchesPattern($pattern); + } + + /** + * Matches if value is a string that contains $substring. + */ + public static function containsString($substring) + { + return \Hamcrest\Text\StringContains::containsString($substring); + } + + /** + * Matches if value is a string that contains $substring regardless of the case. + */ + public static function containsStringIgnoringCase($substring) + { + return \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase($substring); + } + + /** + * Matches if value contains $substrings in a constrained order. + */ + public static function stringContainsInOrder(/* args... */) + { + $args = func_get_args(); + return call_user_func_array(array('\Hamcrest\Text\StringContainsInOrder', 'stringContainsInOrder'), $args); + } + + /** + * Matches if value is a string that ends with $substring. + */ + public static function endsWith($substring) + { + return \Hamcrest\Text\StringEndsWith::endsWith($substring); + } + + /** + * Matches if value is a string that starts with $substring. + */ + public static function startsWith($substring) + { + return \Hamcrest\Text\StringStartsWith::startsWith($substring); + } + + /** + * Is the value an array? + */ + public static function arrayValue() + { + return \Hamcrest\Type\IsArray::arrayValue(); + } + + /** + * Is the value a boolean? + */ + public static function booleanValue() + { + return \Hamcrest\Type\IsBoolean::booleanValue(); + } + + /** + * Is the value a boolean? + */ + public static function boolValue() + { + return \Hamcrest\Type\IsBoolean::booleanValue(); + } + + /** + * Is the value callable? + */ + public static function callableValue() + { + return \Hamcrest\Type\IsCallable::callableValue(); + } + + /** + * Is the value a float/double? + */ + public static function doubleValue() + { + return \Hamcrest\Type\IsDouble::doubleValue(); + } + + /** + * Is the value a float/double? + */ + public static function floatValue() + { + return \Hamcrest\Type\IsDouble::doubleValue(); + } + + /** + * Is the value an integer? + */ + public static function integerValue() + { + return \Hamcrest\Type\IsInteger::integerValue(); + } + + /** + * Is the value an integer? + */ + public static function intValue() + { + return \Hamcrest\Type\IsInteger::integerValue(); + } + + /** + * Is the value a numeric? + */ + public static function numericValue() + { + return \Hamcrest\Type\IsNumeric::numericValue(); + } + + /** + * Is the value an object? + */ + public static function objectValue() + { + return \Hamcrest\Type\IsObject::objectValue(); + } + + /** + * Is the value an object? + */ + public static function anObject() + { + return \Hamcrest\Type\IsObject::objectValue(); + } + + /** + * Is the value a resource? + */ + public static function resourceValue() + { + return \Hamcrest\Type\IsResource::resourceValue(); + } + + /** + * Is the value a scalar (boolean, integer, double, or string)? + */ + public static function scalarValue() + { + return \Hamcrest\Type\IsScalar::scalarValue(); + } + + /** + * Is the value a string? + */ + public static function stringValue() + { + return \Hamcrest\Type\IsString::stringValue(); + } + + /** + * Wraps $matcher with {@link Hamcrest\Core\IsEqual) + * if it's not a matcher and the XPath in count() + * if it's an integer. + */ + public static function hasXPath($xpath, $matcher = null) + { + return \Hamcrest\Xml\HasXPath::hasXPath($xpath, $matcher); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php new file mode 100644 index 0000000..aae8e46 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php @@ -0,0 +1,43 @@ +_value = $value; + $this->_delta = $delta; + } + + protected function matchesSafely($item) + { + return $this->_actualDelta($item) <= 0.0; + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription->appendValue($item) + ->appendText(' differed by ') + ->appendValue($this->_actualDelta($item)) + ; + } + + public function describeTo(Description $description) + { + $description->appendText('a numeric value within ') + ->appendValue($this->_delta) + ->appendText(' of ') + ->appendValue($this->_value) + ; + } + + /** + * Matches if value is a number equal to $value within some range of + * acceptable error $delta. + * + * @factory + */ + public static function closeTo($value, $delta) + { + return new self($value, $delta); + } + + // -- Private Methods + + private function _actualDelta($item) + { + return (abs(($item - $this->_value)) - $this->_delta); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php new file mode 100644 index 0000000..369d0cf --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php @@ -0,0 +1,132 @@ +_value = $value; + $this->_minCompare = $minCompare; + $this->_maxCompare = $maxCompare; + } + + protected function matchesSafely($other) + { + $compare = $this->_compare($this->_value, $other); + + return ($this->_minCompare <= $compare) && ($compare <= $this->_maxCompare); + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription + ->appendValue($item)->appendText(' was ') + ->appendText($this->_comparison($this->_compare($this->_value, $item))) + ->appendText(' ')->appendValue($this->_value) + ; + } + + public function describeTo(Description $description) + { + $description->appendText('a value ') + ->appendText($this->_comparison($this->_minCompare)) + ; + if ($this->_minCompare != $this->_maxCompare) { + $description->appendText(' or ') + ->appendText($this->_comparison($this->_maxCompare)) + ; + } + $description->appendText(' ')->appendValue($this->_value); + } + + /** + * The value is not > $value, nor < $value. + * + * @factory + */ + public static function comparesEqualTo($value) + { + return new self($value, 0, 0); + } + + /** + * The value is > $value. + * + * @factory + */ + public static function greaterThan($value) + { + return new self($value, -1, -1); + } + + /** + * The value is >= $value. + * + * @factory atLeast + */ + public static function greaterThanOrEqualTo($value) + { + return new self($value, -1, 0); + } + + /** + * The value is < $value. + * + * @factory + */ + public static function lessThan($value) + { + return new self($value, 1, 1); + } + + /** + * The value is <= $value. + * + * @factory atMost + */ + public static function lessThanOrEqualTo($value) + { + return new self($value, 0, 1); + } + + // -- Private Methods + + private function _compare($left, $right) + { + $a = $left; + $b = $right; + + if ($a < $b) { + return -1; + } elseif ($a == $b) { + return 0; + } else { + return 1; + } + } + + private function _comparison($compare) + { + if ($compare > 0) { + return 'less than'; + } elseif ($compare == 0) { + return 'equal to'; + } else { + return 'greater than'; + } + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php new file mode 100644 index 0000000..872fdf9 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php @@ -0,0 +1,23 @@ +_out = (string) $out; + } + + public function __toString() + { + return $this->_out; + } + + /** + * Return the description of a {@link Hamcrest\SelfDescribing} object as a + * String. + * + * @param \Hamcrest\SelfDescribing $selfDescribing + * The object to be described. + * + * @return string + * The description of the object. + */ + public static function toString(SelfDescribing $selfDescribing) + { + $self = new self(); + + return (string) $self->appendDescriptionOf($selfDescribing); + } + + /** + * Alias for {@link toString()}. + */ + public static function asString(SelfDescribing $selfDescribing) + { + return self::toString($selfDescribing); + } + + // -- Protected Methods + + protected function append($str) + { + $this->_out .= $str; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php new file mode 100644 index 0000000..2ae61b9 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php @@ -0,0 +1,85 @@ +_empty = $empty; + } + + public function matches($item) + { + return $this->_empty + ? ($item === '') + : is_string($item) && $item !== ''; + } + + public function describeTo(Description $description) + { + $description->appendText($this->_empty ? 'an empty string' : 'a non-empty string'); + } + + /** + * Matches if value is a zero-length string. + * + * @factory emptyString + */ + public static function isEmptyString() + { + if (!self::$_INSTANCE) { + self::$_INSTANCE = new self(true); + } + + return self::$_INSTANCE; + } + + /** + * Matches if value is null or a zero-length string. + * + * @factory nullOrEmptyString + */ + public static function isEmptyOrNullString() + { + if (!self::$_NULL_OR_EMPTY_INSTANCE) { + self::$_NULL_OR_EMPTY_INSTANCE = AnyOf::anyOf( + IsNull::nullvalue(), + self::isEmptyString() + ); + } + + return self::$_NULL_OR_EMPTY_INSTANCE; + } + + /** + * Matches if value is a non-zero-length string. + * + * @factory nonEmptyString + */ + public static function isNonEmptyString() + { + if (!self::$_NOT_INSTANCE) { + self::$_NOT_INSTANCE = new self(false); + } + + return self::$_NOT_INSTANCE; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php new file mode 100644 index 0000000..3836a8c --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php @@ -0,0 +1,52 @@ +_string = $string; + } + + protected function matchesSafely($item) + { + return strtolower($this->_string) === strtolower($item); + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription->appendText('was ')->appendText($item); + } + + public function describeTo(Description $description) + { + $description->appendText('equalToIgnoringCase(') + ->appendValue($this->_string) + ->appendText(')') + ; + } + + /** + * Matches if value is a string equal to $string, regardless of the case. + * + * @factory + */ + public static function equalToIgnoringCase($string) + { + return new self($string); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php new file mode 100644 index 0000000..853692b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php @@ -0,0 +1,66 @@ +_string = $string; + } + + protected function matchesSafely($item) + { + return (strtolower($this->_stripSpace($item)) + === strtolower($this->_stripSpace($this->_string))); + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription->appendText('was ')->appendText($item); + } + + public function describeTo(Description $description) + { + $description->appendText('equalToIgnoringWhiteSpace(') + ->appendValue($this->_string) + ->appendText(')') + ; + } + + /** + * Matches if value is a string equal to $string, regardless of whitespace. + * + * @factory + */ + public static function equalToIgnoringWhiteSpace($string) + { + return new self($string); + } + + // -- Private Methods + + private function _stripSpace($string) + { + $parts = preg_split("/[\r\n\t ]+/", $string); + foreach ($parts as $i => $part) { + $parts[$i] = trim($part, " \r\n\t"); + } + + return trim(implode(' ', $parts), " \r\n\t"); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php new file mode 100644 index 0000000..fa0d68e --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php @@ -0,0 +1,40 @@ +_substring, (string) $item) >= 1; + } + + protected function relationship() + { + return 'matching'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php new file mode 100644 index 0000000..b92786b --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php @@ -0,0 +1,45 @@ +_substring); + } + + /** + * Matches if value is a string that contains $substring. + * + * @factory + */ + public static function containsString($substring) + { + return new self($substring); + } + + // -- Protected Methods + + protected function evalSubstringOf($item) + { + return (false !== strpos((string) $item, $this->_substring)); + } + + protected function relationship() + { + return 'containing'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php new file mode 100644 index 0000000..69f37c2 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php @@ -0,0 +1,40 @@ +_substring)); + } + + protected function relationship() + { + return 'containing in any case'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php new file mode 100644 index 0000000..e75de65 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php @@ -0,0 +1,66 @@ +_substrings = $substrings; + } + + protected function matchesSafely($item) + { + $fromIndex = 0; + + foreach ($this->_substrings as $substring) { + if (false === $fromIndex = strpos($item, $substring, $fromIndex)) { + return false; + } + } + + return true; + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription->appendText('was ')->appendText($item); + } + + public function describeTo(Description $description) + { + $description->appendText('a string containing ') + ->appendValueList('', ', ', '', $this->_substrings) + ->appendText(' in order') + ; + } + + /** + * Matches if value contains $substrings in a constrained order. + * + * @factory ... + */ + public static function stringContainsInOrder(/* args... */) + { + $args = func_get_args(); + + if (isset($args[0]) && is_array($args[0])) { + $args = $args[0]; + } + + return new self($args); + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php new file mode 100644 index 0000000..f802ee4 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php @@ -0,0 +1,40 @@ +_substring))) === $this->_substring); + } + + protected function relationship() + { + return 'ending with'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php new file mode 100644 index 0000000..79c9565 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php @@ -0,0 +1,40 @@ +_substring)) === $this->_substring); + } + + protected function relationship() + { + return 'starting with'; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php new file mode 100644 index 0000000..e560ad6 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php @@ -0,0 +1,45 @@ +_substring = $substring; + } + + protected function matchesSafely($item) + { + return $this->evalSubstringOf($item); + } + + protected function describeMismatchSafely($item, Description $mismatchDescription) + { + $mismatchDescription->appendText('was "')->appendText($item)->appendText('"'); + } + + public function describeTo(Description $description) + { + $description->appendText('a string ') + ->appendText($this->relationship()) + ->appendText(' ') + ->appendValue($this->_substring) + ; + } + + abstract protected function evalSubstringOf($string); + + abstract protected function relationship(); +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php new file mode 100644 index 0000000..9179102 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php @@ -0,0 +1,32 @@ +isHexadecimal($item)) { + return true; + } + + return is_numeric($item); + } + + /** + * Return if the string passed is a valid hexadecimal number. + * This check is necessary because PHP 7 doesn't recognize hexadecimal string as numeric anymore. + * + * @param mixed $item + * @return boolean + */ + private function isHexadecimal($item) + { + if (is_string($item) && preg_match('/^0x(.*)$/', $item, $matches)) { + return ctype_xdigit($matches[1]); + } + + return false; + } + + /** + * Is the value a numeric? + * + * @factory + */ + public static function numericValue() + { + return new self; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php new file mode 100644 index 0000000..65918fc --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php @@ -0,0 +1,32 @@ +matchesSafelyWithDiagnosticDescription($item, new NullDescription()); + } + + final public function describeMismatchSafely($item, Description $mismatchDescription) + { + $this->matchesSafelyWithDiagnosticDescription($item, $mismatchDescription); + } + + // -- Protected Methods + + /** + * Subclasses should implement these. The item will already have been checked for + * the specific type. + */ + abstract protected function matchesSafelyWithDiagnosticDescription($item, Description $mismatchDescription); +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php new file mode 100644 index 0000000..56e299a --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php @@ -0,0 +1,107 @@ +_expectedType = $expectedType; + $this->_expectedSubtype = $expectedSubtype; + } + + final public function matches($item) + { + return $this->_isSafeType($item) && $this->matchesSafely($item); + } + + final public function describeMismatch($item, Description $mismatchDescription) + { + if (!$this->_isSafeType($item)) { + parent::describeMismatch($item, $mismatchDescription); + } else { + $this->describeMismatchSafely($item, $mismatchDescription); + } + } + + // -- Protected Methods + + /** + * The item will already have been checked for the specific type and subtype. + */ + abstract protected function matchesSafely($item); + + /** + * The item will already have been checked for the specific type and subtype. + */ + abstract protected function describeMismatchSafely($item, Description $mismatchDescription); + + // -- Private Methods + + private function _isSafeType($value) + { + switch ($this->_expectedType) { + + case self::TYPE_ANY: + return true; + + case self::TYPE_STRING: + return is_string($value) || is_numeric($value); + + case self::TYPE_NUMERIC: + return is_numeric($value) || is_string($value); + + case self::TYPE_ARRAY: + return is_array($value); + + case self::TYPE_OBJECT: + return is_object($value) + && ($this->_expectedSubtype === null + || $value instanceof $this->_expectedSubtype); + + case self::TYPE_RESOURCE: + return is_resource($value) + && ($this->_expectedSubtype === null + || get_resource_type($value) == $this->_expectedSubtype); + + case self::TYPE_BOOLEAN: + return true; + + default: + return true; + + } + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php new file mode 100644 index 0000000..169b036 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php @@ -0,0 +1,76 @@ + all items are + */ + public static function createMatcherArray(array $items) + { + //Extract single array item + if (count($items) == 1 && is_array($items[0])) { + $items = $items[0]; + } + + //Replace non-matchers + foreach ($items as &$item) { + if (!($item instanceof Matcher)) { + $item = Core\IsEqual::equalTo($item); + } + } + + return $items; + } +} diff --git a/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php new file mode 100644 index 0000000..bedf969 --- /dev/null +++ b/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php @@ -0,0 +1,195 @@ +_xpath = $xpath; + $this->_matcher = $matcher; + } + + /** + * Matches if the XPath matches against the DOM node and the matcher. + * + * @param string|\DOMNode $actual + * @param Description $mismatchDescription + * @return bool + */ + protected function matchesWithDiagnosticDescription($actual, Description $mismatchDescription) + { + if (is_string($actual)) { + $actual = $this->createDocument($actual); + } elseif (!$actual instanceof \DOMNode) { + $mismatchDescription->appendText('was ')->appendValue($actual); + + return false; + } + $result = $this->evaluate($actual); + if ($result instanceof \DOMNodeList) { + return $this->matchesContent($result, $mismatchDescription); + } else { + return $this->matchesExpression($result, $mismatchDescription); + } + } + + /** + * Creates and returns a DOMDocument from the given + * XML or HTML string. + * + * @param string $text + * @return \DOMDocument built from $text + * @throws \InvalidArgumentException if the document is not valid + */ + protected function createDocument($text) + { + $document = new \DOMDocument(); + if (preg_match('/^\s*<\?xml/', $text)) { + if (!@$document->loadXML($text)) { + throw new \InvalidArgumentException('Must pass a valid XML document'); + } + } else { + if (!@$document->loadHTML($text)) { + throw new \InvalidArgumentException('Must pass a valid HTML or XHTML document'); + } + } + + return $document; + } + + /** + * Applies the configured XPath to the DOM node and returns either + * the result if it's an expression or the node list if it's a query. + * + * @param \DOMNode $node context from which to issue query + * @return mixed result of expression or DOMNodeList from query + */ + protected function evaluate(\DOMNode $node) + { + if ($node instanceof \DOMDocument) { + $xpathDocument = new \DOMXPath($node); + + return $xpathDocument->evaluate($this->_xpath); + } else { + $xpathDocument = new \DOMXPath($node->ownerDocument); + + return $xpathDocument->evaluate($this->_xpath, $node); + } + } + + /** + * Matches if the list of nodes is not empty and the content of at least + * one node matches the configured matcher, if supplied. + * + * @param \DOMNodeList $nodes selected by the XPath query + * @param Description $mismatchDescription + * @return bool + */ + protected function matchesContent(\DOMNodeList $nodes, Description $mismatchDescription) + { + if ($nodes->length == 0) { + $mismatchDescription->appendText('XPath returned no results'); + } elseif ($this->_matcher === null) { + return true; + } else { + foreach ($nodes as $node) { + if ($this->_matcher->matches($node->textContent)) { + return true; + } + } + $content = array(); + foreach ($nodes as $node) { + $content[] = $node->textContent; + } + $mismatchDescription->appendText('XPath returned ') + ->appendValue($content); + } + + return false; + } + + /** + * Matches if the result of the XPath expression matches the configured + * matcher or evaluates to true if there is none. + * + * @param mixed $result result of the XPath expression + * @param Description $mismatchDescription + * @return bool + */ + protected function matchesExpression($result, Description $mismatchDescription) + { + if ($this->_matcher === null) { + if ($result) { + return true; + } + $mismatchDescription->appendText('XPath expression result was ') + ->appendValue($result); + } else { + if ($this->_matcher->matches($result)) { + return true; + } + $mismatchDescription->appendText('XPath expression result '); + $this->_matcher->describeMismatch($result, $mismatchDescription); + } + + return false; + } + + public function describeTo(Description $description) + { + $description->appendText('XML or HTML document with XPath "') + ->appendText($this->_xpath) + ->appendText('"'); + if ($this->_matcher !== null) { + $description->appendText(' '); + $this->_matcher->describeTo($description); + } + } + + /** + * Wraps $matcher with {@link Hamcrest\Core\IsEqual) + * if it's not a matcher and the XPath in count() + * if it's an integer. + * + * @factory + */ + public static function hasXPath($xpath, $matcher = null) + { + if ($matcher === null || $matcher instanceof Matcher) { + return new self($xpath, $matcher); + } elseif (is_int($matcher) && strpos($xpath, 'count(') !== 0) { + $xpath = 'count(' . $xpath . ')'; + } + + return new self($xpath, IsEqual::equalTo($matcher)); + } +} diff --git a/vendor/mockery/mockery/.phpstorm.meta.php b/vendor/mockery/mockery/.phpstorm.meta.php new file mode 100644 index 0000000..bb7acee --- /dev/null +++ b/vendor/mockery/mockery/.phpstorm.meta.php @@ -0,0 +1,11 @@ + "@"])); +override(\Mockery::spy(0), map(["" => "@"])); +override(\Mockery::namedMock(0), map(["" => "@"])); +override(\Mockery::instanceMock(0), map(["" => "@"])); +override(\mock(0), map(["" => "@"])); +override(\spy(0), map(["" => "@"])); +override(\namedMock(0), map(["" => "@"])); \ No newline at end of file diff --git a/vendor/mockery/mockery/.readthedocs.yml b/vendor/mockery/mockery/.readthedocs.yml new file mode 100644 index 0000000..7150d7b --- /dev/null +++ b/vendor/mockery/mockery/.readthedocs.yml @@ -0,0 +1,24 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools we might need +build: + os: ubuntu-22.04 + tools: + python: "3.12" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/conf.py + +# Build documentation in additional formats such as PDF and ePub +formats: all + +# Build requirements for our documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: docs/requirements.txt diff --git a/vendor/mockery/mockery/CHANGELOG.md b/vendor/mockery/mockery/CHANGELOG.md new file mode 100644 index 0000000..2180be2 --- /dev/null +++ b/vendor/mockery/mockery/CHANGELOG.md @@ -0,0 +1,419 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [1.6.12] - 2024-05-15 + +### Changed + +- [1420: Update `psalm-baseline.xml` ](https://github.com/mockery/mockery/pull/1420) +- [1419: Update e2e-test.sh](https://github.com/mockery/mockery/pull/1419) +- [1413: Upgrade `phar` tools and `phive.xml` configuration](https://github.com/mockery/mockery/pull/1413) + +### Fixed + +- [1415: Fix mocking anonymous classes](https://github.com/mockery/mockery/pull/1415) +- [1411: Mocking final classes reports unresolvable type by PHPStan](https://github.com/mockery/mockery/issues/1411) +- [1410: Fix PHP Doc Comments](https://github.com/mockery/mockery/pull/1410) + +### Security + +- [1417: Bump `Jinja2` from `3.1.3` to `3.1.4` fix CVE-2024-34064](https://github.com/mockery/mockery/pull/1417) +- [1412: Bump `idna` from `3.6` to `3.7` fix CVE-2024-3651](https://github.com/mockery/mockery/pull/1412) + +## [1.6.11] - 2024-03-21 + +### Fixed + +- [1407: Fix constants map generics doc comments](https://github.com/mockery/mockery/pull/1407) +- [1406: Fix reserved words used to name a class, interface or trait](https://github.com/mockery/mockery/pull/1406) +- [1403: Fix regression - partial construction with trait methods](https://github.com/mockery/mockery/pull/1403) +- [1401: Improve `Mockery::mock()` parameter type compatibility with array typehints](https://github.com/mockery/mockery/pull/1401) + +## [1.6.10] - 2024-03-19 + +### Added + +- [1398: [PHP 8.4] Fixes for implicit nullability deprecation](https://github.com/mockery/mockery/pull/1398) + +### Fixed + +- [1397: Fix mock method $args parameter type](https://github.com/mockery/mockery/pull/1397) +- [1396: Fix `1.6.8` release](https://github.com/mockery/mockery/pull/1396) + +## [1.6.9] - 2024-03-12 + +- [1394: Revert v1.6.8 release](https://github.com/mockery/mockery/pull/1394) + +## [1.6.8] - 2024-03-12 + +- [1393: Changelog v1.6.8](https://github.com/mockery/mockery/pull/1393) +- [1392: Refactor remaining codebase](https://github.com/mockery/mockery/pull/1392) +- [1391: Update actions to use Node 20](https://github.com/mockery/mockery/pull/1391) +- [1390: Update `ReadTheDocs` dependencies](https://github.com/mockery/mockery/pull/1390) +- [1389: Refactor `library/Mockery/Matcher/*`](https://github.com/mockery/mockery/pull/1389) +- [1388: Refactor `library/Mockery/Loader/*`](https://github.com/mockery/mockery/pull/1388) +- [1387: Refactor `library/Mockery/CountValidator/*`](https://github.com/mockery/mockery/pull/1387) +- [1386: Add PHPUnit 10+ attributes](https://github.com/mockery/mockery/pull/1386) +- [1385: Update composer dependencies and clean up](https://github.com/mockery/mockery/pull/1385) +- [1384: Update `psalm-baseline.xml`](https://github.com/mockery/mockery/pull/1384) +- [1383: Refactor `library/helpers.php`](https://github.com/mockery/mockery/pull/1383) +- [1382: Refactor `library/Mockery/VerificationExpectation.php`](https://github.com/mockery/mockery/pull/1382) +- [1381: Refactor `library/Mockery/VerificationDirector.php`](https://github.com/mockery/mockery/pull/1381) +- [1380: Refactor `library/Mockery/QuickDefinitionsConfiguration.php`](https://github.com/mockery/mockery/pull/1380) +- [1379: Refactor `library/Mockery/Undefined.php`](https://github.com/mockery/mockery/pull/1379) +- [1378: Refactor `library/Mockery/Reflector.php`](https://github.com/mockery/mockery/pull/1378) +- [1377: Refactor `library/Mockery/ReceivedMethodCalls.php`](https://github.com/mockery/mockery/pull/1377) +- [1376: Refactor `library/Mockery.php`](https://github.com/mockery/mockery/pull/1376) +- [1375: Refactor `library/Mockery/MockInterface.php`](https://github.com/mockery/mockery/pull/1375) +- [1374: Refactor `library/Mockery/MethodCall.php`](https://github.com/mockery/mockery/pull/1374) +- [1373: Refactor `library/Mockery/LegacyMockInterface.php`](https://github.com/mockery/mockery/pull/1373) +- [1372: Refactor `library/Mockery/Instantiator.php`](https://github.com/mockery/mockery/pull/1372) +- [1371: Refactor `library/Mockery/HigherOrderMessage.php`](https://github.com/mockery/mockery/pull/1371) +- [1370: Refactor `library/Mockery/ExpectsHigherOrderMessage.php`](https://github.com/mockery/mockery/pull/1370) +- [1369: Refactor `library/Mockery/ExpectationInterface.php`](https://github.com/mockery/mockery/pull/1369) +- [1368: Refactor `library/Mockery/ExpectationDirector.php`](https://github.com/mockery/mockery/pull/1368) +- [1367: Refactor `library/Mockery/Expectation.php`](https://github.com/mockery/mockery/pull/1367) +- [1366: Refactor `library/Mockery/Exception.php`](https://github.com/mockery/mockery/pull/1366) +- [1365: Refactor `library/Mockery/Container.php`](https://github.com/mockery/mockery/pull/1365) +- [1364: Refactor `library/Mockery/Configuration.php`](https://github.com/mockery/mockery/pull/1364) +- [1363: Refactor `library/Mockery/CompositeExpectation.php`](https://github.com/mockery/mockery/pull/1363) +- [1362: Refactor `library/Mockery/ClosureWrapper.php`](https://github.com/mockery/mockery/pull/1362) +- [1361: Refactor `library/Mockery.php`](https://github.com/mockery/mockery/pull/1361) +- [1360: Refactor Container](https://github.com/mockery/mockery/pull/1360) +- [1355: Fix the namespace in the SubsetTest class](https://github.com/mockery/mockery/pull/1355) +- [1354: Add array-like objects support to hasKey/hasValue matchers](https://github.com/mockery/mockery/pull/1354) + +## [1.6.7] - 2023-12-09 + +### Added + +- [#1338: Support PHPUnit constraints as matchers](https://github.com/mockery/mockery/pull/1338) +- [#1336: Add factory methods for `IsEqual` and `IsSame` matchers](https://github.com/mockery/mockery/pull/1336) + +### Fixed + +- [#1346: Fix test namespaces](https://github.com/mockery/mockery/pull/1346) +- [#1343: Update documentation default theme and build version](https://github.com/mockery/mockery/pull/1343) +- [#1329: Prevent `shouldNotReceive` from getting overridden by invocation count methods](https://github.com/mockery/mockery/pull/1329) + +### Changed + +- [#1351: Update psalm-baseline.xml](https://github.com/mockery/mockery/pull/1351) +- [#1350: Changelog v1.6.7](https://github.com/mockery/mockery/pull/1350) +- [#1349: Cleanup](https://github.com/mockery/mockery/pull/1349) +- [#1348: Update makefile](https://github.com/mockery/mockery/pull/1348) +- [#1347: Bump phars dependencies](https://github.com/mockery/mockery/pull/1347) +- [#1344: Disabled travis-ci and sensiolabs webhooks](https://github.com/mockery/mockery/issues/1344) +- [#1342: Add `.readthedocs.yml` configuration](https://github.com/mockery/mockery/pull/1342) +- [#1340: docs: Remove misplaced semicolumn from code snippet](https://github.com/mockery/mockery/pull/1340) + +## 1.6.6 (2023-08-08) + +- [#1327: Changelog v1.6.6](https://github.com/mockery/mockery/pull/1327) +- [#1325: Keep the file that caused an error for inspection](https://github.com/mockery/mockery/pull/1325) +- [#1324: Fix Regression - Replace `+` Array Union Operator with `array_merge`](https://github.com/mockery/mockery/pull/1324) + +## 1.6.5 (2023-08-05) + +- [#1322: Changelog v1.6.5](https://github.com/mockery/mockery/pull/1322) +- [#1321: Autoload Test Fixtures Based on PHP Runtime Version](https://github.com/mockery/mockery/pull/1321) +- [#1320: Clean up mocks on destruct](https://github.com/mockery/mockery/pull/1320) +- [#1318: Fix misspelling in docs](https://github.com/mockery/mockery/pull/1318) +- [#1316: Fix compatibility issues with PHP 7.3](https://github.com/mockery/mockery/pull/1316) +- [#1315: Fix PHP 7.3 issues](https://github.com/mockery/mockery/issues/1315) +- [#1314: Add Security Policy](https://github.com/mockery/mockery/pull/1314) +- [#1313: Type declaration for `iterable|object`.](https://github.com/mockery/mockery/pull/1313) +- [#1312: Mock disjunctive normal form types](https://github.com/mockery/mockery/pull/1312) +- [#1299: Test PHP `8.3` language features](https://github.com/mockery/mockery/pull/1299) + +## 1.6.4 (2023-07-19) + +- [#1308: Changelog v1.6.4](https://github.com/mockery/mockery/pull/1308) +- [#1307: Revert `src` to `library` for `1.6.x`](https://github.com/mockery/mockery/pull/1307) + +## 1.6.3 (2023-07-18) + +- [#1304: Remove `extra.branch-alias` and update composer information](https://github.com/mockery/mockery/pull/1304) +- [#1303: Update `.gitattributes`](https://github.com/mockery/mockery/pull/1303) +- [#1302: Changelog v1.6.3](https://github.com/mockery/mockery/pull/1302) +- [#1301: Fix mocking classes with `new` initializers in method and attribute params on PHP 8.1](https://github.com/mockery/mockery/pull/1301) +- [#1298: Update default repository branch to latest release branch](https://github.com/mockery/mockery/issues/1298) +- [#1297: Update `Makefile` for contributors](https://github.com/mockery/mockery/pull/1297) +- [#1294: Correct return types of Mock for phpstan](https://github.com/mockery/mockery/pull/1294) +- [#1290: Rename directory `library` to `src`](https://github.com/mockery/mockery/pull/1290) +- [#1288: Update codecov workflow](https://github.com/mockery/mockery/pull/1288) +- [#1287: Update psalm configuration and workflow](https://github.com/mockery/mockery/pull/1287) +- [#1286: Update phpunit workflow](https://github.com/mockery/mockery/pull/1286) +- [#1285: Enforce the minimum required PHP version](https://github.com/mockery/mockery/pull/1285) +- [#1283: Update license and copyright information](https://github.com/mockery/mockery/pull/1283) +- [#1282: Create `COPYRIGHT.md` file](https://github.com/mockery/mockery/pull/1282) +- [#1279: Bump `vimeo/psalm` from `5.9.0` to `5.12.0`](https://github.com/mockery/mockery/pull/1279) + +## 1.6.2 (2023-06-07) + +- [#1276: Add `IsEqual` Argument Matcher](https://github.com/mockery/mockery/pull/1276) +- [#1275: Add `IsSame` Argument Matcher](https://github.com/mockery/mockery/pull/1275) +- [#1274: Update composer branch alias](https://github.com/mockery/mockery/pull/1274) +- [#1271: Support PHP 8.2 `true` Literal Type](https://github.com/mockery/mockery/pull/1271) +- [#1270: Support PHP 8.0 `false` Literal Type](https://github.com/mockery/mockery/pull/1270) + +## 1.6.1 (2023-06-05) + +- [#1267 Drops support for PHP <7.4](https://github.com/mockery/mockery/pull/1267) +- [#1192 Updated changelog for version 1.5.1 to include changes from #1180](https://github.com/mockery/mockery/pull/1192) +- [#1196 Update example in README.md](https://github.com/mockery/mockery/pull/1196) +- [#1199 Fix function parameter default enum value](https://github.com/mockery/mockery/pull/1199) +- [#1205 Deal with null type in PHP8.2](https://github.com/mockery/mockery/pull/1205) +- [#1208 Import MockeryTestCase fully qualified class name](https://github.com/mockery/mockery/pull/1208) +- [#1210 Add support for target class attributes](https://github.com/mockery/mockery/pull/1210) +- [#1212 docs: Add missing comma](https://github.com/mockery/mockery/pull/1212) +- [#1216 Fixes code generation for intersection types](https://github.com/mockery/mockery/pull/1216) +- [#1217 Add MockeryExceptionInterface](https://github.com/mockery/mockery/pull/1217) +- [#1218 tidy: avoids require](https://github.com/mockery/mockery/pull/1218) +- [#1222 Add .editorconfig](https://github.com/mockery/mockery/pull/1222) +- [#1225 Switch to PSR-4 autoload](https://github.com/mockery/mockery/pull/1225) +- [#1226 Refactoring risky tests](https://github.com/mockery/mockery/pull/1226) +- [#1230 Add vimeo/psalm and psalm/plugin-phpunit](https://github.com/mockery/mockery/pull/1230) +- [#1232 Split PHPUnit TestSuites for PHP 8.2](https://github.com/mockery/mockery/pull/1232) +- [#1233 Bump actions/checkout to v3](https://github.com/mockery/mockery/pull/1233) +- [#1234 Bump nick-invision/retry to v2](https://github.com/mockery/mockery/pull/1234) +- [#1235 Setup Codecov for code coverage](https://github.com/mockery/mockery/pull/1235) +- [#1236 Add Psalm CI Check](https://github.com/mockery/mockery/pull/1236) +- [#1237 Unignore composer.lock file](https://github.com/mockery/mockery/pull/1237) +- [#1239 Prevent CI run duplication](https://github.com/mockery/mockery/pull/1239) +- [#1241 Add PHPUnit workflow for PHP 8.3](https://github.com/mockery/mockery/pull/1241) +- [#1244 Improve ClassAttributesPass for Dynamic Properties](https://github.com/mockery/mockery/pull/1244) +- [#1245 Deprecate hamcrest/hamcrest-php package](https://github.com/mockery/mockery/pull/1245) +- [#1246 Add BUG_REPORT.yml Issue template](https://github.com/mockery/mockery/pull/1246) +- [#1250 Deprecate PHP <=8.0](https://github.com/mockery/mockery/issues/1250) +- [#1253 Prevent array to string conversion when serialising a Subset matcher](https://github.com/mockery/mockery/issues/1253) + +## 1.6.0 (2023-06-05) [DELETED] + +This tag was deleted due to a mistake with the composer.json PHP version +constraint, see [#1266](https://github.com/mockery/mockery/issues/1266) + +## 1.3.6 (2022-09-07) + +- PHP 8.2 | Fix "Use of "parent" in callables is deprecated" notice #1169 + +## 1.5.1 (2022-09-07) + +- [PHP 8.2] Various tests: explicitly declare properties #1170 +- [PHP 8.2] Fix "Use of "parent" in callables is deprecated" notice #1169 +- [PHP 8.1] Support intersection types #1164 +- Handle final `__toString` methods #1162 +- Only count assertions on expectations which can fail a test #1180 + +## 1.5.0 (2022-01-20) + +- Override default call count expectations via expects() #1146 +- Mock methods with static return types #1157 +- Mock methods with mixed return type #1156 +- Mock classes with new in initializers on PHP 8.1 #1160 +- Removes redundant PHPUnitConstraint #1158 + +## 1.4.4 (2021-09-13) + +- Fixes auto-generated return values #1144 +- Adds support for tentative types #1130 +- Fixes for PHP 8.1 Support (#1130 and #1140) +- Add method that allows defining a set of arguments the mock should yield #1133 +- Added option to configure default matchers for objects `\Mockery::getConfiguration()->setDefaultMatcher($class, $matcherClass)` #1120 + +## 1.3.5 (2021-09-13) + +- Fix auto-generated return values with union types #1143 +- Adds support for tentative types #1130 +- Fixes for PHP 8.1 Support (#1130 and #1140) +- Add method that allows defining a set of arguments the mock should yield #1133 +- Added option to configure default matchers for objects `\Mockery::getConfiguration()->setDefaultMatcher($class, $matcherClass)` #1120 + +## 1.4.3 (2021-02-24) + +- Fixes calls to fetchMock before initialisation #1113 +- Allow shouldIgnoreMissing() to behave in a recursive fashion #1097 +- Custom object formatters #766 (Needs Docs) +- Fix crash on a union type including null #1106 + +## 1.3.4 (2021-02-24) + +- Fixes calls to fetchMock before initialisation #1113 +- Fix crash on a union type including null #1106 + +## 1.4.2 (2020-08-11) + +- Fix array to string conversion in ConstantsPass (#1086) +- Fixed nullable PHP 8.0 union types (#1088, #1089) +- Fixed support for PHP 8.0 parent type (#1088, #1089) +- Fixed PHP 8.0 mixed type support (#1088, #1089) +- Fixed PHP 8.0 union return types (#1088, #1089) + +## 1.4.1 (2020-07-09) + +- Allow quick definitions to use 'at least once' expectation + `\Mockery::getConfiguration()->getQuickDefinitions()->shouldBeCalledAtLeastOnce(true)` (#1056) +- Added provisional support for PHP 8.0 (#1068, #1072,#1079) +- Fix mocking methods with iterable return type without specifying a return value (#1075) + +## 1.3.3 (2020-08-11) + +- Fix array to string conversion in ConstantsPass (#1086) +- Fixed nullable PHP 8.0 union types (#1088) +- Fixed support for PHP 8.0 parent type (#1088) +- Fixed PHP 8.0 mixed type support (#1088) +- Fixed PHP 8.0 union return types (#1088) + +## 1.3.2 (2020-07-09) + +- Fix mocking with anonymous classes (#1039) +- Fix andAnyOthers() to properly match earlier expectations (#1051) +- Added provisional support for PHP 8.0 (#1068, #1072,#1079) +- Fix mocking methods with iterable return type without specifying a return value (#1075) + +## 1.4.0 (2020-05-19) + +- Fix mocking with anonymous classes (#1039) +- Fix andAnyOthers() to properly match earlier expectations (#1051) +- Drops support for PHP < 7.3 and PHPUnit < 8 (#1059) + +## 1.3.1 (2019-12-26) + +- Revert improved exception debugging due to BC breaks (#1032) + +## 1.3.0 (2019-11-24) + +- Added capture `Mockery::capture` convenience matcher (#1020) +- Added `andReturnArg` to echo back an argument passed to a an expectation (#992) +- Improved exception debugging (#1000) +- Fixed `andSet` to not reuse properties between mock objects (#1012) + +## 1.2.4 (2019-09-30) + +- Fix a bug introduced with previous release, for empty method definition lists (#1009) + +## 1.2.3 (2019-08-07) + +- Allow mocking classes that have allows and expects methods (#868) +- Allow passing thru __call method in all mock types (experimental) (#969) +- Add support for `!` to blacklist methods (#959) +- Added `withSomeOfArgs` to partial match a list of args (#967) +- Fix chained demeter calls with type hint (#956) + +## 1.2.2 (2019-02-13) + +- Fix a BC breaking change for PHP 5.6/PHPUnit 5.7.27 (#947) + +## 1.2.1 (2019-02-07) + +- Support for PHPUnit 8 (#942) +- Allow mocking static methods called on instance (#938) + +## 1.2.0 (2018-10-02) + +- Starts counting default expectations towards count (#910) +- Adds workaround for some HHVM return types (#909) +- Adds PhpStorm metadata support for autocomplete etc (#904) +- Further attempts to support multiple PHPUnit versions (#903) +- Allows setting constructor expectations on instance mocks (#900) +- Adds workaround for HHVM memoization decorator (#893) +- Adds experimental support for callable spys (#712) + +## 1.1.0 (2018-05-08) + +- Allows use of string method names in allows and expects (#794) +- Finalises allows and expects syntax in API (#799) +- Search for handlers in a case instensitive way (#801) +- Deprecate allowMockingMethodsUnnecessarily (#808) +- Fix risky tests (#769) +- Fix namespace in TestListener (#812) +- Fixed conflicting mock names (#813) +- Clean elses (#819) +- Updated protected method mocking exception message (#826) +- Map of constants to mock (#829) +- Simplify foreach with `in_array` function (#830) +- Typehinted return value on Expectation#verify. (#832) +- Fix shouldNotHaveReceived with HigherOrderMessage (#842) +- Deprecates shouldDeferMissing (#839) +- Adds support for return type hints in Demeter chains (#848) +- Adds shouldNotReceive to composite expectation (#847) +- Fix internal error when using --static-backup (#845) +- Adds `andAnyOtherArgs` as an optional argument matcher (#860) +- Fixes namespace qualifying with namespaced named mocks (#872) +- Added possibility to add Constructor-Expections on hard dependencies, read: Mockery::mock('overload:...') (#781) + +## 1.0.0 (2017-09-06) + +- Destructors (`__destruct`) are stubbed out where it makes sense +- Allow passing a closure argument to `withArgs()` to validate multiple arguments at once. +- `Mockery\Adapter\Phpunit\TestListener` has been rewritten because it + incorrectly marked some tests as risky. It will no longer verify mock + expectations but instead check that tests do that themselves. PHPUnit 6 is + required if you want to use this fail safe. +- Removes SPL Class Loader +- Removed object recorder feature +- Bumped minimum PHP version to 5.6 +- `andThrow` will now throw anything `\Throwable` +- Adds `allows` and `expects` syntax +- Adds optional global helpers for `mock`, `namedMock` and `spy` +- Adds ability to create objects using traits +- `Mockery\Matcher\MustBe` was deprecated +- Marked `Mockery\MockInterface` as internal +- Subset matcher matches recursively +- BC BREAK - Spies return `null` by default from ignored (non-mocked) methods with nullable return type +- Removed extracting getter methods of object instances +- BC BREAK - Remove implicit regex matching when trying to match string arguments, introduce `\Mockery::pattern()` when regex matching is needed +- Fix Mockery not getting closed in cases of failing test cases +- Fix Mockery not setting properties on overloaded instance mocks +- BC BREAK - Fix Mockery not trying default expectations if there is any concrete expectation +- BC BREAK - Mockery's PHPUnit integration will mark a test as risky if it + thinks one it's exceptions has been swallowed in PHPUnit > 5.7.6. Use `$e->dismiss()` to dismiss. + +## 0.9.4 (XXXX-XX-XX) + +- `shouldIgnoreMissing` will respect global `allowMockingNonExistentMethods` + config +- Some support for variadic parameters +- Hamcrest is now a required dependency +- Instance mocks now respect `shouldIgnoreMissing` call on control instance +- This will be the *last version to support PHP 5.3* +- Added `Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration` trait +- Added `makePartial` to `Mockery\MockInterface` as it was missing + +## 0.9.3 (2014-12-22) + +- Added a basic spy implementation +- Added `Mockery\Adapter\Phpunit\MockeryTestCase` for more reliable PHPUnit + integration + +## 0.9.2 (2014-09-03) + +- Some workarounds for the serialisation problems created by changes to PHP in 5.5.13, 5.4.29, + 5.6. +- Demeter chains attempt to reuse doubles as they see fit, so for foo->bar and + foo->baz, we'll attempt to use the same foo + +## 0.9.1 (2014-05-02) + +- Allow specifying consecutive exceptions to be thrown with `andThrowExceptions` +- Allow specifying methods which can be mocked when using + `Mockery\Configuration::allowMockingNonExistentMethods(false)` with + `Mockery\MockInterface::shouldAllowMockingMethod($methodName)` +- Added andReturnSelf method: `$mock->shouldReceive("foo")->andReturnSelf()` +- `shouldIgnoreMissing` now takes an optional value that will be return instead + of null, e.g. `$mock->shouldIgnoreMissing($mock)` + +## 0.9.0 (2014-02-05) + +- Allow mocking classes with final __wakeup() method +- Quick definitions are now always `byDefault` +- Allow mocking of protected methods with `shouldAllowMockingProtectedMethods` +- Support official Hamcrest package +- Generator completely rewritten +- Easily create named mocks with namedMock diff --git a/vendor/mockery/mockery/CONTRIBUTING.md b/vendor/mockery/mockery/CONTRIBUTING.md new file mode 100644 index 0000000..d828fb3 --- /dev/null +++ b/vendor/mockery/mockery/CONTRIBUTING.md @@ -0,0 +1,82 @@ +# Contributing + + +We'd love you to help out with mockery and no contribution is too small. + + +## Reporting Bugs + +Issues can be reported on the [issue tracker](https://github.com/mockery/mockery/issues). +Please try and report any bugs with a minimal reproducible example, it will make things easier for other +contributors and your problems will hopefully be resolved quickly. + + +## Requesting Features + +We're always interested to hear about your ideas and you can request features by +creating a ticket in the [issue tracker](https://github.com/mockery/mockery/issues). We can't always guarantee +someone will jump on it straight away, but putting it out there to see if anyone +else is interested is a good idea. + +Likewise, if a feature you would like is already listed in +the issue tracker, add a :+1: so that other contributors know it's a feature +that would help others. + + +## Contributing code and documentation + +We loosely follow the +[PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md) +and +[PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) coding standards, +but we'll probably merge any code that looks close enough. + +* Fork the [repository](https://github.com/mockery/mockery) on GitHub +* Add the code for your feature or bug +* Add some tests for your feature or bug +* Optionally, but preferably, write some documentation +* Optionally, update the CHANGELOG.md file with your feature or + [BC](http://en.wikipedia.org/wiki/Backward_compatibility) break +* Send a [Pull Request](https://help.github.com/articles/creating-a-pull-request) to the + correct target branch (see below) + +If you have a big change or would like to discuss something, create an issue in +the [issue tracker](https://github.com/mockery/mockery/issues) or jump in to \#mockery on freenode + + +Any code you contribute must be licensed under the [BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause). + +## Target Branch + +Mockery may have several active branches at any one time and roughly follows a +[Git Branching Model](https://igor.io/2013/10/21/git-branching-model.html). +Generally, if you're developing a new feature, you want to be targeting the +master branch, if it's a bug fix, you want to be targeting a release branch, +e.g. 0.8. + + +## Testing Mockery + +To run the unit tests for Mockery, clone the git repository, download Composer using +the instructions at [http://getcomposer.org/download/](http://getcomposer.org/download/), +then install the dependencies with `php /path/to/composer.phar install`. + +This will install the required dev dependencies and create the +autoload files required by the unit tests. You may run the `vendor/bin/phpunit` command +to run the unit tests. If everything goes to plan, there will be no failed tests! + + +## Debugging Mockery + +Mockery and its code generation can be difficult to debug. A good start is to +use the `RequireLoader`, which will dump the code generated by mockery to a file +before requiring it, rather than using eval. This will help with stack traces, +and you will be able to open the mock class in your editor. + +``` php + +// tests/bootstrap.php + +Mockery::setLoader(new Mockery\Loader\RequireLoader(sys_get_temp_dir())); + +``` diff --git a/vendor/mockery/mockery/COPYRIGHT.md b/vendor/mockery/mockery/COPYRIGHT.md new file mode 100644 index 0000000..b3b19bc --- /dev/null +++ b/vendor/mockery/mockery/COPYRIGHT.md @@ -0,0 +1,7 @@ +# Copyright + +- Copyright (c) [2009](https://github.com/mockery/mockery/commit/1d96f88142abe804ab9e893a5f07933f63e9bff9), [Pádraic Brady](https://github.com/padraic) +- Copyright (c) [2011](https://github.com/mockery/mockery/commit/94dbb63aab37c659f63ea6e34acc6958928b0f59), [Robert Basic](https://github.com/robertbasic) +- Copyright (c) [2012](https://github.com/mockery/mockery/commit/64e3ad6960eb3202b5b91b91a4ef1cf6252f0fef), [Dave Marshall](https://github.com/davedevelopment) +- Copyright (c) [2013](https://github.com/mockery/mockery/commit/270ddd0bd051251e36a5688c52fc2638a097b110), [Graham Campbell](https://github.com/GrahamCampbell) +- Copyright (c) [2017](https://github.com/mockery/mockery/commit/ba28b84c416b95924886bbd64a6a2f68e863536a), [Nathanael Esayeas](https://github.com/ghostwriter) diff --git a/vendor/mockery/mockery/LICENSE b/vendor/mockery/mockery/LICENSE new file mode 100644 index 0000000..1a9030c --- /dev/null +++ b/vendor/mockery/mockery/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2009-2023, Pádraic Brady +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/mockery/mockery/README.md b/vendor/mockery/mockery/README.md new file mode 100644 index 0000000..2697734 --- /dev/null +++ b/vendor/mockery/mockery/README.md @@ -0,0 +1,294 @@ +Mockery +======= + +[![Build Status](https://github.com/mockery/mockery/actions/workflows/tests.yml/badge.svg)](https://github.com/mockery/mockery/actions) +[![Supported PHP Version](https://badgen.net/packagist/php/mockery/mockery?color=8892bf)](https://www.php.net/supported-versions) +[![Code Coverage](https://codecov.io/gh/mockery/mockery/branch/1.6.x/graph/badge.svg?token=oxHwVM56bT)](https://codecov.io/gh/mockery/mockery) +[![Type Coverage](https://shepherd.dev/github/mockery/mockery/coverage.svg)](https://shepherd.dev/github/mockery/mockery) +[![Latest Stable Version](https://poser.pugx.org/mockery/mockery/v/stable.svg)](https://packagist.org/packages/mockery/mockery) +[![Total Downloads](https://poser.pugx.org/mockery/mockery/downloads.svg)](https://packagist.org/packages/mockery/mockery) + +Mockery is a simple yet flexible PHP mock object framework for use in unit testing +with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a +test double framework with a succinct API capable of clearly defining all possible +object operations and interactions using a human readable Domain Specific Language +(DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, +Mockery is easy to integrate with PHPUnit and can operate alongside +phpunit-mock-objects without the World ending. + +Mockery is released under a New BSD License. + +## Installation + +To install Mockery, run the command below and you will get the latest +version + +```sh +composer require --dev mockery/mockery +``` + +## Documentation + +In older versions, this README file was the documentation for Mockery. Over time +we have improved this, and have created an extensive documentation for you. Please +use this README file as a starting point for Mockery, but do read the documentation +to learn how to use Mockery. + +The current version can be seen at [docs.mockery.io](http://docs.mockery.io). + +## PHPUnit Integration + +Mockery ships with some helpers if you are using PHPUnit. You can extend the +[`Mockery\Adapter\Phpunit\MockeryTestCase`](library/Mockery/Adapter/Phpunit/MockeryTestCase.php) +class instead of `PHPUnit\Framework\TestCase`, or if you are already using a +custom base class for your tests, take a look at the traits available in the +[`Mockery\Adapter\Phpunit`](library/Mockery/Adapter/Phpunit) namespace. + +## Test Doubles + +Test doubles (often called mocks) simulate the behaviour of real objects. They are +commonly utilised to offer test isolation, to stand in for objects which do not +yet exist, or to allow for the exploratory design of class APIs without +requiring actual implementation up front. + +The benefits of a test double framework are to allow for the flexible generation +and configuration of test doubles. They allow the setting of expected method calls +and/or return values using a flexible API which is capable of capturing every +possible real object behaviour in way that is stated as close as possible to a +natural language description. Use the `Mockery::mock` method to create a test +double. + +``` php +$double = Mockery::mock(); +``` + +If you need Mockery to create a test double to satisfy a particular type hint, +you can pass the type to the `mock` method. + +``` php +class Book {} + +interface BookRepository { + function find($id): Book; + function findAll(): array; + function add(Book $book): void; +} + +$double = Mockery::mock(BookRepository::class); +``` + +A detailed explanation of creating and working with test doubles is given in the +documentation, [Creating test doubles](http://docs.mockery.io/en/latest/reference/creating_test_doubles.html) +section. + +## Method Stubs 🎫 + +A method stub is a mechanism for having your test double return canned responses +to certain method calls. With stubs, you don't care how many times, if at all, +the method is called. Stubs are used to provide indirect input to the system +under test. + +``` php +$double->allows()->find(123)->andReturns(new Book()); + +$book = $double->find(123); +``` + +If you have used Mockery before, you might see something new in the example +above — we created a method stub using `allows`, instead of the "old" +`shouldReceive` syntax. This is a new feature of Mockery v1, but fear not, +the trusty ol' `shouldReceive` is still here. + +For new users of Mockery, the above example can also be written as: + +``` php +$double->shouldReceive('find')->with(123)->andReturn(new Book()); +$book = $double->find(123); +``` + +If your stub doesn't require specific arguments, you can also use this shortcut +for setting up multiple calls at once: + +``` php +$double->allows([ + "findAll" => [new Book(), new Book()], +]); +``` + +or + +``` php +$double->shouldReceive('findAll') + ->andReturn([new Book(), new Book()]); +``` + +You can also use this shortcut, which creates a double and sets up some stubs in +one call: + +``` php +$double = Mockery::mock(BookRepository::class, [ + "findAll" => [new Book(), new Book()], +]); +``` + +## Method Call Expectations 📲 + +A Method call expectation is a mechanism to allow you to verify that a +particular method has been called. You can specify the parameters and you can +also specify how many times you expect it to be called. Method call expectations +are used to verify indirect output of the system under test. + +``` php +$book = new Book(); + +$double = Mockery::mock(BookRepository::class); +$double->expects()->add($book); +``` + +During the test, Mockery accept calls to the `add` method as prescribed. +After you have finished exercising the system under test, you need to +tell Mockery to check that the method was called as expected, using the +`Mockery::close` method. One way to do that is to add it to your `tearDown` +method in PHPUnit. + +``` php + +public function tearDown() +{ + Mockery::close(); +} +``` + +The `expects()` method automatically sets up an expectation that the method call +(and matching parameters) is called **once and once only**. You can choose to change +this if you are expecting more calls. + +``` php +$double->expects()->add($book)->twice(); +``` + +If you have used Mockery before, you might see something new in the example +above — we created a method expectation using `expects`, instead of the "old" +`shouldReceive` syntax. This is a new feature of Mockery v1, but same as with +`allows` in the previous section, it can be written in the "old" style. + +For new users of Mockery, the above example can also be written as: + +``` php +$double->shouldReceive('find') + ->with(123) + ->once() + ->andReturn(new Book()); +$book = $double->find(123); +``` + +A detailed explanation of declaring expectations on method calls, please +read the documentation, the [Expectation declarations](http://docs.mockery.io/en/latest/reference/expectations.html) +section. After that, you can also learn about the new `allows` and `expects` methods +in the [Alternative shouldReceive syntax](http://docs.mockery.io/en/latest/reference/alternative_should_receive_syntax.html) +section. + +It is worth mentioning that one way of setting up expectations is no better or worse +than the other. Under the hood, `allows` and `expects` are doing the same thing as +`shouldReceive`, at times in "less words", and as such it comes to a personal preference +of the programmer which way to use. + +## Test Spies 🕵️ + +By default, all test doubles created with the `Mockery::mock` method will only +accept calls that they have been configured to `allow` or `expect` (or in other words, +calls that they `shouldReceive`). Sometimes we don't necessarily care about all of the +calls that are going to be made to an object. To facilitate this, we can tell Mockery +to ignore any calls it has not been told to expect or allow. To do so, we can tell a +test double `shouldIgnoreMissing`, or we can create the double using the `Mocker::spy` +shortcut. + +``` php +// $double = Mockery::mock()->shouldIgnoreMissing(); +$double = Mockery::spy(); + +$double->foo(); // null +$double->bar(); // null +``` + +Further to this, sometimes we want to have the object accept any call during the test execution +and then verify the calls afterwards. For these purposes, we need our test +double to act as a Spy. All mockery test doubles record the calls that are made +to them for verification afterwards by default: + +``` php +$double->baz(123); + +$double->shouldHaveReceived()->baz(123); // null +$double->shouldHaveReceived()->baz(12345); // Uncaught Exception Mockery\Exception\InvalidCountException... +``` + +Please refer to the [Spies](http://docs.mockery.io/en/latest/reference/spies.html) section +of the documentation to learn more about the spies. + +## Utilities 🔌 + +### Global Helpers + +Mockery ships with a handful of global helper methods, you just need to ask +Mockery to declare them. + +``` php +Mockery::globalHelpers(); + +$mock = mock(Some::class); +$spy = spy(Some::class); + +$spy->shouldHaveReceived() + ->foo(anyArgs()); +``` + +All of the global helpers are wrapped in a `!function_exists` call to avoid +conflicts. So if you already have a global function called `spy`, Mockery will +silently skip the declaring its own `spy` function. + +### Testing Traits + +As Mockery ships with code generation capabilities, it was trivial to add +functionality allowing users to create objects on the fly that use particular +traits. Any abstract methods defined by the trait will be created and can have +expectations or stubs configured like normal Test Doubles. + +``` php +trait Foo { + function foo() { + return $this->doFoo(); + } + + abstract function doFoo(); +} + +$double = Mockery::mock(Foo::class); +$double->allows()->doFoo()->andReturns(123); +$double->foo(); // int(123) +``` + +## Versioning + +The Mockery team attempts to adhere to [Semantic Versioning](http://semver.org), +however, some of Mockery's internals are considered private and will be open to +change at any time. Just because a class isn't final, or a method isn't marked +private, does not mean it constitutes part of the API we guarantee under the +versioning scheme. + +### Alternative Runtimes + +Mockery 1.3 was the last version to support HHVM 3 and PHP 5. There is no support for HHVM 4+. + +## A new home for Mockery + +⚠️️ Update your remotes! Mockery has transferred to a new location. While it was once +at `padraic/mockery`, it is now at `mockery/mockery`. While your +existing repositories will redirect transparently for any operations, take some +time to transition to the new URL. +```sh +$ git remote set-url upstream https://github.com/mockery/mockery.git +``` +Replace `upstream` with the name of the remote you use locally; `upstream` is commonly +used but you may be using something else. Run `git remote -v` to see what you're actually +using. diff --git a/vendor/mockery/mockery/SECURITY.md b/vendor/mockery/mockery/SECURITY.md new file mode 100644 index 0000000..cc8790e --- /dev/null +++ b/vendor/mockery/mockery/SECURITY.md @@ -0,0 +1,14 @@ +# Security Policy + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| `2.0.x` | `yes` | +| `1.6.x` | `yes` | +| `1.5.x` | `yes` | +| `<1.5.x` | `no` | + +## Reporting a Vulnerability + +To report a security vulnerability, please [`Open a draft security advisory`](https://github.com/mockery/mockery/security/advisories/new) so we can coordinate the fix and disclosure. diff --git a/vendor/mockery/mockery/composer.json b/vendor/mockery/mockery/composer.json new file mode 100644 index 0000000..6f03cf2 --- /dev/null +++ b/vendor/mockery/mockery/composer.json @@ -0,0 +1,119 @@ +{ + "name": "mockery/mockery", + "description": "Mockery is a simple yet flexible PHP mock object framework", + "license": "BSD-3-Clause", + "type": "library", + "keywords": [ + "bdd", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "tdd", + "test", + "test double", + "testing" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "https://github.com/padraic", + "role": "Author" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" + } + ], + "homepage": "https://github.com/mockery/mockery", + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery", + "docs": "https://docs.mockery.io/", + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories" + }, + "require": { + "php": ">=7.3", + "lib-pcre": ">=7.0", + "hamcrest/hamcrest-php": "^2.0.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.6.17", + "symplify/easy-coding-standard": "^12.1.14" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "autoload": { + "psr-4": { + "Mockery\\": "library/Mockery" + }, + "files": [ + "library/helpers.php", + "library/Mockery.php" + ] + }, + "autoload-dev": { + "psr-4": { + "Fixture\\": "tests/Fixture/", + "Mockery\\Tests\\Unit\\": "tests/Unit", + "test\\": "tests/" + }, + "files": [ + "fixtures/autoload.php", + "vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php" + ] + }, + "config": { + "optimize-autoloader": true, + "platform": { + "php": "7.3.999" + }, + "preferred-install": "dist", + "sort-packages": true + }, + "scripts": { + "check": [ + "@composer validate", + "@ecs", + "@test" + ], + "docs": "vendor/bin/phpdoc -d library -t docs/api", + "ecs": [ + "@ecs:fix", + "@ecs:check" + ], + "ecs:check": "ecs check --clear-cache || true", + "ecs:fix": "ecs check --clear-cache --fix", + "phive": [ + "tools/phive update --force-accept-unsigned", + "tools/phive purge" + ], + "phpunit": "vendor/bin/phpunit --do-not-cache-result --colors=always", + "phpunit:coverage": "@phpunit --coverage-clover=coverage.xml", + "psalm": "tools/psalm --no-cache --show-info=true", + "psalm:alter": "tools/psalm --no-cache --alter --allow-backwards-incompatible-changes=false --safe-types", + "psalm:baseline": "@psalm --no-diff --set-baseline=psalm-baseline.xml", + "psalm:dry-run": "@psalm:alter --issues=all --dry-run", + "psalm:fix": "@psalm:alter --issues=UnnecessaryVarAnnotation,MissingPureAnnotation,MissingImmutableAnnotation", + "psalm:security": "@psalm --no-diff --taint-analysis", + "psalm:shepherd": "@psalm --no-diff --shepherd --stats --output-format=github", + "test": [ + "@phpunit --stop-on-defect", + "@psalm", + "@psalm:security", + "@psalm:dry-run" + ] + } +} diff --git a/vendor/mockery/mockery/composer.lock b/vendor/mockery/mockery/composer.lock new file mode 100644 index 0000000..603f969 --- /dev/null +++ b/vendor/mockery/mockery/composer.lock @@ -0,0 +1,1867 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "e70f68192a56a148f93ad7a1c0779be3", + "packages": [ + { + "name": "hamcrest/hamcrest-php", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, + "time": "2020-07-09T08:09:16+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:15:36+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2023-03-08T13:26:56+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.18.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" + }, + "time": "2023-12-10T21:03:43+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.30", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:47:57+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.6.17", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1a156980d78a6666721b7e8e8502fe210b587fcd", + "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1 || ^2", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.28", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.5", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.2", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.6-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.17" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2024-02-23T13:14:51+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:19:30+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-05-07T05:35:17+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:03:51+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T06:03:37+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bde739e7565280bda77be70044ac1047bc007e34" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", + "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-02T09:26:13+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:20:34+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:07:39+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:13:03+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "symplify/easy-coding-standard", + "version": "12.1.14", + "source": { + "type": "git", + "url": "https://github.com/easy-coding-standard/easy-coding-standard.git", + "reference": "e3c4a241ee36704f7cf920d5931f39693e64afd5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/easy-coding-standard/easy-coding-standard/zipball/e3c4a241ee36704f7cf920d5931f39693e64afd5", + "reference": "e3c4a241ee36704f7cf920d5931f39693e64afd5", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "conflict": { + "friendsofphp/php-cs-fixer": "<3.46", + "phpcsstandards/php_codesniffer": "<3.8", + "symplify/coding-standard": "<12.1" + }, + "bin": [ + "bin/ecs" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Use Coding Standard with 0-knowledge of PHP-CS-Fixer and PHP_CodeSniffer", + "keywords": [ + "Code style", + "automation", + "fixer", + "static analysis" + ], + "support": { + "issues": "https://github.com/easy-coding-standard/easy-coding-standard/issues", + "source": "https://github.com/easy-coding-standard/easy-coding-standard/tree/12.1.14" + }, + "funding": [ + { + "url": "https://www.paypal.me/rectorphp", + "type": "custom" + }, + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "time": "2024-02-23T13:10:40+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2023-11-20T00:12:19+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.3", + "lib-pcre": ">=7.0" + }, + "platform-dev": [], + "platform-overrides": { + "php": "7.3.999" + }, + "plugin-api-version": "2.6.0" +} diff --git a/vendor/mockery/mockery/docs/.gitignore b/vendor/mockery/mockery/docs/.gitignore new file mode 100644 index 0000000..e35d885 --- /dev/null +++ b/vendor/mockery/mockery/docs/.gitignore @@ -0,0 +1 @@ +_build diff --git a/vendor/mockery/mockery/docs/Makefile b/vendor/mockery/mockery/docs/Makefile new file mode 100644 index 0000000..9a8c940 --- /dev/null +++ b/vendor/mockery/mockery/docs/Makefile @@ -0,0 +1,177 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/MockeryDocs.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/MockeryDocs.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/MockeryDocs" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/MockeryDocs" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/vendor/mockery/mockery/docs/README.md b/vendor/mockery/mockery/docs/README.md new file mode 100644 index 0000000..63ca69d --- /dev/null +++ b/vendor/mockery/mockery/docs/README.md @@ -0,0 +1,4 @@ +mockery-docs +============ + +Document for the PHP Mockery framework on readthedocs.org \ No newline at end of file diff --git a/vendor/mockery/mockery/docs/_static/.gitkeep b/vendor/mockery/mockery/docs/_static/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/vendor/mockery/mockery/docs/conf.py b/vendor/mockery/mockery/docs/conf.py new file mode 100644 index 0000000..d0f6960 --- /dev/null +++ b/vendor/mockery/mockery/docs/conf.py @@ -0,0 +1,268 @@ +# -*- coding: utf-8 -*- +# +# Mockery Docs documentation build configuration file, created by +# sphinx-quickstart on Mon Mar 3 14:04:26 2014. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys +import os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.todo', + 'sphinx_rtd_theme', +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'Mockery Docs' +copyright = u'Pádraic Brady, Dave Marshall and contributors' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '1.6' +# The full version, including alpha/beta/rc tags. +release = '1.6.x' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +#html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'MockeryDocsdoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + ('index', 'MockeryDocs.tex', u'Mockery Docs Documentation', + u'Pádraic Brady, Dave Marshall, Wouter, Graham Campbell', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'mockerydocs', u'Mockery Docs Documentation', + [u'Pádraic Brady, Dave Marshall, Wouter, Graham Campbell'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'MockeryDocs', u'Mockery Docs Documentation', + u'Pádraic Brady, Dave Marshall, Wouter, Graham Campbell', 'MockeryDocs', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False + + +#on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + +if not on_rtd: # only import and set the theme if we're building docs locally + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + print(sphinx_rtd_theme.get_html_theme_path()) + +# load PhpLexer +from sphinx.highlighting import lexers +from pygments.lexers.web import PhpLexer + +# enable highlighting for PHP code not between by default +lexers['php'] = PhpLexer(startinline=True) +lexers['php-annotations'] = PhpLexer(startinline=True) diff --git a/vendor/mockery/mockery/docs/cookbook/big_parent_class.rst b/vendor/mockery/mockery/docs/cookbook/big_parent_class.rst new file mode 100644 index 0000000..a27d532 --- /dev/null +++ b/vendor/mockery/mockery/docs/cookbook/big_parent_class.rst @@ -0,0 +1,52 @@ +.. index:: + single: Cookbook; Big Parent Class + +Big Parent Class +================ + +In some application code, especially older legacy code, we can come across some +classes that extend a "big parent class" - a parent class that knows and does +too much: + +.. code-block:: php + + class BigParentClass + { + public function doesEverything() + { + // sets up database connections + // writes to log files + } + } + + class ChildClass extends BigParentClass + { + public function doesOneThing() + { + // but calls on BigParentClass methods + $result = $this->doesEverything(); + // does something with $result + return $result; + } + } + +We want to test our ``ChildClass`` and its ``doesOneThing`` method, but the +problem is that it calls on ``BigParentClass::doesEverything()``. One way to +handle this would be to mock out **all** of the dependencies ``BigParentClass`` +has and needs, and then finally actually test our ``doesOneThing`` method. It's +an awful lot of work to do that. + +What we can do, is to do something... unconventional. We can create a runtime +partial test double of the ``ChildClass`` itself and mock only the parent's +``doesEverything()`` method: + +.. code-block:: php + + $childClass = \Mockery::mock('ChildClass')->makePartial(); + $childClass->shouldReceive('doesEverything') + ->andReturn('some result from parent'); + + $childClass->doesOneThing(); // string("some result from parent"); + +With this approach we mock out only the ``doesEverything()`` method, and all the +unmocked methods are called on the actual ``ChildClass`` instance. diff --git a/vendor/mockery/mockery/docs/cookbook/class_constants.rst b/vendor/mockery/mockery/docs/cookbook/class_constants.rst new file mode 100644 index 0000000..0b92569 --- /dev/null +++ b/vendor/mockery/mockery/docs/cookbook/class_constants.rst @@ -0,0 +1,183 @@ +.. index:: + single: Cookbook; Class Constants + +Class Constants +=============== + +When creating a test double for a class, Mockery does not create stubs out of +any class constants defined in the class we are mocking. Sometimes though, the +non-existence of these class constants, setup of the test, and the application +code itself, it can lead to undesired behavior, and even a PHP error: +``PHP Fatal error: Uncaught Error: Undefined class constant 'FOO' in ...`` + +While supporting class constants in Mockery would be possible, it does require +an awful lot of work, for a small number of use cases. + +Named Mocks +----------- + +We can, however, deal with these constants in a way supported by Mockery - by +using :ref:`creating-test-doubles-named-mocks`. + +A named mock is a test double that has a name of the class we want to mock, but +under it is a stubbed out class that mimics the real class with canned responses. + +Lets look at the following made up, but not impossible scenario: + +.. code-block:: php + + class Fetcher + { + const SUCCESS = 0; + const FAILURE = 1; + + public static function fetch() + { + // Fetcher gets something for us from somewhere... + return self::SUCCESS; + } + } + + class MyClass + { + public function doFetching() + { + $response = Fetcher::fetch(); + + if ($response == Fetcher::SUCCESS) { + echo "Thanks!" . PHP_EOL; + } else { + echo "Try again!" . PHP_EOL; + } + } + } + +Our ``MyClass`` calls a ``Fetcher`` that fetches some resource from somewhere - +maybe it downloads a file from a remote web service. Our ``MyClass`` prints out +a response message depending on the response from the ``Fetcher::fetch()`` call. + +When testing ``MyClass`` we don't really want ``Fetcher`` to go and download +random stuff from the internet every time we run our test suite. So we mock it +out: + +.. code-block:: php + + // Using alias: because fetch is called statically! + \Mockery::mock('alias:Fetcher') + ->shouldReceive('fetch') + ->andReturn(0); + + $myClass = new MyClass(); + $myClass->doFetching(); + +If we run this, our test will error out with a nasty +``PHP Fatal error: Uncaught Error: Undefined class constant 'SUCCESS' in ..``. + +Here's how a ``namedMock()`` can help us in a situation like this. + +We create a stub for the ``Fetcher`` class, stubbing out the class constants, +and then use ``namedMock()`` to create a mock named ``Fetcher`` based on our +stub: + +.. code-block:: php + + class FetcherStub + { + const SUCCESS = 0; + const FAILURE = 1; + } + + \Mockery::namedMock('Fetcher', 'FetcherStub') + ->shouldReceive('fetch') + ->andReturn(0); + + $myClass = new MyClass(); + $myClass->doFetching(); + +This works because under the hood, Mockery creates a class called ``Fetcher`` +that extends ``FetcherStub``. + +The same approach will work even if ``Fetcher::fetch()`` is not a static +dependency: + +.. code-block:: php + + class Fetcher + { + const SUCCESS = 0; + const FAILURE = 1; + + public function fetch() + { + // Fetcher gets something for us from somewhere... + return self::SUCCESS; + } + } + + class MyClass + { + public function doFetching($fetcher) + { + $response = $fetcher->fetch(); + + if ($response == Fetcher::SUCCESS) { + echo "Thanks!" . PHP_EOL; + } else { + echo "Try again!" . PHP_EOL; + } + } + } + +And the test will have something like this: + +.. code-block:: php + + class FetcherStub + { + const SUCCESS = 0; + const FAILURE = 1; + } + + $mock = \Mockery::mock('Fetcher', 'FetcherStub') + $mock->shouldReceive('fetch') + ->andReturn(0); + + $myClass = new MyClass(); + $myClass->doFetching($mock); + + +Constants Map +------------- + +Another way of mocking class constants can be with the use of the constants map configuration. + +Given a class with constants: + +.. code-block:: php + + class Fetcher + { + const SUCCESS = 0; + const FAILURE = 1; + + public function fetch() + { + // Fetcher gets something for us from somewhere... + return self::SUCCESS; + } + } + +It can be mocked with: + +.. code-block:: php + + \Mockery::getConfiguration()->setConstantsMap([ + 'Fetcher' => [ + 'SUCCESS' => 'success', + 'FAILURE' => 'fail', + ] + ]); + + $mock = \Mockery::mock('Fetcher'); + var_dump($mock::SUCCESS); // (string) 'success' + var_dump($mock::FAILURE); // (string) 'fail' diff --git a/vendor/mockery/mockery/docs/cookbook/default_expectations.rst b/vendor/mockery/mockery/docs/cookbook/default_expectations.rst new file mode 100644 index 0000000..2c6fcae --- /dev/null +++ b/vendor/mockery/mockery/docs/cookbook/default_expectations.rst @@ -0,0 +1,17 @@ +.. index:: + single: Cookbook; Default Mock Expectations + +Default Mock Expectations +========================= + +Often in unit testing, we end up with sets of tests which use the same object +dependency over and over again. Rather than mocking this class/object within +every single unit test (requiring a mountain of duplicate code), we can +instead define reusable default mocks within the test case's ``setup()`` +method. This even works where unit tests use varying expectations on the same +or similar mock object. + +How this works, is that you can define mocks with default expectations. Then, +in a later unit test, you can add or fine-tune expectations for that specific +test. Any expectation can be set as a default using the ``byDefault()`` +declaration. diff --git a/vendor/mockery/mockery/docs/cookbook/detecting_mock_objects.rst b/vendor/mockery/mockery/docs/cookbook/detecting_mock_objects.rst new file mode 100644 index 0000000..0210c69 --- /dev/null +++ b/vendor/mockery/mockery/docs/cookbook/detecting_mock_objects.rst @@ -0,0 +1,13 @@ +.. index:: + single: Cookbook; Detecting Mock Objects + +Detecting Mock Objects +====================== + +Users may find it useful to check whether a given object is a real object or a +simulated Mock Object. All Mockery mocks implement the +``\Mockery\MockInterface`` interface which can be used in a type check. + +.. code-block:: php + + assert($mightBeMocked instanceof \Mockery\MockInterface); diff --git a/vendor/mockery/mockery/docs/cookbook/index.rst b/vendor/mockery/mockery/docs/cookbook/index.rst new file mode 100644 index 0000000..034e39d --- /dev/null +++ b/vendor/mockery/mockery/docs/cookbook/index.rst @@ -0,0 +1,16 @@ +Cookbook +======== + +.. toctree:: + :hidden: + + default_expectations + detecting_mock_objects + not_calling_the_constructor + mocking_hard_dependencies + class_constants + big_parent_class + mockery_on + mocking_class_within_class + +.. include:: map.rst.inc diff --git a/vendor/mockery/mockery/docs/cookbook/map.rst.inc b/vendor/mockery/mockery/docs/cookbook/map.rst.inc new file mode 100644 index 0000000..c9dd99e --- /dev/null +++ b/vendor/mockery/mockery/docs/cookbook/map.rst.inc @@ -0,0 +1,7 @@ +* :doc:`/cookbook/default_expectations` +* :doc:`/cookbook/detecting_mock_objects` +* :doc:`/cookbook/not_calling_the_constructor` +* :doc:`/cookbook/mocking_hard_dependencies` +* :doc:`/cookbook/class_constants` +* :doc:`/cookbook/big_parent_class` +* :doc:`/cookbook/mockery_on` diff --git a/vendor/mockery/mockery/docs/cookbook/mockery_on.rst b/vendor/mockery/mockery/docs/cookbook/mockery_on.rst new file mode 100644 index 0000000..631f124 --- /dev/null +++ b/vendor/mockery/mockery/docs/cookbook/mockery_on.rst @@ -0,0 +1,85 @@ +.. index:: + single: Cookbook; Complex Argument Matching With Mockery::on + +Complex Argument Matching With Mockery::on +========================================== + +When we need to do a more complex argument matching for an expected method call, +the ``\Mockery::on()`` matcher comes in really handy. It accepts a closure as an +argument and that closure in turn receives the argument passed in to the method, +when called. If the closure returns ``true``, Mockery will consider that the +argument has passed the expectation. If the closure returns ``false``, or a +"falsey" value, the expectation will not pass. + +The ``\Mockery::on()`` matcher can be used in various scenarios — validating +an array argument based on multiple keys and values, complex string matching... + +Say, for example, we have the following code. It doesn't do much; publishes a +post by setting the ``published`` flag in the database to ``1`` and sets the +``published_at`` to the current date and time: + +.. code-block:: php + + model = $model; + } + + public function publishPost($id) + { + $saveData = [ + 'post_id' => $id, + 'published' => 1, + 'published_at' => gmdate('Y-m-d H:i:s'), + ]; + $this->model->save($saveData); + } + } + +In a test we would mock the model and set some expectations on the call of the +``save()`` method: + +.. code-block:: php + + shouldReceive('save') + ->once() + ->with(\Mockery::on(function ($argument) use ($postId) { + $postIdIsSet = isset($argument['post_id']) && $argument['post_id'] === $postId; + $publishedFlagIsSet = isset($argument['published']) && $argument['published'] === 1; + $publishedAtIsSet = isset($argument['published_at']); + + return $postIdIsSet && $publishedFlagIsSet && $publishedAtIsSet; + })); + + $service = new \Service\Post($modelMock); + $service->publishPost($postId); + + \Mockery::close(); + +The important part of the example is inside the closure we pass to the +``\Mockery::on()`` matcher. The ``$argument`` is actually the ``$saveData`` argument +the ``save()`` method gets when it is called. We check for a couple of things in +this argument: + +* the post ID is set, and is same as the post ID we passed in to the + ``publishPost()`` method, +* the ``published`` flag is set, and is ``1``, and +* the ``published_at`` key is present. + +If any of these requirements is not satisfied, the closure will return ``false``, +the method call expectation will not be met, and Mockery will throw a +``NoMatchingExpectationException``. + +.. note:: + + This cookbook entry is an adaption of the blog post titled + `"Complex argument matching in Mockery" `_, + published by Robert Basic on his blog. diff --git a/vendor/mockery/mockery/docs/cookbook/mocking_class_within_class.rst b/vendor/mockery/mockery/docs/cookbook/mocking_class_within_class.rst new file mode 100644 index 0000000..51f030b --- /dev/null +++ b/vendor/mockery/mockery/docs/cookbook/mocking_class_within_class.rst @@ -0,0 +1,146 @@ +.. index:: + single: Cookbook; Mocking class within class + +.. _mocking-class-within-class: + +Mocking class within class +========================== + +Imagine a case where you need to create an instance of a class and use it +within the same method: + +.. code-block:: php + + // Point.php + setPoint($x1, $y1); + + $b = new Point(); + $b->setPoint($x2, $y1); + + $c = new Point(); + $c->setPoint($x2, $y2); + + $d = new Point(); + $d->setPoint($x1, $y2); + + $this->draw([$a, $b, $c, $d]); + } + + public function draw($points) { + echo "Do something with the points"; + } + } + +And that you want to test that a logic in ``Rectangle->create()`` calls +properly each used thing - in this case calls ``Point->setPoint()``, but +``Rectangle->draw()`` does some graphical stuff that you want to avoid calling. + +You set the mocks for ``App\Point`` and ``App\Rectangle``: + +.. code-block:: php + + shouldReceive("setPoint")->andThrow(Exception::class); + + $rect = Mockery::mock("App\Rectangle")->makePartial(); + $rect->shouldReceive("draw"); + + $rect->create(0, 0, 100, 100); // does not throw exception + Mockery::close(); + } + } + +and the test does not work. Why? The mocking relies on the class not being +present yet, but the class is autoloaded therefore the mock alone for +``App\Point`` is useless which you can see with ``echo`` being executed. + +Mocks however work for the first class in the order of loading i.e. +``App\Rectangle``, which loads the ``App\Point`` class. In more complex example +that would be a single point that initiates the whole loading (``use Class``) +such as:: + + A // main loading initiator + |- B // another loading initiator + | |-E + | +-G + | + |- C // another loading initiator + | +-F + | + +- D + +That basically means that the loading prevents mocking and for each such +a loading initiator there needs to be implemented a workaround. +Overloading is one approach, however it pollutes the global state. In this case +we try to completely avoid the global state pollution with custom +``new Class()`` behavior per loading initiator and that can be mocked easily +in few critical places. + +That being said, although we can't stop loading, we can return mocks. Let's +look at ``Rectangle->create()`` method: + +.. code-block:: php + + class Rectangle { + public function newPoint() { + return new Point(); + } + + public function create($x1, $y1, $x2, $y2) { + $a = $this->newPoint(); + $a->setPoint($x1, $y1); + ... + } + ... + } + +We create a custom function to encapsulate ``new`` keyword that would otherwise +just use the autoloaded class ``App\Point`` and in our test we mock that function +so that it returns our mock: + +.. code-block:: php + + shouldReceive("setPoint")->andThrow(Exception::class); + + $rect = Mockery::mock("App\Rectangle")->makePartial(); + $rect->shouldReceive("draw"); + + // pass the App\Point mock into App\Rectangle as an alternative + // to using new App\Point() in-place. + $rect->shouldReceive("newPoint")->andReturn($point); + + $this->expectException(Exception::class); + $rect->create(0, 0, 100, 100); + Mockery::close(); + } + } + +If we run this test now, it should pass. For more complex cases we'd find +the next loader in the program flow and proceed with wrapping and passing +mock instances with predefined behavior into already existing classes. diff --git a/vendor/mockery/mockery/docs/cookbook/mocking_hard_dependencies.rst b/vendor/mockery/mockery/docs/cookbook/mocking_hard_dependencies.rst new file mode 100644 index 0000000..3391d7b --- /dev/null +++ b/vendor/mockery/mockery/docs/cookbook/mocking_hard_dependencies.rst @@ -0,0 +1,137 @@ +.. index:: + single: Cookbook; Mocking Hard Dependencies + +Mocking Hard Dependencies (new Keyword) +======================================= + +One prerequisite to mock hard dependencies is that the code we are trying to test uses autoloading. + +Let's take the following code for an example: + +.. code-block:: php + + sendSomething($param); + return $externalService->getSomething(); + } + } + +The way we can test this without doing any changes to the code itself is by creating :doc:`instance mocks ` by using the ``overload`` prefix. + +.. code-block:: php + + shouldReceive('sendSomething') + ->once() + ->with($param); + $externalMock->shouldReceive('getSomething') + ->once() + ->andReturn('Tested!'); + + $service = new \App\Service(); + + $result = $service->callExternalService($param); + + $this->assertSame('Tested!', $result); + } + } + +If we run this test now, it should pass. Mockery does its job and our ``App\Service`` will use the mocked external service instead of the real one. + +The problem with this is when we want to, for example, test the ``App\Service\External`` itself, or if we use that class somewhere else in our tests. + +When Mockery overloads a class, because of how PHP works with files, that overloaded class file must not be included otherwise Mockery will throw a "class already exists" exception. This is where autoloading kicks in and makes our job a lot easier. + +To make this possible, we'll tell PHPUnit to run the tests that have overloaded classes in separate processes and to not preserve global state. That way we'll avoid having the overloaded class included more than once. Of course this has its downsides as these tests will run slower. + +Our test example from above now becomes: + +.. code-block:: php + + shouldReceive('sendSomething') + ->once() + ->with($param); + $externalMock->shouldReceive('getSomething') + ->once() + ->andReturn('Tested!'); + + $service = new \App\Service(); + + $result = $service->callExternalService($param); + + $this->assertSame('Tested!', $result); + } + } + + + +Testing the constructor arguments of hard Dependencies +------------------------------------------------------ + +Sometimes we might want to ensure that the hard dependency is instantiated with +particular arguments. With overloaded mocks, we can set up expectations on the +constructor. + +.. code-block:: php + + allows('sendSomething'); + $externalMock->shouldReceive('__construct') + ->once() + ->with(5); + + $service = new \App\Service(); + $result = $service->callExternalService($param); + } + } + + +.. note:: + For more straightforward and single-process tests oriented way check + :ref:`mocking-class-within-class`. + +.. note:: + + This cookbook entry is an adaption of the blog post titled + `"Mocking hard dependencies with Mockery" `_, + published by Robert Basic on his blog. diff --git a/vendor/mockery/mockery/docs/cookbook/not_calling_the_constructor.rst b/vendor/mockery/mockery/docs/cookbook/not_calling_the_constructor.rst new file mode 100644 index 0000000..b8157ae --- /dev/null +++ b/vendor/mockery/mockery/docs/cookbook/not_calling_the_constructor.rst @@ -0,0 +1,63 @@ +.. index:: + single: Cookbook; Not Calling the Original Constructor + +Not Calling the Original Constructor +==================================== + +When creating generated partial test doubles, Mockery mocks out only the method +which we specifically told it to. This means that the original constructor of +the class we are mocking will be called. + +In some cases this is not a desired behavior, as the constructor might issue +calls to other methods, or other object collaborators, and as such, can create +undesired side-effects in the application's environment when running the tests. + +If this happens, we need to use runtime partial test doubles, as they don't +call the original constructor. + +.. code-block:: php + + class MyClass + { + public function __construct() + { + echo "Original constructor called." . PHP_EOL; + // Other side-effects can happen... + } + } + + // This will print "Original constructor called." + $mock = \Mockery::mock('MyClass[foo]'); + +A better approach is to use runtime partial doubles: + +.. code-block:: php + + class MyClass + { + public function __construct() + { + echo "Original constructor called." . PHP_EOL; + // Other side-effects can happen... + } + } + + // This will not print anything + $mock = \Mockery::mock('MyClass')->makePartial(); + $mock->shouldReceive('foo'); + +This is one of the reason why we don't recommend using generated partial test +doubles, but if possible, always use the runtime partials. + +Read more about :ref:`creating-test-doubles-partial-test-doubles`. + +.. note:: + + The way generated partial test doubles work, is a BC break. If you use a + really old version of Mockery, it might behave in a way that the constructor + is not being called for these generated partials. In the case if you upgrade + to a more recent version of Mockery, you'll probably have to change your + tests to use runtime partials, instead of generated ones. + + This change was introduced in early 2013, so it is highly unlikely that you + are using a Mockery from before that, so this should not be an issue. diff --git a/vendor/mockery/mockery/docs/getting_started/index.rst b/vendor/mockery/mockery/docs/getting_started/index.rst new file mode 100644 index 0000000..434755c --- /dev/null +++ b/vendor/mockery/mockery/docs/getting_started/index.rst @@ -0,0 +1,12 @@ +Getting Started +=============== + +.. toctree:: + :hidden: + + installation + upgrading + simple_example + quick_reference + +.. include:: map.rst.inc diff --git a/vendor/mockery/mockery/docs/getting_started/installation.rst b/vendor/mockery/mockery/docs/getting_started/installation.rst new file mode 100644 index 0000000..f578adc --- /dev/null +++ b/vendor/mockery/mockery/docs/getting_started/installation.rst @@ -0,0 +1,49 @@ +.. index:: + single: Installation + +Installation +============ + +Mockery can be installed using Composer or by cloning it from its GitHub +repository. These two options are outlined below. + +Composer +-------- + +You can read more about Composer on `getcomposer.org `_. +To install Mockery using Composer, first install Composer for your project +using the instructions on the `Composer download page `_. +You can then define your development dependency on Mockery using the suggested +parameters below. While every effort is made to keep the master branch stable, +you may prefer to use the current stable version tag instead (use the +``@stable`` tag). + +.. code-block:: json + + { + "require-dev": { + "mockery/mockery": "dev-master" + } + } + +To install, you then may call: + +.. code-block:: bash + + php composer.phar update + +This will install Mockery as a development dependency, meaning it won't be +installed when using ``php composer.phar update --no-dev`` in production. + +Other way to install is directly from composer command line, as below. + +.. code-block:: bash + + php composer.phar require --dev mockery/mockery + +Git +--- + +The Git repository hosts the development version in its master branch. You can +install this using Composer by referencing ``dev-master`` as your preferred +version in your project's ``composer.json`` file as the earlier example shows. diff --git a/vendor/mockery/mockery/docs/getting_started/map.rst.inc b/vendor/mockery/mockery/docs/getting_started/map.rst.inc new file mode 100644 index 0000000..1055945 --- /dev/null +++ b/vendor/mockery/mockery/docs/getting_started/map.rst.inc @@ -0,0 +1,4 @@ +* :doc:`/getting_started/installation` +* :doc:`/getting_started/upgrading` +* :doc:`/getting_started/simple_example` +* :doc:`/getting_started/quick_reference` diff --git a/vendor/mockery/mockery/docs/getting_started/quick_reference.rst b/vendor/mockery/mockery/docs/getting_started/quick_reference.rst new file mode 100644 index 0000000..e729a85 --- /dev/null +++ b/vendor/mockery/mockery/docs/getting_started/quick_reference.rst @@ -0,0 +1,200 @@ +.. index:: + single: Quick Reference + +Quick Reference +=============== + +The purpose of this page is to give a quick and short overview of some of the +most common Mockery features. + +Do read the :doc:`../reference/index` to learn about all the Mockery features. + +Integrate Mockery with PHPUnit, either by extending the ``MockeryTestCase``: + +.. code-block:: php + + use \Mockery\Adapter\Phpunit\MockeryTestCase; + + class MyTest extends MockeryTestCase + { + } + +or by using the ``MockeryPHPUnitIntegration`` trait: + +.. code-block:: php + + use \PHPUnit\Framework\TestCase; + use \Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; + + class MyTest extends TestCase + { + use MockeryPHPUnitIntegration; + } + +Creating a test double: + +.. code-block:: php + + $testDouble = \Mockery::mock('MyClass'); + +Creating a test double that implements a certain interface: + +.. code-block:: php + + $testDouble = \Mockery::mock('MyClass, MyInterface'); + +Expecting a method to be called on a test double: + +.. code-block:: php + + $testDouble = \Mockery::mock('MyClass'); + $testDouble->shouldReceive('foo'); + +Expecting a method to **not** be called on a test double: + +.. code-block:: php + + $testDouble = \Mockery::mock('MyClass'); + $testDouble->shouldNotReceive('foo'); + +Expecting a method to be called on a test double, once, with a certain argument, +and to return a value: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('foo') + ->once() + ->with($arg) + ->andReturn($returnValue); + +Expecting a method to be called on a test double and to return a different value +for each successive call: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('foo') + ->andReturn(1, 2, 3); + + $mock->foo(); // int(1); + $mock->foo(); // int(2); + $mock->foo(); // int(3); + $mock->foo(); // int(3); + +Creating a runtime partial test double: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass')->makePartial(); + +Creating a spy: + +.. code-block:: php + + $spy = \Mockery::spy('MyClass'); + +Expecting that a spy should have received a method call: + +.. code-block:: php + + $spy = \Mockery::spy('MyClass'); + + $spy->foo(); + + $spy->shouldHaveReceived()->foo(); + +Not so simple examples +^^^^^^^^^^^^^^^^^^^^^^ + +Creating a mock object to return a sequence of values from a set of method +calls: + +.. code-block:: php + + use \Mockery\Adapter\Phpunit\MockeryTestCase; + + class SimpleTest extends MockeryTestCase + { + public function testSimpleMock() + { + $mock = \Mockery::mock(array('pi' => 3.1416, 'e' => 2.71)); + $this->assertEquals(3.1416, $mock->pi()); + $this->assertEquals(2.71, $mock->e()); + } + } + +Creating a mock object which returns a self-chaining Undefined object for a +method call: + +.. code-block:: php + + use \Mockery\Adapter\Phpunit\MockeryTestCase; + + class UndefinedTest extends MockeryTestCase + { + public function testUndefinedValues() + { + $mock = \Mockery::mock('mymock'); + $mock->shouldReceive('divideBy')->with(0)->andReturnUndefined(); + $this->assertTrue($mock->divideBy(0) instanceof \Mockery\Undefined); + } + } + +Creating a mock object with multiple query calls and a single update call: + +.. code-block:: php + + use \Mockery\Adapter\Phpunit\MockeryTestCase; + + class DbTest extends MockeryTestCase + { + public function testDbAdapter() + { + $mock = \Mockery::mock('db'); + $mock->shouldReceive('query')->andReturn(1, 2, 3); + $mock->shouldReceive('update')->with(5)->andReturn(NULL)->once(); + + // ... test code here using the mock + } + } + +Expecting all queries to be executed before any updates: + +.. code-block:: php + + use \Mockery\Adapter\Phpunit\MockeryTestCase; + + class DbTest extends MockeryTestCase + { + public function testQueryAndUpdateOrder() + { + $mock = \Mockery::mock('db'); + $mock->shouldReceive('query')->andReturn(1, 2, 3)->ordered(); + $mock->shouldReceive('update')->andReturn(NULL)->once()->ordered(); + + // ... test code here using the mock + } + } + +Creating a mock object where all queries occur after startup, but before finish, +and where queries are expected with several different params: + +.. code-block:: php + + use \Mockery\Adapter\Phpunit\MockeryTestCase; + + class DbTest extends MockeryTestCase + { + public function testOrderedQueries() + { + $db = \Mockery::mock('db'); + $db->shouldReceive('startup')->once()->ordered(); + $db->shouldReceive('query')->with('CPWR')->andReturn(12.3)->once()->ordered('queries'); + $db->shouldReceive('query')->with('MSFT')->andReturn(10.0)->once()->ordered('queries'); + $db->shouldReceive('query')->with(\Mockery::pattern("/^....$/"))->andReturn(3.3)->atLeast()->once()->ordered('queries'); + $db->shouldReceive('finish')->once()->ordered(); + + // ... test code here using the mock + } + } diff --git a/vendor/mockery/mockery/docs/getting_started/simple_example.rst b/vendor/mockery/mockery/docs/getting_started/simple_example.rst new file mode 100644 index 0000000..32ee269 --- /dev/null +++ b/vendor/mockery/mockery/docs/getting_started/simple_example.rst @@ -0,0 +1,70 @@ +.. index:: + single: Getting Started; Simple Example + +Simple Example +============== + +Imagine we have a ``Temperature`` class which samples the temperature of a +locale before reporting an average temperature. The data could come from a web +service or any other data source, but we do not have such a class at present. +We can, however, assume some basic interactions with such a class based on its +interaction with the ``Temperature`` class: + +.. code-block:: php + + class Temperature + { + private $service; + + public function __construct($service) + { + $this->service = $service; + } + + public function average() + { + $total = 0; + for ($i=0; $i<3; $i++) { + $total += $this->service->readTemp(); + } + return $total/3; + } + } + +Even without an actual service class, we can see how we expect it to operate. +When writing a test for the ``Temperature`` class, we can now substitute a +mock object for the real service which allows us to test the behaviour of the +``Temperature`` class without actually needing a concrete service instance. + +.. code-block:: php + + use \Mockery; + + class TemperatureTest extends \PHPUnit\Framework\TestCase + { + public function tearDown() + { + Mockery::close(); + } + + public function testGetsAverageTemperatureFromThreeServiceReadings() + { + $service = Mockery::mock('service'); + $service->shouldReceive('readTemp') + ->times(3) + ->andReturn(10, 12, 14); + + $temperature = new Temperature($service); + + $this->assertEquals(12, $temperature->average()); + } + } + +We create a mock object which our ``Temperature`` class will use and set some +expectations for that mock — that it should receive three calls to the ``readTemp`` +method, and these calls will return 10, 12, and 14 as results. + +.. note:: + + PHPUnit integration can remove the need for a ``tearDown()`` method. See + ":doc:`/reference/phpunit_integration`" for more information. diff --git a/vendor/mockery/mockery/docs/getting_started/upgrading.rst b/vendor/mockery/mockery/docs/getting_started/upgrading.rst new file mode 100644 index 0000000..8a17dfd --- /dev/null +++ b/vendor/mockery/mockery/docs/getting_started/upgrading.rst @@ -0,0 +1,82 @@ +.. index:: + single: Upgrading + +Upgrading +========= + +Upgrading to 1.0.0 +------------------ + +Minimum PHP version ++++++++++++++++++++ + +As of Mockery 1.0.0 the minimum PHP version required is 5.6. + +Using Mockery with PHPUnit +++++++++++++++++++++++++++ + +In the "old days", 0.9.x and older, the way Mockery was integrated with PHPUnit was +through a PHPUnit listener. That listener would in turn call the ``\Mockery::close()`` +method for us. + +As of 1.0.0, PHPUnit test cases where we want to use Mockery, should either use the +``\Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration`` trait, or extend the +``\Mockery\Adapter\Phpunit\MockeryTestCase`` test case. This will in turn call the +``\Mockery::close()`` method for us. + +Read the documentation for a detailed overview of ":doc:`/reference/phpunit_integration`". + +``\Mockery\Matcher\MustBe`` is deprecated ++++++++++++++++++++++++++++++++++++++++++ + +As of 1.0.0 the ``\Mockery\Matcher\MustBe`` matcher is deprecated and will be removed in +Mockery 2.0.0. We recommend instead to use the PHPUnit equivalents of the +MustBe matcher. + +``allows`` and ``expects`` +++++++++++++++++++++++++++ + +As of 1.0.0, Mockery has two new methods to set up expectations: ``allows`` and ``expects``. +This means that these methods names are now "reserved" for Mockery, or in other words +classes you want to mock with Mockery, can't have methods called ``allows`` or ``expects``. + +Read more in the documentation about this ":doc:`/reference/alternative_should_receive_syntax`". + +No more implicit regex matching for string arguments +++++++++++++++++++++++++++++++++++++++++++++++++++++ + +When setting up string arguments in method expectations, Mockery 0.9.x and older, would try +to match arguments using a regular expression in a "last attempt" scenario. + +As of 1.0.0, Mockery will no longer attempt to do this regex matching, but will only try +first the identical operator ``===``, and failing that, the equals operator ``==``. + +If you want to match an argument using regular expressions, please use the new +``\Mockery\Matcher\Pattern`` matcher. Read more in the documentation about this +pattern matcher in the ":doc:`/reference/argument_validation`" section. + +``andThrow`` ``\Throwable`` ++++++++++++++++++++++++++++ + +As of 1.0.0, the ``andThrow`` can now throw any ``\Throwable``. + +Upgrading to 0.9 +---------------- + +The generator was completely rewritten, so any code with a deep integration to +mockery will need evaluating. + +Upgrading to 0.8 +---------------- + +Since the release of 0.8.0 the following behaviours were altered: + +1. The ``shouldIgnoreMissing()`` behaviour optionally applied to mock objects + returned an instance of ``\Mockery\Undefined`` when methods called did not + match a known expectation. Since 0.8.0, this behaviour was switched to + returning ``null`` instead. You can restore the 0.7.2 behaviour by using the + following: + + .. code-block:: php + + $mock = \Mockery::mock('stdClass')->shouldIgnoreMissing()->asUndefined(); diff --git a/vendor/mockery/mockery/docs/index.rst b/vendor/mockery/mockery/docs/index.rst new file mode 100644 index 0000000..f8cbbd3 --- /dev/null +++ b/vendor/mockery/mockery/docs/index.rst @@ -0,0 +1,76 @@ +Mockery +======= + +Mockery is a simple yet flexible PHP mock object framework for use in unit +testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is +to offer a test double framework with a succinct API capable of clearly +defining all possible object operations and interactions using a human +readable Domain Specific Language (DSL). Designed as a drop in alternative to +PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with +PHPUnit and can operate alongside phpunit-mock-objects without the World +ending. + +Mock Objects +------------ + +In unit tests, mock objects simulate the behaviour of real objects. They are +commonly utilised to offer test isolation, to stand in for objects which do +not yet exist, or to allow for the exploratory design of class APIs without +requiring actual implementation up front. + +The benefits of a mock object framework are to allow for the flexible +generation of such mock objects (and stubs). They allow the setting of +expected method calls and return values using a flexible API which is capable +of capturing every possible real object behaviour in way that is stated as +close as possible to a natural language description. + +Getting Started +--------------- + +Ready to dive into the Mockery framework? Then you can get started by reading +the "Getting Started" section! + +.. toctree:: + :hidden: + + getting_started/index + +.. include:: getting_started/map.rst.inc + +Reference +--------- + +The reference contains a complete overview of all features of the Mockery +framework. + +.. toctree:: + :hidden: + + reference/index + +.. include:: reference/map.rst.inc + +Mockery +------- + +Learn about Mockery's configuration, reserved method names, exceptions... + +.. toctree:: + :hidden: + + mockery/index + +.. include:: mockery/map.rst.inc + +Cookbook +-------- + +Want to learn some easy tips and tricks? Take a look at the cookbook articles! + +.. toctree:: + :hidden: + + cookbook/index + +.. include:: cookbook/map.rst.inc + diff --git a/vendor/mockery/mockery/docs/mockery/configuration.rst b/vendor/mockery/mockery/docs/mockery/configuration.rst new file mode 100644 index 0000000..0071336 --- /dev/null +++ b/vendor/mockery/mockery/docs/mockery/configuration.rst @@ -0,0 +1,94 @@ +.. index:: + single: Mockery; Configuration + +Mockery Global Configuration +============================ + +To allow for a degree of fine-tuning, Mockery utilises a singleton +configuration object to store a small subset of core behaviours. The three +currently present include: + +* Option to allow/disallow the mocking of methods which do not actually exist + fulfilled (i.e. unused) +* Setter/Getter for added a parameter map for internal PHP class methods + (``Reflection`` cannot detect these automatically) +* Option to drive if quick definitions should define a stub or a mock with + an 'at least once' expectation. + +By default, the first behaviour is enabled. Of course, there are +situations where this can lead to unintended consequences. The mocking of +non-existent methods may allow mocks based on real classes/objects to fall out +of sync with the actual implementations, especially when some degree of +integration testing (testing of object wiring) is not being performed. + +You may allow or disallow this behaviour (whether for whole test suites or +just select tests) by using the following call: + +.. code-block:: php + + \Mockery::getConfiguration()->allowMockingNonExistentMethods(bool); + +Passing a true allows the behaviour, false disallows it. It takes effect +immediately until switched back. If the behaviour is detected when not allowed, +it will result in an Exception being thrown at that point. Note that disallowing +this behaviour should be carefully considered since it necessarily removes at +least some of Mockery's flexibility. + +The other two methods are: + +.. code-block:: php + + \Mockery::getConfiguration()->setInternalClassMethodParamMap($class, $method, array $paramMap) + \Mockery::getConfiguration()->getInternalClassMethodParamMap($class, $method) + +These are used to define parameters (i.e. the signature string of each) for the +methods of internal PHP classes (e.g. SPL, or PECL extension classes like +ext/mongo's MongoCollection. Reflection cannot analyse the parameters of internal +classes. Most of the time, you never need to do this. It's mainly needed where an +internal class method uses pass-by-reference for a parameter - you MUST in such +cases ensure the parameter signature includes the ``&`` symbol correctly as Mockery +won't correctly add it automatically for internal classes. Note that internal class +parameter overriding is not available in PHP 8. This is because incompatible +signatures have been reclassified as fatal errors. + +Finally there is the possibility to change what a quick definition produces. +By default quick definitions create stubs but you can change this behaviour +by asking Mockery to use 'at least once' expectations. + +.. code-block:: php + + \Mockery::getConfiguration()->getQuickDefinitions()->shouldBeCalledAtLeastOnce(bool) + +Passing a true allows the behaviour, false disallows it. It takes effect +immediately until switched back. By doing so you can avoid the proliferating of +quick definitions that accumulate overtime in your code since the test would +fail in case the 'at least once' expectation is not fulfilled. + +Disabling reflection caching +---------------------------- + +Mockery heavily uses `"reflection" `_ +to do it's job. To speed up things, Mockery caches internally the information it +gathers via reflection. In some cases, this caching can cause problems. + +The **only** known situation when this occurs is when PHPUnit's ``--static-backup`` option +is used. If you use ``--static-backup`` and you get an error that looks like the +following: + +.. code-block:: php + + Error: Internal error: Failed to retrieve the reflection object + +We suggest turning off the reflection cache as so: + +.. code-block:: php + + \Mockery::getConfiguration()->disableReflectionCache(); + +Turning it back on can be done like so: + +.. code-block:: php + + \Mockery::getConfiguration()->enableReflectionCache(); + +In no other situation should you be required turn this reflection cache off. diff --git a/vendor/mockery/mockery/docs/mockery/exceptions.rst b/vendor/mockery/mockery/docs/mockery/exceptions.rst new file mode 100644 index 0000000..623b158 --- /dev/null +++ b/vendor/mockery/mockery/docs/mockery/exceptions.rst @@ -0,0 +1,65 @@ +.. index:: + single: Mockery; Exceptions + +Mockery Exceptions +================== + +Mockery throws three types of exceptions when it cannot verify a mock object. + +#. ``\Mockery\Exception\InvalidCountException`` +#. ``\Mockery\Exception\InvalidOrderException`` +#. ``\Mockery\Exception\NoMatchingExpectationException`` + +You can capture any of these exceptions in a try...catch block to query them +for specific information which is also passed along in the exception message +but is provided separately from getters should they be useful when logging or +reformatting output. + +\Mockery\Exception\InvalidCountException +---------------------------------------- + +The exception class is used when a method is called too many (or too few) +times and offers the following methods: + +* ``getMock()`` - return actual mock object +* ``getMockName()`` - return the name of the mock object +* ``getMethodName()`` - return the name of the method the failing expectation + is attached to +* ``getExpectedCount()`` - return expected calls +* ``getExpectedCountComparative()`` - returns a string, e.g. ``<=`` used to + compare to actual count +* ``getActualCount()`` - return actual calls made with given argument + constraints + +\Mockery\Exception\InvalidOrderException +---------------------------------------- + +The exception class is used when a method is called outside the expected order +set using the ``ordered()`` and ``globally()`` expectation modifiers. It +offers the following methods: + +* ``getMock()`` - return actual mock object +* ``getMockName()`` - return the name of the mock object +* ``getMethodName()`` - return the name of the method the failing expectation + is attached to +* ``getExpectedOrder()`` - returns an integer represented the expected index + for which this call was expected +* ``getActualOrder()`` - return the actual index at which this method call + occurred. + +\Mockery\Exception\NoMatchingExpectationException +------------------------------------------------- + +The exception class is used when a method call does not match any known +expectation. All expectations are uniquely identified in a mock object by the +method name and the list of expected arguments. You can disable this exception +and opt for returning NULL from all unexpected method calls by using the +earlier mentioned shouldIgnoreMissing() behaviour modifier. This exception +class offers the following methods: + +* ``getMock()`` - return actual mock object +* ``getMockName()`` - return the name of the mock object +* ``getMethodName()`` - return the name of the method the failing expectation + is attached to +* ``getActualArguments()`` - return actual arguments used to search for a + matching expectation diff --git a/vendor/mockery/mockery/docs/mockery/gotchas.rst b/vendor/mockery/mockery/docs/mockery/gotchas.rst new file mode 100644 index 0000000..92c566d --- /dev/null +++ b/vendor/mockery/mockery/docs/mockery/gotchas.rst @@ -0,0 +1,44 @@ +.. index:: + single: Mockery; Gotchas + +Gotchas! +======== + +Mocking objects in PHP has its limitations and gotchas. Some functionality +can't be mocked or can't be mocked YET! If you locate such a circumstance, +please please (pretty please with sugar on top) create a new issue on GitHub +so it can be documented and resolved where possible. Here is a list to note: + +1. Classes containing public ``__wakeup()`` methods can be mocked but the + mocked ``__wakeup()`` method will perform no actions and cannot have + expectations set for it. This is necessary since Mockery must serialize and + unserialize objects to avoid some ``__construct()`` insanity and attempting + to mock a ``__wakeup()`` method as normal leads to a + ``BadMethodCallException`` being thrown. + +2. Mockery has two scenarios where real classes are replaced: Instance mocks + and alias mocks. Both will generate PHP fatal errors if the real class is + loaded, usually via a require or include statement. Only use these two mock + types where autoloading is in place and where classes are not explicitly + loaded on a per-file basis using ``require()``, ``require_once()``, etc. + +3. Internal PHP classes are not entirely capable of being fully analysed using + ``Reflection``. For example, ``Reflection`` cannot reveal details of + expected parameters to the methods of such internal classes. As a result, + there will be problems where a method parameter is defined to accept a + value by reference (Mockery cannot detect this condition and will assume a + pass by value on scalars and arrays). If references as internal class + method parameters are needed, you should use the + ``\Mockery\Configuration::setInternalClassMethodParamMap()`` method. + Note, however that internal class parameter overriding is not available in + PHP 8 since incompatible signatures have been reclassified as fatal errors. + +4. Creating a mock implementing a certain interface with incorrect case in the + interface name, and then creating a second mock implementing the same + interface, but this time with the correct case, will have undefined behavior + due to PHP's ``class_exists`` and related functions being case insensitive. + Using the ``::class`` keyword in PHP can help you avoid these mistakes. + +The gotchas noted above are largely down to PHP's architecture and are assumed +to be unavoidable. But - if you figure out a solution (or a better one than +what may exist), let us know! diff --git a/vendor/mockery/mockery/docs/mockery/index.rst b/vendor/mockery/mockery/docs/mockery/index.rst new file mode 100644 index 0000000..b698d6c --- /dev/null +++ b/vendor/mockery/mockery/docs/mockery/index.rst @@ -0,0 +1,12 @@ +Mockery +======= + +.. toctree:: + :hidden: + + configuration + exceptions + reserved_method_names + gotchas + +.. include:: map.rst.inc diff --git a/vendor/mockery/mockery/docs/mockery/map.rst.inc b/vendor/mockery/mockery/docs/mockery/map.rst.inc new file mode 100644 index 0000000..46ffa97 --- /dev/null +++ b/vendor/mockery/mockery/docs/mockery/map.rst.inc @@ -0,0 +1,4 @@ +* :doc:`/mockery/configuration` +* :doc:`/mockery/exceptions` +* :doc:`/mockery/reserved_method_names` +* :doc:`/mockery/gotchas` diff --git a/vendor/mockery/mockery/docs/mockery/reserved_method_names.rst b/vendor/mockery/mockery/docs/mockery/reserved_method_names.rst new file mode 100644 index 0000000..5ad58d4 --- /dev/null +++ b/vendor/mockery/mockery/docs/mockery/reserved_method_names.rst @@ -0,0 +1,33 @@ +.. index:: + single: Reserved Method Names + +Reserved Method Names +===================== + +As you may have noticed, Mockery uses a number of methods called directly on +all mock objects, for example ``shouldReceive()``. Such methods are necessary +in order to setup expectations on the given mock, and so they cannot be +implemented on the classes or objects being mocked without creating a method +name collision (reported as a PHP fatal error). The methods reserved by +Mockery are: + +* ``shouldReceive()`` +* ``shouldNotReceive()`` +* ``allows()`` +* ``expects()`` +* ``shouldAllowMockingMethod()`` +* ``shouldIgnoreMissing()`` +* ``asUndefined()`` +* ``shouldAllowMockingProtectedMethods()`` +* ``makePartial()`` +* ``byDefault()`` +* ``shouldHaveReceived()`` +* ``shouldHaveBeenCalled()`` +* ``shouldNotHaveReceived()`` +* ``shouldNotHaveBeenCalled()`` + + +In addition, all mocks utilise a set of added methods and protected properties +which cannot exist on the class or object being mocked. These are far less +likely to cause collisions. All properties are prefixed with ``_mockery`` and +all method names with ``mockery_``. diff --git a/vendor/mockery/mockery/docs/reference/alternative_should_receive_syntax.rst b/vendor/mockery/mockery/docs/reference/alternative_should_receive_syntax.rst new file mode 100644 index 0000000..78c1e83 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/alternative_should_receive_syntax.rst @@ -0,0 +1,91 @@ +.. index:: + single: Alternative shouldReceive Syntax + +Alternative shouldReceive Syntax +================================ + +As of Mockery 1.0.0, we support calling methods as we would call any PHP method, +and not as string arguments to Mockery ``should*`` methods. + +The two Mockery methods that enable this are ``allows()`` and ``expects()``. + +Allows +------ + +We use ``allows()`` when we create stubs for methods that return a predefined +return value, but for these method stubs we don't care how many times, or if at +all, were they called. + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->allows([ + 'name_of_method_1' => 'return value', + 'name_of_method_2' => 'return value', + ]); + +This is equivalent with the following ``shouldReceive`` syntax: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive([ + 'name_of_method_1' => 'return value', + 'name_of_method_2' => 'return value', + ]); + +Note that with this format, we also tell Mockery that we don't care about the +arguments to the stubbed methods. + +If we do care about the arguments, we would do it like so: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->allows() + ->name_of_method_1($arg1) + ->andReturn('return value'); + +This is equivalent with the following ``shouldReceive`` syntax: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method_1') + ->with($arg1) + ->andReturn('return value'); + +Expects +------- + +We use ``expects()`` when we want to verify that a particular method was called: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->expects() + ->name_of_method_1($arg1) + ->andReturn('return value'); + +This is equivalent with the following ``shouldReceive`` syntax: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method_1') + ->once() + ->with($arg1) + ->andReturn('return value'); + +By default ``expects()`` sets up an expectation that the method should be called +once and once only. If we expect more than one call to the method, we can change +that expectation: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->expects() + ->name_of_method_1($arg1) + ->twice() + ->andReturn('return value'); + diff --git a/vendor/mockery/mockery/docs/reference/argument_validation.rst b/vendor/mockery/mockery/docs/reference/argument_validation.rst new file mode 100644 index 0000000..9351ce4 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/argument_validation.rst @@ -0,0 +1,338 @@ +.. index:: + single: Argument Validation + +Argument Validation +=================== + +The arguments passed to the ``with()`` declaration when setting up an +expectation determine the criteria for matching method calls to expectations. +Thus, we can setup up many expectations for a single method, each +differentiated by the expected arguments. Such argument matching is done on a +"best fit" basis. This ensures explicit matches take precedence over +generalised matches. + +An explicit match is merely where the expected argument and the actual +argument are easily equated (i.e. using ``===`` or ``==``). More generalised +matches are possible using regular expressions, class hinting and the +available generic matchers. The purpose of generalised matchers is to allow +arguments be defined in non-explicit terms, e.g. ``Mockery::any()`` passed to +``with()`` will match **any** argument in that position. + +Mockery's generic matchers do not cover all possibilities but offers optional +support for the Hamcrest library of matchers. Hamcrest is a PHP port of the +similarly named Java library (which has been ported also to Python, Erlang, +etc). By using Hamcrest, Mockery does not need to duplicate Hamcrest's already +impressive utility which itself promotes a natural English DSL. + +The examples below show Mockery matchers and their Hamcrest equivalent, if there +is one. Hamcrest uses functions (no namespacing). + +.. note:: + + If you don't wish to use the global Hamcrest functions, they are all exposed + through the ``\Hamcrest\Matchers`` class as well, as static methods. Thus, + ``identicalTo($arg)`` is the same as ``\Hamcrest\Matchers::identicalTo($arg)`` + +The most common matcher is the ``with()`` matcher: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('foo') + ->with(1): + +It tells mockery that it should receive a call to the ``foo`` method with the +integer ``1`` as an argument. In cases like this, Mockery first tries to match +the arguments using ``===`` (identical) comparison operator. If the argument is +a primitive, and if it fails the identical comparison, Mockery does a fallback +to the ``==`` (equals) comparison operator. + +When matching objects as arguments, Mockery only does the strict ``===`` +comparison, which means only the same ``$object`` will match: + +.. code-block:: php + + $object = new stdClass(); + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive("foo") + ->with($object); + + // Hamcrest equivalent + $mock->shouldReceive("foo") + ->with(identicalTo($object)); + +A different instance of ``stdClass`` will **not** match. + +.. note:: + + The ``Mockery\Matcher\MustBe`` matcher has been deprecated. + +If we need a loose comparison of objects, we can do that using Hamcrest's +``equalTo`` matcher: + +.. code-block:: php + + $mock->shouldReceive("foo") + ->with(equalTo(new stdClass)); + +In cases when we don't care about the type, or the value of an argument, just +that any argument is present, we use ``any()``: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive("foo") + ->with(\Mockery::any()); + + // Hamcrest equivalent + $mock->shouldReceive("foo") + ->with(anything()) + +Anything and everything passed in this argument slot is passed unconstrained. + +Validating Types and Resources +------------------------------ + +The ``type()`` matcher accepts any string which can be attached to ``is_`` to +form a valid type check. + +To match any PHP resource, we could do the following: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive("foo") + ->with(\Mockery::type('resource')); + + // Hamcrest equivalents + $mock->shouldReceive("foo") + ->with(resourceValue()); + $mock->shouldReceive("foo") + ->with(typeOf('resource')); + +It will return a ``true`` from an ``is_resource()`` call, if the provided +argument to the method is a PHP resource. For example, ``\Mockery::type('float')`` +or Hamcrest's ``floatValue()`` and ``typeOf('float')`` checks use ``is_float()``, +and ``\Mockery::type('callable')`` or Hamcrest's ``callable()`` uses +``is_callable()``. + +The ``type()`` matcher also accepts a class or interface name to be used in an +``instanceof`` evaluation of the actual argument. Hamcrest uses ``anInstanceOf()``. + +A full list of the type checkers is available at +`php.net `_ or browse Hamcrest's function +list in +`the Hamcrest code `_. + +.. _argument-validation-complex-argument-validation: + +Complex Argument Validation +--------------------------- + +If we want to perform a complex argument validation, the ``on()`` matcher is +invaluable. It accepts a closure (anonymous function) to which the actual +argument will be passed. + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive("foo") + ->with(\Mockery::on(closure)); + +If the closure evaluates to (i.e. returns) boolean ``true`` then the argument is +assumed to have matched the expectation. + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + + $mock->shouldReceive('foo') + ->with(\Mockery::on(function ($argument) { + if ($argument % 2 == 0) { + return true; + } + return false; + })); + + $mock->foo(4); // matches the expectation + $mock->foo(3); // throws a NoMatchingExpectationException + +.. note:: + + There is no Hamcrest version of the ``on()`` matcher. + +We can also perform argument validation by passing a closure to ``withArgs()`` +method. The closure will receive all arguments passed in the call to the expected +method and if it evaluates (i.e. returns) to boolean ``true``, then the list of +arguments is assumed to have matched the expectation: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive("foo") + ->withArgs(closure); + +The closure can also handle optional parameters, so if an optional parameter is +missing in the call to the expected method, it doesn't necessary means that the +list of arguments doesn't match the expectation. + +.. code-block:: php + + $closure = function ($odd, $even, $sum = null) { + $result = ($odd % 2 != 0) && ($even % 2 == 0); + if (!is_null($sum)) { + return $result && ($odd + $even == $sum); + } + return $result; + }; + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('foo')->withArgs($closure); + + $mock->foo(1, 2); // It matches the expectation: the optional argument is not needed + $mock->foo(1, 2, 3); // It also matches the expectation: the optional argument pass the validation + $mock->foo(1, 2, 4); // It doesn't match the expectation: the optional doesn't pass the validation + +.. note:: + + In previous versions, Mockery's ``with()`` would attempt to do a pattern + matching against the arguments, attempting to use the argument as a + regular expression. Over time this proved to be not such a great idea, so + we removed this functionality, and have introduced ``Mockery::pattern()`` + instead. + +If we would like to match an argument against a regular expression, we can use +the ``\Mockery::pattern()``: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('foo') + ->with(\Mockery::pattern('/^foo/')); + + // Hamcrest equivalent + $mock->shouldReceive('foo') + ->with(matchesPattern('/^foo/')); + +The ``ducktype()`` matcher is an alternative to matching by class type: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('foo') + ->with(\Mockery::ducktype('foo', 'bar')); + +It matches any argument which is an object containing the provided list of +methods to call. + +.. note:: + + There is no Hamcrest version of the ``ducktype()`` matcher. + +Capturing Arguments +------------------- + +If we want to perform multiple validations on a single argument, the ``capture`` +matcher provides a streamlined alternative to using the ``on()`` matcher. +It accepts a variable which the actual argument will be assigned. + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive("foo") + ->with(\Mockery::capture($bar)); + +This will assign *any* argument passed to ``foo`` to the local ``$bar`` variable to +then perform additional validation using assertions. + +.. note:: + + The ``capture`` matcher always evaluates to ``true``. As such, we should always + perform additional argument validation. + +Additional Argument Matchers +---------------------------- + +The ``not()`` matcher matches any argument which is not equal or identical to +the matcher's parameter: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('foo') + ->with(\Mockery::not(2)); + + // Hamcrest equivalent + $mock->shouldReceive('foo') + ->with(not(2)); + +``anyOf()`` matches any argument which equals any one of the given parameters: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('foo') + ->with(\Mockery::anyOf(1, 2)); + + // Hamcrest equivalent + $mock->shouldReceive('foo') + ->with(anyOf(1,2)); + +``notAnyOf()`` matches any argument which is not equal or identical to any of +the given parameters: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('foo') + ->with(\Mockery::notAnyOf(1, 2)); + +.. note:: + + There is no Hamcrest version of the ``notAnyOf()`` matcher. + +``subset()`` matches any argument which is any array containing the given array +subset: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('foo') + ->with(\Mockery::subset(array(0 => 'foo'))); + +This enforces both key naming and values, i.e. both the key and value of each +actual element is compared. + +.. note:: + + There is no Hamcrest version of this functionality, though Hamcrest can check + a single entry using ``hasEntry()`` or ``hasKeyValuePair()``. + +``contains()`` matches any argument which is an array containing the listed +values: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('foo') + ->with(\Mockery::contains(value1, value2)); + +The naming of keys is ignored. + +``hasKey()`` matches any argument which is an array containing the given key +name: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('foo') + ->with(\Mockery::hasKey(key)); + +``hasValue()`` matches any argument which is an array containing the given +value: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('foo') + ->with(\Mockery::hasValue(value)); diff --git a/vendor/mockery/mockery/docs/reference/creating_test_doubles.rst b/vendor/mockery/mockery/docs/reference/creating_test_doubles.rst new file mode 100644 index 0000000..b675514 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/creating_test_doubles.rst @@ -0,0 +1,435 @@ +.. index:: + single: Reference; Creating Test Doubles + +Creating Test Doubles +===================== + +Mockery's main goal is to help us create test doubles. It can create stubs, +mocks, and spies. + +Stubs and mocks are created the same. The difference between the two is that a +stub only returns a preset result when called, while a mock needs to have +expectations set on the method calls it expects to receive. + +Spies are a type of test doubles that keep track of the calls they received, and +allow us to inspect these calls after the fact. + +When creating a test double object, we can pass in an identifier as a name for +our test double. If we pass it no identifier, the test double name will be +unknown. Furthermore, the identifier does not have to be a class name. It is a +good practice, and our recommendation, to always name the test doubles with the +same name as the underlying class we are creating test doubles for. + +If the identifier we use for our test double is a name of an existing class, +the test double will inherit the type of the class (via inheritance), i.e. the +mock object will pass type hints or ``instanceof`` evaluations for the existing +class. This is useful when a test double must be of a specific type, to satisfy +the expectations our code has. + +Stubs and mocks +--------------- + +Stubs and mocks are created by calling the ``\Mockery::mock()`` method. The +following example shows how to create a stub, or a mock, object named "foo": + +.. code-block:: php + + $mock = \Mockery::mock('foo'); + +The mock object created like this is the loosest form of mocks possible, and is +an instance of ``\Mockery\MockInterface``. + +.. note:: + + All test doubles created with Mockery are an instance of + ``\Mockery\MockInterface``, regardless are they a stub, mock or a spy. + +To create a stub or a mock object with no name, we can call the ``mock()`` +method with no parameters: + +.. code-block:: php + + $mock = \Mockery::mock(); + +As we stated earlier, we don't recommend creating stub or mock objects without +a name. + +Classes, abstracts, interfaces +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The recommended way to create a stub or a mock object is by using a name of +an existing class we want to create a test double of: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + +This stub or mock object will have the type of ``MyClass``, through inheritance. + +Stub or mock objects can be based on any concrete class, abstract class or even +an interface. The primary purpose is to ensure the mock object inherits a +specific type for type hinting. + +.. code-block:: php + + $mock = \Mockery::mock('MyInterface'); + +This stub or mock object will implement the ``MyInterface`` interface. + +.. note:: + + Classes marked final, or classes that have methods marked final cannot be + mocked fully. Mockery supports creating partial mocks for these cases. + Partial mocks will be explained later in the documentation. + +Mockery also supports creating stub or mock objects based on a single existing +class, which must implement one or more interfaces. We can do this by providing +a comma-separated list of the class and interfaces as the first argument to the +``\Mockery::mock()`` method: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass, MyInterface, OtherInterface'); + +This stub or mock object will now be of type ``MyClass`` and implement the +``MyInterface`` and ``OtherInterface`` interfaces. + +.. note:: + + The class name doesn't need to be the first member of the list but it's a + friendly convention to use for readability. + +We can tell a mock to implement the desired interfaces by passing the list of +interfaces as the second argument: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass', 'MyInterface, OtherInterface'); + +For all intents and purposes, this is the same as the previous example. + +Spies +----- + +The third type of test doubles Mockery supports are spies. The main difference +between spies and mock objects is that with spies we verify the calls made +against our test double after the calls were made. We would use a spy when we +don't necessarily care about all of the calls that are going to be made to an +object. + +A spy will return ``null`` for all method calls it receives. It is not possible +to tell a spy what will be the return value of a method call. If we do that, then +we would deal with a mock object, and not with a spy. + +We create a spy by calling the ``\Mockery::spy()`` method: + +.. code-block:: php + + $spy = \Mockery::spy('MyClass'); + +Just as with stubs or mocks, we can tell Mockery to base a spy on any concrete +or abstract class, or to implement any number of interfaces: + +.. code-block:: php + + $spy = \Mockery::spy('MyClass, MyInterface, OtherInterface'); + +This spy will now be of type ``MyClass`` and implement the ``MyInterface`` and +``OtherInterface`` interfaces. + +.. note:: + + The ``\Mockery::spy()`` method call is actually a shorthand for calling + ``\Mockery::mock()->shouldIgnoreMissing()``. The ``shouldIgnoreMissing`` + method is a "behaviour modifier". We'll discuss them a bit later. + +Mocks vs. Spies +--------------- + +Let's try and illustrate the difference between mocks and spies with the +following example: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $spy = \Mockery::spy('MyClass'); + + $mock->shouldReceive('foo')->andReturn(42); + + $mockResult = $mock->foo(); + $spyResult = $spy->foo(); + + $spy->shouldHaveReceived()->foo(); + + var_dump($mockResult); // int(42) + var_dump($spyResult); // null + +As we can see from this example, with a mock object we set the call expectations +before the call itself, and we get the return result we expect it to return. +With a spy object on the other hand, we verify the call has happened after the +fact. The return result of a method call against a spy is always ``null``. + +We also have a dedicated chapter to :doc:`spies` only. + +.. _creating-test-doubles-partial-test-doubles: + +Partial Test Doubles +-------------------- + +Partial doubles are useful when we want to stub out, set expectations for, or +spy on *some* methods of a class, but run the actual code for other methods. + +We differentiate between three types of partial test doubles: + + * runtime partial test doubles, + * generated partial test doubles, and + * proxied partial test doubles. + +Runtime partial test doubles +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +What we call a runtime partial, involves creating a test double and then telling +it to make itself partial. Any method calls that the double hasn't been told to +allow or expect, will act as they would on a normal instance of the object. + +.. code-block:: php + + class Foo { + function foo() { return 123; } + function bar() { return $this->foo(); } + } + + $foo = mock(Foo::class)->makePartial(); + $foo->foo(); // int(123); + +We can then tell the test double to allow or expect calls as with any other +Mockery double. + +.. code-block:: php + + $foo->shouldReceive('foo')->andReturn(456); + $foo->bar(); // int(456) + +See the cookbook entry on :doc:`../cookbook/big_parent_class` for an example +usage of runtime partial test doubles. + +Generated partial test doubles +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The second type of partial double we can create is what we call a generated +partial. With generated partials, we specifically tell Mockery which methods +we want to be able to allow or expect calls to. All other methods will run the +actual code *directly*, so stubs and expectations on these methods will not +work. + +.. code-block:: php + + class Foo { + function foo() { return 123; } + function bar() { return $this->foo(); } + } + + $foo = mock("Foo[foo]"); + + $foo->foo(); // error, no expectation set + + $foo->shouldReceive('foo')->andReturn(456); + $foo->foo(); // int(456) + + // setting an expectation for this has no effect + $foo->shouldReceive('bar')->andReturn(999); + $foo->bar(); // int(456) + +It's also possible to specify explicitly which methods to run directly using +the `!method` syntax: + +.. code-block:: php + + class Foo { + function foo() { return 123; } + function bar() { return $this->foo(); } + } + + $foo = mock("Foo[!foo]"); + + $foo->foo(); // int(123) + + $foo->bar(); // error, no expectation set + +.. note:: + + Even though we support generated partial test doubles, we do not recommend + using them. + + One of the reasons why is because a generated partial will call the original + constructor of the mocked class. This can have unwanted side-effects during + testing application code. + + See :doc:`../cookbook/not_calling_the_constructor` for more details. + +Proxied partial test doubles +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +A proxied partial mock is a partial of last resort. We may encounter a class +which is simply not capable of being mocked because it has been marked as +final. Similarly, we may find a class with methods marked as final. In such a +scenario, we cannot simply extend the class and override methods to mock - we +need to get creative. + +.. code-block:: php + + $mock = \Mockery::mock(new MyClass); + +Yes, the new mock is a Proxy. It intercepts calls and reroutes them to the +proxied object (which we construct and pass in) for methods which are not +subject to any expectations. Indirectly, this allows us to mock methods +marked final since the Proxy is not subject to those limitations. The tradeoff +should be obvious - a proxied partial will fail any typehint checks for the +class being mocked since it cannot extend that class. + +.. _creating-test-doubles-aliasing: + +Aliasing +-------- + +Prefixing the valid name of a class (which is NOT currently loaded) with +"alias:" will generate an "alias mock". Alias mocks create a class alias with +the given classname to stdClass and are generally used to enable the mocking +of public static methods. Expectations set on the new mock object which refer +to static methods will be used by all static calls to this class. + +.. code-block:: php + + $mock = \Mockery::mock('alias:MyClass'); + + +.. note:: + + Even though aliasing classes is supported, we do not recommend it. + +Overloading +----------- + +Prefixing the valid name of a class (which is NOT currently loaded) with +"overload:" will generate an alias mock (as with "alias:") except that created +new instances of that class will import any expectations set on the origin +mock (``$mock``). The origin mock is never verified since it's used an +expectation store for new instances. For this purpose we use the term "instance +mock" to differentiate it from the simpler "alias mock". + +In other words, an instance mock will "intercept" when a new instance of the +mocked class is created, then the mock will be used instead. This is useful +especially when mocking hard dependencies which will be discussed later. + +.. code-block:: php + + $mock = \Mockery::mock('overload:MyClass'); + +.. note:: + + Using alias/instance mocks across more than one test will generate a fatal + error since we can't have two classes of the same name. To avoid this, + run each test of this kind in a separate PHP process (which is supported + out of the box by both PHPUnit and PHPT). + + +.. _creating-test-doubles-named-mocks: + +Named Mocks +----------- + +The ``namedMock()`` method will generate a class called by the first argument, +so in this example ``MyClassName``. The rest of the arguments are treated in the +same way as the ``mock`` method: + +.. code-block:: php + + $mock = \Mockery::namedMock('MyClassName', 'DateTime'); + +This example would create a class called ``MyClassName`` that extends +``DateTime``. + +Named mocks are quite an edge case, but they can be useful when code depends +on the ``__CLASS__`` magic constant, or when we need two derivatives of an +abstract type, that are actually different classes. + +See the cookbook entry on :doc:`../cookbook/class_constants` for an example +usage of named mocks. + +.. note:: + + We can only create a named mock once, any subsequent calls to + ``namedMock``, with different arguments are likely to cause exceptions. + +.. _creating-test-doubles-constructor-arguments: + +Constructor Arguments +--------------------- + +Sometimes the mocked class has required constructor arguments. We can pass these +to Mockery as an indexed array, as the 2nd argument: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass', [$constructorArg1, $constructorArg2]); + +or if we need the ``MyClass`` to implement an interface as well, as the 3rd +argument: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass', 'MyInterface', [$constructorArg1, $constructorArg2]); + +Mockery now knows to pass in ``$constructorArg1`` and ``$constructorArg2`` as +arguments to the constructor. + +.. _creating-test-doubles-behavior-modifiers: + +Behavior Modifiers +------------------ + +When creating a mock object, we may wish to use some commonly preferred +behaviours that are not the default in Mockery. + +The use of the ``shouldIgnoreMissing()`` behaviour modifier will label this +mock object as a Passive Mock: + +.. code-block:: php + + \Mockery::mock('MyClass')->shouldIgnoreMissing(); + +In such a mock object, calls to methods which are not covered by expectations +will return ``null`` instead of the usual error about there being no expectation +matching the call. + +On PHP >= 7.0.0, methods with missing expectations that have a return type +will return either a mock of the object (if return type is a class) or a +"falsy" primitive value, e.g. empty string, empty array, zero for ints and +floats, false for bools, or empty closures. + +On PHP >= 7.1.0, methods with missing expectations and nullable return type +will return null. + +We can optionally prefer to return an object of type ``\Mockery\Undefined`` +(i.e. a ``null`` object) (which was the 0.7.2 behaviour) by using an +additional modifier: + +.. code-block:: php + + \Mockery::mock('MyClass')->shouldIgnoreMissing()->asUndefined(); + +The returned object is nothing more than a placeholder so if, by some act of +fate, it's erroneously used somewhere it shouldn't, it will likely not pass a +logic check. + +We have encountered the ``makePartial()`` method before, as it is the method we +use to create runtime partial test doubles: + +.. code-block:: php + + \Mockery::mock('MyClass')->makePartial(); + +This form of mock object will defer all methods not subject to an expectation to +the parent class of the mock, i.e. ``MyClass``. Whereas the previous +``shouldIgnoreMissing()`` returned ``null``, this behaviour simply calls the +parent's matching method. diff --git a/vendor/mockery/mockery/docs/reference/demeter_chains.rst b/vendor/mockery/mockery/docs/reference/demeter_chains.rst new file mode 100644 index 0000000..1dad5ef --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/demeter_chains.rst @@ -0,0 +1,38 @@ +.. index:: + single: Mocking; Demeter Chains + +Mocking Demeter Chains And Fluent Interfaces +============================================ + +Both of these terms refer to the growing practice of invoking statements +similar to: + +.. code-block:: php + + $object->foo()->bar()->zebra()->alpha()->selfDestruct(); + +The long chain of method calls isn't necessarily a bad thing, assuming they +each link back to a local object the calling class knows. As a fun example, +Mockery's long chains (after the first ``shouldReceive()`` method) all call to +the same instance of ``\Mockery\Expectation``. However, sometimes this is not +the case and the chain is constantly crossing object boundaries. + +In either case, mocking such a chain can be a horrible task. To make it easier +Mockery supports demeter chain mocking. Essentially, we shortcut through the +chain and return a defined value from the final call. For example, let's +assume ``selfDestruct()`` returns the string "Ten!" to $object (an instance of +``CaptainsConsole``). Here's how we could mock it. + +.. code-block:: php + + $mock = \Mockery::mock('CaptainsConsole'); + $mock->shouldReceive('foo->bar->zebra->alpha->selfDestruct')->andReturn('Ten!'); + +The above expectation can follow any previously seen format or expectation, +except that the method name is simply the string of all expected chain calls +separated by ``->``. Mockery will automatically setup the chain of expected +calls with its final return values, regardless of whatever intermediary object +might be used in the real implementation. + +Arguments to all members of the chain (except the final call) are ignored in +this process. diff --git a/vendor/mockery/mockery/docs/reference/expectations.rst b/vendor/mockery/mockery/docs/reference/expectations.rst new file mode 100644 index 0000000..4430e97 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/expectations.rst @@ -0,0 +1,533 @@ +.. index:: + single: Expectations + +Expectation Declarations +======================== + +.. note:: + + In order for our expectations to work we MUST call ``Mockery::close()``, + preferably in a callback method such as ``tearDown`` or ``_after`` + (depending on whether or not we're integrating Mockery with another + framework). This static call cleans up the Mockery container used by the + current test, and run any verification tasks needed for our expectations. + +Once we have created a mock object, we'll often want to start defining how +exactly it should behave (and how it should be called). This is where the +Mockery expectation declarations take over. + +Declaring Method Call Expectations +---------------------------------- + +To tell our test double to expect a call for a method with a given name, we use +the ``shouldReceive`` method: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method'); + +This is the starting expectation upon which all other expectations and +constraints are appended. + +We can declare more than one method call to be expected: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method_1', 'name_of_method_2'); + +All of these will adopt any chained expectations or constraints. + +It is possible to declare the expectations for the method calls, along with +their return values: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive([ + 'name_of_method_1' => 'return value 1', + 'name_of_method_2' => 'return value 2', + ]); + +There's also a shorthand way of setting up method call expectations and their +return values: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass', ['name_of_method_1' => 'return value 1', 'name_of_method_2' => 'return value 2']); + +All of these will adopt any additional chained expectations or constraints. + +We can declare that a test double should not expect a call to the given method +name: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldNotReceive('name_of_method'); + +This method is a convenience method for calling ``shouldReceive()->never()``. + +Declaring Method Argument Expectations +-------------------------------------- + +For every method we declare expectation for, we can add constraints that the +defined expectations apply only to the method calls that match the expected +argument list: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->with($arg1, $arg2, ...); + // or + $mock->shouldReceive('name_of_method') + ->withArgs([$arg1, $arg2, ...]); + +We can add a lot more flexibility to argument matching using the built in +matcher classes (see later). For example, ``\Mockery::any()`` matches any +argument passed to that position in the ``with()`` parameter list. Mockery also +allows Hamcrest library matchers - for example, the Hamcrest function +``anything()`` is equivalent to ``\Mockery::any()``. + +It's important to note that this means all expectations attached only apply to +the given method when it is called with these exact arguments: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + + $mock->shouldReceive('foo')->with('Hello'); + + $mock->foo('Goodbye'); // throws a NoMatchingExpectationException + +This allows for setting up differing expectations based on the arguments +provided to expected calls. + +Argument matching with closures +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Instead of providing a built-in matcher for each argument, we can provide a +closure that matches all passed arguments at once: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->withArgs(closure); + +The given closure receives all the arguments passed in the call to the expected +method. In this way, this expectation only applies to method calls where passed +arguments make the closure evaluate to true: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + + $mock->shouldReceive('foo')->withArgs(function ($arg) { + if ($arg % 2 == 0) { + return true; + } + return false; + }); + + $mock->foo(4); // matches the expectation + $mock->foo(3); // throws a NoMatchingExpectationException + +Argument matching with some of given values +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +We can provide expected arguments that match passed arguments when mocked method +is called. + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->withSomeOfArgs(arg1, arg2, arg3, ...); + +The given expected arguments order doesn't matter. +Check if expected values are included or not, but type should be matched: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('foo') + ->withSomeOfArgs(1, 2); + + $mock->foo(1, 2, 3); // matches the expectation + $mock->foo(3, 2, 1); // matches the expectation (passed order doesn't matter) + $mock->foo('1', '2'); // throws a NoMatchingExpectationException (type should be matched) + $mock->foo(3); // throws a NoMatchingExpectationException + +Any, or no arguments +^^^^^^^^^^^^^^^^^^^^ + +We can declare that the expectation matches a method call regardless of what +arguments are passed: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->withAnyArgs(); + +This is set by default unless otherwise specified. + +We can declare that the expectation matches method calls with zero arguments: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->withNoArgs(); + +Declaring Return Value Expectations +----------------------------------- + +For mock objects, we can tell Mockery what return values to return from the +expected method calls. + +For that we can use the ``andReturn()`` method: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->andReturn($value); + +This sets a value to be returned from the expected method call. + +It is possible to set up expectation for multiple return values. By providing +a sequence of return values, we tell Mockery what value to return on every +subsequent call to the method: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->andReturn($value1, $value2, ...) + +The first call will return ``$value1`` and the second call will return ``$value2``. + +If we call the method more times than the number of return values we declared, +Mockery will return the final value for any subsequent method call: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + + $mock->shouldReceive('foo')->andReturn(1, 2, 3); + + $mock->foo(); // int(1) + $mock->foo(); // int(2) + $mock->foo(); // int(3) + $mock->foo(); // int(3) + +The same can be achieved using the alternative syntax: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->andReturnValues([$value1, $value2, ...]) + +It accepts a simple array instead of a list of parameters. The order of return +is determined by the numerical index of the given array with the last array +member being returned on all calls once previous return values are exhausted. + +The following two options are primarily for communication with test readers: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->andReturnNull(); + // or + $mock->shouldReceive('name_of_method') + ->andReturn([null]); + +They mark the mock object method call as returning ``null`` or nothing. + +Sometimes we want to calculate the return results of the method calls, based on +the arguments passed to the method. We can do that with the ``andReturnUsing()`` +method which accepts one or more closure: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->andReturnUsing(closure, ...); + +Closures can be queued by passing them as extra parameters as for ``andReturn()``. + +Occasionally, it can be useful to echo back one of the arguments that a method +is called with. In this case we can use the ``andReturnArg()`` method; the +argument to be returned is specified by its index in the arguments list: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->andReturnArg(1); + +This returns the second argument (index #1) from the list of arguments when the +method is called. + +.. note:: + + We cannot currently mix ``andReturnUsing()`` or ``andReturnArg`` with + ``andReturn()``. + +If we are mocking fluid interfaces, the following method will be helpful: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->andReturnSelf(); + +It sets the return value to the mocked class name. + +Throwing Exceptions +------------------- + +We can tell the method of mock objects to throw exceptions: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->andThrow(new Exception); + +It will throw the given ``Exception`` object when called. + +Rather than an object, we can pass in the ``Exception`` class, message and/or code to +use when throwing an ``Exception`` from the mocked method: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->andThrow('exception_name', 'message', 123456789); + +.. _expectations-setting-public-properties: + +Setting Public Properties +------------------------- + +Used with an expectation so that when a matching method is called, we can cause +a mock object's public property to be set to a specified value, by using +``andSet()`` or ``set()``: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->andSet($property, $value); + // or + $mock->shouldReceive('name_of_method') + ->set($property, $value); + +In cases where we want to call the real method of the class that was mocked and +return its result, the ``passthru()`` method tells the expectation to bypass +a return queue: + +.. code-block:: php + + passthru() + +It allows expectation matching and call count validation to be applied against +real methods while still calling the real class method with the expected +arguments. + +Declaring Call Count Expectations +--------------------------------- + +Besides setting expectations on the arguments of the method calls, and the +return values of those same calls, we can set expectations on how many times +should any method be called. + +When a call count expectation is not met, a +``\Mockery\Expectation\InvalidCountException`` will be thrown. + +.. note:: + + It is absolutely required to call ``\Mockery::close()`` at the end of our + tests, for example in the ``tearDown()`` method of PHPUnit. Otherwise + Mockery will not verify the calls made against our mock objects. + +We can declare that the expected method may be called zero or more times: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->zeroOrMoreTimes(); + +This is the default for all methods unless otherwise set. + +To tell Mockery to expect an exact number of calls to a method, we can use the +following: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->times($n); + +where ``$n`` is the number of times the method should be called. + +A couple of most common cases got their shorthand methods. + +To declare that the expected method must be called one time only: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->once(); + +To declare that the expected method must be called two times: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->twice(); + +To declare that the expected method must never be called: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->never(); + +Call count modifiers +^^^^^^^^^^^^^^^^^^^^ + +The call count expectations can have modifiers set. + +If we want to tell Mockery the minimum number of times a method should be called, +we use ``atLeast()``: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->atLeast() + ->times(3); + +``atLeast()->times(3)`` means the call must be called at least three times +(given matching method args) but never less than three times. + +Similarly, we can tell Mockery the maximum number of times a method should be +called, using ``atMost()``: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->atMost() + ->times(3); + +``atMost()->times(3)`` means the call must be called no more than three times. +If the method gets no calls at all, the expectation will still be met. + +We can also set a range of call counts, using ``between()``: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + $mock->shouldReceive('name_of_method') + ->between($min, $max); + +This is actually identical to using ``atLeast()->times($min)->atMost()->times($max)`` +but is provided as a shorthand. It may be followed by a ``times()`` call with no +parameter to preserve the APIs natural language readability. + +Multiple Calls with Different Expectations +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If a method is expected to get called multiple times with different arguments +and/or return values we can simply repeat the expectations. The same of course +also works if we expect multiple calls to different methods. + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + // Expectations for the 1st call + $mock->shouldReceive('name_of_method') + ->once() + ->with('arg1') + ->andReturn($value1) + + // 2nd call to same method + ->shouldReceive('name_of_method') + ->once() + ->with('arg2') + ->andReturn($value2) + + // final call to another method + ->shouldReceive('other_method') + ->once() + ->with('other') + ->andReturn($value_other); + +Expectation Declaration Utilities +--------------------------------- + +Declares that this method is expected to be called in a specific order in +relation to similarly marked methods. + +.. code-block:: php + + ordered() + +The order is dictated by the order in which this modifier is actually used when +setting up mocks. + +Declares the method as belonging to an order group (which can be named or +numbered). Methods within a group can be called in any order, but the ordered +calls from outside the group are ordered in relation to the group: + +.. code-block:: php + + ordered(group) + +We can set up so that method1 is called before group1 which is in turn called +before method2. + +When called prior to ``ordered()`` or ``ordered(group)``, it declares this +ordering to apply across all mock objects (not just the current mock): + +.. code-block:: php + + globally() + +This allows for dictating order expectations across multiple mocks. + +The ``byDefault()`` marks an expectation as a default. Default expectations are +applied unless a non-default expectation is created: + +.. code-block:: php + + byDefault() + +These later expectations immediately replace the previously defined default. +This is useful so we can setup default mocks in our unit test ``setup()`` and +later tweak them in specific tests as needed. + +Returns the current mock object from an expectation chain: + +.. code-block:: php + + getMock() + +Useful where we prefer to keep mock setups as a single statement, e.g.: + +.. code-block:: php + + $mock = \Mockery::mock('foo')->shouldReceive('foo')->andReturn(1)->getMock(); diff --git a/vendor/mockery/mockery/docs/reference/final_methods_classes.rst b/vendor/mockery/mockery/docs/reference/final_methods_classes.rst new file mode 100644 index 0000000..dd0fa5b --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/final_methods_classes.rst @@ -0,0 +1,29 @@ +.. index:: + single: Mocking; Final Classes/Methods + +Dealing with Final Classes/Methods +================================== + +One of the primary restrictions of mock objects in PHP, is that mocking +classes or methods marked final is hard. The final keyword prevents methods so +marked from being replaced in subclasses (subclassing is how mock objects can +inherit the type of the class or object being mocked). + +The simplest solution is to implement an interface in your final class and +typehint against / mock this. + +However this may not be possible in some third party libraries. +Mockery does allow creating "proxy mocks" from classes marked final, or from +classes with methods marked final. This offers all the usual mock object +goodness but the resulting mock will not inherit the class type of the object +being mocked, i.e. it will not pass any instanceof comparison. Methods marked +as final will be proxied to the original method, i.e., final methods can't be +mocked. + +We can create a proxy mock by passing the instantiated object we wish to +mock into ``\Mockery::mock()``, i.e. Mockery will then generate a Proxy to the +real object and selectively intercept method calls for the purposes of setting +and meeting expectations. + +See the :ref:`creating-test-doubles-partial-test-doubles` chapter, the subsection +about proxied partial test doubles. diff --git a/vendor/mockery/mockery/docs/reference/index.rst b/vendor/mockery/mockery/docs/reference/index.rst new file mode 100644 index 0000000..7d6a038 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/index.rst @@ -0,0 +1,23 @@ +Reference +========= + +.. toctree:: + :hidden: + + creating_test_doubles + expectations + argument_validation + alternative_should_receive_syntax + spies + instance_mocking + partial_mocks + protected_methods + public_properties + public_static_properties + pass_by_reference_behaviours + demeter_chains + final_methods_classes + magic_methods + phpunit_integration + +.. include:: map.rst.inc diff --git a/vendor/mockery/mockery/docs/reference/instance_mocking.rst b/vendor/mockery/mockery/docs/reference/instance_mocking.rst new file mode 100644 index 0000000..9d1aa28 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/instance_mocking.rst @@ -0,0 +1,22 @@ +.. index:: + single: Mocking; Instance + +Instance Mocking +================ + +Instance mocking means that a statement like: + +.. code-block:: php + + $obj = new \MyNamespace\Foo; + +...will actually generate a mock object. This is done by replacing the real +class with an instance mock (similar to an alias mock), as with mocking public +methods. The alias will import its expectations from the original mock of +that type (note that the original is never verified and should be ignored +after its expectations are setup). This lets you intercept instantiation where +you can't simply inject a replacement object. + +As before, this does not prevent a require statement from including the real +class and triggering a fatal PHP error. It's intended for use where +autoloading is the primary class loading mechanism. diff --git a/vendor/mockery/mockery/docs/reference/magic_methods.rst b/vendor/mockery/mockery/docs/reference/magic_methods.rst new file mode 100644 index 0000000..39591cf --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/magic_methods.rst @@ -0,0 +1,16 @@ +.. index:: + single: Mocking; Magic Methods + +PHP Magic Methods +================= + +PHP magic methods which are prefixed with a double underscore, e.g. +``__set()``, pose a particular problem in mocking and unit testing in general. +It is strongly recommended that unit tests and mock objects do not directly +refer to magic methods. Instead, refer only to the virtual methods and +properties these magic methods simulate. + +Following this piece of advice will ensure we are testing the real API of +classes and also ensures there is no conflict should Mockery override these +magic methods, which it will inevitably do in order to support its role in +intercepting method calls and properties. diff --git a/vendor/mockery/mockery/docs/reference/map.rst.inc b/vendor/mockery/mockery/docs/reference/map.rst.inc new file mode 100644 index 0000000..883bc3c --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/map.rst.inc @@ -0,0 +1,14 @@ +* :doc:`/reference/creating_test_doubles` +* :doc:`/reference/expectations` +* :doc:`/reference/argument_validation` +* :doc:`/reference/alternative_should_receive_syntax` +* :doc:`/reference/spies` +* :doc:`/reference/partial_mocks` +* :doc:`/reference/protected_methods` +* :doc:`/reference/public_properties` +* :doc:`/reference/public_static_properties` +* :doc:`/reference/pass_by_reference_behaviours` +* :doc:`/reference/demeter_chains` +* :doc:`/reference/final_methods_classes` +* :doc:`/reference/magic_methods` +* :doc:`/reference/phpunit_integration` diff --git a/vendor/mockery/mockery/docs/reference/partial_mocks.rst b/vendor/mockery/mockery/docs/reference/partial_mocks.rst new file mode 100644 index 0000000..457eb8d --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/partial_mocks.rst @@ -0,0 +1,108 @@ +.. index:: + single: Mocking; Partial Mocks + +Creating Partial Mocks +====================== + +Partial mocks are useful when we only need to mock several methods of an +object leaving the remainder free to respond to calls normally (i.e. as +implemented). Mockery implements three distinct strategies for creating +partials. Each has specific advantages and disadvantages so which strategy we +use will depend on our own preferences and the source code in need of +mocking. + +We have previously talked a bit about :ref:`creating-test-doubles-partial-test-doubles`, +but we'd like to expand on the subject a bit here. + +#. Runtime partial test doubles +#. Generated partial test doubles +#. Proxied Partial Mock + +Runtime partial test doubles +---------------------------- + +A runtime partial test double, also known as a passive partial mock, is a kind +of a default state of being for a mocked object. + +.. code-block:: php + + $mock = \Mockery::mock('MyClass')->makePartial(); + +With a runtime partial, we assume that all methods will simply defer to the +parent class (``MyClass``) original methods unless a method call matches a +known expectation. If we have no matching expectation for a specific method +call, that call is deferred to the class being mocked. Since the division +between mocked and unmocked calls depends entirely on the expectations we +define, there is no need to define which methods to mock in advance. + +See the cookbook entry on :doc:`../cookbook/big_parent_class` for an example +usage of runtime partial test doubles. + +Generated Partial Test Doubles +------------------------------ + +A generated partial test double, also known as a traditional partial mock, +defines ahead of time which methods of a class are to be mocked and which are +to be left unmocked (i.e. callable as normal). The syntax for creating +traditional mocks is: + +.. code-block:: php + + $mock = \Mockery::mock('MyClass[foo,bar]'); + +In the above example, the ``foo()`` and ``bar()`` methods of MyClass will be +mocked but no other MyClass methods are touched. We will need to define +expectations for the ``foo()`` and ``bar()`` methods to dictate their mocked +behaviour. + +Don't forget that we can pass in constructor arguments since unmocked methods +may rely on those! + +.. code-block:: php + + $mock = \Mockery::mock('MyNamespace\MyClass[foo]', array($arg1, $arg2)); + +See the :ref:`creating-test-doubles-constructor-arguments` section to read up +on them. + +.. note:: + + Even though we support generated partial test doubles, we do not recommend + using them. + +Proxied Partial Mock +-------------------- + +A proxied partial mock is a partial of last resort. We may encounter a class +which is simply not capable of being mocked because it has been marked as +final. Similarly, we may find a class with methods marked as final. In such a +scenario, we cannot simply extend the class and override methods to mock - we +need to get creative. + +.. code-block:: php + + $mock = \Mockery::mock(new MyClass); + +Yes, the new mock is a Proxy. It intercepts calls and reroutes them to the +proxied object (which we construct and pass in) for methods which are not +subject to any expectations. Indirectly, this allows us to mock methods +marked final since the Proxy is not subject to those limitations. The tradeoff +should be obvious - a proxied partial will fail any typehint checks for the +class being mocked since it cannot extend that class. + +Special Internal Cases +---------------------- + +All mock objects, with the exception of Proxied Partials, allows us to make +any expectation call to the underlying real class method using the ``passthru()`` +expectation call. This will return values from the real call and bypass any +mocked return queue (which can simply be omitted obviously). + +There is a fourth kind of partial mock reserved for internal use. This is +automatically generated when we attempt to mock a class containing methods +marked final. Since we cannot override such methods, they are simply left +unmocked. Typically, we don't need to worry about this but if we really +really must mock a final method, the only possible means is through a Proxied +Partial Mock. SplFileInfo, for example, is a common class subject to this form +of automatic internal partial since it contains public final methods used +internally. diff --git a/vendor/mockery/mockery/docs/reference/pass_by_reference_behaviours.rst b/vendor/mockery/mockery/docs/reference/pass_by_reference_behaviours.rst new file mode 100644 index 0000000..5e2e457 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/pass_by_reference_behaviours.rst @@ -0,0 +1,130 @@ +.. index:: + single: Pass-By-Reference Method Parameter Behaviour + +Preserving Pass-By-Reference Method Parameter Behaviour +======================================================= + +PHP Class method may accept parameters by reference. In this case, changes +made to the parameter (a reference to the original variable passed to the +method) are reflected in the original variable. An example: + +.. code-block:: php + + class Foo + { + + public function bar(&$a) + { + $a++; + } + + } + + $baz = 1; + $foo = new Foo; + $foo->bar($baz); + + echo $baz; // will echo the integer 2 + +In the example above, the variable ``$baz`` is passed by reference to +``Foo::bar()`` (notice the ``&`` symbol in front of the parameter?). Any +change ``bar()`` makes to the parameter reference is reflected in the original +variable, ``$baz``. + +Mockery handles references correctly for all methods where it can analyse +the parameter (using ``Reflection``) to see if it is passed by reference. To +mock how a reference is manipulated by the class method, we can use a closure +argument matcher to manipulate it, i.e. ``\Mockery::on()`` - see the +:ref:`argument-validation-complex-argument-validation` chapter. + +There is an exception for internal PHP classes where Mockery cannot analyse +method parameters using ``Reflection`` (a limitation in PHP). To work around +this, we can explicitly declare method parameters for an internal class using +``\Mockery\Configuration::setInternalClassMethodParamMap()``. + +Here's an example using ``MongoCollection::insert()``. ``MongoCollection`` is +an internal class offered by the mongo extension from PECL. Its ``insert()`` +method accepts an array of data as the first parameter, and an optional +options array as the second parameter. The original data array is updated +(i.e. when a ``insert()`` pass-by-reference parameter) to include a new +``_id`` field. We can mock this behaviour using a configured parameter map (to +tell Mockery to expect a pass by reference parameter) and a ``Closure`` +attached to the expected method parameter to be updated. + +Here's a PHPUnit unit test verifying that this pass-by-reference behaviour is +preserved: + +.. code-block:: php + + public function testCanOverrideExpectedParametersOfInternalPHPClassesToPreserveRefs() + { + \Mockery::getConfiguration()->setInternalClassMethodParamMap( + 'MongoCollection', + 'insert', + array('&$data', '$options = array()') + ); + $m = \Mockery::mock('MongoCollection'); + $m->shouldReceive('insert')->with( + \Mockery::on(function(&$data) { + if (!is_array($data)) return false; + $data['_id'] = 123; + return true; + }), + \Mockery::any() + ); + + $data = array('a'=>1,'b'=>2); + $m->insert($data); + + $this->assertTrue(isset($data['_id'])); + $this->assertEquals(123, $data['_id']); + + \Mockery::resetContainer(); + } + +Protected Methods +----------------- + +When dealing with protected methods, and trying to preserve pass by reference +behavior for them, a different approach is required. + +.. code-block:: php + + class Model + { + public function test(&$data) + { + return $this->doTest($data); + } + + protected function doTest(&$data) + { + $data['something'] = 'wrong'; + return $this; + } + } + + class Test extends \PHPUnit\Framework\TestCase + { + public function testModel() + { + $mock = \Mockery::mock('Model[test]')->shouldAllowMockingProtectedMethods(); + + $mock->shouldReceive('test') + ->with(\Mockery::on(function(&$data) { + $data['something'] = 'wrong'; + return true; + })); + + $data = array('foo' => 'bar'); + + $mock->test($data); + $this->assertTrue(isset($data['something'])); + $this->assertEquals('wrong', $data['something']); + } + } + +This is quite an edge case, so we need to change the original code a little bit, +by creating a public method that will call our protected method, and then mock +that, instead of the protected method. This new public method will act as a +proxy to our protected method. diff --git a/vendor/mockery/mockery/docs/reference/phpunit_integration.rst b/vendor/mockery/mockery/docs/reference/phpunit_integration.rst new file mode 100644 index 0000000..669a8ca --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/phpunit_integration.rst @@ -0,0 +1,145 @@ +.. index:: + single: PHPUnit Integration + +PHPUnit Integration +=================== + +Mockery was designed as a simple-to-use *standalone* mock object framework, so +its need for integration with any testing framework is entirely optional. To +integrate Mockery, we need to define a ``tearDown()`` method for our tests +containing the following (we may use a shorter ``\Mockery`` namespace +alias): + +.. code-block:: php + + public function tearDown() { + \Mockery::close(); + } + +This static call cleans up the Mockery container used by the current test, and +run any verification tasks needed for our expectations. + +For some added brevity when it comes to using Mockery, we can also explicitly +use the Mockery namespace with a shorter alias. For example: + +.. code-block:: php + + use \Mockery as m; + + class SimpleTest extends \PHPUnit\Framework\TestCase + { + public function testSimpleMock() { + $mock = m::mock('simplemock'); + $mock->shouldReceive('foo')->with(5, m::any())->once()->andReturn(10); + + $this->assertEquals(10, $mock->foo(5)); + } + + public function tearDown() { + m::close(); + } + } + +Mockery ships with an autoloader so we don't need to litter our tests with +``require_once()`` calls. To use it, ensure Mockery is on our +``include_path`` and add the following to our test suite's ``Bootstrap.php`` +or ``TestHelper.php`` file: + +.. code-block:: php + + require_once 'Mockery/Loader.php'; + require_once 'Hamcrest/Hamcrest.php'; + + $loader = new \Mockery\Loader; + $loader->register(); + +If we are using Composer, we can simplify this to including the Composer +generated autoloader file: + +.. code-block:: php + + require __DIR__ . '/../vendor/autoload.php'; // assuming vendor is one directory up + +.. caution:: + + Prior to Hamcrest 1.0.0, the ``Hamcrest.php`` file name had a small "h" + (i.e. ``hamcrest.php``). If upgrading Hamcrest to 1.0.0 remember to check + the file name is updated for all your projects.) + +To integrate Mockery into PHPUnit and avoid having to call the close method +and have Mockery remove itself from code coverage reports, have your test case +extends the ``\Mockery\Adapter\Phpunit\MockeryTestCase``: + +.. code-block:: php + + class MyTest extends \Mockery\Adapter\Phpunit\MockeryTestCase + { + + } + +An alternative is to use the supplied trait: + +.. code-block:: php + + class MyTest extends \PHPUnit\Framework\TestCase + { + use \Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; + } + +Extending ``MockeryTestCase`` or using the ``MockeryPHPUnitIntegration`` +trait is **the recommended way** of integrating Mockery with PHPUnit, +since Mockery 1.0.0. + +PHPUnit listener +---------------- + +Before the 1.0.0 release, Mockery provided a PHPUnit listener that would +call ``Mockery::close()`` for us at the end of a test. This has changed +significantly since the 1.0.0 version. + +Now, Mockery provides a PHPUnit listener that makes tests fail if +``Mockery::close()`` has not been called. It can help identify tests where +we've forgotten to include the trait or extend the ``MockeryTestCase``. + +If we are using PHPUnit's XML configuration approach, we can include the +following to load the ``TestListener``: + +.. code-block:: xml + + + + + +Make sure Composer's or Mockery's autoloader is present in the bootstrap file +or we will need to also define a "file" attribute pointing to the file of the +``TestListener`` class. + +If we are creating the test suite programmatically we may add the listener +like this: + +.. code-block:: php + + // Create the suite. + $suite = new PHPUnit\Framework\TestSuite(); + + // Create the listener and add it to the suite. + $result = new PHPUnit\Framework\TestResult(); + $result->addListener(new \Mockery\Adapter\Phpunit\TestListener()); + + // Run the tests. + $suite->run($result); + +.. caution:: + + PHPUnit provides a functionality that allows + `tests to run in a separated process `_, + to ensure better isolation. Mockery verifies the mocks expectations using the + ``Mockery::close()`` method, and provides a PHPUnit listener, that automatically + calls this method for us after every test. + + However, this listener is not called in the right process when using + PHPUnit's process isolation, resulting in expectations that might not be + respected, but without raising any ``Mockery\Exception``. To avoid this, + we cannot rely on the supplied Mockery PHPUnit ``TestListener``, and we need + to explicitly call ``Mockery::close``. The easiest solution to include this + call in the ``tearDown()`` method, as explained previously. diff --git a/vendor/mockery/mockery/docs/reference/protected_methods.rst b/vendor/mockery/mockery/docs/reference/protected_methods.rst new file mode 100644 index 0000000..ec4a5ba --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/protected_methods.rst @@ -0,0 +1,26 @@ +.. index:: + single: Mocking; Protected Methods + +Mocking Protected Methods +========================= + +By default, Mockery does not allow mocking protected methods. We do not recommend +mocking protected methods, but there are cases when there is no other solution. + +For those cases we have the ``shouldAllowMockingProtectedMethods()`` method. It +instructs Mockery to specifically allow mocking of protected methods, for that +one class only: + +.. code-block:: php + + class MyClass + { + protected function foo() + { + } + } + + $mock = \Mockery::mock('MyClass') + ->shouldAllowMockingProtectedMethods(); + $mock->shouldReceive('foo'); + diff --git a/vendor/mockery/mockery/docs/reference/public_properties.rst b/vendor/mockery/mockery/docs/reference/public_properties.rst new file mode 100644 index 0000000..3165668 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/public_properties.rst @@ -0,0 +1,20 @@ +.. index:: + single: Mocking; Public Properties + +Mocking Public Properties +========================= + +Mockery allows us to mock properties in several ways. One way is that we can set +a public property and its value on any mock object. The second is that we can +use the expectation methods ``set()`` and ``andSet()`` to set property values if +that expectation is ever met. + +You can read more about :ref:`expectations-setting-public-properties`. + +.. note:: + + In general, Mockery does not support mocking any magic methods since these + are generally not considered a public API (and besides it is a bit difficult + to differentiate them when you badly need them for mocking!). So please mock + virtual properties (those relying on ``__get()`` and ``__set()``) as if they + were actually declared on the class. diff --git a/vendor/mockery/mockery/docs/reference/public_static_properties.rst b/vendor/mockery/mockery/docs/reference/public_static_properties.rst new file mode 100644 index 0000000..2396efc --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/public_static_properties.rst @@ -0,0 +1,15 @@ +.. index:: + single: Mocking; Public Static Methods + +Mocking Public Static Methods +============================= + +Static methods are not called on real objects, so normal mock objects can't +mock them. Mockery supports class aliased mocks, mocks representing a class +name which would normally be loaded (via autoloading or a require statement) +in the system under test. These aliases block that loading (unless via a +require statement - so please use autoloading!) and allow Mockery to intercept +static method calls and add expectations for them. + +See the :ref:`creating-test-doubles-aliasing` section for more information on +creating aliased mocks, for the purpose of mocking public static methods. diff --git a/vendor/mockery/mockery/docs/reference/spies.rst b/vendor/mockery/mockery/docs/reference/spies.rst new file mode 100644 index 0000000..1663918 --- /dev/null +++ b/vendor/mockery/mockery/docs/reference/spies.rst @@ -0,0 +1,154 @@ +.. index:: + single: Reference; Spies + +Spies +===== + +Spies are a type of test doubles, but they differ from stubs or mocks in that, +that the spies record any interaction between the spy and the System Under Test +(SUT), and allow us to make assertions against those interactions after the fact. + +Creating a spy means we don't have to set up expectations for every method call +the double might receive during the test, some of which may not be relevant to +the current test. A spy allows us to make assertions about the calls we care +about for this test only, reducing the chances of over-specification and making +our tests more clear. + +Spies also allow us to follow the more familiar Arrange-Act-Assert or +Given-When-Then style within our tests. With mocks, we have to follow a less +familiar style, something along the lines of Arrange-Expect-Act-Assert, where +we have to tell our mocks what to expect before we act on the SUT, then assert +that those expectations were met: + +.. code-block:: php + + // arrange + $mock = \Mockery::mock('MyDependency'); + $sut = new MyClass($mock); + + // expect + $mock->shouldReceive('foo') + ->once() + ->with('bar'); + + // act + $sut->callFoo(); + + // assert + \Mockery::close(); + +Spies allow us to skip the expect part and move the assertion to after we have +acted on the SUT, usually making our tests more readable: + +.. code-block:: php + + // arrange + $spy = \Mockery::spy('MyDependency'); + $sut = new MyClass($spy); + + // act + $sut->callFoo(); + + // assert + $spy->shouldHaveReceived() + ->foo() + ->with('bar'); + +On the other hand, spies are far less restrictive than mocks, meaning tests are +usually less precise, as they let us get away with more. This is usually a +good thing, they should only be as precise as they need to be, but while spies +make our tests more intent-revealing, they do tend to reveal less about the +design of the SUT. If we're having to setup lots of expectations for a mock, +in lots of different tests, our tests are trying to tell us something - the SUT +is doing too much and probably should be refactored. We don't get this with +spies, they simply ignore the calls that aren't relevant to them. + +Another downside to using spies is debugging. When a mock receives a call that +it wasn't expecting, it immediately throws an exception (failing fast), giving +us a nice stack trace or possibly even invoking our debugger. With spies, we're +simply asserting calls were made after the fact, so if the wrong calls were made, +we don't have quite the same just in time context we have with the mocks. + +Finally, if we need to define a return value for our test double, we can't do +that with a spy, only with a mock object. + +.. note:: + + This documentation page is an adaption of the blog post titled + `"Mockery Spies" `_, + published by Dave Marshall on his blog. Dave is the original author of spies + in Mockery. + +Spies Reference +--------------- + +To verify that a method was called on a spy, we use the ``shouldHaveReceived()`` +method: + +.. code-block:: php + + $spy->shouldHaveReceived('foo'); + +To verify that a method was **not** called on a spy, we use the +``shouldNotHaveReceived()`` method: + +.. code-block:: php + + $spy->shouldNotHaveReceived('foo'); + +We can also do argument matching with spies: + +.. code-block:: php + + $spy->shouldHaveReceived('foo') + ->with('bar'); + +Argument matching is also possible by passing in an array of arguments to +match: + +.. code-block:: php + + $spy->shouldHaveReceived('foo', ['bar']); + +Although when verifying a method was not called, the argument matching can only +be done by supplying the array of arguments as the 2nd argument to the +``shouldNotHaveReceived()`` method: + +.. code-block:: php + + $spy->shouldNotHaveReceived('foo', ['bar']); + +This is due to Mockery's internals. + +Finally, when expecting calls that should have been received, we can also verify +the number of calls: + +.. code-block:: php + + $spy->shouldHaveReceived('foo') + ->with('bar') + ->twice(); + +Alternative shouldReceive syntax +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +As of Mockery 1.0.0, we support calling methods as we would call any PHP method, +and not as string arguments to Mockery ``should*`` methods. + +In cases of spies, this only applies to the ``shouldHaveReceived()`` method: + +.. code-block:: php + + $spy->shouldHaveReceived() + ->foo('bar'); + +We can set expectation on number of calls as well: + +.. code-block:: php + + $spy->shouldHaveReceived() + ->foo('bar') + ->twice(); + +Unfortunately, due to limitations we can't support the same syntax for the +``shouldNotHaveReceived()`` method. diff --git a/vendor/mockery/mockery/docs/requirements.txt b/vendor/mockery/mockery/docs/requirements.txt new file mode 100644 index 0000000..2f74b4c --- /dev/null +++ b/vendor/mockery/mockery/docs/requirements.txt @@ -0,0 +1,25 @@ +alabaster==0.7.16 +Babel==2.14.0 +certifi==2024.2.2 +charset-normalizer==3.3.2 +docutils==0.20.1 +idna==3.7 +imagesize==1.4.1 +Jinja2==3.1.4 +MarkupSafe==2.1.5 +packaging==24.0 +Pygments==2.17.2 +requests==2.31.0 +setuptools==69.2.0 +snowballstemmer==2.2.0 +Sphinx==7.3.7 +sphinx-rtd-theme==2.0.0 +sphinxcontrib-applehelp==1.0.8 +sphinxcontrib-devhelp==1.0.6 +sphinxcontrib-htmlhelp==2.0.5 +sphinxcontrib-jquery==4.1 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.7 +sphinxcontrib-serializinghtml==1.1.10 +urllib3==2.2.1 +wheel==0.43.0 diff --git a/vendor/mockery/mockery/library/Mockery.php b/vendor/mockery/mockery/library/Mockery.php new file mode 100644 index 0000000..1370cea --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery.php @@ -0,0 +1,1062 @@ + + */ + private static $_filesToCleanUp = []; + + /** + * Return instance of AndAnyOtherArgs matcher. + * + * @return AndAnyOtherArgs + */ + public static function andAnyOtherArgs() + { + return new AndAnyOtherArgs(); + } + + /** + * Return instance of AndAnyOtherArgs matcher. + * + * An alternative name to `andAnyOtherArgs` so + * the API stays closer to `any` as well. + * + * @return AndAnyOtherArgs + */ + public static function andAnyOthers() + { + return new AndAnyOtherArgs(); + } + + /** + * Return instance of ANY matcher. + * + * @return Any + */ + public static function any() + { + return new Any(); + } + + /** + * Return instance of ANYOF matcher. + * + * @template TAnyOf + * + * @param TAnyOf ...$args + * + * @return AnyOf + */ + public static function anyOf(...$args) + { + return new AnyOf($args); + } + + /** + * @return array + * + * @deprecated since 1.3.2 and will be removed in 2.0. + */ + public static function builtInTypes() + { + return ['array', 'bool', 'callable', 'float', 'int', 'iterable', 'object', 'self', 'string', 'void']; + } + + /** + * Return instance of CLOSURE matcher. + * + * @template TReference + * + * @param TReference $reference + * + * @return ClosureMatcher + */ + public static function capture(&$reference) + { + $closure = static function ($argument) use (&$reference) { + $reference = $argument; + return true; + }; + + return new ClosureMatcher($closure); + } + + /** + * Static shortcut to closing up and verifying all mocks in the global + * container, and resetting the container static variable to null. + * + * @return void + */ + public static function close() + { + foreach (self::$_filesToCleanUp as $fileName) { + @\unlink($fileName); + } + + self::$_filesToCleanUp = []; + + if (self::$_container === null) { + return; + } + + $container = self::$_container; + + self::$_container = null; + + $container->mockery_teardown(); + + $container->mockery_close(); + } + + /** + * Return instance of CONTAINS matcher. + * + * @template TContains + * + * @param TContains $args + * + * @return Contains + */ + public static function contains(...$args) + { + return new Contains($args); + } + + /** + * @param class-string $fqn + * + * @return void + */ + public static function declareClass($fqn) + { + static::declareType($fqn, 'class'); + } + + /** + * @param class-string $fqn + * + * @return void + */ + public static function declareInterface($fqn) + { + static::declareType($fqn, 'interface'); + } + + /** + * Return instance of DUCKTYPE matcher. + * + * @template TDucktype + * + * @param TDucktype ...$args + * + * @return Ducktype + */ + public static function ducktype(...$args) + { + return new Ducktype($args); + } + + /** + * Static fetching of a mock associated with a name or explicit class poser. + * + * @template TFetchMock of object + * + * @param class-string $name + * + * @return null|(LegacyMockInterface&MockInterface&TFetchMock) + */ + public static function fetchMock($name) + { + return self::getContainer()->fetchMock($name); + } + + /** + * Utility method to format method name and arguments into a string. + * + * @param string $method + * + * @return string + */ + public static function formatArgs($method, ?array $arguments = null) + { + if ($arguments === null) { + return $method . '()'; + } + + $formattedArguments = []; + foreach ($arguments as $argument) { + $formattedArguments[] = self::formatArgument($argument); + } + + return $method . '(' . \implode(', ', $formattedArguments) . ')'; + } + + /** + * Utility function to format objects to printable arrays. + * + * @return string + */ + public static function formatObjects(?array $objects = null) + { + static $formatting; + + if ($formatting) { + return '[Recursion]'; + } + + if ($objects === null) { + return ''; + } + + $objects = \array_filter($objects, 'is_object'); + if ($objects === []) { + return ''; + } + + $formatting = true; + $parts = []; + + foreach ($objects as $object) { + $parts[\get_class($object)] = self::objectToArray($object); + } + + $formatting = false; + + return 'Objects: ( ' . \var_export($parts, true) . ')'; + } + + /** + * Lazy loader and Getter for the global + * configuration container. + * + * @return Configuration + */ + public static function getConfiguration() + { + if (self::$_config === null) { + self::$_config = new Configuration(); + } + + return self::$_config; + } + + /** + * Lazy loader and getter for the container property. + * + * @return Container + */ + public static function getContainer() + { + if (self::$_container === null) { + self::$_container = new Container(self::getGenerator(), self::getLoader()); + } + + return self::$_container; + } + + /** + * Creates and returns a default generator + * used inside this class. + * + * @return CachingGenerator + */ + public static function getDefaultGenerator() + { + return new CachingGenerator(StringManipulationGenerator::withDefaultPasses()); + } + + /** + * Gets an EvalLoader to be used as default. + * + * @return EvalLoader + */ + public static function getDefaultLoader() + { + return new EvalLoader(); + } + + /** + * Lazy loader method and getter for + * the generator property. + * + * @return Generator + */ + public static function getGenerator() + { + if (self::$_generator === null) { + self::$_generator = self::getDefaultGenerator(); + } + + return self::$_generator; + } + + /** + * Lazy loader method and getter for + * the $_loader property. + * + * @return Loader + */ + public static function getLoader() + { + if (self::$_loader === null) { + self::$_loader = self::getDefaultLoader(); + } + + return self::$_loader; + } + + /** + * Defines the global helper functions + * + * @return void + */ + public static function globalHelpers() + { + require_once __DIR__ . '/helpers.php'; + } + + /** + * Return instance of HASKEY matcher. + * + * @template THasKey + * + * @param THasKey $key + * + * @return HasKey + */ + public static function hasKey($key) + { + return new HasKey($key); + } + + /** + * Return instance of HASVALUE matcher. + * + * @template THasValue + * + * @param THasValue $val + * + * @return HasValue + */ + public static function hasValue($val) + { + return new HasValue($val); + } + + /** + * Static and Semantic shortcut to Container::mock(). + * + * @template TInstanceMock + * + * @param array|TInstanceMock|array> $args + * + * @return LegacyMockInterface&MockInterface&TInstanceMock + */ + public static function instanceMock(...$args) + { + return self::getContainer()->mock(...$args); + } + + /** + * @param string $type + * + * @return bool + * + * @deprecated since 1.3.2 and will be removed in 2.0. + */ + public static function isBuiltInType($type) + { + return \in_array($type, self::builtInTypes(), true); + } + + /** + * Return instance of IsEqual matcher. + * + * @template TExpected + * + * @param TExpected $expected + */ + public static function isEqual($expected): IsEqual + { + return new IsEqual($expected); + } + + /** + * Return instance of IsSame matcher. + * + * @template TExpected + * + * @param TExpected $expected + */ + public static function isSame($expected): IsSame + { + return new IsSame($expected); + } + + /** + * Static shortcut to Container::mock(). + * + * @template TMock of object + * + * @param array|TMock|Closure(LegacyMockInterface&MockInterface&TMock):LegacyMockInterface&MockInterface&TMock|array> $args + * + * @return LegacyMockInterface&MockInterface&TMock + */ + public static function mock(...$args) + { + return self::getContainer()->mock(...$args); + } + + /** + * Return instance of MUSTBE matcher. + * + * @template TExpected + * + * @param TExpected $expected + * + * @return MustBe + */ + public static function mustBe($expected) + { + return new MustBe($expected); + } + + /** + * Static shortcut to Container::mock(), first argument names the mock. + * + * @template TNamedMock + * + * @param array|TNamedMock|array> $args + * + * @return LegacyMockInterface&MockInterface&TNamedMock + */ + public static function namedMock(...$args) + { + $name = \array_shift($args); + + $builder = new MockConfigurationBuilder(); + $builder->setName($name); + + \array_unshift($args, $builder); + + return self::getContainer()->mock(...$args); + } + + /** + * Return instance of NOT matcher. + * + * @template TNotExpected + * + * @param TNotExpected $expected + * + * @return Not + */ + public static function not($expected) + { + return new Not($expected); + } + + /** + * Return instance of NOTANYOF matcher. + * + * @template TNotAnyOf + * + * @param TNotAnyOf ...$args + * + * @return NotAnyOf + */ + public static function notAnyOf(...$args) + { + return new NotAnyOf($args); + } + + /** + * Return instance of CLOSURE matcher. + * + * @template TClosure of Closure + * + * @param TClosure $closure + * + * @return ClosureMatcher + */ + public static function on($closure) + { + return new ClosureMatcher($closure); + } + + /** + * Utility function to parse shouldReceive() arguments and generate + * expectations from such as needed. + * + * @template TReturnArgs + * + * @param TReturnArgs ...$args + * @param Closure $add + * + * @return CompositeExpectation + */ + public static function parseShouldReturnArgs(LegacyMockInterface $mock, $args, $add) + { + $composite = new CompositeExpectation(); + + foreach ($args as $arg) { + if (\is_string($arg)) { + $composite->add(self::buildDemeterChain($mock, $arg, $add)); + + continue; + } + + if (\is_array($arg)) { + foreach ($arg as $k => $v) { + $composite->add(self::buildDemeterChain($mock, $k, $add)->andReturn($v)); + } + } + } + + return $composite; + } + + /** + * Return instance of PATTERN matcher. + * + * @template TPatter + * + * @param TPatter $expected + * + * @return Pattern + */ + public static function pattern($expected) + { + return new Pattern($expected); + } + + /** + * Register a file to be deleted on tearDown. + * + * @param string $fileName + */ + public static function registerFileForCleanUp($fileName) + { + self::$_filesToCleanUp[] = $fileName; + } + + /** + * Reset the container to null. + * + * @return void + */ + public static function resetContainer() + { + self::$_container = null; + } + + /** + * Static shortcut to Container::self(). + * + * @throws LogicException + * + * @return LegacyMockInterface|MockInterface + */ + public static function self() + { + if (self::$_container === null) { + throw new LogicException('You have not declared any mocks yet'); + } + + return self::$_container->self(); + } + + /** + * Set the container. + * + * @return Container + */ + public static function setContainer(Container $container) + { + return self::$_container = $container; + } + + /** + * Setter for the $_generator static property. + */ + public static function setGenerator(Generator $generator) + { + self::$_generator = $generator; + } + + /** + * Setter for the $_loader static property. + */ + public static function setLoader(Loader $loader) + { + self::$_loader = $loader; + } + + /** + * Static and semantic shortcut for getting a mock from the container + * and applying the spy's expected behavior into it. + * + * @template TSpy + * + * @param array|TSpy|Closure(LegacyMockInterface&MockInterface&TSpy):LegacyMockInterface&MockInterface&TSpy|array> $args + * + * @return LegacyMockInterface&MockInterface&TSpy + */ + public static function spy(...$args) + { + if ($args !== [] && $args[0] instanceof Closure) { + $args[0] = new ClosureWrapper($args[0]); + } + + return self::getContainer()->mock(...$args)->shouldIgnoreMissing(); + } + + /** + * Return instance of SUBSET matcher. + * + * @param bool $strict - (Optional) True for strict comparison, false for loose + * + * @return Subset + */ + public static function subset(array $part, $strict = true) + { + return new Subset($part, $strict); + } + + /** + * Return instance of TYPE matcher. + * + * @template TExpectedType + * + * @param TExpectedType $expected + * + * @return Type + */ + public static function type($expected) + { + return new Type($expected); + } + + /** + * Sets up expectations on the members of the CompositeExpectation and + * builds up any demeter chain that was passed to shouldReceive. + * + * @param string $arg + * @param Closure $add + * + * @throws MockeryException + * + * @return ExpectationInterface + */ + protected static function buildDemeterChain(LegacyMockInterface $mock, $arg, $add) + { + $container = $mock->mockery_getContainer(); + $methodNames = \explode('->', $arg); + + \reset($methodNames); + + if ( + ! $mock->mockery_isAnonymous() + && ! self::getConfiguration()->mockingNonExistentMethodsAllowed() + && ! \in_array(\current($methodNames), $mock->mockery_getMockableMethods(), true) + ) { + throw new MockeryException( + "Mockery's configuration currently forbids mocking the method " + . \current($methodNames) . ' as it does not exist on the class or object ' + . 'being mocked' + ); + } + + /** @var Closure $nextExp */ + $nextExp = static function ($method) use ($add) { + return $add($method); + }; + + $parent = \get_class($mock); + + /** @var null|ExpectationInterface $expectations */ + $expectations = null; + while (true) { + $method = \array_shift($methodNames); + $expectations = $mock->mockery_getExpectationsFor($method); + + if ($expectations === null || self::noMoreElementsInChain($methodNames)) { + $expectations = $nextExp($method); + if (self::noMoreElementsInChain($methodNames)) { + break; + } + + $mock = self::getNewDemeterMock($container, $parent, $method, $expectations); + } else { + $demeterMockKey = $container->getKeyOfDemeterMockFor($method, $parent); + if ($demeterMockKey !== null) { + $mock = self::getExistingDemeterMock($container, $demeterMockKey); + } + } + + $parent .= '->' . $method; + + $nextExp = static function ($n) use ($mock) { + return $mock->allows($n); + }; + } + + return $expectations; + } + + /** + * Utility method for recursively generating a representation of the given array. + * + * @template TArray or array + * + * @param TArray $argument + * @param int $nesting + * + * @return TArray + */ + private static function cleanupArray($argument, $nesting = 3) + { + if ($nesting === 0) { + return '...'; + } + + foreach ($argument as $key => $value) { + if (\is_array($value)) { + $argument[$key] = self::cleanupArray($value, $nesting - 1); + + continue; + } + + if (\is_object($value)) { + $argument[$key] = self::objectToArray($value, $nesting - 1); + } + } + + return $argument; + } + + /** + * Utility method used for recursively generating + * an object or array representation. + * + * @template TArgument + * + * @param TArgument $argument + * @param int $nesting + * + * @return mixed + */ + private static function cleanupNesting($argument, $nesting) + { + if (\is_object($argument)) { + $object = self::objectToArray($argument, $nesting - 1); + $object['class'] = \get_class($argument); + + return $object; + } + + if (\is_array($argument)) { + return self::cleanupArray($argument, $nesting - 1); + } + + return $argument; + } + + /** + * @param string $fqn + * @param string $type + */ + private static function declareType($fqn, $type): void + { + $targetCode = ' + */ + private static function extractInstancePublicProperties($object, $nesting) + { + $reflection = new ReflectionClass($object); + $properties = $reflection->getProperties(ReflectionProperty::IS_PUBLIC); + $cleanedProperties = []; + + foreach ($properties as $publicProperty) { + if (! $publicProperty->isStatic()) { + $name = $publicProperty->getName(); + try { + $cleanedProperties[$name] = self::cleanupNesting($object->{$name}, $nesting); + } catch (Exception $exception) { + $cleanedProperties[$name] = $exception->getMessage(); + } + } + } + + return $cleanedProperties; + } + + /** + * Gets the string representation + * of any passed argument. + * + * @param mixed $argument + * @param int $depth + * + * @return mixed + */ + private static function formatArgument($argument, $depth = 0) + { + if ($argument instanceof MatcherInterface) { + return (string) $argument; + } + + if (\is_object($argument)) { + return 'object(' . \get_class($argument) . ')'; + } + + if (\is_int($argument) || \is_float($argument)) { + return $argument; + } + + if (\is_array($argument)) { + if ($depth === 1) { + $argument = '[...]'; + } else { + $sample = []; + foreach ($argument as $key => $value) { + $key = \is_int($key) ? $key : \sprintf("'%s'", $key); + $value = self::formatArgument($value, $depth + 1); + $sample[] = \sprintf('%s => %s', $key, $value); + } + + $argument = '[' . \implode(', ', $sample) . ']'; + } + + return (\strlen($argument) > 1000) ? \substr($argument, 0, 1000) . '...]' : $argument; + } + + if (\is_bool($argument)) { + return $argument ? 'true' : 'false'; + } + + if (\is_resource($argument)) { + return 'resource(...)'; + } + + if ($argument === null) { + return 'NULL'; + } + + return "'" . $argument . "'"; + } + + /** + * Gets a specific demeter mock from the ones kept by the container. + * + * @template TMock of object + * + * @param class-string $demeterMockKey + * + * @return null|(LegacyMockInterface&MockInterface&TMock) + */ + private static function getExistingDemeterMock(Container $container, $demeterMockKey) + { + return $container->getMocks()[$demeterMockKey] ?? null; + } + + /** + * Gets a new demeter configured + * mock from the container. + * + * @param string $parent + * @param string $method + * + * @return LegacyMockInterface&MockInterface + */ + private static function getNewDemeterMock(Container $container, $parent, $method, ExpectationInterface $exp) + { + $newMockName = 'demeter_' . \md5($parent) . '_' . $method; + + $parRef = null; + + $parentMock = $exp->getMock(); + if ($parentMock !== null) { + $parRef = new ReflectionObject($parentMock); + } + + if ($parRef instanceof ReflectionObject && $parRef->hasMethod($method)) { + $parRefMethod = $parRef->getMethod($method); + $parRefMethodRetType = Reflector::getReturnType($parRefMethod, true); + + if ($parRefMethodRetType !== null) { + $returnTypes = \explode('|', $parRefMethodRetType); + + $filteredReturnTypes = array_filter($returnTypes, static function (string $type): bool { + return ! Reflector::isReservedWord($type); + }); + + if ($filteredReturnTypes !== []) { + $nameBuilder = new MockNameBuilder(); + + $nameBuilder->addPart('\\' . $newMockName); + + $mock = self::namedMock( + $nameBuilder->build(), + ...$filteredReturnTypes + ); + + $exp->andReturn($mock); + + return $mock; + } + } + } + + $mock = $container->mock($newMockName); + $exp->andReturn($mock); + + return $mock; + } + + /** + * Checks if the passed array representing a demeter + * chain with the method names is empty. + * + * @return bool + */ + private static function noMoreElementsInChain(array $methodNames) + { + return $methodNames === []; + } + + /** + * Utility function to turn public properties and public get* and is* method values into an array. + * + * @param object $object + * @param int $nesting + * + * @return array + */ + private static function objectToArray($object, $nesting = 3) + { + if ($nesting === 0) { + return ['...']; + } + + $defaultFormatter = static function ($object, $nesting) { + return [ + 'properties' => self::extractInstancePublicProperties($object, $nesting), + ]; + }; + + $class = \get_class($object); + + $formatter = self::getConfiguration()->getObjectFormatter($class, $defaultFormatter); + + $array = [ + 'class' => $class, + 'identity' => '#' . \md5(\spl_object_hash($object)), + ]; + + return \array_merge($array, $formatter($object, $nesting)); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php new file mode 100644 index 0000000..a6d5b8f --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php @@ -0,0 +1,86 @@ +addToAssertionCount(Mockery::getContainer()->mockery_getExpectationCount()); + } + + protected function checkMockeryExceptions() + { + if (! method_exists($this, 'markAsRisky')) { + return; + } + + foreach (Mockery::getContainer()->mockery_thrownExceptions() as $e) { + if (! $e->dismissed()) { + $this->markAsRisky(); + } + } + } + + protected function closeMockery() + { + Mockery::close(); + $this->mockeryOpen = false; + } + + /** + * Performs assertions shared by all tests of a test case. This method is + * called before execution of a test ends and before the tearDown method. + */ + protected function mockeryAssertPostConditions() + { + $this->addMockeryExpectationsToAssertionCount(); + $this->checkMockeryExceptions(); + $this->closeMockery(); + + parent::assertPostConditions(); + } + + /** + * @after + */ + #[After] + protected function purgeMockeryContainer() + { + if ($this->mockeryOpen) { + // post conditions wasn't called, so test probably failed + Mockery::close(); + } + } + + /** + * @before + */ + #[Before] + protected function startMockery() + { + $this->mockeryOpen = true; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditions.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditions.php new file mode 100644 index 0000000..e4a80b5 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditions.php @@ -0,0 +1,21 @@ +mockeryAssertPostConditions(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php new file mode 100644 index 0000000..942f1c0 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php @@ -0,0 +1,27 @@ +mockeryTestSetUp(); + } + + protected function tearDown(): void + { + $this->mockeryTestTearDown(); + parent::tearDown(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php new file mode 100644 index 0000000..1ae8458 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php @@ -0,0 +1,38 @@ +trait = new TestListenerTrait(); + } + + public function endTest(Test $test, float $time): void + { + $this->trait->endTest($test, $time); + } + + public function startTestSuite(TestSuite $suite): void + { + $this->trait->startTestSuite(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListenerTrait.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListenerTrait.php new file mode 100644 index 0000000..45c6b3f --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListenerTrait.php @@ -0,0 +1,84 @@ +getStatus() !== BaseTestRunner::STATUS_PASSED) { + // If the test didn't pass there is no guarantee that + // verifyMockObjects and assertPostConditions have been called. + // And even if it did, the point here is to prevent false + // negatives, not to make failing tests fail for more reasons. + return; + } + + try { + // The self() call is used as a sentinel. Anything that throws if + // the container is closed already will do. + Mockery::self(); + } catch (LogicException $logicException) { + return; + } + + $e = new ExpectationFailedException( + sprintf( + "Mockery's expectations have not been verified. Make sure that \Mockery::close() is called at the end of the test. Consider using %s\MockeryPHPUnitIntegration or extending %s\MockeryTestCase.", + __NAMESPACE__, + __NAMESPACE__ + ) + ); + + /** @var \PHPUnit\Framework\TestResult $result */ + $result = $test->getTestResultObject(); + + if ($result !== null) { + $result->addFailure($test, $e, $time); + } + } + + public function startTestSuite() + { + if (method_exists(Blacklist::class, 'addDirectory')) { + (new Blacklist())->getBlacklistedDirectories(); + Blacklist::addDirectory(dirname((new ReflectionClass(Mockery::class))->getFileName())); + } else { + Blacklist::$blacklistedClassNames[Mockery::class] = 1; + } + } +} diff --git a/vendor/mockery/mockery/library/Mockery/ClosureWrapper.php b/vendor/mockery/mockery/library/Mockery/ClosureWrapper.php new file mode 100644 index 0000000..fae8871 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/ClosureWrapper.php @@ -0,0 +1,36 @@ +closure = $closure; + } + + /** + * @return mixed + */ + public function __invoke() + { + return ($this->closure)(...func_get_args()); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php b/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php new file mode 100644 index 0000000..fa03c39 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php @@ -0,0 +1,150 @@ + + */ + protected $_expectations = []; + + /** + * Intercept any expectation calls and direct against all expectations + * + * @param string $method + * + * @return self + */ + public function __call($method, array $args) + { + foreach ($this->_expectations as $expectation) { + $expectation->{$method}(...$args); + } + + return $this; + } + + /** + * Return the string summary of this composite expectation + * + * @return string + */ + public function __toString() + { + $parts = array_map(static function (ExpectationInterface $expectation): string { + return (string) $expectation; + }, $this->_expectations); + + return '[' . implode(', ', $parts) . ']'; + } + + /** + * Add an expectation to the composite + * + * @param ExpectationInterface|HigherOrderMessage $expectation + * + * @return void + */ + public function add($expectation) + { + $this->_expectations[] = $expectation; + } + + /** + * @param mixed ...$args + */ + public function andReturn(...$args) + { + return $this->__call(__FUNCTION__, $args); + } + + /** + * Set a return value, or sequential queue of return values + * + * @param mixed ...$args + * + * @return self + */ + public function andReturns(...$args) + { + return $this->andReturn(...$args); + } + + /** + * Return the parent mock of the first expectation + * + * @return LegacyMockInterface&MockInterface + */ + public function getMock() + { + reset($this->_expectations); + $first = current($this->_expectations); + return $first->getMock(); + } + + /** + * Return order number of the first expectation + * + * @return int + */ + public function getOrderNumber() + { + reset($this->_expectations); + $first = current($this->_expectations); + return $first->getOrderNumber(); + } + + /** + * Mockery API alias to getMock + * + * @return LegacyMockInterface&MockInterface + */ + public function mock() + { + return $this->getMock(); + } + + /** + * Starts a new expectation addition on the first mock which is the primary target outside of a demeter chain + * + * @param mixed ...$args + * + * @return Expectation + */ + public function shouldNotReceive(...$args) + { + reset($this->_expectations); + $first = current($this->_expectations); + return $first->getMock()->shouldNotReceive(...$args); + } + + /** + * Starts a new expectation addition on the first mock which is the primary target, outside of a demeter chain + * + * @param mixed ...$args + * + * @return Expectation + */ + public function shouldReceive(...$args) + { + reset($this->_expectations); + $first = current($this->_expectations); + return $first->getMock()->shouldReceive(...$args); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Configuration.php b/vendor/mockery/mockery/library/Mockery/Configuration.php new file mode 100644 index 0000000..d415d9e --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Configuration.php @@ -0,0 +1,406 @@ + ['MY_CONST' => 123, 'OTHER_CONST' => 'foo']] + * + * @var array|scalar>> + */ + protected $_constantsMap = []; + + /** + * Default argument matchers + * + * e.g. ['class' => 'matcher'] + * + * @var array + */ + protected $_defaultMatchers = []; + + /** + * Parameter map for use with PHP internal classes. + * + * e.g. ['class' => ['method' => ['param1', 'param2']]] + * + * @var array>> + */ + protected $_internalClassParamMap = []; + + /** + * Custom object formatters + * + * e.g. ['class' => static fn($object) => 'formatted'] + * + * @var array + */ + protected $_objectFormatters = []; + + /** + * @var QuickDefinitionsConfiguration + */ + protected $_quickDefinitionsConfiguration; + + /** + * Boolean assertion is reflection caching enabled or not. It should be + * always enabled, except when using PHPUnit's --static-backup option. + * + * @see https://github.com/mockery/mockery/issues/268 + */ + protected $_reflectionCacheEnabled = true; + + public function __construct() + { + $this->_quickDefinitionsConfiguration = new QuickDefinitionsConfiguration(); + } + + /** + * Set boolean to allow/prevent unnecessary mocking of methods + * + * @param bool $flag + * + * @return void + * + * @deprecated since 1.4.0 + */ + public function allowMockingMethodsUnnecessarily($flag = true) + { + @trigger_error( + sprintf('The %s method is deprecated and will be removed in a future version of Mockery', __METHOD__), + E_USER_DEPRECATED + ); + + $this->_allowMockingMethodsUnnecessarily = (bool) $flag; + } + + /** + * Set boolean to allow/prevent mocking of non-existent methods + * + * @param bool $flag + * + * @return void + */ + public function allowMockingNonExistentMethods($flag = true) + { + $this->_allowMockingNonExistentMethod = (bool) $flag; + } + + /** + * Disable reflection caching + * + * It should be always enabled, except when using + * PHPUnit's --static-backup option. + * + * @see https://github.com/mockery/mockery/issues/268 + * + * @return void + */ + public function disableReflectionCache() + { + $this->_reflectionCacheEnabled = false; + } + + /** + * Enable reflection caching + * + * It should be always enabled, except when using + * PHPUnit's --static-backup option. + * + * @see https://github.com/mockery/mockery/issues/268 + * + * @return void + */ + public function enableReflectionCache() + { + $this->_reflectionCacheEnabled = true; + } + + /** + * Get the map of constants to be used in the mock generator + * + * @return array|scalar>> + */ + public function getConstantsMap() + { + return $this->_constantsMap; + } + + /** + * Get the default matcher for a given class + * + * @param class-string $class + * + * @return null|class-string + */ + public function getDefaultMatcher($class) + { + $classes = []; + + $parentClass = $class; + + do { + $classes[] = $parentClass; + + $parentClass = get_parent_class($parentClass); + } while ($parentClass !== false); + + $classesAndInterfaces = array_merge($classes, class_implements($class)); + + foreach ($classesAndInterfaces as $type) { + if (array_key_exists($type, $this->_defaultMatchers)) { + return $this->_defaultMatchers[$type]; + } + } + + return null; + } + + /** + * Get the parameter map of an internal PHP class method + * + * @param class-string $class + * @param string $method + * + * @return null|array + */ + public function getInternalClassMethodParamMap($class, $method) + { + $class = strtolower($class); + $method = strtolower($method); + if (! array_key_exists($class, $this->_internalClassParamMap)) { + return null; + } + + if (! array_key_exists($method, $this->_internalClassParamMap[$class])) { + return null; + } + + return $this->_internalClassParamMap[$class][$method]; + } + + /** + * Get the parameter maps of internal PHP classes + * + * @return array>> + */ + public function getInternalClassMethodParamMaps() + { + return $this->_internalClassParamMap; + } + + /** + * Get the object formatter for a class + * + * @param class-string $class + * @param Closure $defaultFormatter + * + * @return Closure + */ + public function getObjectFormatter($class, $defaultFormatter) + { + $parentClass = $class; + + do { + $classes[] = $parentClass; + + $parentClass = get_parent_class($parentClass); + } while ($parentClass !== false); + + $classesAndInterfaces = array_merge($classes, class_implements($class)); + + foreach ($classesAndInterfaces as $type) { + if (array_key_exists($type, $this->_objectFormatters)) { + return $this->_objectFormatters[$type]; + } + } + + return $defaultFormatter; + } + + /** + * Returns the quick definitions configuration + */ + public function getQuickDefinitions(): QuickDefinitionsConfiguration + { + return $this->_quickDefinitionsConfiguration; + } + + /** + * Return flag indicating whether mocking non-existent methods allowed + * + * @return bool + * + * @deprecated since 1.4.0 + */ + public function mockingMethodsUnnecessarilyAllowed() + { + @trigger_error( + sprintf('The %s method is deprecated and will be removed in a future version of Mockery', __METHOD__), + E_USER_DEPRECATED + ); + + return $this->_allowMockingMethodsUnnecessarily; + } + + /** + * Return flag indicating whether mocking non-existent methods allowed + * + * @return bool + */ + public function mockingNonExistentMethodsAllowed() + { + return $this->_allowMockingNonExistentMethod; + } + + /** + * Is reflection cache enabled? + * + * @return bool + */ + public function reflectionCacheEnabled() + { + return $this->_reflectionCacheEnabled; + } + + /** + * Remove all overridden parameter maps from internal PHP classes. + * + * @return void + */ + public function resetInternalClassMethodParamMaps() + { + $this->_internalClassParamMap = []; + } + + /** + * Set a map of constants to be used in the mock generator + * + * e.g. ['MyClass' => ['MY_CONST' => 123, 'ARRAY_CONST' => ['foo', 'bar']]] + * + * @param array|scalar>> $map + * + * @return void + */ + public function setConstantsMap(array $map) + { + $this->_constantsMap = $map; + } + + /** + * @param class-string $class + * @param class-string $matcherClass + * + * @throws InvalidArgumentException + * + * @return void + */ + public function setDefaultMatcher($class, $matcherClass) + { + $isHamcrest = is_a($matcherClass, Matcher::class, true) + || is_a($matcherClass, Hamcrest_Matcher::class, true); + + if ($isHamcrest) { + @trigger_error('Hamcrest package has been deprecated and will be removed in 2.0', E_USER_DEPRECATED); + } + + if (! $isHamcrest && ! is_a($matcherClass, MatcherInterface::class, true)) { + throw new InvalidArgumentException(sprintf( + "Matcher class must implement %s, '%s' given.", + MatcherInterface::class, + $matcherClass + )); + } + + $this->_defaultMatchers[$class] = $matcherClass; + } + + /** + * Set a parameter map (array of param signature strings) for the method of an internal PHP class. + * + * @param class-string $class + * @param string $method + * @param list $map + * + * @throws LogicException + * + * @return void + */ + public function setInternalClassMethodParamMap($class, $method, array $map) + { + if (PHP_MAJOR_VERSION > 7) { + throw new LogicException( + 'Internal class parameter overriding is not available in PHP 8. Incompatible signatures have been reclassified as fatal errors.' + ); + } + + $class = strtolower($class); + + if (! array_key_exists($class, $this->_internalClassParamMap)) { + $this->_internalClassParamMap[$class] = []; + } + + $this->_internalClassParamMap[$class][strtolower($method)] = $map; + } + + /** + * Set a custom object formatter for a class + * + * @param class-string $class + * @param Closure $formatterCallback + * + * @return void + */ + public function setObjectFormatter($class, $formatterCallback) + { + $this->_objectFormatters[$class] = $formatterCallback; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Container.php b/vendor/mockery/mockery/library/Mockery/Container.php new file mode 100644 index 0000000..ddba888 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Container.php @@ -0,0 +1,678 @@ + + */ + protected $_groups = []; + + /** + * @var LoaderInterface + */ + protected $_loader; + + /** + * Store of mock objects + * + * @var array|array-key,LegacyMockInterface&MockInterface&TMockObject> + */ + protected $_mocks = []; + + /** + * @var array + */ + protected $_namedMocks = []; + + /** + * @var Instantiator + */ + protected $instantiator; + + public function __construct(?Generator $generator = null, ?LoaderInterface $loader = null, ?Instantiator $instantiator = null) + { + $this->_generator = $generator instanceof Generator ? $generator : Mockery::getDefaultGenerator(); + $this->_loader = $loader instanceof LoaderInterface ? $loader : Mockery::getDefaultLoader(); + $this->instantiator = $instantiator instanceof Instantiator ? $instantiator : new Instantiator(); + } + + /** + * Return a specific remembered mock according to the array index it + * was stored to in this container instance + * + * @template TMock of object + * + * @param class-string $reference + * + * @return null|(LegacyMockInterface&MockInterface&TMock) + */ + public function fetchMock($reference) + { + return $this->_mocks[$reference] ?? null; + } + + /** + * @return Generator + */ + public function getGenerator() + { + return $this->_generator; + } + + /** + * @param string $method + * @param string $parent + * + * @return null|string + */ + public function getKeyOfDemeterMockFor($method, $parent) + { + $keys = array_keys($this->_mocks); + + $match = preg_grep('/__demeter_' . md5($parent) . sprintf('_%s$/', $method), $keys); + if ($match === false) { + return null; + } + + if ($match === []) { + return null; + } + + return array_values($match)[0]; + } + + /** + * @return LoaderInterface + */ + public function getLoader() + { + return $this->_loader; + } + + /** + * @template TMock of object + * @return array|array-key,LegacyMockInterface&MockInterface&TMockObject> + */ + public function getMocks() + { + return $this->_mocks; + } + + /** + * @return void + */ + public function instanceMock() + { + } + + /** + * see http://php.net/manual/en/language.oop5.basic.php + * + * @param string $className + * + * @return bool + */ + public function isValidClassName($className) + { + if ($className[0] === '\\') { + $className = substr($className, 1); // remove the first backslash + } + + // all the namespaces and class name should match the regex + return array_filter( + explode('\\', $className), + static function ($name): bool { + return ! preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $name); + } + ) === []; + } + + /** + * Generates a new mock object for this container + * + * I apologies in advance for this. A God Method just fits the API which + * doesn't require differentiating between classes, interfaces, abstracts, + * names or partials - just so long as it's something that can be mocked. + * I'll refactor it one day so it's easier to follow. + * + * @template TMock of object + * + * @param array|TMock|Closure(LegacyMockInterface&MockInterface&TMock):LegacyMockInterface&MockInterface&TMock|array> $args + * + * @throws ReflectionException|RuntimeException + * + * @return LegacyMockInterface&MockInterface&TMock + */ + public function mock(...$args) + { + /** @var null|MockConfigurationBuilder $builder */ + $builder = null; + /** @var null|callable $expectationClosure */ + $expectationClosure = null; + $partialMethods = null; + $quickDefinitions = []; + $constructorArgs = null; + $blocks = []; + + if (count($args) > 1) { + $finalArg = array_pop($args); + + if (is_callable($finalArg) && is_object($finalArg)) { + $expectationClosure = $finalArg; + } else { + $args[] = $finalArg; + } + } + + foreach ($args as $k => $arg) { + if ($arg instanceof MockConfigurationBuilder) { + $builder = $arg; + + unset($args[$k]); + } + } + + reset($args); + + $builder = $builder ?? new MockConfigurationBuilder(); + $mockeryConfiguration = Mockery::getConfiguration(); + $builder->setParameterOverrides($mockeryConfiguration->getInternalClassMethodParamMaps()); + $builder->setConstantsMap($mockeryConfiguration->getConstantsMap()); + + while ($args !== []) { + $arg = array_shift($args); + + // check for multiple interfaces + if (is_string($arg)) { + foreach (explode('|', $arg) as $type) { + if ($arg === 'null') { + // skip PHP 8 'null's + continue; + } + + if (strpos($type, ',') && !strpos($type, ']')) { + $interfaces = explode(',', str_replace(' ', '', $type)); + + $builder->addTargets($interfaces); + + continue; + } + + if (strpos($type, 'alias:') === 0) { + $type = str_replace('alias:', '', $type); + + $builder->addTarget('stdClass'); + $builder->setName($type); + + continue; + } + + if (strpos($type, 'overload:') === 0) { + $type = str_replace('overload:', '', $type); + + $builder->setInstanceMock(true); + $builder->addTarget('stdClass'); + $builder->setName($type); + + continue; + } + + if ($type[strlen($type) - 1] === ']') { + $parts = explode('[', $type); + + $class = $parts[0]; + + if (! class_exists($class, true) && ! interface_exists($class, true)) { + throw new Exception('Can only create a partial mock from an existing class or interface'); + } + + $builder->addTarget($class); + + $partialMethods = array_filter( + explode(',', strtolower(rtrim(str_replace(' ', '', $parts[1]), ']'))) + ); + + foreach ($partialMethods as $partialMethod) { + if ($partialMethod[0] === '!') { + $builder->addBlackListedMethod(substr($partialMethod, 1)); + + continue; + } + + $builder->addWhiteListedMethod($partialMethod); + } + + continue; + } + + if (class_exists($type, true) || interface_exists($type, true) || trait_exists($type, true)) { + $builder->addTarget($type); + + continue; + } + + if (! $mockeryConfiguration->mockingNonExistentMethodsAllowed()) { + throw new Exception(sprintf("Mockery can't find '%s' so can't mock it", $type)); + } + + if (! $this->isValidClassName($type)) { + throw new Exception('Class name contains invalid characters'); + } + + $builder->addTarget($type); + + // unions are "sum" types and not "intersections", and so we must only process the first part + break; + } + + continue; + } + + if (is_object($arg)) { + $builder->addTarget($arg); + + continue; + } + + if (is_array($arg)) { + if ([] !== $arg && array_keys($arg) !== range(0, count($arg) - 1)) { + // if associative array + if (array_key_exists(self::BLOCKS, $arg)) { + $blocks = $arg[self::BLOCKS]; + } + + unset($arg[self::BLOCKS]); + + $quickDefinitions = $arg; + + continue; + } + + $constructorArgs = $arg; + + continue; + } + + throw new Exception(sprintf( + 'Unable to parse arguments sent to %s::mock()', get_class($this) + )); + } + + $builder->addBlackListedMethods($blocks); + + if ($constructorArgs !== null) { + $builder->addBlackListedMethod('__construct'); // we need to pass through + } else { + $builder->setMockOriginalDestructor(true); + } + + if ($partialMethods !== null && $constructorArgs === null) { + $constructorArgs = []; + } + + $config = $builder->getMockConfiguration(); + + $this->checkForNamedMockClashes($config); + + $def = $this->getGenerator()->generate($config); + + $className = $def->getClassName(); + if (class_exists($className, $attemptAutoload = false)) { + $rfc = new ReflectionClass($className); + if (! $rfc->implementsInterface(LegacyMockInterface::class)) { + throw new RuntimeException(sprintf('Could not load mock %s, class already exists', $className)); + } + } + + $this->getLoader()->load($def); + + $mock = $this->_getInstance($className, $constructorArgs); + $mock->mockery_init($this, $config->getTargetObject(), $config->isInstanceMock()); + + if ($quickDefinitions !== []) { + if ($mockeryConfiguration->getQuickDefinitions()->shouldBeCalledAtLeastOnce()) { + $mock->shouldReceive($quickDefinitions)->atLeast()->once(); + } else { + $mock->shouldReceive($quickDefinitions)->byDefault(); + } + } + + // if the last parameter passed to mock() is a closure, + if ($expectationClosure instanceof Closure) { + // call the closure with the mock object + $expectationClosure($mock); + } + + return $this->rememberMock($mock); + } + + /** + * Fetch the next available allocation order number + * + * @return int + */ + public function mockery_allocateOrder() + { + return ++$this->_allocatedOrder; + } + + /** + * Reset the container to its original state + * + * @return void + */ + public function mockery_close() + { + foreach ($this->_mocks as $mock) { + $mock->mockery_teardown(); + } + + $this->_mocks = []; + } + + /** + * Get current ordered number + * + * @return int + */ + public function mockery_getCurrentOrder() + { + return $this->_currentOrder; + } + + /** + * Gets the count of expectations on the mocks + * + * @return int + */ + public function mockery_getExpectationCount() + { + $count = 0; + foreach ($this->_mocks as $mock) { + $count += $mock->mockery_getExpectationCount(); + } + + return $count; + } + + /** + * Fetch array of ordered groups + * + * @return array + */ + public function mockery_getGroups() + { + return $this->_groups; + } + + /** + * Set current ordered number + * + * @param int $order + * + * @return int The current order number that was set + */ + public function mockery_setCurrentOrder($order) + { + return $this->_currentOrder = $order; + } + + /** + * Set ordering for a group + * + * @param string $group + * @param int $order + * + * @return void + */ + public function mockery_setGroup($group, $order) + { + $this->_groups[$group] = $order; + } + + /** + * Tear down tasks for this container + * + * @throws PHPException + */ + public function mockery_teardown() + { + try { + $this->mockery_verify(); + } catch (PHPException $phpException) { + $this->mockery_close(); + + throw $phpException; + } + } + + /** + * Retrieves all exceptions thrown by mocks + * + * @return array + */ + public function mockery_thrownExceptions() + { + /** @var array $exceptions */ + $exceptions = []; + + foreach ($this->_mocks as $mock) { + foreach ($mock->mockery_thrownExceptions() as $exception) { + $exceptions[] = $exception; + } + } + + return $exceptions; + } + + /** + * Validate the current mock's ordering + * + * @param string $method + * @param int $order + * + * @throws Exception + */ + public function mockery_validateOrder($method, $order, LegacyMockInterface $mock) + { + if ($order < $this->_currentOrder) { + $exception = new InvalidOrderException( + sprintf( + 'Method %s called out of order: expected order %d, was %d', + $method, + $order, + $this->_currentOrder + ) + ); + + $exception->setMock($mock) + ->setMethodName($method) + ->setExpectedOrder($order) + ->setActualOrder($this->_currentOrder); + + throw $exception; + } + + $this->mockery_setCurrentOrder($order); + } + + /** + * Verify the container mocks + */ + public function mockery_verify() + { + foreach ($this->_mocks as $mock) { + $mock->mockery_verify(); + } + } + + /** + * Store a mock and set its container reference + * + * @template TRememberMock of object + * + * @param LegacyMockInterface&MockInterface&TRememberMock $mock + * + * @return LegacyMockInterface&MockInterface&TRememberMock + */ + public function rememberMock(LegacyMockInterface $mock) + { + $class = get_class($mock); + + if (! array_key_exists($class, $this->_mocks)) { + return $this->_mocks[$class] = $mock; + } + + /** + * This condition triggers for an instance mock where origin mock + * is already remembered + */ + return $this->_mocks[] = $mock; + } + + /** + * Retrieve the last remembered mock object, + * which is the same as saying retrieve the current mock being programmed where you have yet to call mock() + * to change it thus why the method name is "self" since it will be used during the programming of the same mock. + * + * @return LegacyMockInterface|MockInterface + */ + public function self() + { + $mocks = array_values($this->_mocks); + $index = count($mocks) - 1; + return $mocks[$index]; + } + + /** + * @template TMock of object + * @template TMixed + * + * @param class-string $mockName + * @param null|array $constructorArgs + * + * @return TMock + */ + protected function _getInstance($mockName, $constructorArgs = null) + { + if ($constructorArgs !== null) { + return (new ReflectionClass($mockName))->newInstanceArgs($constructorArgs); + } + + try { + $instance = $this->instantiator->instantiate($mockName); + } catch (PHPException $phpException) { + /** @var class-string $internalMockName */ + $internalMockName = $mockName . '_Internal'; + + if (! class_exists($internalMockName)) { + eval(sprintf( + 'class %s extends %s { public function __construct() {} }', + $internalMockName, + $mockName + )); + } + + $instance = new $internalMockName(); + } + + return $instance; + } + + protected function checkForNamedMockClashes($config) + { + $name = $config->getName(); + + if ($name === null) { + return; + } + + $hash = $config->getHash(); + + if (array_key_exists($name, $this->_namedMocks) && $hash !== $this->_namedMocks[$name]) { + throw new Exception( + sprintf("The mock named '%s' has been already defined with a different mock configuration", $name) + ); + } + + $this->_namedMocks[$name] = $hash; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php b/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php new file mode 100644 index 0000000..f250d75 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php @@ -0,0 +1,58 @@ +_limit > $n) { + $exception = new InvalidCountException( + 'Method ' . (string) $this->_expectation + . ' from ' . $this->_expectation->getMock()->mockery_getName() + . ' should be called' . PHP_EOL + . ' at least ' . $this->_limit . ' times but called ' . $n + . ' times.' + ); + + $exception->setMock($this->_expectation->getMock()) + ->setMethodName((string) $this->_expectation) + ->setExpectedCountComparative('>=') + ->setExpectedCount($this->_limit) + ->setActualCount($n); + throw $exception; + } + } +} diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php b/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php new file mode 100644 index 0000000..11bbe37 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php @@ -0,0 +1,45 @@ +_limit < $n) { + $exception = new InvalidCountException( + 'Method ' . (string) $this->_expectation + . ' from ' . $this->_expectation->getMock()->mockery_getName() + . ' should be called' . PHP_EOL + . ' at most ' . $this->_limit . ' times but called ' . $n + . ' times.' + ); + $exception->setMock($this->_expectation->getMock()) + ->setMethodName((string) $this->_expectation) + ->setExpectedCountComparative('<=') + ->setExpectedCount($this->_limit) + ->setActualCount($n); + throw $exception; + } + } +} diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php b/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php new file mode 100644 index 0000000..3ecfde3 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php @@ -0,0 +1,62 @@ +_expectation = $expectation; + $this->_limit = $limit; + } + + /** + * Checks if the validator can accept an additional nth call + * + * @param int $n + * + * @return bool + */ + public function isEligible($n) + { + return $n < $this->_limit; + } + + /** + * Validate the call count against this validator + * + * @param int $n + * + * @return bool + */ + abstract public function validate($n); +} diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorInterface.php b/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorInterface.php new file mode 100644 index 0000000..1cbf4cc --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorInterface.php @@ -0,0 +1,24 @@ +_limit !== $n) { + $because = $this->_expectation->getExceptionMessage(); + + $exception = new InvalidCountException( + 'Method ' . (string) $this->_expectation + . ' from ' . $this->_expectation->getMock()->mockery_getName() + . ' should be called' . PHP_EOL + . ' exactly ' . $this->_limit . ' times but called ' . $n + . ' times.' + . ($because ? ' Because ' . $this->_expectation->getExceptionMessage() : '') + ); + $exception->setMock($this->_expectation->getMock()) + ->setMethodName((string) $this->_expectation) + ->setExpectedCountComparative('=') + ->setExpectedCount($this->_limit) + ->setActualCount($n); + throw $exception; + } + } +} diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php b/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php new file mode 100644 index 0000000..b1c20cd --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php @@ -0,0 +1,18 @@ +dismissed = true; + // we sometimes stack them + $previous = $this->getPrevious(); + if (! $previous instanceof self) { + return; + } + + $previous->dismiss(); + } + + /** + * @return bool + */ + public function dismissed() + { + return $this->dismissed; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Exception/InvalidArgumentException.php b/vendor/mockery/mockery/library/Mockery/Exception/InvalidArgumentException.php new file mode 100644 index 0000000..d76e275 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Exception/InvalidArgumentException.php @@ -0,0 +1,15 @@ +actual; + } + + /** + * @return int + */ + public function getExpectedCount() + { + return $this->expected; + } + + /** + * @return string + */ + public function getExpectedCountComparative() + { + return $this->expectedComparative; + } + + /** + * @return string|null + */ + public function getMethodName() + { + return $this->method; + } + + /** + * @return LegacyMockInterface|null + */ + public function getMock() + { + return $this->mockObject; + } + + /** + * @throws RuntimeException + * @return string|null + */ + public function getMockName() + { + $mock = $this->getMock(); + + if ($mock === null) { + return ''; + } + + return $mock->mockery_getName(); + } + + /** + * @param int $count + * @return self + */ + public function setActualCount($count) + { + $this->actual = $count; + return $this; + } + + /** + * @param int $count + * @return self + */ + public function setExpectedCount($count) + { + $this->expected = $count; + return $this; + } + + /** + * @param string $comp + * @return self + */ + public function setExpectedCountComparative($comp) + { + if (! in_array($comp, ['=', '>', '<', '>=', '<='], true)) { + throw new RuntimeException('Illegal comparative for expected call counts set: ' . $comp); + } + + $this->expectedComparative = $comp; + return $this; + } + + /** + * @param string $name + * @return self + */ + public function setMethodName($name) + { + $this->method = $name; + return $this; + } + + /** + * @return self + */ + public function setMock(LegacyMockInterface $mock) + { + $this->mockObject = $mock; + return $this; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php b/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php new file mode 100644 index 0000000..cf5bb70 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php @@ -0,0 +1,125 @@ +actual; + } + + /** + * @return int + */ + public function getExpectedOrder() + { + return $this->expected; + } + + /** + * @return string|null + */ + public function getMethodName() + { + return $this->method; + } + + /** + * @return LegacyMockInterface|null + */ + public function getMock() + { + return $this->mockObject; + } + + /** + * @return string|null + */ + public function getMockName() + { + $mock = $this->getMock(); + + if ($mock === null) { + return $mock; + } + + return $mock->mockery_getName(); + } + + /** + * @param int $count + * + * @return self + */ + public function setActualOrder($count) + { + $this->actual = $count; + return $this; + } + + /** + * @param int $count + * + * @return self + */ + public function setExpectedOrder($count) + { + $this->expected = $count; + return $this; + } + + /** + * @param string $name + * + * @return self + */ + public function setMethodName($name) + { + $this->method = $name; + return $this; + } + + /** + * @return self + */ + public function setMock(LegacyMockInterface $mock) + { + $this->mockObject = $mock; + return $this; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Exception/MockeryExceptionInterface.php b/vendor/mockery/mockery/library/Mockery/Exception/MockeryExceptionInterface.php new file mode 100644 index 0000000..5ce07ee --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Exception/MockeryExceptionInterface.php @@ -0,0 +1,19 @@ + + */ + protected $actual = []; + + /** + * @var string|null + */ + protected $method = null; + + /** + * @var LegacyMockInterface|null + */ + protected $mockObject = null; + + /** + * @return array + */ + public function getActualArguments() + { + return $this->actual; + } + + /** + * @return string|null + */ + public function getMethodName() + { + return $this->method; + } + + /** + * @return LegacyMockInterface|null + */ + public function getMock() + { + return $this->mockObject; + } + + /** + * @return string|null + */ + public function getMockName() + { + $mock = $this->getMock(); + + if ($mock === null) { + return $mock; + } + + return $mock->mockery_getName(); + } + + /** + * @todo Rename param `count` to `args` + * @template TMixed + * + * @param array $count + * @return self + */ + public function setActualArguments($count) + { + $this->actual = $count; + return $this; + } + + /** + * @param string $name + * @return self + */ + public function setMethodName($name) + { + $this->method = $name; + return $this; + } + + /** + * @return self + */ + public function setMock(LegacyMockInterface $mock) + { + $this->mockObject = $mock; + return $this; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php b/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php new file mode 100644 index 0000000..5d4f643 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php @@ -0,0 +1,17 @@ +_mock = $mock; + $this->_name = $name; + $this->withAnyArgs(); + } + + /** + * Cloning logic + */ + public function __clone() + { + $newValidators = []; + + $countValidators = $this->_countValidators; + + foreach ($countValidators as $validator) { + $newValidators[] = clone $validator; + } + + $this->_countValidators = $newValidators; + } + + /** + * Return a string with the method name and arguments formatted + * + * @return string + */ + public function __toString() + { + return Mockery::formatArgs($this->_name, $this->_expectedArgs); + } + + /** + * Set a return value, or sequential queue of return values + * + * @param mixed ...$args + * + * @return self + */ + public function andReturn(...$args) + { + $this->_returnQueue = $args; + + return $this; + } + + /** + * Sets up a closure to return the nth argument from the expected method call + * + * @param int $index + * + * @return self + */ + public function andReturnArg($index) + { + if (! is_int($index) || $index < 0) { + throw new InvalidArgumentException( + 'Invalid argument index supplied. Index must be a non-negative integer.' + ); + } + + $closure = static function (...$args) use ($index) { + if (array_key_exists($index, $args)) { + return $args[$index]; + } + + throw new OutOfBoundsException( + 'Cannot return an argument value. No argument exists for the index ' . $index + ); + }; + + $this->_closureQueue = [$closure]; + + return $this; + } + + /** + * @return self + */ + public function andReturnFalse() + { + return $this->andReturn(false); + } + + /** + * Return null. This is merely a language construct for Mock describing. + * + * @return self + */ + public function andReturnNull() + { + return $this->andReturn(null); + } + + /** + * Set a return value, or sequential queue of return values + * + * @param mixed ...$args + * + * @return self + */ + public function andReturns(...$args) + { + return $this->andReturn(...$args); + } + + /** + * Return this mock, like a fluent interface + * + * @return self + */ + public function andReturnSelf() + { + return $this->andReturn($this->_mock); + } + + /** + * @return self + */ + public function andReturnTrue() + { + return $this->andReturn(true); + } + + /** + * Return a self-returning black hole object. + * + * @return self + */ + public function andReturnUndefined() + { + return $this->andReturn(new Undefined()); + } + + /** + * Set a closure or sequence of closures with which to generate return + * values. The arguments passed to the expected method are passed to the + * closures as parameters. + * + * @param callable ...$args + * + * @return self + */ + public function andReturnUsing(...$args) + { + $this->_closureQueue = $args; + + return $this; + } + + /** + * Set a sequential queue of return values with an array + * + * @return self + */ + public function andReturnValues(array $values) + { + return $this->andReturn(...$values); + } + + /** + * Register values to be set to a public property each time this expectation occurs + * + * @param string $name + * @param array ...$values + * + * @return self + */ + public function andSet($name, ...$values) + { + $this->_setQueue[$name] = $values; + + return $this; + } + + /** + * Set Exception class and arguments to that class to be thrown + * + * @param string|Throwable $exception + * @param string $message + * @param int $code + * + * @return self + */ + public function andThrow($exception, $message = '', $code = 0, ?\Exception $previous = null) + { + $this->_throw = true; + + if (is_object($exception)) { + return $this->andReturn($exception); + } + + return $this->andReturn(new $exception($message, $code, $previous)); + } + + /** + * Set Exception classes to be thrown + * + * @return self + */ + public function andThrowExceptions(array $exceptions) + { + $this->_throw = true; + + foreach ($exceptions as $exception) { + if (! is_object($exception)) { + throw new Exception('You must pass an array of exception objects to andThrowExceptions'); + } + } + + return $this->andReturnValues($exceptions); + } + + public function andThrows($exception, $message = '', $code = 0, ?\Exception $previous = null) + { + return $this->andThrow($exception, $message, $code, $previous); + } + + /** + * Sets up a closure that will yield each of the provided args + * + * @param mixed ...$args + * + * @return self + */ + public function andYield(...$args) + { + $closure = static function () use ($args) { + foreach ($args as $arg) { + yield $arg; + } + }; + + $this->_closureQueue = [$closure]; + + return $this; + } + + /** + * Sets next count validator to the AtLeast instance + * + * @return self + */ + public function atLeast() + { + $this->_countValidatorClass = AtLeast::class; + + return $this; + } + + /** + * Sets next count validator to the AtMost instance + * + * @return self + */ + public function atMost() + { + $this->_countValidatorClass = AtMost::class; + + return $this; + } + + /** + * Set the exception message + * + * @param string $message + * + * @return $this + */ + public function because($message) + { + $this->_because = $message; + + return $this; + } + + /** + * Shorthand for setting minimum and maximum constraints on call counts + * + * @param int $minimum + * @param int $maximum + */ + public function between($minimum, $maximum) + { + return $this->atLeast()->times($minimum)->atMost()->times($maximum); + } + + /** + * Mark this expectation as being a default + * + * @return self + */ + public function byDefault() + { + $director = $this->_mock->mockery_getExpectationsFor($this->_name); + + if ($director instanceof ExpectationDirector) { + $director->makeExpectationDefault($this); + } + + return $this; + } + + /** + * @return null|string + */ + public function getExceptionMessage() + { + return $this->_because; + } + + /** + * Return the parent mock of the expectation + * + * @return LegacyMockInterface|MockInterface + */ + public function getMock() + { + return $this->_mock; + } + + public function getName() + { + return $this->_name; + } + + /** + * Return order number + * + * @return int + */ + public function getOrderNumber() + { + return $this->_orderNumber; + } + + /** + * Indicates call order should apply globally + * + * @return self + */ + public function globally() + { + $this->_globally = true; + + return $this; + } + + /** + * Check if there is a constraint on call count + * + * @return bool + */ + public function isCallCountConstrained() + { + return $this->_countValidators !== []; + } + + /** + * Checks if this expectation is eligible for additional calls + * + * @return bool + */ + public function isEligible() + { + foreach ($this->_countValidators as $validator) { + if (! $validator->isEligible($this->_actualCount)) { + return false; + } + } + + return true; + } + + /** + * Check if passed arguments match an argument expectation + * + * @return bool + */ + public function matchArgs(array $args) + { + if ($this->isArgumentListMatcher()) { + return $this->_matchArg($this->_expectedArgs[0], $args); + } + + $argCount = count($args); + + $expectedArgsCount = count($this->_expectedArgs); + + if ($argCount === $expectedArgsCount) { + return $this->_matchArgs($args); + } + + $lastExpectedArgument = $this->_expectedArgs[$expectedArgsCount - 1]; + + if ($lastExpectedArgument instanceof AndAnyOtherArgs) { + $firstCorrespondingKey = array_search($lastExpectedArgument, $this->_expectedArgs, true); + + $args = array_slice($args, 0, $firstCorrespondingKey); + + return $this->_matchArgs($args); + } + + return false; + } + + /** + * Indicates that this expectation is never expected to be called + * + * @return self + */ + public function never() + { + return $this->times(0); + } + + /** + * Indicates that this expectation is expected exactly once + * + * @return self + */ + public function once() + { + return $this->times(1); + } + + /** + * Indicates that this expectation must be called in a specific given order + * + * @param string $group Name of the ordered group + * + * @return self + */ + public function ordered($group = null) + { + if ($this->_globally) { + $this->_globalOrderNumber = $this->_defineOrdered($group, $this->_mock->mockery_getContainer()); + } else { + $this->_orderNumber = $this->_defineOrdered($group, $this->_mock); + } + + $this->_globally = false; + + return $this; + } + + /** + * Flag this expectation as calling the original class method with + * the provided arguments instead of using a return value queue. + * + * @return self + */ + public function passthru() + { + if ($this->_mock instanceof Mock) { + throw new Exception( + 'Mock Objects not created from a loaded/existing class are incapable of passing method calls through to a parent class' + ); + } + + $this->_passthru = true; + + return $this; + } + + /** + * Alias to andSet(). Allows the natural English construct + * - set('foo', 'bar')->andReturn('bar') + * + * @param string $name + * @param mixed $value + * + * @return self + */ + public function set($name, $value) + { + return $this->andSet(...func_get_args()); + } + + /** + * Indicates the number of times this expectation should occur + * + * @param int $limit + * + * @throws InvalidArgumentException + * + * @return self + */ + public function times($limit = null) + { + if ($limit === null) { + return $this; + } + + if (! is_int($limit)) { + throw new InvalidArgumentException('The passed Times limit should be an integer value'); + } + + if ($this->_expectedCount === 0) { + @trigger_error(self::ERROR_ZERO_INVOCATION, E_USER_DEPRECATED); + // throw new \InvalidArgumentException(self::ERROR_ZERO_INVOCATION); + } + + if ($limit === 0) { + $this->_countValidators = []; + } + + $this->_expectedCount = $limit; + + $this->_countValidators[$this->_countValidatorClass] = new $this->_countValidatorClass($this, $limit); + + if ($this->_countValidatorClass !== Exact::class) { + $this->_countValidatorClass = Exact::class; + + unset($this->_countValidators[$this->_countValidatorClass]); + } + + return $this; + } + + /** + * Indicates that this expectation is expected exactly twice + * + * @return self + */ + public function twice() + { + return $this->times(2); + } + + /** + * Verify call order + * + * @return void + */ + public function validateOrder() + { + if ($this->_orderNumber) { + $this->_mock->mockery_validateOrder((string) $this, $this->_orderNumber, $this->_mock); + } + + if ($this->_globalOrderNumber) { + $this->_mock->mockery_getContainer()->mockery_validateOrder( + (string) $this, + $this->_globalOrderNumber, + $this->_mock + ); + } + } + + /** + * Verify this expectation + * + * @return void + */ + public function verify() + { + foreach ($this->_countValidators as $validator) { + $validator->validate($this->_actualCount); + } + } + + /** + * Verify the current call, i.e. that the given arguments match those + * of this expectation + * + * @throws Throwable + * + * @return mixed + */ + public function verifyCall(array $args) + { + $this->validateOrder(); + + ++$this->_actualCount; + + if ($this->_passthru === true) { + return $this->_mock->mockery_callSubjectMethod($this->_name, $args); + } + + $return = $this->_getReturnValue($args); + + $this->throwAsNecessary($return); + + $this->_setValues(); + + return $return; + } + + /** + * Expected argument setter for the expectation + * + * @param mixed ...$args + * + * @return self + */ + public function with(...$args) + { + return $this->withArgs($args); + } + + /** + * Set expectation that any arguments are acceptable + * + * @return self + */ + public function withAnyArgs() + { + $this->_expectedArgs = [new AnyArgs()]; + + return $this; + } + + /** + * Expected arguments for the expectation passed as an array or a closure that matches each passed argument on + * each function call. + * + * @param array|Closure $argsOrClosure + * + * @return self + */ + public function withArgs($argsOrClosure) + { + if (is_array($argsOrClosure)) { + return $this->withArgsInArray($argsOrClosure); + } + + if ($argsOrClosure instanceof Closure) { + return $this->withArgsMatchedByClosure($argsOrClosure); + } + + throw new InvalidArgumentException(sprintf( + 'Call to %s with an invalid argument (%s), only array and closure are allowed', + __METHOD__, + $argsOrClosure + )); + } + + /** + * Set with() as no arguments expected + * + * @return self + */ + public function withNoArgs() + { + $this->_expectedArgs = [new NoArgs()]; + + return $this; + } + + /** + * Expected arguments should partially match the real arguments + * + * @param mixed ...$expectedArgs + * + * @return self + */ + public function withSomeOfArgs(...$expectedArgs) + { + return $this->withArgs(static function (...$args) use ($expectedArgs): bool { + foreach ($expectedArgs as $expectedArg) { + if (! in_array($expectedArg, $args, true)) { + return false; + } + } + + return true; + }); + } + + /** + * Indicates this expectation should occur zero or more times + * + * @return self + */ + public function zeroOrMoreTimes() + { + return $this->atLeast()->never(); + } + + /** + * Setup the ordering tracking on the mock or mock container + * + * @param string $group + * @param object $ordering + * + * @return int + */ + protected function _defineOrdered($group, $ordering) + { + $groups = $ordering->mockery_getGroups(); + if ($group === null) { + return $ordering->mockery_allocateOrder(); + } + + if (array_key_exists($group, $groups)) { + return $groups[$group]; + } + + $result = $ordering->mockery_allocateOrder(); + + $ordering->mockery_setGroup($group, $result); + + return $result; + } + + /** + * Fetch the return value for the matching args + * + * @return mixed + */ + protected function _getReturnValue(array $args) + { + $closureQueueCount = count($this->_closureQueue); + + if ($closureQueueCount > 1) { + return array_shift($this->_closureQueue)(...$args); + } + + if ($closureQueueCount > 0) { + return current($this->_closureQueue)(...$args); + } + + $returnQueueCount = count($this->_returnQueue); + + if ($returnQueueCount > 1) { + return array_shift($this->_returnQueue); + } + + if ($returnQueueCount > 0) { + return current($this->_returnQueue); + } + + return $this->_mock->mockery_returnValueForMethod($this->_name); + } + + /** + * Check if passed argument matches an argument expectation + * + * @param mixed $expected + * @param mixed $actual + * + * @return bool + */ + protected function _matchArg($expected, &$actual) + { + if ($expected === $actual) { + return true; + } + + if ($expected instanceof MatcherInterface) { + return $expected->match($actual); + } + + if ($expected instanceof Constraint) { + return (bool) $expected->evaluate($actual, '', true); + } + + if ($expected instanceof Matcher || $expected instanceof Hamcrest_Matcher) { + @trigger_error('Hamcrest package has been deprecated and will be removed in 2.0', E_USER_DEPRECATED); + + return $expected->matches($actual); + } + + if (is_object($expected)) { + $matcher = Mockery::getConfiguration()->getDefaultMatcher(get_class($expected)); + + return $matcher === null ? false : $this->_matchArg(new $matcher($expected), $actual); + } + + if (is_object($actual) && is_string($expected) && $actual instanceof $expected) { + return true; + } + + return $expected == $actual; + } + + /** + * Check if the passed arguments match the expectations, one by one. + * + * @param array $args + * + * @return bool + */ + protected function _matchArgs($args) + { + for ($index = 0, $argCount = count($args); $index < $argCount; ++$index) { + $param = &$args[$index]; + + if (! $this->_matchArg($this->_expectedArgs[$index], $param)) { + return false; + } + } + + return true; + } + + /** + * Sets public properties with queued values to the mock object + * + * @return void + */ + protected function _setValues() + { + $mockClass = get_class($this->_mock); + + $container = $this->_mock->mockery_getContainer(); + + $mocks = $container->getMocks(); + + foreach ($this->_setQueue as $name => &$values) { + if ($values === []) { + continue; + } + + $value = array_shift($values); + + $this->_mock->{$name} = $value; + + foreach ($mocks as $mock) { + if (! $mock instanceof $mockClass) { + continue; + } + + if (! $mock->mockery_isInstance()) { + continue; + } + + $mock->{$name} = $value; + } + } + } + + /** + * @template TExpectedArg + * + * @param TExpectedArg $expectedArg + * + * @return bool + */ + private function isAndAnyOtherArgumentsMatcher($expectedArg) + { + return $expectedArg instanceof AndAnyOtherArgs; + } + + /** + * Check if the registered expectation is an ArgumentListMatcher + * + * @return bool + */ + private function isArgumentListMatcher() + { + return $this->_expectedArgs !== [] && $this->_expectedArgs[0] instanceof ArgumentListMatcher; + } + + /** + * Throws an exception if the expectation has been configured to do so + * + * @param Throwable $return + * + * @throws Throwable + * + * @return void + */ + private function throwAsNecessary($return) + { + if (! $this->_throw) { + return; + } + + if (! $return instanceof Throwable) { + return; + } + + throw $return; + } + + /** + * Expected arguments for the expectation passed as an array + * + * @return self + */ + private function withArgsInArray(array $arguments) + { + if ($arguments === []) { + return $this->withNoArgs(); + } + + $this->_expectedArgs = $arguments; + + return $this; + } + + /** + * Expected arguments have to be matched by the given closure. + * + * @return self + */ + private function withArgsMatchedByClosure(Closure $closure) + { + $this->_expectedArgs = [new MultiArgumentClosure($closure)]; + + return $this; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php b/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php new file mode 100644 index 0000000..286268b --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php @@ -0,0 +1,242 @@ + + */ + protected $_defaults = []; + + /** + * Stores an array of all expectations for this mock + * + * @var list + */ + protected $_expectations = []; + + /** + * The expected order of next call + * + * @var int + */ + protected $_expectedOrder = null; + + /** + * Mock object the director is attached to + * + * @var LegacyMockInterface|MockInterface + */ + protected $_mock = null; + + /** + * Method name the director is directing + * + * @var string + */ + protected $_name = null; + + /** + * Constructor + * + * @param string $name + */ + public function __construct($name, LegacyMockInterface $mock) + { + $this->_name = $name; + $this->_mock = $mock; + } + + /** + * Add a new expectation to the director + */ + public function addExpectation(Expectation $expectation) + { + $this->_expectations[] = $expectation; + } + + /** + * Handle a method call being directed by this instance + * + * @return mixed + */ + public function call(array $args) + { + $expectation = $this->findExpectation($args); + if ($expectation !== null) { + return $expectation->verifyCall($args); + } + + $exception = new NoMatchingExpectationException( + 'No matching handler found for ' + . $this->_mock->mockery_getName() . '::' + . Mockery::formatArgs($this->_name, $args) + . '. Either the method was unexpected or its arguments matched' + . ' no expected argument list for this method' + . PHP_EOL . PHP_EOL + . Mockery::formatObjects($args) + ); + + $exception->setMock($this->_mock) + ->setMethodName($this->_name) + ->setActualArguments($args); + + throw $exception; + } + + /** + * Attempt to locate an expectation matching the provided args + * + * @return mixed + */ + public function findExpectation(array $args) + { + $expectation = null; + + if ($this->_expectations !== []) { + $expectation = $this->_findExpectationIn($this->_expectations, $args); + } + + if ($expectation === null && $this->_defaults !== []) { + return $this->_findExpectationIn($this->_defaults, $args); + } + + return $expectation; + } + + /** + * Return all expectations assigned to this director + * + * @return array + */ + public function getDefaultExpectations() + { + return $this->_defaults; + } + + /** + * Return the number of expectations assigned to this director. + * + * @return int + */ + public function getExpectationCount() + { + $count = 0; + + $expectations = $this->getExpectations(); + + if ($expectations === []) { + $expectations = $this->getDefaultExpectations(); + } + + foreach ($expectations as $expectation) { + if ($expectation->isCallCountConstrained()) { + ++$count; + } + } + + return $count; + } + + /** + * Return all expectations assigned to this director + * + * @return array + */ + public function getExpectations() + { + return $this->_expectations; + } + + /** + * Make the given expectation a default for all others assuming it was correctly created last + * + * @throws Exception + * + * @return void + */ + public function makeExpectationDefault(Expectation $expectation) + { + if (end($this->_expectations) === $expectation) { + array_pop($this->_expectations); + + array_unshift($this->_defaults, $expectation); + + return; + } + + throw new Exception('Cannot turn a previously defined expectation into a default'); + } + + /** + * Verify all expectations of the director + * + * @throws Exception + * + * @return void + */ + public function verify() + { + if ($this->_expectations !== []) { + foreach ($this->_expectations as $expectation) { + $expectation->verify(); + } + + return; + } + + foreach ($this->_defaults as $expectation) { + $expectation->verify(); + } + } + + /** + * Search current array of expectations for a match + * + * @param array $expectations + * + * @return null|ExpectationInterface + */ + protected function _findExpectationIn(array $expectations, array $args) + { + foreach ($expectations as $expectation) { + if (! $expectation->isEligible()) { + continue; + } + + if (! $expectation->matchArgs($args)) { + continue; + } + + return $expectation; + } + + foreach ($expectations as $expectation) { + if ($expectation->matchArgs($args)) { + return $expectation; + } + } + + return null; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php b/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php new file mode 100644 index 0000000..29c27d3 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php @@ -0,0 +1,38 @@ +once(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/CachingGenerator.php b/vendor/mockery/mockery/library/Mockery/Generator/CachingGenerator.php new file mode 100644 index 0000000..deff12e --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/CachingGenerator.php @@ -0,0 +1,43 @@ + + */ + protected $cache = []; + + /** + * @var Generator + */ + protected $generator; + + public function __construct(Generator $generator) + { + $this->generator = $generator; + } + + /** + * @return string + */ + public function generate(MockConfiguration $config) + { + $hash = $config->getHash(); + + if (array_key_exists($hash, $this->cache)) { + return $this->cache[$hash]; + } + + return $this->cache[$hash] = $this->generator->generate($config); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php b/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php new file mode 100644 index 0000000..f2a3f32 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php @@ -0,0 +1,188 @@ +rfc = $rfc; + $this->name = $alias ?? $rfc->getName(); + } + + /** + * @return class-string + */ + public function __toString() + { + return $this->name; + } + + /** + * @param class-string $name + * @param class-string|null $alias + * @return self + */ + public static function factory($name, $alias = null) + { + return new self(new ReflectionClass($name), $alias); + } + + /** + * @return list + */ + public function getAttributes() + { + if (PHP_VERSION_ID < 80000) { + return []; + } + + return array_unique( + array_merge( + ['\AllowDynamicProperties'], + array_map( + static function (ReflectionAttribute $attribute): string { + return '\\' . $attribute->getName(); + }, + $this->rfc->getAttributes() + ) + ) + ); + } + + /** + * @return array + */ + public function getInterfaces() + { + return array_map( + static function (ReflectionClass $interface): self { + return new self($interface); + }, + $this->rfc->getInterfaces() + ); + } + + /** + * @return list + */ + public function getMethods() + { + return array_map( + static function (ReflectionMethod $method): Method { + return new Method($method); + }, + $this->rfc->getMethods() + ); + } + + /** + * @return class-string + */ + public function getName() + { + return $this->name; + } + + /** + * @return string + */ + public function getNamespaceName() + { + return $this->rfc->getNamespaceName(); + } + + /** + * @return string + */ + public function getShortName() + { + return $this->rfc->getShortName(); + } + + /** + * @return bool + */ + public function hasInternalAncestor() + { + if ($this->rfc->isInternal()) { + return true; + } + + $child = $this->rfc; + while ($parent = $child->getParentClass()) { + if ($parent->isInternal()) { + return true; + } + + $child = $parent; + } + + return false; + } + + /** + * @param class-string $interface + * @return bool + */ + public function implementsInterface($interface) + { + return $this->rfc->implementsInterface($interface); + } + + /** + * @return bool + */ + public function inNamespace() + { + return $this->rfc->inNamespace(); + } + + /** + * @return bool + */ + public function isAbstract() + { + return $this->rfc->isAbstract(); + } + + /** + * @return bool + */ + public function isFinal() + { + return $this->rfc->isFinal(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/Generator.php b/vendor/mockery/mockery/library/Mockery/Generator/Generator.php new file mode 100644 index 0000000..9dc59c8 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/Generator.php @@ -0,0 +1,19 @@ +method = $method; + } + + /** + * @template TArgs + * @template TMixed + * + * @param string $method + * @param array $args + * + * @return TMixed + */ + public function __call($method, $args) + { + /** @var TMixed */ + return $this->method->{$method}(...$args); + } + + /** + * @return list + */ + public function getParameters() + { + return array_map(static function (ReflectionParameter $parameter) { + return new Parameter($parameter); + }, $this->method->getParameters()); + } + + /** + * @return null|string + */ + public function getReturnType() + { + return Reflector::getReturnType($this->method); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php b/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php new file mode 100644 index 0000000..1849c3e --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php @@ -0,0 +1,709 @@ + + */ + protected $allMethods = []; + + /** + * Methods that should specifically not be mocked + * + * This is currently populated with stuff we don't know how to deal with, should really be somewhere else + */ + protected $blackListedMethods = []; + + protected $constantsMap = []; + + /** + * An instance mock is where we override the original class before it's autoloaded + * + * @var bool + */ + protected $instanceMock = false; + + /** + * If true, overrides original class destructor + * + * @var bool + */ + protected $mockOriginalDestructor = false; + + /** + * The class name we'd like to use for a generated mock + * + * @var string|null + */ + protected $name; + + /** + * Param overrides + * + * @var array + */ + protected $parameterOverrides = []; + + /** + * A class that we'd like to mock + * @var TargetClassInterface|null + */ + protected $targetClass; + + /** + * @var class-string|null + */ + protected $targetClassName; + + /** + * @var array + */ + protected $targetInterfaceNames = []; + + /** + * A number of interfaces we'd like to mock, keyed by name to attempt to keep unique + * + * @var array + */ + protected $targetInterfaces = []; + + /** + * An object we'd like our mock to proxy to + * + * @var object|null + */ + protected $targetObject; + + /** + * @var array + */ + protected $targetTraitNames = []; + + /** + * A number of traits we'd like to mock, keyed by name to attempt to keep unique + * + * @var array + */ + protected $targetTraits = []; + + /** + * If not empty, only these methods will be mocked + * + * @var array + */ + protected $whiteListedMethods = []; + + /** + * @param array $targets + * @param array $blackListedMethods + * @param array $whiteListedMethods + * @param string|null $name + * @param bool $instanceMock + * @param array $parameterOverrides + * @param bool $mockOriginalDestructor + * @param array|scalar> $constantsMap + */ + public function __construct( + array $targets = [], + array $blackListedMethods = [], + array $whiteListedMethods = [], + $name = null, + $instanceMock = false, + array $parameterOverrides = [], + $mockOriginalDestructor = false, + array $constantsMap = [] + ) { + $this->addTargets($targets); + $this->blackListedMethods = $blackListedMethods; + $this->whiteListedMethods = $whiteListedMethods; + $this->name = $name; + $this->instanceMock = $instanceMock; + $this->parameterOverrides = $parameterOverrides; + $this->mockOriginalDestructor = $mockOriginalDestructor; + $this->constantsMap = $constantsMap; + } + + /** + * Generate a suitable name based on the config + * + * @return string + */ + public function generateName() + { + $nameBuilder = new MockNameBuilder(); + + $targetObject = $this->getTargetObject(); + if ($targetObject !== null) { + $className = get_class($targetObject); + + $nameBuilder->addPart(strpos($className, '@') !== false ? md5($className) : $className); + } + + $targetClass = $this->getTargetClass(); + if ($targetClass instanceof TargetClassInterface) { + $className = $targetClass->getName(); + + $nameBuilder->addPart(strpos($className, '@') !== false ? md5($className) : $className); + } + + foreach ($this->getTargetInterfaces() as $targetInterface) { + $nameBuilder->addPart($targetInterface->getName()); + } + + return $nameBuilder->build(); + } + + /** + * @return array + */ + public function getBlackListedMethods() + { + return $this->blackListedMethods; + } + + /** + * @return array> + */ + public function getConstantsMap() + { + return $this->constantsMap; + } + + /** + * Attempt to create a hash of the configuration, in order to allow caching + * + * @TODO workout if this will work + * + * @return string + */ + public function getHash() + { + $vars = [ + 'targetClassName' => $this->targetClassName, + 'targetInterfaceNames' => $this->targetInterfaceNames, + 'targetTraitNames' => $this->targetTraitNames, + 'name' => $this->name, + 'blackListedMethods' => $this->blackListedMethods, + 'whiteListedMethod' => $this->whiteListedMethods, + 'instanceMock' => $this->instanceMock, + 'parameterOverrides' => $this->parameterOverrides, + 'mockOriginalDestructor' => $this->mockOriginalDestructor, + ]; + + return md5(serialize($vars)); + } + + /** + * Gets a list of methods from the classes, interfaces and objects and filters them appropriately. + * Lot's of filtering going on, perhaps we could have filter classes to iterate through + * + * @return list + */ + public function getMethodsToMock() + { + $methods = $this->getAllMethods(); + + foreach ($methods as $key => $method) { + if ($method->isFinal()) { + unset($methods[$key]); + } + } + + /** + * Whitelist trumps everything else + */ + $whiteListedMethods = $this->getWhiteListedMethods(); + if ($whiteListedMethods !== []) { + $whitelist = array_map('strtolower', $whiteListedMethods); + + return array_filter($methods, static function ($method) use ($whitelist) { + if ($method->isAbstract()) { + return true; + } + + return in_array(strtolower($method->getName()), $whitelist, true); + }); + } + + /** + * Remove blacklisted methods + */ + $blackListedMethods = $this->getBlackListedMethods(); + if ($blackListedMethods !== []) { + $blacklist = array_map('strtolower', $blackListedMethods); + + $methods = array_filter($methods, static function ($method) use ($blacklist) { + return ! in_array(strtolower($method->getName()), $blacklist, true); + }); + } + + /** + * Internal objects can not be instantiated with newInstanceArgs and if + * they implement Serializable, unserialize will have to be called. As + * such, we can't mock it and will need a pass to add a dummy + * implementation + */ + $targetClass = $this->getTargetClass(); + + if ( + $targetClass !== null + && $targetClass->implementsInterface(Serializable::class) + && $targetClass->hasInternalAncestor() + ) { + $methods = array_filter($methods, static function ($method) { + return $method->getName() !== 'unserialize'; + }); + } + + return array_values($methods); + } + + /** + * @return string|null + */ + public function getName() + { + return $this->name; + } + + /** + * @return string + */ + public function getNamespaceName() + { + $parts = explode('\\', $this->getName()); + array_pop($parts); + + if ($parts !== []) { + return implode('\\', $parts); + } + + return ''; + } + + /** + * @return array + */ + public function getParameterOverrides() + { + return $this->parameterOverrides; + } + + /** + * @return string + */ + public function getShortName() + { + $parts = explode('\\', $this->getName()); + return array_pop($parts); + } + + /** + * @return null|TargetClassInterface + */ + public function getTargetClass() + { + if ($this->targetClass) { + return $this->targetClass; + } + + if (! $this->targetClassName) { + return null; + } + + if (class_exists($this->targetClassName)) { + $alias = null; + if (strpos($this->targetClassName, '@') !== false) { + $alias = (new MockNameBuilder()) + ->addPart('anonymous_class') + ->addPart(md5($this->targetClassName)) + ->build(); + class_alias($this->targetClassName, $alias); + } + + $dtc = DefinedTargetClass::factory($this->targetClassName, $alias); + + if ($this->getTargetObject() === null && $dtc->isFinal()) { + throw new Exception( + 'The class ' . $this->targetClassName . ' is marked final and its methods' + . ' cannot be replaced. Classes marked final can be passed in' + . ' to \Mockery::mock() as instantiated objects to create a' + . ' partial mock, but only if the mock is not subject to type' + . ' hinting checks.' + ); + } + + $this->targetClass = $dtc; + } else { + $this->targetClass = UndefinedTargetClass::factory($this->targetClassName); + } + + return $this->targetClass; + } + + /** + * @return class-string|null + */ + public function getTargetClassName() + { + return $this->targetClassName; + } + + /** + * @return list + */ + public function getTargetInterfaces() + { + if ($this->targetInterfaces !== []) { + return $this->targetInterfaces; + } + + foreach ($this->targetInterfaceNames as $targetInterface) { + if (! interface_exists($targetInterface)) { + $this->targetInterfaces[] = UndefinedTargetClass::factory($targetInterface); + continue; + } + + $dtc = DefinedTargetClass::factory($targetInterface); + $extendedInterfaces = array_keys($dtc->getInterfaces()); + $extendedInterfaces[] = $targetInterface; + + $traversableFound = false; + $iteratorShiftedToFront = false; + foreach ($extendedInterfaces as $interface) { + if (! $traversableFound && preg_match('/^\\?Iterator(|Aggregate)$/i', $interface)) { + break; + } + + if (preg_match('/^\\\\?IteratorAggregate$/i', $interface)) { + $this->targetInterfaces[] = DefinedTargetClass::factory('\\IteratorAggregate'); + $iteratorShiftedToFront = true; + + continue; + } + + if (preg_match('/^\\\\?Iterator$/i', $interface)) { + $this->targetInterfaces[] = DefinedTargetClass::factory('\\Iterator'); + $iteratorShiftedToFront = true; + + continue; + } + + if (preg_match('/^\\\\?Traversable$/i', $interface)) { + $traversableFound = true; + } + } + + if ($traversableFound && ! $iteratorShiftedToFront) { + $this->targetInterfaces[] = DefinedTargetClass::factory('\\IteratorAggregate'); + } + + /** + * We never straight up implement Traversable + */ + $isTraversable = preg_match('/^\\\\?Traversable$/i', $targetInterface); + if ($isTraversable === 0 || $isTraversable === false) { + $this->targetInterfaces[] = $dtc; + } + } + + return $this->targetInterfaces = array_unique($this->targetInterfaces); + } + + /** + * @return object|null + */ + public function getTargetObject() + { + return $this->targetObject; + } + + /** + * @return list + */ + public function getTargetTraits() + { + if ($this->targetTraits !== []) { + return $this->targetTraits; + } + + foreach ($this->targetTraitNames as $targetTrait) { + $this->targetTraits[] = DefinedTargetClass::factory($targetTrait); + } + + $this->targetTraits = array_unique($this->targetTraits); // just in case + return $this->targetTraits; + } + + /** + * @return array + */ + public function getWhiteListedMethods() + { + return $this->whiteListedMethods; + } + + /** + * @return bool + */ + public function isInstanceMock() + { + return $this->instanceMock; + } + + /** + * @return bool + */ + public function isMockOriginalDestructor() + { + return $this->mockOriginalDestructor; + } + + /** + * @param class-string $className + * @return self + */ + public function rename($className) + { + $targets = []; + + if ($this->targetClassName) { + $targets[] = $this->targetClassName; + } + + if ($this->targetInterfaceNames) { + $targets = array_merge($targets, $this->targetInterfaceNames); + } + + if ($this->targetTraitNames) { + $targets = array_merge($targets, $this->targetTraitNames); + } + + if ($this->targetObject) { + $targets[] = $this->targetObject; + } + + return new self( + $targets, + $this->blackListedMethods, + $this->whiteListedMethods, + $className, + $this->instanceMock, + $this->parameterOverrides, + $this->mockOriginalDestructor, + $this->constantsMap + ); + } + + /** + * We declare the __callStatic method to handle undefined stuff, if the class + * we're mocking has also defined it, we need to comply with their interface + * + * @return bool + */ + public function requiresCallStaticTypeHintRemoval() + { + foreach ($this->getAllMethods() as $method) { + if ($method->getName() === '__callStatic') { + $params = $method->getParameters(); + + if (! array_key_exists(1, $params)) { + return false; + } + + return ! $params[1]->isArray(); + } + } + + return false; + } + + /** + * We declare the __call method to handle undefined stuff, if the class + * we're mocking has also defined it, we need to comply with their interface + * + * @return bool + */ + public function requiresCallTypeHintRemoval() + { + foreach ($this->getAllMethods() as $method) { + if ($method->getName() === '__call') { + $params = $method->getParameters(); + return ! $params[1]->isArray(); + } + } + + return false; + } + + /** + * @param class-string|object $target + */ + protected function addTarget($target) + { + if (is_object($target)) { + $this->setTargetObject($target); + $this->setTargetClassName(get_class($target)); + return; + } + + if ($target[0] !== '\\') { + $target = '\\' . $target; + } + + if (class_exists($target)) { + $this->setTargetClassName($target); + return; + } + + if (interface_exists($target)) { + $this->addTargetInterfaceName($target); + return; + } + + if (trait_exists($target)) { + $this->addTargetTraitName($target); + return; + } + + /** + * Default is to set as class, or interface if class already set + * + * Don't like this condition, can't remember what the default + * targetClass is for + */ + if ($this->getTargetClassName()) { + $this->addTargetInterfaceName($target); + return; + } + + $this->setTargetClassName($target); + } + + /** + * If we attempt to implement Traversable, + * we must ensure we are also implementing either Iterator or IteratorAggregate, + * and that whichever one it is comes before Traversable in the list of implements. + * + * @param class-string $targetInterface + */ + protected function addTargetInterfaceName($targetInterface) + { + $this->targetInterfaceNames[] = $targetInterface; + } + + /** + * @param array $interfaces + */ + protected function addTargets($interfaces) + { + foreach ($interfaces as $interface) { + $this->addTarget($interface); + } + } + + /** + * @param class-string $targetTraitName + */ + protected function addTargetTraitName($targetTraitName) + { + $this->targetTraitNames[] = $targetTraitName; + } + + /** + * @return list + */ + protected function getAllMethods() + { + if ($this->allMethods) { + return $this->allMethods; + } + + $classes = $this->getTargetInterfaces(); + + if ($this->getTargetClass()) { + $classes[] = $this->getTargetClass(); + } + + $methods = []; + foreach ($classes as $class) { + $methods = array_merge($methods, $class->getMethods()); + } + + foreach ($this->getTargetTraits() as $trait) { + foreach ($trait->getMethods() as $method) { + if ($method->isAbstract()) { + $methods[] = $method; + } + } + } + + $names = []; + $methods = array_filter($methods, static function ($method) use (&$names) { + if (in_array($method->getName(), $names, true)) { + return false; + } + + $names[] = $method->getName(); + return true; + }); + + return $this->allMethods = $methods; + } + + /** + * @param class-string $targetClassName + */ + protected function setTargetClassName($targetClassName) + { + $this->targetClassName = $targetClassName; + } + + /** + * @param object $object + */ + protected function setTargetObject($object) + { + $this->targetObject = $object; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php b/vendor/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php new file mode 100644 index 0000000..989325e --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php @@ -0,0 +1,252 @@ + + */ + protected $blackListedMethods = [ + '__call', + '__callStatic', + '__clone', + '__wakeup', + '__set', + '__get', + '__toString', + '__isset', + '__destruct', + '__debugInfo', ## mocking this makes it difficult to debug with xdebug + + // below are reserved words in PHP + '__halt_compiler', 'abstract', 'and', 'array', 'as', + 'break', 'callable', 'case', 'catch', 'class', + 'clone', 'const', 'continue', 'declare', 'default', + 'die', 'do', 'echo', 'else', 'elseif', + 'empty', 'enddeclare', 'endfor', 'endforeach', 'endif', + 'endswitch', 'endwhile', 'eval', 'exit', 'extends', + 'final', 'for', 'foreach', 'function', 'global', + 'goto', 'if', 'implements', 'include', 'include_once', + 'instanceof', 'insteadof', 'interface', 'isset', 'list', + 'namespace', 'new', 'or', 'print', 'private', + 'protected', 'public', 'require', 'require_once', 'return', + 'static', 'switch', 'throw', 'trait', 'try', + 'unset', 'use', 'var', 'while', 'xor', + ]; + + /** + * @var array + */ + protected $constantsMap = []; + + /** + * @var bool + */ + protected $instanceMock = false; + + /** + * @var bool + */ + protected $mockOriginalDestructor = false; + + /** + * @var string + */ + protected $name; + + /** + * @var array + */ + protected $parameterOverrides = []; + + /** + * @var list + */ + protected $php7SemiReservedKeywords = [ + 'callable', 'class', 'trait', 'extends', 'implements', 'static', 'abstract', 'final', + 'public', 'protected', 'private', 'const', 'enddeclare', 'endfor', 'endforeach', 'endif', + 'endwhile', 'and', 'global', 'goto', 'instanceof', 'insteadof', 'interface', 'namespace', 'new', + 'or', 'xor', 'try', 'use', 'var', 'exit', 'list', 'clone', 'include', 'include_once', 'throw', + 'array', 'print', 'echo', 'require', 'require_once', 'return', 'else', 'elseif', 'default', + 'break', 'continue', 'switch', 'yield', 'function', 'if', 'endswitch', 'finally', 'for', 'foreach', + 'declare', 'case', 'do', 'while', 'as', 'catch', 'die', 'self', 'parent', + ]; + + /** + * @var array + */ + protected $targets = []; + + /** + * @var array + */ + protected $whiteListedMethods = []; + + public function __construct() + { + $this->blackListedMethods = array_diff($this->blackListedMethods, $this->php7SemiReservedKeywords); + } + + /** + * @param string $blackListedMethod + * @return self + */ + public function addBlackListedMethod($blackListedMethod) + { + $this->blackListedMethods[] = $blackListedMethod; + return $this; + } + + /** + * @param list $blackListedMethods + * @return self + */ + public function addBlackListedMethods(array $blackListedMethods) + { + foreach ($blackListedMethods as $method) { + $this->addBlackListedMethod($method); + } + + return $this; + } + + /** + * @param class-string $target + * @return self + */ + public function addTarget($target) + { + $this->targets[] = $target; + + return $this; + } + + /** + * @param list $targets + * @return self + */ + public function addTargets($targets) + { + foreach ($targets as $target) { + $this->addTarget($target); + } + + return $this; + } + + /** + * @return self + */ + public function addWhiteListedMethod($whiteListedMethod) + { + $this->whiteListedMethods[] = $whiteListedMethod; + return $this; + } + + /** + * @return self + */ + public function addWhiteListedMethods(array $whiteListedMethods) + { + foreach ($whiteListedMethods as $method) { + $this->addWhiteListedMethod($method); + } + + return $this; + } + + /** + * @return MockConfiguration + */ + public function getMockConfiguration() + { + return new MockConfiguration( + $this->targets, + $this->blackListedMethods, + $this->whiteListedMethods, + $this->name, + $this->instanceMock, + $this->parameterOverrides, + $this->mockOriginalDestructor, + $this->constantsMap + ); + } + + /** + * @param list $blackListedMethods + * @return self + */ + public function setBlackListedMethods(array $blackListedMethods) + { + $this->blackListedMethods = $blackListedMethods; + return $this; + } + + /** + * @return self + */ + public function setConstantsMap(array $map) + { + $this->constantsMap = $map; + + return $this; + } + + /** + * @param bool $instanceMock + */ + public function setInstanceMock($instanceMock) + { + $this->instanceMock = (bool) $instanceMock; + + return $this; + } + + /** + * @param bool $mockDestructor + */ + public function setMockOriginalDestructor($mockDestructor) + { + $this->mockOriginalDestructor = (bool) $mockDestructor; + return $this; + } + + /** + * @param string $name + */ + public function setName($name) + { + $this->name = $name; + return $this; + } + + /** + * @return self + */ + public function setParameterOverrides(array $overrides) + { + $this->parameterOverrides = $overrides; + return $this; + } + + /** + * @param list $whiteListedMethods + * @return self + */ + public function setWhiteListedMethods(array $whiteListedMethods) + { + $this->whiteListedMethods = $whiteListedMethods; + return $this; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php b/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php new file mode 100644 index 0000000..337c31f --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php @@ -0,0 +1,64 @@ +getName()) { + throw new InvalidArgumentException('MockConfiguration must contain a name'); + } + + $this->config = $config; + $this->code = $code; + } + + /** + * @return string + */ + public function getClassName() + { + return $this->config->getName(); + } + + /** + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * @return MockConfiguration + */ + public function getConfig() + { + return $this->config; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockNameBuilder.php b/vendor/mockery/mockery/library/Mockery/Generator/MockNameBuilder.php new file mode 100644 index 0000000..424cdc5 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/MockNameBuilder.php @@ -0,0 +1,51 @@ + + */ + protected $parts = []; + + /** + * @param string $part + */ + public function addPart($part) + { + $this->parts[] = $part; + + return $this; + } + + /** + * @return string + */ + public function build() + { + $parts = ['Mockery', static::$mockCounter++]; + + foreach ($this->parts as $part) { + $parts[] = str_replace('\\', '_', $part); + } + + return implode('_', $parts); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/Parameter.php b/vendor/mockery/mockery/library/Mockery/Generator/Parameter.php new file mode 100644 index 0000000..442a713 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/Parameter.php @@ -0,0 +1,130 @@ +rfp = $rfp; + } + + /** + * Proxy all method calls to the reflection parameter. + * + * @template TMixed + * @template TResult + * + * @param string $method + * @param array $args + * + * @return TResult + */ + public function __call($method, array $args) + { + /** @var TResult */ + return $this->rfp->{$method}(...$args); + } + + /** + * Get the reflection class for the parameter type, if it exists. + * + * This will be null if there was no type, or it was a scalar or a union. + * + * @return null|ReflectionClass + * + * @deprecated since 1.3.3 and will be removed in 2.0. + */ + public function getClass() + { + $typeHint = Reflector::getTypeHint($this->rfp, true); + + return class_exists($typeHint) ? DefinedTargetClass::factory($typeHint, false) : null; + } + + /** + * Get the name of the parameter. + * + * Some internal classes have funny looking definitions! + * + * @return string + */ + public function getName() + { + $name = $this->rfp->getName(); + + if (! $name || $name === '...') { + return 'arg' . self::$parameterCounter++; + } + + return $name; + } + + /** + * Get the string representation for the paramater type. + * + * @return null|string + */ + public function getTypeHint() + { + return Reflector::getTypeHint($this->rfp); + } + + /** + * Get the string representation for the paramater type. + * + * @return string + * + * @deprecated since 1.3.2 and will be removed in 2.0. Use getTypeHint() instead. + */ + public function getTypeHintAsString() + { + return (string) Reflector::getTypeHint($this->rfp, true); + } + + /** + * Determine if the parameter is an array. + * + * @return bool + */ + public function isArray() + { + return Reflector::isArray($this->rfp); + } + + /** + * Determine if the parameter is variadic. + * + * @return bool + */ + public function isVariadic() + { + return $this->rfp->isVariadic(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php new file mode 100644 index 0000000..4a7e2a5 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php @@ -0,0 +1,42 @@ +getName(); + }, $config->getMethodsToMock()); + + foreach (['allows', 'expects'] as $method) { + if (in_array($method, $names, true)) { + $code = preg_replace(sprintf('#// start method %s.*// end method %s#ms', $method, $method), '', $code); + + $code = str_replace(' implements MockInterface', ' implements LegacyMockInterface', $code); + } + } + + return $code; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php new file mode 100644 index 0000000..747fdee --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php @@ -0,0 +1,42 @@ +requiresCallTypeHintRemoval()) { + $code = str_replace( + 'public function __call($method, array $args)', + 'public function __call($method, $args)', + $code + ); + } + + if ($config->requiresCallStaticTypeHintRemoval()) { + return str_replace( + 'public static function __callStatic($method, array $args)', + 'public static function __callStatic($method, $args)', + $code + ); + } + + return $code; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassAttributesPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassAttributesPass.php new file mode 100644 index 0000000..86b157e --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassAttributesPass.php @@ -0,0 +1,40 @@ +getTargetClass(); + + if (! $class) { + return $code; + } + + /** @var array $attributes */ + $attributes = $class->getAttributes(); + + if ($attributes !== []) { + return str_replace('#[\AllowDynamicProperties]', '#[' . implode(',', $attributes) . ']', $code); + } + + return $code; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php new file mode 100644 index 0000000..0280a06 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php @@ -0,0 +1,35 @@ +getNamespaceName(); + + $namespace = ltrim($namespace, '\\'); + + $className = $config->getShortName(); + + $code = str_replace('namespace Mockery;', $namespace !== '' ? 'namespace ' . $namespace . ';' : '', $code); + + return str_replace('class Mock', 'class ' . $className, $code); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php new file mode 100644 index 0000000..ba4826c --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php @@ -0,0 +1,49 @@ +getTargetClass(); + + if (! $target) { + return $code; + } + + if ($target->isFinal()) { + return $code; + } + + $className = ltrim($target->getName(), '\\'); + + if (! class_exists($className)) { + Mockery::declareClass($className); + } + + return str_replace( + 'implements MockInterface', + 'extends \\' . $className . ' implements MockInterface', + $code + ); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ConstantsPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ConstantsPass.php new file mode 100644 index 0000000..1088a0d --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ConstantsPass.php @@ -0,0 +1,51 @@ +getConstantsMap(); + if ($cm === []) { + return $code; + } + + $name = $config->getName(); + if (! array_key_exists($name, $cm)) { + return $code; + } + + $constantsCode = ''; + foreach ($cm[$name] as $constant => $value) { + $constantsCode .= sprintf("\n const %s = %s;\n", $constant, var_export($value, true)); + } + + $offset = strrpos($code, '}'); + if ($offset === false) { + return $code; + } + + return substr_replace($code, $constantsCode, $offset) . '}' . PHP_EOL; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php new file mode 100644 index 0000000..78adba4 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php @@ -0,0 +1,78 @@ +_mockery_ignoreVerification = false; + \$associatedRealObject = \Mockery::fetchMock(__CLASS__); + + foreach (get_object_vars(\$this) as \$attr => \$val) { + if (\$attr !== "_mockery_ignoreVerification" && \$attr !== "_mockery_expectations") { + \$this->\$attr = \$associatedRealObject->\$attr; + } + } + + \$directors = \$associatedRealObject->mockery_getExpectations(); + foreach (\$directors as \$method=>\$director) { + // get the director method needed + \$existingDirector = \$this->mockery_getExpectationsFor(\$method); + if (!\$existingDirector) { + \$existingDirector = new \Mockery\ExpectationDirector(\$method, \$this); + \$this->mockery_setExpectationsFor(\$method, \$existingDirector); + } + \$expectations = \$director->getExpectations(); + foreach (\$expectations as \$expectation) { + \$clonedExpectation = clone \$expectation; + \$existingDirector->addExpectation(\$clonedExpectation); + } + \$defaultExpectations = \$director->getDefaultExpectations(); + foreach (array_reverse(\$defaultExpectations) as \$expectation) { + \$clonedExpectation = clone \$expectation; + \$existingDirector->addExpectation(\$clonedExpectation); + \$existingDirector->makeExpectationDefault(\$clonedExpectation); + } + } + \Mockery::getContainer()->rememberMock(\$this); + + \$this->_mockery_constructorCalled(func_get_args()); + } +MOCK; + + /** + * @param string $code + * @return string + */ + public function apply($code, MockConfiguration $config) + { + if ($config->isInstanceMock()) { + return $this->appendToClass($code, static::INSTANCE_MOCK_CODE); + } + + return $code; + } + + protected function appendToClass($class, $code) + { + $lastBrace = strrpos($class, '}'); + return substr($class, 0, $lastBrace) . $code . "\n }\n"; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php new file mode 100644 index 0000000..4eabcb0 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php @@ -0,0 +1,41 @@ +getTargetInterfaces() as $i) { + $name = ltrim($i->getName(), '\\'); + if (! interface_exists($name)) { + Mockery::declareInterface($name); + } + } + + $interfaces = array_reduce($config->getTargetInterfaces(), static function ($code, $i) { + return $code . ', \\' . ltrim($i->getName(), '\\'); + }, ''); + + return str_replace('implements MockInterface', 'implements MockInterface' . $interfaces, $code); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MagicMethodTypeHintsPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MagicMethodTypeHintsPass.php new file mode 100644 index 0000000..f4191fd --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MagicMethodTypeHintsPass.php @@ -0,0 +1,197 @@ +getMagicMethods($config->getTargetClass()); + foreach ($config->getTargetInterfaces() as $interface) { + $magicMethods = array_merge($magicMethods, $this->getMagicMethods($interface)); + } + + foreach ($magicMethods as $method) { + $code = $this->applyMagicTypeHints($code, $method); + } + + return $code; + } + + /** + * Returns the magic methods within the + * passed DefinedTargetClass. + * + * @return array + */ + public function getMagicMethods(?TargetClassInterface $class = null) + { + if (! $class instanceof TargetClassInterface) { + return []; + } + + return array_filter($class->getMethods(), function (Method $method) { + return in_array($method->getName(), $this->mockMagicMethods, true); + }); + } + + protected function renderTypeHint(Parameter $param) + { + $typeHint = $param->getTypeHint(); + + return $typeHint === null ? '' : sprintf('%s ', $typeHint); + } + + /** + * Applies type hints of magic methods from + * class to the passed code. + * + * @param int $code + * + * @return string + */ + private function applyMagicTypeHints($code, Method $method) + { + if ($this->isMethodWithinCode($code, $method)) { + $namedParameters = $this->getOriginalParameters($code, $method); + $code = preg_replace( + $this->getDeclarationRegex($method->getName()), + $this->getMethodDeclaration($method, $namedParameters), + $code + ); + } + + return $code; + } + + /** + * Returns a regex string used to match the + * declaration of some method. + * + * @param string $methodName + * + * @return string + */ + private function getDeclarationRegex($methodName) + { + return sprintf('/public\s+(?:static\s+)?function\s+%s\s*\(.*\)\s*(?=\{)/i', $methodName); + } + + /** + * Gets the declaration code, as a string, for the passed method. + * + * @param array $namedParameters + * + * @return string + */ + private function getMethodDeclaration(Method $method, array $namedParameters) + { + $declaration = 'public'; + $declaration .= $method->isStatic() ? ' static' : ''; + $declaration .= ' function ' . $method->getName() . '('; + + foreach ($method->getParameters() as $index => $parameter) { + $declaration .= $this->renderTypeHint($parameter); + $name = $namedParameters[$index] ?? $parameter->getName(); + $declaration .= '$' . $name; + $declaration .= ','; + } + + $declaration = rtrim($declaration, ','); + $declaration .= ') '; + + $returnType = $method->getReturnType(); + if ($returnType !== null) { + $declaration .= sprintf(': %s', $returnType); + } + + return $declaration; + } + + /** + * Returns the method original parameters, as they're + * described in the $code string. + * + * @param int $code + * + * @return array + */ + private function getOriginalParameters($code, Method $method) + { + $matches = []; + $parameterMatches = []; + + preg_match($this->getDeclarationRegex($method->getName()), $code, $matches); + + if ($matches !== []) { + preg_match_all('/(?<=\$)(\w+)+/i', $matches[0], $parameterMatches); + } + + $groupMatches = end($parameterMatches); + + return is_array($groupMatches) ? $groupMatches : [$groupMatches]; + } + + /** + * Checks if the method is declared within code. + * + * @param int $code + * + * @return bool + */ + private function isMethodWithinCode($code, Method $method) + { + return preg_match($this->getDeclarationRegex($method->getName()), $code) === 1; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php new file mode 100644 index 0000000..68d37f9 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php @@ -0,0 +1,199 @@ +getMethodsToMock() as $method) { + if ($method->isPublic()) { + $methodDef = 'public'; + } elseif ($method->isProtected()) { + $methodDef = 'protected'; + } else { + $methodDef = 'private'; + } + + if ($method->isStatic()) { + $methodDef .= ' static'; + } + + $methodDef .= ' function '; + $methodDef .= $method->returnsReference() ? ' & ' : ''; + $methodDef .= $method->getName(); + $methodDef .= $this->renderParams($method, $config); + $methodDef .= $this->renderReturnType($method); + $methodDef .= $this->renderMethodBody($method, $config); + + $code = $this->appendToClass($code, $methodDef); + } + + return $code; + } + + protected function appendToClass($class, $code) + { + $lastBrace = strrpos($class, '}'); + return substr($class, 0, $lastBrace) . $code . "\n }\n"; + } + + protected function renderParams(Method $method, $config) + { + $class = $method->getDeclaringClass(); + if ($class->isInternal()) { + $overrides = $config->getParameterOverrides(); + + if (isset($overrides[strtolower($class->getName())][$method->getName()])) { + return '(' . implode(',', $overrides[strtolower($class->getName())][$method->getName()]) . ')'; + } + } + + $methodParams = []; + $params = $method->getParameters(); + $isPhp81 = PHP_VERSION_ID >= 80100; + foreach ($params as $param) { + $paramDef = $this->renderTypeHint($param); + $paramDef .= $param->isPassedByReference() ? '&' : ''; + $paramDef .= $param->isVariadic() ? '...' : ''; + $paramDef .= '$' . $param->getName(); + + if (! $param->isVariadic()) { + if ($param->isDefaultValueAvailable() !== false) { + $defaultValue = $param->getDefaultValue(); + + if (is_object($defaultValue)) { + $prefix = get_class($defaultValue); + if ($isPhp81) { + if (enum_exists($prefix)) { + $prefix = var_export($defaultValue, true); + } elseif ( + ! $param->isDefaultValueConstant() && + // "Parameter #1 [ F\Q\CN $a = new \F\Q\CN(param1, param2: 2) ] + preg_match( + '#\s.*?\s=\snew\s(.*?)\s]$#', + $param->__toString(), + $matches + ) === 1 + ) { + $prefix = 'new ' . $matches[1]; + } + } + } else { + $prefix = var_export($defaultValue, true); + } + + $paramDef .= ' = ' . $prefix; + } elseif ($param->isOptional()) { + $paramDef .= ' = null'; + } + } + + $methodParams[] = $paramDef; + } + + return '(' . implode(', ', $methodParams) . ')'; + } + + protected function renderReturnType(Method $method) + { + $type = $method->getReturnType(); + + return $type ? sprintf(': %s', $type) : ''; + } + + protected function renderTypeHint(Parameter $param) + { + $typeHint = $param->getTypeHint(); + + return $typeHint === null ? '' : sprintf('%s ', $typeHint); + } + + private function renderMethodBody($method, $config) + { + $invoke = $method->isStatic() ? 'static::_mockery_handleStaticMethodCall' : '$this->_mockery_handleMethodCall'; + $body = <<getDeclaringClass(); + $class_name = strtolower($class->getName()); + $overrides = $config->getParameterOverrides(); + if (isset($overrides[$class_name][$method->getName()])) { + $params = array_values($overrides[$class_name][$method->getName()]); + $paramCount = count($params); + for ($i = 0; $i < $paramCount; ++$i) { + $param = $params[$i]; + if (strpos($param, '&') !== false) { + $body .= << {$i}) { + \$argv[{$i}] = {$param}; +} + +BODY; + } + } + } else { + $params = array_values($method->getParameters()); + $paramCount = count($params); + for ($i = 0; $i < $paramCount; ++$i) { + $param = $params[$i]; + if (! $param->isPassedByReference()) { + continue; + } + + $body .= << {$i}) { + \$argv[{$i}] =& \${$param->getName()}; +} + +BODY; + } + } + + $body .= "\$ret = {$invoke}(__FUNCTION__, \$argv);\n"; + + if (! in_array($method->getReturnType(), ['never', 'void'], true)) { + $body .= "return \$ret;\n"; + } + + return $body . "}\n"; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/Pass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/Pass.php new file mode 100644 index 0000000..9200873 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/Pass.php @@ -0,0 +1,22 @@ + '/public function __wakeup\(\)\s+\{.*?\}/sm', + '__toString' => '/public function __toString\(\)\s+(:\s+string)?\s*\{.*?\}/sm', + ]; + + /** + * @param string $code + * @return string + */ + public function apply($code, MockConfiguration $config) + { + $target = $config->getTargetClass(); + + if (! $target instanceof TargetClassInterface) { + return $code; + } + + foreach ($target->getMethods() as $method) { + if (! $method->isFinal()) { + continue; + } + + if (! isset($this->methods[$method->getName()])) { + continue; + } + + $code = preg_replace($this->methods[$method->getName()], '', $code); + } + + return $code; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveDestructorPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveDestructorPass.php new file mode 100644 index 0000000..7fd86e7 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveDestructorPass.php @@ -0,0 +1,39 @@ +getTargetClass(); + + if (! $target) { + return $code; + } + + if (! $config->isMockOriginalDestructor()) { + return preg_replace('/public function __destruct\(\)\s+\{.*?\}/sm', '', $code); + } + + return $code; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php new file mode 100644 index 0000000..5bbb578 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php @@ -0,0 +1,57 @@ +getTargetClass(); + + if (! $target) { + return $code; + } + + if (! $target->hasInternalAncestor() || ! $target->implementsInterface('Serializable')) { + return $code; + } + + return $this->appendToClass( + $code, + PHP_VERSION_ID < 80100 ? self::DUMMY_METHOD_DEFINITION_LEGACY : self::DUMMY_METHOD_DEFINITION + ); + } + + protected function appendToClass($class, $code) + { + $lastBrace = strrpos($class, '}'); + return substr($class, 0, $lastBrace) . $code . "\n }\n"; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/TraitPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/TraitPass.php new file mode 100644 index 0000000..faf2a90 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/TraitPass.php @@ -0,0 +1,39 @@ +getTargetTraits(); + + if ($traits === []) { + return $code; + } + + $useStatements = array_map(static function ($trait) { + return 'use \\\\' . ltrim($trait->getName(), '\\') . ';'; + }, $traits); + + return preg_replace('/^{$/m', "{\n " . implode("\n ", $useStatements) . "\n", $code); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php new file mode 100644 index 0000000..5cb1421 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php @@ -0,0 +1,102 @@ + + */ + protected $passes = []; + + /** + * @var string + */ + private $code; + + /** + * @param list $passes + */ + public function __construct(array $passes) + { + $this->passes = $passes; + + $this->code = file_get_contents(__DIR__ . '/../Mock.php'); + } + + /** + * @param Pass $pass + * @return void + */ + public function addPass(Pass $pass) + { + $this->passes[] = $pass; + } + + /** + * @return MockDefinition + */ + public function generate(MockConfiguration $config) + { + $className = $config->getName() ?: $config->generateName(); + + $namedConfig = $config->rename($className); + + $code = $this->code; + foreach ($this->passes as $pass) { + $code = $pass->apply($code, $namedConfig); + } + + return new MockDefinition($namedConfig, $code); + } + + /** + * Creates a new StringManipulationGenerator with the default passes + * + * @return StringManipulationGenerator + */ + public static function withDefaultPasses() + { + return new static([ + new CallTypeHintPass(), + new MagicMethodTypeHintsPass(), + new ClassPass(), + new TraitPass(), + new ClassNamePass(), + new InstanceMockPass(), + new InterfacePass(), + new AvoidMethodClashPass(), + new MethodDefinitionPass(), + new RemoveUnserializeForInternalSerializableClassesPass(), + new RemoveBuiltinMethodsThatAreFinalPass(), + new RemoveDestructorPass(), + new ConstantsPass(), + new ClassAttributesPass(), + ]); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/TargetClassInterface.php b/vendor/mockery/mockery/library/Mockery/Generator/TargetClassInterface.php new file mode 100644 index 0000000..730ae1b --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/TargetClassInterface.php @@ -0,0 +1,104 @@ + + */ + public function getAttributes(); + + /** + * Returns the targetClass's interfaces. + * + * @return array + */ + public function getInterfaces(); + + /** + * Returns the targetClass's methods. + * + * @return array + */ + public function getMethods(); + + /** + * Returns the targetClass's name. + * + * @return class-string + */ + public function getName(); + + /** + * Returns the targetClass's namespace name. + * + * @return string + */ + public function getNamespaceName(); + + /** + * Returns the targetClass's short name. + * + * @return string + */ + public function getShortName(); + + /** + * Returns whether the targetClass has + * an internal ancestor. + * + * @return bool + */ + public function hasInternalAncestor(); + + /** + * Returns whether the targetClass is in + * the passed interface. + * + * @param class-string|string $interface + * + * @return bool + */ + public function implementsInterface($interface); + + /** + * Returns whether the targetClass is in namespace. + * + * @return bool + */ + public function inNamespace(); + + /** + * Returns whether the targetClass is abstract. + * + * @return bool + */ + public function isAbstract(); + + /** + * Returns whether the targetClass is final. + * + * @return bool + */ + public function isFinal(); +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/UndefinedTargetClass.php b/vendor/mockery/mockery/library/Mockery/Generator/UndefinedTargetClass.php new file mode 100644 index 0000000..ea72202 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Generator/UndefinedTargetClass.php @@ -0,0 +1,141 @@ +name = $name; + } + + /** + * @return class-string + */ + public function __toString() + { + return $this->name; + } + + /** + * @param class-string $name + * @return self + */ + public static function factory($name) + { + return new self($name); + } + + /** + * @return list + */ + public function getAttributes() + { + return []; + } + + /** + * @return list + */ + public function getInterfaces() + { + return []; + } + + /** + * @return list + */ + public function getMethods() + { + return []; + } + + /** + * @return class-string + */ + public function getName() + { + return $this->name; + } + + /** + * @return string + */ + public function getNamespaceName() + { + $parts = explode('\\', ltrim($this->getName(), '\\')); + array_pop($parts); + return implode('\\', $parts); + } + + /** + * @return string + */ + public function getShortName() + { + $parts = explode('\\', $this->getName()); + return array_pop($parts); + } + + /** + * @return bool + */ + public function hasInternalAncestor() + { + return false; + } + + /** + * @param class-string $interface + * @return bool + */ + public function implementsInterface($interface) + { + return false; + } + + /** + * @return bool + */ + public function inNamespace() + { + return $this->getNamespaceName() !== ''; + } + + /** + * @return bool + */ + public function isAbstract() + { + return false; + } + + /** + * @return bool + */ + public function isFinal() + { + return false; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/HigherOrderMessage.php b/vendor/mockery/mockery/library/Mockery/HigherOrderMessage.php new file mode 100644 index 0000000..42df34b --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/HigherOrderMessage.php @@ -0,0 +1,52 @@ +mock = $mock; + $this->method = $method; + } + + /** + * @param string $method + * @param array $args + * + * @return Expectation|ExpectationInterface|HigherOrderMessage + */ + public function __call($method, $args) + { + if ($this->method === 'shouldNotHaveReceived') { + return $this->mock->{$this->method}($method, $args); + } + + $expectation = $this->mock->{$this->method}($method); + + return $expectation->withArgs($args); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Instantiator.php b/vendor/mockery/mockery/library/Mockery/Instantiator.php new file mode 100644 index 0000000..11b8e5b --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Instantiator.php @@ -0,0 +1,147 @@ + $className + * + * @throws InvalidArgumentException + * @throws UnexpectedValueException + * + * @return TClass + */ + public function instantiate($className): object + { + return $this->buildFactory($className)(); + } + + /** + * @throws UnexpectedValueException + */ + private function attemptInstantiationViaUnSerialization( + ReflectionClass $reflectionClass, + string $serializedString + ): void { + set_error_handler(static function ($code, $message, $file, $line) use ($reflectionClass, &$error): void { + $msg = sprintf( + 'Could not produce an instance of "%s" via un-serialization, since an error was triggered in file "%s" at line "%d"', + $reflectionClass->getName(), + $file, + $line + ); + + $error = new UnexpectedValueException($msg, 0, new Exception($message, $code)); + }); + + try { + unserialize($serializedString); + } catch (Exception $exception) { + restore_error_handler(); + + throw new UnexpectedValueException( + sprintf( + 'An exception was raised while trying to instantiate an instance of "%s" via un-serialization', + $reflectionClass->getName() + ), + 0, + $exception + ); + } + + restore_error_handler(); + + if ($error instanceof UnexpectedValueException) { + throw $error; + } + } + + /** + * Builds a {@see Closure} capable of instantiating the given $className without invoking its constructor. + */ + private function buildFactory(string $className): Closure + { + $reflectionClass = $this->getReflectionClass($className); + + if ($this->isInstantiableViaReflection($reflectionClass)) { + return static function () use ($reflectionClass) { + return $reflectionClass->newInstanceWithoutConstructor(); + }; + } + + $serializedString = sprintf('O:%d:"%s":0:{}', strlen($className), $className); + + $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString); + + return static function () use ($serializedString) { + return unserialize($serializedString); + }; + } + + /** + * @throws InvalidArgumentException + */ + private function getReflectionClass(string $className): ReflectionClass + { + if (! class_exists($className)) { + throw new InvalidArgumentException(sprintf('Class:%s does not exist', $className)); + } + + $reflection = new ReflectionClass($className); + + if ($reflection->isAbstract()) { + throw new InvalidArgumentException(sprintf('Class:%s is an abstract class', $className)); + } + + return $reflection; + } + + /** + * Verifies whether the given class is to be considered internal + */ + private function hasInternalAncestors(ReflectionClass $reflectionClass): bool + { + do { + if ($reflectionClass->isInternal()) { + return true; + } + } while ($reflectionClass = $reflectionClass->getParentClass()); + + return false; + } + + /** + * Verifies if the class is instantiable via reflection + */ + private function isInstantiableViaReflection(ReflectionClass $reflectionClass): bool + { + return ! ($reflectionClass->isInternal() && $reflectionClass->isFinal()); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/LegacyMockInterface.php b/vendor/mockery/mockery/library/Mockery/LegacyMockInterface.php new file mode 100644 index 0000000..5c904e1 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/LegacyMockInterface.php @@ -0,0 +1,258 @@ + $args + * + * @return null|Expectation + */ + public function mockery_findExpectation($method, array $args); + + /** + * Return the container for this mock + * + * @return Container + */ + public function mockery_getContainer(); + + /** + * Get current ordered number + * + * @return int + */ + public function mockery_getCurrentOrder(); + + /** + * Gets the count of expectations for this mock + * + * @return int + */ + public function mockery_getExpectationCount(); + + /** + * Return the expectations director for the given method + * + * @param string $method + * + * @return null|ExpectationDirector + */ + public function mockery_getExpectationsFor($method); + + /** + * Fetch array of ordered groups + * + * @return array + */ + public function mockery_getGroups(); + + /** + * @return string[] + */ + public function mockery_getMockableMethods(); + + /** + * @return array + */ + public function mockery_getMockableProperties(); + + /** + * Return the name for this mock + * + * @return string + */ + public function mockery_getName(); + + /** + * Alternative setup method to constructor + * + * @param object $partialObject + * + * @return void + */ + public function mockery_init(?Container $container = null, $partialObject = null); + + /** + * @return bool + */ + public function mockery_isAnonymous(); + + /** + * Set current ordered number + * + * @param int $order + * + * @return int + */ + public function mockery_setCurrentOrder($order); + + /** + * Return the expectations director for the given method + * + * @param string $method + * + * @return null|ExpectationDirector + */ + public function mockery_setExpectationsFor($method, ExpectationDirector $director); + + /** + * Set ordering for a group + * + * @param string $group + * @param int $order + * + * @return void + */ + public function mockery_setGroup($group, $order); + + /** + * Tear down tasks for this mock + * + * @return void + */ + public function mockery_teardown(); + + /** + * Validate the current mock's ordering + * + * @param string $method + * @param int $order + * + * @throws Exception + * + * @return void + */ + public function mockery_validateOrder($method, $order); + + /** + * Iterate across all expectation directors and validate each + * + * @throws Throwable + * + * @return void + */ + public function mockery_verify(); + + /** + * Allows additional methods to be mocked that do not explicitly exist on mocked class + * + * @param string $method the method name to be mocked + * @return self + */ + public function shouldAllowMockingMethod($method); + + /** + * @return self + */ + public function shouldAllowMockingProtectedMethods(); + + /** + * Set mock to defer unexpected methods to its parent if possible + * + * @deprecated since 1.4.0. Please use makePartial() instead. + * + * @return self + */ + public function shouldDeferMissing(); + + /** + * @return self + */ + public function shouldHaveBeenCalled(); + + /** + * @template TMixed + * @param string $method + * @param null|array|Closure $args + * + * @return self + */ + public function shouldHaveReceived($method, $args = null); + + /** + * Set mock to ignore unexpected methods and return Undefined class + * + * @template TReturnValue + * + * @param null|TReturnValue $returnValue the default return value for calls to missing functions on this mock + * + * @return self + */ + public function shouldIgnoreMissing($returnValue = null); + + /** + * @template TMixed + * @param null|array $args (optional) + * + * @return self + */ + public function shouldNotHaveBeenCalled(?array $args = null); + + /** + * @template TMixed + * @param string $method + * @param null|array|Closure $args + * + * @return self + */ + public function shouldNotHaveReceived($method, $args = null); + + /** + * Shortcut method for setting an expectation that a method should not be called. + * + * @param string ...$methodNames one or many methods that are expected not to be called in this mock + * + * @return Expectation|ExpectationInterface|HigherOrderMessage + */ + public function shouldNotReceive(...$methodNames); + + /** + * Set expected method calls + * + * @param string ...$methodNames one or many methods that are expected to be called in this mock + * + * @return Expectation|ExpectationInterface|HigherOrderMessage + */ + public function shouldReceive(...$methodNames); +} diff --git a/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php b/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php new file mode 100644 index 0000000..63247e8 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php @@ -0,0 +1,32 @@ +getClassName(), false)) { + return; + } + + eval('?>' . $definition->getCode()); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Loader/Loader.php b/vendor/mockery/mockery/library/Mockery/Loader/Loader.php new file mode 100644 index 0000000..90d5689 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Loader/Loader.php @@ -0,0 +1,23 @@ +path = realpath($path); + } + + public function __destruct() + { + $files = array_diff(glob($this->path . DIRECTORY_SEPARATOR . 'Mockery_*.php') ?: [], [$this->lastPath]); + + foreach ($files as $file) { + @unlink($file); + } + } + + /** + * Load the given mock definition + * + * @return void + */ + public function load(MockDefinition $definition) + { + if (class_exists($definition->getClassName(), false)) { + return; + } + + $this->lastPath = sprintf('%s%s%s.php', $this->path, DIRECTORY_SEPARATOR, uniqid('Mockery_', false)); + + file_put_contents($this->lastPath, $definition->getCode()); + + if (file_exists($this->lastPath)) { + require $this->lastPath; + } + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/AndAnyOtherArgs.php b/vendor/mockery/mockery/library/Mockery/Matcher/AndAnyOtherArgs.php new file mode 100644 index 0000000..f4a698e --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/AndAnyOtherArgs.php @@ -0,0 +1,38 @@ +'; + } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return true; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Any.php b/vendor/mockery/mockery/library/Mockery/Matcher/Any.php new file mode 100644 index 0000000..5bb4b2f --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Any.php @@ -0,0 +1,38 @@ +'; + } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return true; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/AnyArgs.php b/vendor/mockery/mockery/library/Mockery/Matcher/AnyArgs.php new file mode 100644 index 0000000..0e1ce8c --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/AnyArgs.php @@ -0,0 +1,31 @@ +'; + } + + /** + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return true; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php b/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php new file mode 100644 index 0000000..425dcae --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php @@ -0,0 +1,41 @@ +'; + } + + /** + * Check if the actual value does not match the expected (in this + * case it's specifically NOT expected). + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return in_array($actual, $this->_expected, true); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/ArgumentListMatcher.php b/vendor/mockery/mockery/library/Mockery/Matcher/ArgumentListMatcher.php new file mode 100644 index 0000000..56e58f6 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/ArgumentListMatcher.php @@ -0,0 +1,15 @@ +'; + } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return ($this->_expected)($actual) === true; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php b/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php new file mode 100644 index 0000000..9fdeb83 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php @@ -0,0 +1,61 @@ +_expected as $v) { + $elements[] = (string) $v; + } + + return ''; + } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + $values = array_values($actual); + foreach ($this->_expected as $exp) { + $match = false; + foreach ($values as $val) { + if ($exp === $val || $exp == $val) { + $match = true; + break; + } + } + + if ($match === false) { + return false; + } + } + + return true; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php b/vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php new file mode 100644 index 0000000..3f3a9ef --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php @@ -0,0 +1,52 @@ +_expected) . ']>'; + } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + if (! is_object($actual)) { + return false; + } + + foreach ($this->_expected as $method) { + if (! method_exists($actual, $method)) { + return false; + } + } + + return true; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php b/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php new file mode 100644 index 0000000..15ef915 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php @@ -0,0 +1,48 @@ +', $this->_expected); + } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + if (! is_array($actual) && ! $actual instanceof ArrayAccess) { + return false; + } + + return array_key_exists($this->_expected, (array) $actual); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php b/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php new file mode 100644 index 0000000..8d37a5f --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php @@ -0,0 +1,47 @@ +_expected . ']>'; + } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + if (! is_array($actual) && ! $actual instanceof ArrayAccess) { + return false; + } + + return in_array($this->_expected, (array) $actual, true); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/IsEqual.php b/vendor/mockery/mockery/library/Mockery/Matcher/IsEqual.php new file mode 100644 index 0000000..72d1a02 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/IsEqual.php @@ -0,0 +1,38 @@ +'; + } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return $this->_expected == $actual; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/IsSame.php b/vendor/mockery/mockery/library/Mockery/Matcher/IsSame.php new file mode 100644 index 0000000..7671448 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/IsSame.php @@ -0,0 +1,38 @@ +'; + } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return $this->_expected === $actual; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php b/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php new file mode 100644 index 0000000..813950a --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php @@ -0,0 +1,39 @@ +_expected = $expected; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/MatcherInterface.php b/vendor/mockery/mockery/library/Mockery/Matcher/MatcherInterface.php new file mode 100644 index 0000000..19154ea --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/MatcherInterface.php @@ -0,0 +1,36 @@ +'; + } + + /** + * Check if the actual value matches the expected. + * Actual passed by reference to preserve reference trail (where applicable) + * back to the original method parameter. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return ($this->_expected)(...$actual) === true; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php b/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php new file mode 100644 index 0000000..d365bc7 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php @@ -0,0 +1,47 @@ +'; + } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + if (! is_object($actual)) { + return $this->_expected === $actual; + } + + return $this->_expected == $actual; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/NoArgs.php b/vendor/mockery/mockery/library/Mockery/Matcher/NoArgs.php new file mode 100644 index 0000000..37438f1 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/NoArgs.php @@ -0,0 +1,33 @@ +'; + } + + /** + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return count($actual) === 0; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Not.php b/vendor/mockery/mockery/library/Mockery/Matcher/Not.php new file mode 100644 index 0000000..133007e --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Not.php @@ -0,0 +1,39 @@ +'; + } + + /** + * Check if the actual value does not match the expected (in this + * case it's specifically NOT expected). + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return $actual !== $this->_expected; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php b/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php new file mode 100644 index 0000000..567b24e --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php @@ -0,0 +1,45 @@ +'; + } + + /** + * Check if the actual value does not match the expected (in this + * case it's specifically NOT expected). + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + foreach ($this->_expected as $exp) { + if ($actual === $exp || $actual == $exp) { + return false; + } + } + + return true; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Pattern.php b/vendor/mockery/mockery/library/Mockery/Matcher/Pattern.php new file mode 100644 index 0000000..b2e84df --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Pattern.php @@ -0,0 +1,40 @@ +'; + } + + /** + * Check if the actual value matches the expected pattern. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return preg_match($this->_expected, (string) $actual) >= 1; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php b/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php new file mode 100644 index 0000000..96893fb --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php @@ -0,0 +1,99 @@ +expected = $expected; + $this->strict = $strict; + } + + /** + * Return a string representation of this Matcher + * + * @return string + */ + public function __toString() + { + return 'formatArray($this->expected) . '>'; + } + + /** + * @param array $expected Expected subset of data + * + * @return Subset + */ + public static function loose(array $expected) + { + return new static($expected, false); + } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + if (! is_array($actual)) { + return false; + } + + if ($this->strict) { + return $actual === array_replace_recursive($actual, $this->expected); + } + + return $actual == array_replace_recursive($actual, $this->expected); + } + + /** + * @param array $expected Expected subset of data + * + * @return Subset + */ + public static function strict(array $expected) + { + return new static($expected, true); + } + + /** + * Recursively format an array into the string representation for this matcher + * + * @return string + */ + protected function formatArray(array $array) + { + $elements = []; + foreach ($array as $k => $v) { + $elements[] = $k . '=' . (is_array($v) ? $this->formatArray($v) : (string) $v); + } + + return '[' . implode(', ', $elements) . ']'; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Type.php b/vendor/mockery/mockery/library/Mockery/Matcher/Type.php new file mode 100644 index 0000000..8265b60 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Type.php @@ -0,0 +1,59 @@ +_expected) . '>'; + } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + $function = $this->_expected === 'real' ? 'is_float' : 'is_' . strtolower($this->_expected); + + if (function_exists($function)) { + return $function($actual); + } + + if (! is_string($this->_expected)) { + return false; + } + + if (class_exists($this->_expected) || interface_exists($this->_expected)) { + return $actual instanceof $this->_expected; + } + + return false; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/MethodCall.php b/vendor/mockery/mockery/library/Mockery/MethodCall.php new file mode 100644 index 0000000..f331514 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/MethodCall.php @@ -0,0 +1,50 @@ +method = $method; + $this->args = $args; + } + + /** + * @return array + */ + public function getArgs() + { + return $this->args; + } + + /** + * @return string + */ + public function getMethod() + { + return $this->method; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Mock.php b/vendor/mockery/mockery/library/Mockery/Mock.php new file mode 100644 index 0000000..068cce3 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Mock.php @@ -0,0 +1,1020 @@ +_mockery_container = $container; + if (!is_null($partialObject)) { + $this->_mockery_partial = $partialObject; + } + + if (!\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed()) { + foreach ($this->mockery_getMethods() as $method) { + if ($method->isPublic()) { + $this->_mockery_mockableMethods[] = $method->getName(); + } + } + } + + $this->_mockery_instanceMock = $instanceMock; + + $this->_mockery_parentClass = get_parent_class($this); + } + + /** + * Set expected method calls + * + * @param string ...$methodNames one or many methods that are expected to be called in this mock + * + * @return ExpectationInterface|Expectation|HigherOrderMessage + */ + public function shouldReceive(...$methodNames) + { + if ($methodNames === []) { + return new HigherOrderMessage($this, 'shouldReceive'); + } + + foreach ($methodNames as $method) { + if ('' === $method) { + throw new \InvalidArgumentException('Received empty method name'); + } + } + + $self = $this; + $allowMockingProtectedMethods = $this->_mockery_allowMockingProtectedMethods; + return \Mockery::parseShouldReturnArgs( + $this, + $methodNames, + static function ($method) use ($self, $allowMockingProtectedMethods) { + $rm = $self->mockery_getMethod($method); + if ($rm) { + if ($rm->isPrivate()) { + throw new \InvalidArgumentException($method . '() cannot be mocked as it is a private method'); + } + + if (!$allowMockingProtectedMethods && $rm->isProtected()) { + throw new \InvalidArgumentException($method . '() cannot be mocked as it is a protected method and mocking protected methods is not enabled for the currently used mock object. Use shouldAllowMockingProtectedMethods() to enable mocking of protected methods.'); + } + } + + $director = $self->mockery_getExpectationsFor($method); + if (!$director) { + $director = new ExpectationDirector($method, $self); + $self->mockery_setExpectationsFor($method, $director); + } + + $expectation = new Expectation($self, $method); + $director->addExpectation($expectation); + return $expectation; + } + ); + } + + // start method allows + /** + * @param mixed $something String method name or map of method => return + * @return self|ExpectationInterface|Expectation|HigherOrderMessage + */ + public function allows($something = []) + { + if (is_string($something)) { + return $this->shouldReceive($something); + } + + if (empty($something)) { + return $this->shouldReceive(); + } + + foreach ($something as $method => $returnValue) { + $this->shouldReceive($method)->andReturn($returnValue); + } + + return $this; + } + + // end method allows + // start method expects + /** + /** + * @param mixed $something String method name (optional) + * @return ExpectationInterface|Expectation|ExpectsHigherOrderMessage + */ + public function expects($something = null) + { + if (is_string($something)) { + return $this->shouldReceive($something)->once(); + } + + return new ExpectsHigherOrderMessage($this); + } + + // end method expects + /** + * Shortcut method for setting an expectation that a method should not be called. + * + * @param string ...$methodNames one or many methods that are expected not to be called in this mock + * @return ExpectationInterface|Expectation|HigherOrderMessage + */ + public function shouldNotReceive(...$methodNames) + { + if ($methodNames === []) { + return new HigherOrderMessage($this, 'shouldNotReceive'); + } + + $expectation = call_user_func_array(function (string $methodNames) { + return $this->shouldReceive($methodNames); + }, $methodNames); + $expectation->never(); + return $expectation; + } + + /** + * Allows additional methods to be mocked that do not explicitly exist on mocked class + * + * @param string $method name of the method to be mocked + * @return Mock|MockInterface|LegacyMockInterface + */ + public function shouldAllowMockingMethod($method) + { + $this->_mockery_mockableMethods[] = $method; + return $this; + } + + /** + * Set mock to ignore unexpected methods and return Undefined class + * @param mixed $returnValue the default return value for calls to missing functions on this mock + * @param bool $recursive Specify if returned mocks should also have shouldIgnoreMissing set + * @return static + */ + public function shouldIgnoreMissing($returnValue = null, $recursive = false) + { + $this->_mockery_ignoreMissing = true; + $this->_mockery_ignoreMissingRecursive = $recursive; + $this->_mockery_defaultReturnValue = $returnValue; + return $this; + } + + public function asUndefined() + { + $this->_mockery_ignoreMissing = true; + $this->_mockery_defaultReturnValue = new Undefined(); + return $this; + } + + /** + * @return static + */ + public function shouldAllowMockingProtectedMethods() + { + if (!\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed()) { + foreach ($this->mockery_getMethods() as $method) { + if ($method->isProtected()) { + $this->_mockery_mockableMethods[] = $method->getName(); + } + } + } + + $this->_mockery_allowMockingProtectedMethods = true; + return $this; + } + + + /** + * Set mock to defer unexpected methods to it's parent + * + * This is particularly useless for this class, as it doesn't have a parent, + * but included for completeness + * + * @deprecated 2.0.0 Please use makePartial() instead + * + * @return static + */ + public function shouldDeferMissing() + { + return $this->makePartial(); + } + + /** + * Set mock to defer unexpected methods to it's parent + * + * It was an alias for shouldDeferMissing(), which will be removed + * in 2.0.0. + * + * @return static + */ + public function makePartial() + { + $this->_mockery_deferMissing = true; + return $this; + } + + /** + * In the event shouldReceive() accepting one or more methods/returns, + * this method will switch them from normal expectations to default + * expectations + * + * @return self + */ + public function byDefault() + { + foreach ($this->_mockery_expectations as $director) { + $exps = $director->getExpectations(); + foreach ($exps as $exp) { + $exp->byDefault(); + } + } + + return $this; + } + + /** + * Capture calls to this mock + */ + public function __call($method, array $args) + { + return $this->_mockery_handleMethodCall($method, $args); + } + + public static function __callStatic($method, array $args) + { + return self::_mockery_handleStaticMethodCall($method, $args); + } + + /** + * Forward calls to this magic method to the __call method + */ + #[\ReturnTypeWillChange] + public function __toString() + { + return $this->__call('__toString', []); + } + + /** + * Iterate across all expectation directors and validate each + * + * @throws Exception + * @return void + */ + public function mockery_verify() + { + if ($this->_mockery_verified) { + return; + } + + if (property_exists($this, '_mockery_ignoreVerification') && $this->_mockery_ignoreVerification !== null + && $this->_mockery_ignoreVerification == true) { + return; + } + + $this->_mockery_verified = true; + foreach ($this->_mockery_expectations as $director) { + $director->verify(); + } + } + + /** + * Gets a list of exceptions thrown by this mock + * + * @return array + */ + public function mockery_thrownExceptions() + { + return $this->_mockery_thrownExceptions; + } + + /** + * Tear down tasks for this mock + * + * @return void + */ + public function mockery_teardown() + { + } + + /** + * Fetch the next available allocation order number + * + * @return int + */ + public function mockery_allocateOrder() + { + ++$this->_mockery_allocatedOrder; + return $this->_mockery_allocatedOrder; + } + + /** + * Set ordering for a group + * + * @param mixed $group + * @param int $order + */ + public function mockery_setGroup($group, $order) + { + $this->_mockery_groups[$group] = $order; + } + + /** + * Fetch array of ordered groups + * + * @return array + */ + public function mockery_getGroups() + { + return $this->_mockery_groups; + } + + /** + * Set current ordered number + * + * @param int $order + */ + public function mockery_setCurrentOrder($order) + { + $this->_mockery_currentOrder = $order; + return $this->_mockery_currentOrder; + } + + /** + * Get current ordered number + * + * @return int + */ + public function mockery_getCurrentOrder() + { + return $this->_mockery_currentOrder; + } + + /** + * Validate the current mock's ordering + * + * @param string $method + * @param int $order + * @throws \Mockery\Exception + * @return void + */ + public function mockery_validateOrder($method, $order) + { + if ($order < $this->_mockery_currentOrder) { + $exception = new InvalidOrderException( + 'Method ' . self::class . '::' . $method . '()' + . ' called out of order: expected order ' + . $order . ', was ' . $this->_mockery_currentOrder + ); + $exception->setMock($this) + ->setMethodName($method) + ->setExpectedOrder($order) + ->setActualOrder($this->_mockery_currentOrder); + throw $exception; + } + + $this->mockery_setCurrentOrder($order); + } + + /** + * Gets the count of expectations for this mock + * + * @return int + */ + public function mockery_getExpectationCount() + { + $count = $this->_mockery_expectations_count; + foreach ($this->_mockery_expectations as $director) { + $count += $director->getExpectationCount(); + } + + return $count; + } + + /** + * Return the expectations director for the given method + * + * @var string $method + * @return ExpectationDirector|null + */ + public function mockery_setExpectationsFor($method, ExpectationDirector $director) + { + $this->_mockery_expectations[$method] = $director; + } + + /** + * Return the expectations director for the given method + * + * @var string $method + * @return ExpectationDirector|null + */ + public function mockery_getExpectationsFor($method) + { + if (isset($this->_mockery_expectations[$method])) { + return $this->_mockery_expectations[$method]; + } + } + + /** + * Find an expectation matching the given method and arguments + * + * @var string $method + * @var array $args + * @return Expectation|null + */ + public function mockery_findExpectation($method, array $args) + { + if (!isset($this->_mockery_expectations[$method])) { + return null; + } + + $director = $this->_mockery_expectations[$method]; + + return $director->findExpectation($args); + } + + /** + * Return the container for this mock + * + * @return Container + */ + public function mockery_getContainer() + { + return $this->_mockery_container; + } + + /** + * Return the name for this mock + * + * @return string + */ + public function mockery_getName() + { + return self::class; + } + + /** + * @return array + */ + public function mockery_getMockableProperties() + { + return $this->_mockery_mockableProperties; + } + + public function __isset($name) + { + if (false !== stripos($name, '_mockery_')) { + return false; + } + + if (!$this->_mockery_parentClass) { + return false; + } + + if (!method_exists($this->_mockery_parentClass, '__isset')) { + return false; + } + + return call_user_func($this->_mockery_parentClass . '::__isset', $name); + } + + public function mockery_getExpectations() + { + return $this->_mockery_expectations; + } + + /** + * Calls a parent class method and returns the result. Used in a passthru + * expectation where a real return value is required while still taking + * advantage of expectation matching and call count verification. + * + * @param string $name + * @param array $args + * @return mixed + */ + public function mockery_callSubjectMethod($name, array $args) + { + if (!method_exists($this, $name) && $this->_mockery_parentClass && method_exists($this->_mockery_parentClass, '__call')) { + return call_user_func($this->_mockery_parentClass . '::__call', $name, $args); + } + + return call_user_func_array($this->_mockery_parentClass . '::' . $name, $args); + } + + /** + * @return string[] + */ + public function mockery_getMockableMethods() + { + return $this->_mockery_mockableMethods; + } + + /** + * @return bool + */ + public function mockery_isAnonymous() + { + $rfc = new \ReflectionClass($this); + + // PHP 8 has Stringable interface + $interfaces = array_filter($rfc->getInterfaces(), static function ($i) { + return $i->getName() !== 'Stringable'; + }); + + return false === $rfc->getParentClass() && 2 === count($interfaces); + } + + public function mockery_isInstance() + { + return $this->_mockery_instanceMock; + } + + public function __wakeup() + { + /** + * This does not add __wakeup method support. It's a blind method and any + * expected __wakeup work will NOT be performed. It merely cuts off + * annoying errors where a __wakeup exists but is not essential when + * mocking + */ + } + + public function __destruct() + { + /** + * Overrides real class destructor in case if class was created without original constructor + */ + } + + public function mockery_getMethod($name) + { + foreach ($this->mockery_getMethods() as $method) { + if ($method->getName() == $name) { + return $method; + } + } + + return null; + } + + /** + * @param string $name Method name. + * + * @return mixed Generated return value based on the declared return value of the named method. + */ + public function mockery_returnValueForMethod($name) + { + $rm = $this->mockery_getMethod($name); + + if ($rm === null) { + return null; + } + + $returnType = Reflector::getSimplestReturnType($rm); + + switch ($returnType) { + case null: return null; + case 'string': return ''; + case 'int': return 0; + case 'float': return 0.0; + case 'bool': return false; + case 'true': return true; + case 'false': return false; + + case 'array': + case 'iterable': + return []; + + case 'callable': + case '\Closure': + return static function () : void { + }; + + case '\Traversable': + case '\Generator': + $generator = static function () { + yield; + }; + return $generator(); + + case 'void': + return null; + + case 'static': + return $this; + + case 'object': + $mock = \Mockery::mock(); + if ($this->_mockery_ignoreMissingRecursive) { + $mock->shouldIgnoreMissing($this->_mockery_defaultReturnValue, true); + } + + return $mock; + + default: + $mock = \Mockery::mock($returnType); + if ($this->_mockery_ignoreMissingRecursive) { + $mock->shouldIgnoreMissing($this->_mockery_defaultReturnValue, true); + } + + return $mock; + } + } + + public function shouldHaveReceived($method = null, $args = null) + { + if ($method === null) { + return new HigherOrderMessage($this, 'shouldHaveReceived'); + } + + $expectation = new VerificationExpectation($this, $method); + if (null !== $args) { + $expectation->withArgs($args); + } + + $expectation->atLeast()->once(); + $director = new VerificationDirector($this->_mockery_getReceivedMethodCalls(), $expectation); + ++$this->_mockery_expectations_count; + $director->verify(); + return $director; + } + + public function shouldHaveBeenCalled() + { + return $this->shouldHaveReceived('__invoke'); + } + + public function shouldNotHaveReceived($method = null, $args = null) + { + if ($method === null) { + return new HigherOrderMessage($this, 'shouldNotHaveReceived'); + } + + $expectation = new VerificationExpectation($this, $method); + if (null !== $args) { + $expectation->withArgs($args); + } + + $expectation->never(); + $director = new VerificationDirector($this->_mockery_getReceivedMethodCalls(), $expectation); + ++$this->_mockery_expectations_count; + $director->verify(); + return null; + } + + public function shouldNotHaveBeenCalled(?array $args = null) + { + return $this->shouldNotHaveReceived('__invoke', $args); + } + + protected static function _mockery_handleStaticMethodCall($method, array $args) + { + $associatedRealObject = \Mockery::fetchMock(self::class); + try { + return $associatedRealObject->__call($method, $args); + } catch (BadMethodCallException $badMethodCallException) { + throw new BadMethodCallException( + 'Static method ' . $associatedRealObject->mockery_getName() . '::' . $method + . '() does not exist on this mock object', + 0, + $badMethodCallException + ); + } + } + + protected function _mockery_getReceivedMethodCalls() + { + return $this->_mockery_receivedMethodCalls ?: $this->_mockery_receivedMethodCalls = new ReceivedMethodCalls(); + } + + /** + * Called when an instance Mock was created and its constructor is getting called + * + * @see \Mockery\Generator\StringManipulation\Pass\InstanceMockPass + * @param array $args + */ + protected function _mockery_constructorCalled(array $args) + { + if (!isset($this->_mockery_expectations['__construct']) /* _mockery_handleMethodCall runs the other checks */) { + return; + } + + $this->_mockery_handleMethodCall('__construct', $args); + } + + protected function _mockery_findExpectedMethodHandler($method) + { + if (isset($this->_mockery_expectations[$method])) { + return $this->_mockery_expectations[$method]; + } + + $lowerCasedMockeryExpectations = array_change_key_case($this->_mockery_expectations, CASE_LOWER); + $lowerCasedMethod = strtolower($method); + + return $lowerCasedMockeryExpectations[$lowerCasedMethod] ?? null; + } + + protected function _mockery_handleMethodCall($method, array $args) + { + $this->_mockery_getReceivedMethodCalls()->push(new MethodCall($method, $args)); + + $rm = $this->mockery_getMethod($method); + if ($rm && $rm->isProtected() && !$this->_mockery_allowMockingProtectedMethods) { + if ($rm->isAbstract()) { + return; + } + + try { + $prototype = $rm->getPrototype(); + if ($prototype->isAbstract()) { + return; + } + } catch (\ReflectionException $re) { + // noop - there is no hasPrototype method + } + + if (null === $this->_mockery_parentClass) { + $this->_mockery_parentClass = get_parent_class($this); + } + + return call_user_func_array($this->_mockery_parentClass . '::' . $method, $args); + } + + $handler = $this->_mockery_findExpectedMethodHandler($method); + + if ($handler !== null && !$this->_mockery_disableExpectationMatching) { + try { + return $handler->call($args); + } catch (NoMatchingExpectationException $e) { + if (!$this->_mockery_ignoreMissing && !$this->_mockery_deferMissing) { + throw $e; + } + } + } + + if (!is_null($this->_mockery_partial) && + (method_exists($this->_mockery_partial, $method) || method_exists($this->_mockery_partial, '__call'))) { + return $this->_mockery_partial->{$method}(...$args); + } + + if ($this->_mockery_deferMissing && is_callable($this->_mockery_parentClass . '::' . $method) + && (!$this->hasMethodOverloadingInParentClass() || ($this->_mockery_parentClass && method_exists($this->_mockery_parentClass, $method)))) { + return call_user_func_array($this->_mockery_parentClass . '::' . $method, $args); + } + + if ($this->_mockery_deferMissing && $this->_mockery_parentClass && method_exists($this->_mockery_parentClass, '__call')) { + return call_user_func($this->_mockery_parentClass . '::__call', $method, $args); + } + + if ($method === '__toString') { + // __toString is special because we force its addition to the class API regardless of the + // original implementation. Thus, we should always return a string rather than honor + // _mockery_ignoreMissing and break the API with an error. + return sprintf('%s#%s', self::class, spl_object_hash($this)); + } + + if ($this->_mockery_ignoreMissing && (\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed() || (!is_null($this->_mockery_partial) && method_exists($this->_mockery_partial, $method)) || is_callable($this->_mockery_parentClass . '::' . $method))) { + if ($this->_mockery_defaultReturnValue instanceof Undefined) { + return $this->_mockery_defaultReturnValue->{$method}(...$args); + } + + if (null === $this->_mockery_defaultReturnValue) { + return $this->mockery_returnValueForMethod($method); + } + + return $this->_mockery_defaultReturnValue; + } + + $message = 'Method ' . self::class . '::' . $method . + '() does not exist on this mock object'; + + if (!is_null($rm)) { + $message = 'Received ' . self::class . + '::' . $method . '(), but no expectations were specified'; + } + + $bmce = new BadMethodCallException($message); + $this->_mockery_thrownExceptions[] = $bmce; + throw $bmce; + } + + /** + * Uses reflection to get the list of all + * methods within the current mock object + * + * @return array + */ + protected function mockery_getMethods() + { + if (static::$_mockery_methods && \Mockery::getConfiguration()->reflectionCacheEnabled()) { + return static::$_mockery_methods; + } + + if ($this->_mockery_partial !== null) { + $reflected = new \ReflectionObject($this->_mockery_partial); + } else { + $reflected = new \ReflectionClass($this); + } + + return static::$_mockery_methods = $reflected->getMethods(); + } + + private function hasMethodOverloadingInParentClass() + { + // if there's __call any name would be callable + return is_callable($this->_mockery_parentClass . '::aFunctionNameThatNoOneWouldEverUseInRealLife12345'); + } + + /** + * @return array + */ + private function getNonPublicMethods() + { + return array_map( + static function ($method) { + return $method->getName(); + }, + array_filter($this->mockery_getMethods(), static function ($method) { + return !$method->isPublic(); + }) + ); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/MockInterface.php b/vendor/mockery/mockery/library/Mockery/MockInterface.php new file mode 100644 index 0000000..9dc5364 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/MockInterface.php @@ -0,0 +1,28 @@ + return + * + * @return Expectation|ExpectationInterface|HigherOrderMessage|self + */ + public function allows($something = []); + + /** + * @param mixed $something String method name (optional) + * + * @return Expectation|ExpectationInterface|ExpectsHigherOrderMessage + */ + public function expects($something = null); +} diff --git a/vendor/mockery/mockery/library/Mockery/QuickDefinitionsConfiguration.php b/vendor/mockery/mockery/library/Mockery/QuickDefinitionsConfiguration.php new file mode 100644 index 0000000..aef28b7 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/QuickDefinitionsConfiguration.php @@ -0,0 +1,47 @@ +_quickDefinitionsApplicationMode = $newValue + ? self::QUICK_DEFINITIONS_MODE_MOCK_AT_LEAST_ONCE + : self::QUICK_DEFINITIONS_MODE_DEFAULT_EXPECTATION; + } + + return $this->_quickDefinitionsApplicationMode === self::QUICK_DEFINITIONS_MODE_MOCK_AT_LEAST_ONCE; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/ReceivedMethodCalls.php b/vendor/mockery/mockery/library/Mockery/ReceivedMethodCalls.php new file mode 100644 index 0000000..4ec1c67 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/ReceivedMethodCalls.php @@ -0,0 +1,38 @@ +methodCalls[] = $methodCall; + } + + public function verify(Expectation $expectation) + { + foreach ($this->methodCalls as $methodCall) { + if ($methodCall->getMethod() !== $expectation->getName()) { + continue; + } + + if (! $expectation->matchArgs($methodCall->getArgs())) { + continue; + } + + $expectation->verifyCall($methodCall->getArgs()); + } + + $expectation->verify(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Reflector.php b/vendor/mockery/mockery/library/Mockery/Reflector.php new file mode 100644 index 0000000..8e4fc15 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Reflector.php @@ -0,0 +1,316 @@ + + */ + public const BUILTIN_TYPES = ['array', 'bool', 'int', 'float', 'null', 'object', 'string']; + + /** + * List of reserved words. + * + * @var list + */ + public const RESERVED_WORDS = ['bool', 'true', 'false', 'float', 'int', 'iterable', 'mixed', 'never', 'null', 'object', 'string', 'void']; + + /** + * Iterable. + * + * @var list + */ + private const ITERABLE = ['iterable']; + + /** + * Traversable array. + * + * @var list + */ + private const TRAVERSABLE_ARRAY = ['\Traversable', 'array']; + + /** + * Compute the string representation for the return type. + * + * @param bool $withoutNullable + * + * @return null|string + */ + public static function getReturnType(ReflectionMethod $method, $withoutNullable = false) + { + $type = $method->getReturnType(); + + if (! $type instanceof ReflectionType && method_exists($method, 'getTentativeReturnType')) { + $type = $method->getTentativeReturnType(); + } + + if (! $type instanceof ReflectionType) { + return null; + } + + $typeHint = self::getTypeFromReflectionType($type, $method->getDeclaringClass()); + + return (! $withoutNullable && $type->allowsNull()) ? self::formatNullableType($typeHint) : $typeHint; + } + + /** + * Compute the string representation for the simplest return type. + * + * @return null|string + */ + public static function getSimplestReturnType(ReflectionMethod $method) + { + $type = $method->getReturnType(); + + if (! $type instanceof ReflectionType && method_exists($method, 'getTentativeReturnType')) { + $type = $method->getTentativeReturnType(); + } + + if (! $type instanceof ReflectionType || $type->allowsNull()) { + return null; + } + + $typeInformation = self::getTypeInformation($type, $method->getDeclaringClass()); + + // return the first primitive type hint + foreach ($typeInformation as $info) { + if ($info['isPrimitive']) { + return $info['typeHint']; + } + } + + // if no primitive type, return the first type + foreach ($typeInformation as $info) { + return $info['typeHint']; + } + + return null; + } + + /** + * Compute the string representation for the paramater type. + * + * @param bool $withoutNullable + * + * @return null|string + */ + public static function getTypeHint(ReflectionParameter $param, $withoutNullable = false) + { + if (! $param->hasType()) { + return null; + } + + $type = $param->getType(); + $declaringClass = $param->getDeclaringClass(); + $typeHint = self::getTypeFromReflectionType($type, $declaringClass); + + return (! $withoutNullable && $type->allowsNull()) ? self::formatNullableType($typeHint) : $typeHint; + } + + /** + * Determine if the parameter is typed as an array. + * + * @return bool + */ + public static function isArray(ReflectionParameter $param) + { + $type = $param->getType(); + + return $type instanceof ReflectionNamedType && $type->getName(); + } + + /** + * Determine if the given type is a reserved word. + */ + public static function isReservedWord(string $type): bool + { + return in_array(strtolower($type), self::RESERVED_WORDS, true); + } + + /** + * Format the given type as a nullable type. + */ + private static function formatNullableType(string $typeHint): string + { + if ($typeHint === 'mixed') { + return $typeHint; + } + + if (strpos($typeHint, 'null') !== false) { + return $typeHint; + } + + if (PHP_VERSION_ID < 80000) { + return sprintf('?%s', $typeHint); + } + + return sprintf('%s|null', $typeHint); + } + + private static function getTypeFromReflectionType(ReflectionType $type, ReflectionClass $declaringClass): string + { + if ($type instanceof ReflectionNamedType) { + $typeHint = $type->getName(); + + if ($type->isBuiltin()) { + return $typeHint; + } + + if ($typeHint === 'static') { + return $typeHint; + } + + // 'self' needs to be resolved to the name of the declaring class + if ($typeHint === 'self') { + $typeHint = $declaringClass->getName(); + } + + // 'parent' needs to be resolved to the name of the parent class + if ($typeHint === 'parent') { + $typeHint = $declaringClass->getParentClass()->getName(); + } + + // class names need prefixing with a slash + return sprintf('\\%s', $typeHint); + } + + if ($type instanceof ReflectionIntersectionType) { + $types = array_map( + static function (ReflectionType $type) use ($declaringClass): string { + return self::getTypeFromReflectionType($type, $declaringClass); + }, + $type->getTypes() + ); + + return implode('&', $types); + } + + if ($type instanceof ReflectionUnionType) { + $types = array_map( + static function (ReflectionType $type) use ($declaringClass): string { + return self::getTypeFromReflectionType($type, $declaringClass); + }, + $type->getTypes() + ); + + $intersect = array_intersect(self::TRAVERSABLE_ARRAY, $types); + if ($intersect === self::TRAVERSABLE_ARRAY) { + $types = array_merge(self::ITERABLE, array_diff($types, self::TRAVERSABLE_ARRAY)); + } + + return implode( + '|', + array_map( + static function (string $type): string { + return strpos($type, '&') === false ? $type : sprintf('(%s)', $type); + }, + $types + ) + ); + } + + throw new InvalidArgumentException('Unknown ReflectionType: ' . get_debug_type($type)); + } + + /** + * Get the string representation of the given type. + * + * @return list + */ + private static function getTypeInformation(ReflectionType $type, ReflectionClass $declaringClass): array + { + // PHP 8 union types and PHP 8.1 intersection types can be recursively processed + if ($type instanceof ReflectionUnionType || $type instanceof ReflectionIntersectionType) { + $types = []; + + foreach ($type->getTypes() as $innterType) { + foreach (self::getTypeInformation($innterType, $declaringClass) as $info) { + if ($info['typeHint'] === 'null' && $info['isPrimitive']) { + continue; + } + + $types[] = $info; + } + } + + return $types; + } + + // $type must be an instance of \ReflectionNamedType + $typeHint = $type->getName(); + + // builtins can be returned as is + if ($type->isBuiltin()) { + return [ + [ + 'typeHint' => $typeHint, + 'isPrimitive' => in_array($typeHint, self::BUILTIN_TYPES, true), + ], + ]; + } + + // 'static' can be returned as is + if ($typeHint === 'static') { + return [ + [ + 'typeHint' => $typeHint, + 'isPrimitive' => false, + ], + ]; + } + + // 'self' needs to be resolved to the name of the declaring class + if ($typeHint === 'self') { + $typeHint = $declaringClass->getName(); + } + + // 'parent' needs to be resolved to the name of the parent class + if ($typeHint === 'parent') { + $typeHint = $declaringClass->getParentClass()->getName(); + } + + // class names need prefixing with a slash + return [ + [ + 'typeHint' => sprintf('\\%s', $typeHint), + 'isPrimitive' => false, + ], + ]; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Undefined.php b/vendor/mockery/mockery/library/Mockery/Undefined.php new file mode 100644 index 0000000..ca3ace4 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Undefined.php @@ -0,0 +1,39 @@ +receivedMethodCalls = $receivedMethodCalls; + $this->expectation = $expectation; + } + + /** + * @return self + */ + public function atLeast() + { + return $this->cloneWithoutCountValidatorsApplyAndVerify('atLeast', []); + } + + /** + * @return self + */ + public function atMost() + { + return $this->cloneWithoutCountValidatorsApplyAndVerify('atMost', []); + } + + /** + * @param int $minimum + * @param int $maximum + * + * @return self + */ + public function between($minimum, $maximum) + { + return $this->cloneWithoutCountValidatorsApplyAndVerify('between', [$minimum, $maximum]); + } + + /** + * @return self + */ + public function once() + { + return $this->cloneWithoutCountValidatorsApplyAndVerify('once', []); + } + + /** + * @param int $limit + * + * @return self + */ + public function times($limit = null) + { + return $this->cloneWithoutCountValidatorsApplyAndVerify('times', [$limit]); + } + + /** + * @return self + */ + public function twice() + { + return $this->cloneWithoutCountValidatorsApplyAndVerify('twice', []); + } + + public function verify() + { + $this->receivedMethodCalls->verify($this->expectation); + } + + /** + * @template TArgs + * + * @param TArgs $args + * + * @return self + */ + public function with(...$args) + { + return $this->cloneApplyAndVerify('with', $args); + } + + /** + * @return self + */ + public function withAnyArgs() + { + return $this->cloneApplyAndVerify('withAnyArgs', []); + } + + /** + * @template TArgs + * + * @param TArgs $args + * + * @return self + */ + public function withArgs($args) + { + return $this->cloneApplyAndVerify('withArgs', [$args]); + } + + /** + * @return self + */ + public function withNoArgs() + { + return $this->cloneApplyAndVerify('withNoArgs', []); + } + + /** + * @param string $method + * @param array $args + * + * @return self + */ + protected function cloneApplyAndVerify($method, $args) + { + $verificationExpectation = clone $this->expectation; + + $verificationExpectation->{$method}(...$args); + + $verificationDirector = new self($this->receivedMethodCalls, $verificationExpectation); + + $verificationDirector->verify(); + + return $verificationDirector; + } + + /** + * @param string $method + * @param array $args + * + * @return self + */ + protected function cloneWithoutCountValidatorsApplyAndVerify($method, $args) + { + $verificationExpectation = clone $this->expectation; + + $verificationExpectation->clearCountValidators(); + + $verificationExpectation->{$method}(...$args); + + $verificationDirector = new self($this->receivedMethodCalls, $verificationExpectation); + + $verificationDirector->verify(); + + return $verificationDirector; + } +} diff --git a/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php b/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php new file mode 100644 index 0000000..9e36f6c --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php @@ -0,0 +1,29 @@ +_actualCount = 0; + } + + /** + * @return void + */ + public function clearCountValidators() + { + $this->_countValidators = []; + } +} diff --git a/vendor/mockery/mockery/library/helpers.php b/vendor/mockery/mockery/library/helpers.php new file mode 100644 index 0000000..8f15857 --- /dev/null +++ b/vendor/mockery/mockery/library/helpers.php @@ -0,0 +1,77 @@ +|TMock|Closure(LegacyMockInterface&MockInterface&TMock):LegacyMockInterface&MockInterface&TMock|array> $args + * + * @return LegacyMockInterface&MockInterface&TMock + */ + function mock(...$args) + { + return Mockery::mock(...$args); + } +} + +if (! \function_exists('spy')) { + /** + * @template TSpy of object + * + * @param array|TSpy|Closure(LegacyMockInterface&MockInterface&TSpy):LegacyMockInterface&MockInterface&TSpy|array> $args + * + * @return LegacyMockInterface&MockInterface&TSpy + */ + function spy(...$args) + { + return Mockery::spy(...$args); + } +} + +if (! \function_exists('namedMock')) { + /** + * @template TNamedMock of object + * + * @param array|TNamedMock|array> $args + * + * @return LegacyMockInterface&MockInterface&TNamedMock + */ + function namedMock(...$args) + { + return Mockery::namedMock(...$args); + } +} + +if (! \function_exists('anyArgs')) { + function anyArgs(): AnyArgs + { + return new AnyArgs(); + } +} + +if (! \function_exists('andAnyOtherArgs')) { + function andAnyOtherArgs(): AndAnyOtherArgs + { + return new AndAnyOtherArgs(); + } +} + +if (! \function_exists('andAnyOthers')) { + function andAnyOthers(): AndAnyOtherArgs + { + return new AndAnyOtherArgs(); + } +} diff --git a/vendor/myclabs/deep-copy/LICENSE b/vendor/myclabs/deep-copy/LICENSE new file mode 100644 index 0000000..c3e8350 --- /dev/null +++ b/vendor/myclabs/deep-copy/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 My C-Sense + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/myclabs/deep-copy/README.md b/vendor/myclabs/deep-copy/README.md new file mode 100644 index 0000000..88ae14c --- /dev/null +++ b/vendor/myclabs/deep-copy/README.md @@ -0,0 +1,406 @@ +# DeepCopy + +DeepCopy helps you create deep copies (clones) of your objects. It is designed to handle cycles in the association graph. + +[![Total Downloads](https://poser.pugx.org/myclabs/deep-copy/downloads.svg)](https://packagist.org/packages/myclabs/deep-copy) +[![Integrate](https://github.com/myclabs/DeepCopy/actions/workflows/ci.yaml/badge.svg?branch=1.x)](https://github.com/myclabs/DeepCopy/actions/workflows/ci.yaml) + +## Table of Contents + +1. [How](#how) +1. [Why](#why) + 1. [Using simply `clone`](#using-simply-clone) + 1. [Overriding `__clone()`](#overriding-__clone) + 1. [With `DeepCopy`](#with-deepcopy) +1. [How it works](#how-it-works) +1. [Going further](#going-further) + 1. [Matchers](#matchers) + 1. [Property name](#property-name) + 1. [Specific property](#specific-property) + 1. [Type](#type) + 1. [Filters](#filters) + 1. [`SetNullFilter`](#setnullfilter-filter) + 1. [`KeepFilter`](#keepfilter-filter) + 1. [`DoctrineCollectionFilter`](#doctrinecollectionfilter-filter) + 1. [`DoctrineEmptyCollectionFilter`](#doctrineemptycollectionfilter-filter) + 1. [`DoctrineProxyFilter`](#doctrineproxyfilter-filter) + 1. [`ReplaceFilter`](#replacefilter-type-filter) + 1. [`ShallowCopyFilter`](#shallowcopyfilter-type-filter) +1. [Edge cases](#edge-cases) +1. [Contributing](#contributing) + 1. [Tests](#tests) + + +## How? + +Install with Composer: + +``` +composer require myclabs/deep-copy +``` + +Use it: + +```php +use DeepCopy\DeepCopy; + +$copier = new DeepCopy(); +$myCopy = $copier->copy($myObject); +``` + + +## Why? + +- How do you create copies of your objects? + +```php +$myCopy = clone $myObject; +``` + +- How do you create **deep** copies of your objects (i.e. copying also all the objects referenced in the properties)? + +You use [`__clone()`](http://www.php.net/manual/en/language.oop5.cloning.php#object.clone) and implement the behavior +yourself. + +- But how do you handle **cycles** in the association graph? + +Now you're in for a big mess :( + +![association graph](doc/graph.png) + + +### Using simply `clone` + +![Using clone](doc/clone.png) + + +### Overriding `__clone()` + +![Overriding __clone](doc/deep-clone.png) + + +### With `DeepCopy` + +![With DeepCopy](doc/deep-copy.png) + + +## How it works + +DeepCopy recursively traverses all the object's properties and clones them. To avoid cloning the same object twice it +keeps a hash map of all instances and thus preserves the object graph. + +To use it: + +```php +use function DeepCopy\deep_copy; + +$copy = deep_copy($var); +``` + +Alternatively, you can create your own `DeepCopy` instance to configure it differently for example: + +```php +use DeepCopy\DeepCopy; + +$copier = new DeepCopy(true); + +$copy = $copier->copy($var); +``` + +You may want to roll your own deep copy function: + +```php +namespace Acme; + +use DeepCopy\DeepCopy; + +function deep_copy($var) +{ + static $copier = null; + + if (null === $copier) { + $copier = new DeepCopy(true); + } + + return $copier->copy($var); +} +``` + + +## Going further + +You can add filters to customize the copy process. + +The method to add a filter is `DeepCopy\DeepCopy::addFilter($filter, $matcher)`, +with `$filter` implementing `DeepCopy\Filter\Filter` +and `$matcher` implementing `DeepCopy\Matcher\Matcher`. + +We provide some generic filters and matchers. + + +### Matchers + + - `DeepCopy\Matcher` applies on a object attribute. + - `DeepCopy\TypeMatcher` applies on any element found in graph, including array elements. + + +#### Property name + +The `PropertyNameMatcher` will match a property by its name: + +```php +use DeepCopy\Matcher\PropertyNameMatcher; + +// Will apply a filter to any property of any objects named "id" +$matcher = new PropertyNameMatcher('id'); +``` + + +#### Specific property + +The `PropertyMatcher` will match a specific property of a specific class: + +```php +use DeepCopy\Matcher\PropertyMatcher; + +// Will apply a filter to the property "id" of any objects of the class "MyClass" +$matcher = new PropertyMatcher('MyClass', 'id'); +``` + + +#### Type + +The `TypeMatcher` will match any element by its type (instance of a class or any value that could be parameter of +[gettype()](http://php.net/manual/en/function.gettype.php) function): + +```php +use DeepCopy\TypeMatcher\TypeMatcher; + +// Will apply a filter to any object that is an instance of Doctrine\Common\Collections\Collection +$matcher = new TypeMatcher('Doctrine\Common\Collections\Collection'); +``` + + +### Filters + +- `DeepCopy\Filter` applies a transformation to the object attribute matched by `DeepCopy\Matcher` +- `DeepCopy\TypeFilter` applies a transformation to any element matched by `DeepCopy\TypeMatcher` + +By design, matching a filter will stop the chain of filters (i.e. the next ones will not be applied). +Using the ([`ChainableFilter`](#chainablefilter-filter)) won't stop the chain of filters. + + +#### `SetNullFilter` (filter) + +Let's say for example that you are copying a database record (or a Doctrine entity), so you want the copy not to have +any ID: + +```php +use DeepCopy\DeepCopy; +use DeepCopy\Filter\SetNullFilter; +use DeepCopy\Matcher\PropertyNameMatcher; + +$object = MyClass::load(123); +echo $object->id; // 123 + +$copier = new DeepCopy(); +$copier->addFilter(new SetNullFilter(), new PropertyNameMatcher('id')); + +$copy = $copier->copy($object); + +echo $copy->id; // null +``` + + +#### `KeepFilter` (filter) + +If you want a property to remain untouched (for example, an association to an object): + +```php +use DeepCopy\DeepCopy; +use DeepCopy\Filter\KeepFilter; +use DeepCopy\Matcher\PropertyMatcher; + +$copier = new DeepCopy(); +$copier->addFilter(new KeepFilter(), new PropertyMatcher('MyClass', 'category')); + +$copy = $copier->copy($object); +// $copy->category has not been touched +``` + + +#### `ChainableFilter` (filter) + +If you use cloning on proxy classes, you might want to apply two filters for: +1. loading the data +2. applying a transformation + +You can use the `ChainableFilter` as a decorator of the proxy loader filter, which won't stop the chain of filters (i.e. +the next ones may be applied). + + +```php +use DeepCopy\DeepCopy; +use DeepCopy\Filter\ChainableFilter; +use DeepCopy\Filter\Doctrine\DoctrineProxyFilter; +use DeepCopy\Filter\SetNullFilter; +use DeepCopy\Matcher\Doctrine\DoctrineProxyMatcher; +use DeepCopy\Matcher\PropertyNameMatcher; + +$copier = new DeepCopy(); +$copier->addFilter(new ChainableFilter(new DoctrineProxyFilter()), new DoctrineProxyMatcher()); +$copier->addFilter(new SetNullFilter(), new PropertyNameMatcher('id')); + +$copy = $copier->copy($object); + +echo $copy->id; // null +``` + + +#### `DoctrineCollectionFilter` (filter) + +If you use Doctrine and want to copy an entity, you will need to use the `DoctrineCollectionFilter`: + +```php +use DeepCopy\DeepCopy; +use DeepCopy\Filter\Doctrine\DoctrineCollectionFilter; +use DeepCopy\Matcher\PropertyTypeMatcher; + +$copier = new DeepCopy(); +$copier->addFilter(new DoctrineCollectionFilter(), new PropertyTypeMatcher('Doctrine\Common\Collections\Collection')); + +$copy = $copier->copy($object); +``` + + +#### `DoctrineEmptyCollectionFilter` (filter) + +If you use Doctrine and want to copy an entity who contains a `Collection` that you want to be reset, you can use the +`DoctrineEmptyCollectionFilter` + +```php +use DeepCopy\DeepCopy; +use DeepCopy\Filter\Doctrine\DoctrineEmptyCollectionFilter; +use DeepCopy\Matcher\PropertyMatcher; + +$copier = new DeepCopy(); +$copier->addFilter(new DoctrineEmptyCollectionFilter(), new PropertyMatcher('MyClass', 'myProperty')); + +$copy = $copier->copy($object); + +// $copy->myProperty will return an empty collection +``` + + +#### `DoctrineProxyFilter` (filter) + +If you use Doctrine and use cloning on lazy loaded entities, you might encounter errors mentioning missing fields on a +Doctrine proxy class (...\\\_\_CG\_\_\Proxy). +You can use the `DoctrineProxyFilter` to load the actual entity behind the Doctrine proxy class. +**Make sure, though, to put this as one of your very first filters in the filter chain so that the entity is loaded +before other filters are applied!** +We recommend to decorate the `DoctrineProxyFilter` with the `ChainableFilter` to allow applying other filters to the +cloned lazy loaded entities. + +```php +use DeepCopy\DeepCopy; +use DeepCopy\Filter\Doctrine\DoctrineProxyFilter; +use DeepCopy\Matcher\Doctrine\DoctrineProxyMatcher; + +$copier = new DeepCopy(); +$copier->addFilter(new ChainableFilter(new DoctrineProxyFilter()), new DoctrineProxyMatcher()); + +$copy = $copier->copy($object); + +// $copy should now contain a clone of all entities, including those that were not yet fully loaded. +``` + + +#### `ReplaceFilter` (type filter) + +1. If you want to replace the value of a property: + +```php +use DeepCopy\DeepCopy; +use DeepCopy\Filter\ReplaceFilter; +use DeepCopy\Matcher\PropertyMatcher; + +$copier = new DeepCopy(); +$callback = function ($currentValue) { + return $currentValue . ' (copy)' +}; +$copier->addFilter(new ReplaceFilter($callback), new PropertyMatcher('MyClass', 'title')); + +$copy = $copier->copy($object); + +// $copy->title will contain the data returned by the callback, e.g. 'The title (copy)' +``` + +2. If you want to replace whole element: + +```php +use DeepCopy\DeepCopy; +use DeepCopy\TypeFilter\ReplaceFilter; +use DeepCopy\TypeMatcher\TypeMatcher; + +$copier = new DeepCopy(); +$callback = function (MyClass $myClass) { + return get_class($myClass); +}; +$copier->addTypeFilter(new ReplaceFilter($callback), new TypeMatcher('MyClass')); + +$copy = $copier->copy([new MyClass, 'some string', new MyClass]); + +// $copy will contain ['MyClass', 'some string', 'MyClass'] +``` + + +The `$callback` parameter of the `ReplaceFilter` constructor accepts any PHP callable. + + +#### `ShallowCopyFilter` (type filter) + +Stop *DeepCopy* from recursively copying element, using standard `clone` instead: + +```php +use DeepCopy\DeepCopy; +use DeepCopy\TypeFilter\ShallowCopyFilter; +use DeepCopy\TypeMatcher\TypeMatcher; +use Mockery as m; + +$this->deepCopy = new DeepCopy(); +$this->deepCopy->addTypeFilter( + new ShallowCopyFilter, + new TypeMatcher(m\MockInterface::class) +); + +$myServiceWithMocks = new MyService(m::mock(MyDependency1::class), m::mock(MyDependency2::class)); +// All mocks will be just cloned, not deep copied +``` + + +## Edge cases + +The following structures cannot be deep-copied with PHP Reflection. As a result they are shallow cloned and filters are +not applied. There is two ways for you to handle them: + +- Implement your own `__clone()` method +- Use a filter with a type matcher + + +## Contributing + +DeepCopy is distributed under the MIT license. + + +### Tests + +Running the tests is simple: + +```php +vendor/bin/phpunit +``` + +### Support + +Get professional support via [the Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-myclabs-deep-copy?utm_source=packagist-myclabs-deep-copy&utm_medium=referral&utm_campaign=readme). diff --git a/vendor/myclabs/deep-copy/composer.json b/vendor/myclabs/deep-copy/composer.json new file mode 100644 index 0000000..f115fff --- /dev/null +++ b/vendor/myclabs/deep-copy/composer.json @@ -0,0 +1,43 @@ +{ + "name": "myclabs/deep-copy", + "description": "Create deep copies (clones) of your objects", + "license": "MIT", + "type": "library", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "autoload-dev": { + "psr-4": { + "DeepCopyTest\\": "tests/DeepCopyTest/", + "DeepCopy\\": "fixtures/" + } + }, + "config": { + "sort-packages": true + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php b/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php new file mode 100644 index 0000000..a944697 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php @@ -0,0 +1,328 @@ + Filter, 'matcher' => Matcher] pairs. + */ + private $filters = []; + + /** + * Type Filters to apply. + * + * @var array Array of ['filter' => Filter, 'matcher' => Matcher] pairs. + */ + private $typeFilters = []; + + /** + * @var bool + */ + private $skipUncloneable = false; + + /** + * @var bool + */ + private $useCloneMethod; + + /** + * @param bool $useCloneMethod If set to true, when an object implements the __clone() function, it will be used + * instead of the regular deep cloning. + */ + public function __construct($useCloneMethod = false) + { + $this->useCloneMethod = $useCloneMethod; + + $this->addTypeFilter(new ArrayObjectFilter($this), new TypeMatcher(ArrayObject::class)); + $this->addTypeFilter(new DateIntervalFilter(), new TypeMatcher(DateInterval::class)); + $this->addTypeFilter(new DatePeriodFilter(), new TypeMatcher(DatePeriod::class)); + $this->addTypeFilter(new SplDoublyLinkedListFilter($this), new TypeMatcher(SplDoublyLinkedList::class)); + } + + /** + * If enabled, will not throw an exception when coming across an uncloneable property. + * + * @param $skipUncloneable + * + * @return $this + */ + public function skipUncloneable($skipUncloneable = true) + { + $this->skipUncloneable = $skipUncloneable; + + return $this; + } + + /** + * Deep copies the given object. + * + * @template TObject + * + * @param TObject $object + * + * @return TObject + */ + public function copy($object) + { + $this->hashMap = []; + + return $this->recursiveCopy($object); + } + + public function addFilter(Filter $filter, Matcher $matcher) + { + $this->filters[] = [ + 'matcher' => $matcher, + 'filter' => $filter, + ]; + } + + public function prependFilter(Filter $filter, Matcher $matcher) + { + array_unshift($this->filters, [ + 'matcher' => $matcher, + 'filter' => $filter, + ]); + } + + public function addTypeFilter(TypeFilter $filter, TypeMatcher $matcher) + { + $this->typeFilters[] = [ + 'matcher' => $matcher, + 'filter' => $filter, + ]; + } + + public function prependTypeFilter(TypeFilter $filter, TypeMatcher $matcher) + { + array_unshift($this->typeFilters, [ + 'matcher' => $matcher, + 'filter' => $filter, + ]); + } + + private function recursiveCopy($var) + { + // Matches Type Filter + if ($filter = $this->getFirstMatchedTypeFilter($this->typeFilters, $var)) { + return $filter->apply($var); + } + + // Resource + if (is_resource($var)) { + return $var; + } + + // Array + if (is_array($var)) { + return $this->copyArray($var); + } + + // Scalar + if (! is_object($var)) { + return $var; + } + + // Enum + if (PHP_VERSION_ID >= 80100 && enum_exists(get_class($var))) { + return $var; + } + + // Object + return $this->copyObject($var); + } + + /** + * Copy an array + * @param array $array + * @return array + */ + private function copyArray(array $array) + { + foreach ($array as $key => $value) { + $array[$key] = $this->recursiveCopy($value); + } + + return $array; + } + + /** + * Copies an object. + * + * @param object $object + * + * @throws CloneException + * + * @return object + */ + private function copyObject($object) + { + $objectHash = spl_object_hash($object); + + if (isset($this->hashMap[$objectHash])) { + return $this->hashMap[$objectHash]; + } + + $reflectedObject = new ReflectionObject($object); + $isCloneable = $reflectedObject->isCloneable(); + + if (false === $isCloneable) { + if ($this->skipUncloneable) { + $this->hashMap[$objectHash] = $object; + + return $object; + } + + throw new CloneException( + sprintf( + 'The class "%s" is not cloneable.', + $reflectedObject->getName() + ) + ); + } + + $newObject = clone $object; + $this->hashMap[$objectHash] = $newObject; + + if ($this->useCloneMethod && $reflectedObject->hasMethod('__clone')) { + return $newObject; + } + + if ($newObject instanceof DateTimeInterface || $newObject instanceof DateTimeZone) { + return $newObject; + } + + foreach (ReflectionHelper::getProperties($reflectedObject) as $property) { + $this->copyObjectProperty($newObject, $property); + } + + return $newObject; + } + + private function copyObjectProperty($object, ReflectionProperty $property) + { + // Ignore static properties + if ($property->isStatic()) { + return; + } + + // Ignore readonly properties + if (method_exists($property, 'isReadOnly') && $property->isReadOnly()) { + return; + } + + // Apply the filters + foreach ($this->filters as $item) { + /** @var Matcher $matcher */ + $matcher = $item['matcher']; + /** @var Filter $filter */ + $filter = $item['filter']; + + if ($matcher->matches($object, $property->getName())) { + $filter->apply( + $object, + $property->getName(), + function ($object) { + return $this->recursiveCopy($object); + } + ); + + if ($filter instanceof ChainableFilter) { + continue; + } + + // If a filter matches, we stop processing this property + return; + } + } + + if (PHP_VERSION_ID < 80100) { + $property->setAccessible(true); + } + + // Ignore uninitialized properties (for PHP >7.4) + if (method_exists($property, 'isInitialized') && !$property->isInitialized($object)) { + return; + } + + $propertyValue = $property->getValue($object); + + // Copy the property + $property->setValue($object, $this->recursiveCopy($propertyValue)); + } + + /** + * Returns first filter that matches variable, `null` if no such filter found. + * + * @param array $filterRecords Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and + * 'matcher' with value of type {@see TypeMatcher} + * @param mixed $var + * + * @return TypeFilter|null + */ + private function getFirstMatchedTypeFilter(array $filterRecords, $var) + { + $matched = $this->first( + $filterRecords, + function (array $record) use ($var) { + /* @var TypeMatcher $matcher */ + $matcher = $record['matcher']; + + return $matcher->matches($var); + } + ); + + return isset($matched) ? $matched['filter'] : null; + } + + /** + * Returns first element that matches predicate, `null` if no such element found. + * + * @param array $elements Array of ['filter' => Filter, 'matcher' => Matcher] pairs. + * @param callable $predicate Predicate arguments are: element. + * + * @return array|null Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and 'matcher' + * with value of type {@see TypeMatcher} or `null`. + */ + private function first(array $elements, callable $predicate) + { + foreach ($elements as $element) { + if (call_user_func($predicate, $element)) { + return $element; + } + } + + return null; + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php b/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php new file mode 100644 index 0000000..c046706 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php @@ -0,0 +1,9 @@ +filter = $filter; + } + + public function apply($object, $property, $objectCopier) + { + $this->filter->apply($object, $property, $objectCopier); + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php new file mode 100644 index 0000000..66e91e5 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php @@ -0,0 +1,35 @@ +setAccessible(true); + } + $oldCollection = $reflectionProperty->getValue($object); + + $newCollection = $oldCollection->map( + function ($item) use ($objectCopier) { + return $objectCopier($item); + } + ); + + $reflectionProperty->setValue($object, $newCollection); + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php new file mode 100644 index 0000000..fa1c034 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php @@ -0,0 +1,30 @@ +setAccessible(true); + } + + $reflectionProperty->setValue($object, new ArrayCollection()); + } +} \ No newline at end of file diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php new file mode 100644 index 0000000..8bee8f7 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php @@ -0,0 +1,22 @@ +__load(); + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php new file mode 100644 index 0000000..85ba18c --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php @@ -0,0 +1,18 @@ +callback = $callable; + } + + /** + * Replaces the object property by the result of the callback called with the object property. + * + * {@inheritdoc} + */ + public function apply($object, $property, $objectCopier) + { + $reflectionProperty = ReflectionHelper::getProperty($object, $property); + if (PHP_VERSION_ID < 80100) { + $reflectionProperty->setAccessible(true); + } + + $value = call_user_func($this->callback, $reflectionProperty->getValue($object)); + + $reflectionProperty->setValue($object, $value); + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php new file mode 100644 index 0000000..6722272 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php @@ -0,0 +1,26 @@ +setAccessible(true); + } + $reflectionProperty->setValue($object, null); + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php new file mode 100644 index 0000000..c5887b1 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php @@ -0,0 +1,22 @@ +class = $class; + $this->property = $property; + } + + /** + * Matches a specific property of a specific class. + * + * {@inheritdoc} + */ + public function matches($object, $property) + { + return ($object instanceof $this->class) && $property == $this->property; + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php new file mode 100644 index 0000000..c8ec0d2 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php @@ -0,0 +1,32 @@ +property = $property; + } + + /** + * Matches a property by its name. + * + * {@inheritdoc} + */ + public function matches($object, $property) + { + return $property == $this->property; + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php new file mode 100644 index 0000000..7980bfa --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php @@ -0,0 +1,54 @@ +propertyType = $propertyType; + } + + /** + * {@inheritdoc} + */ + public function matches($object, $property) + { + try { + $reflectionProperty = ReflectionHelper::getProperty($object, $property); + } catch (ReflectionException $exception) { + return false; + } + + if (PHP_VERSION_ID < 80100) { + $reflectionProperty->setAccessible(true); + } + + // Uninitialized properties (for PHP >7.4) + if (method_exists($reflectionProperty, 'isInitialized') && !$reflectionProperty->isInitialized($object)) { + // null instanceof $this->propertyType + return false; + } + + return $reflectionProperty->getValue($object) instanceof $this->propertyType; + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php b/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php new file mode 100644 index 0000000..742410c --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php @@ -0,0 +1,78 @@ +getProperties() does not return private properties from ancestor classes. + * + * @author muratyaman@gmail.com + * @see http://php.net/manual/en/reflectionclass.getproperties.php + * + * @param ReflectionClass $ref + * + * @return ReflectionProperty[] + */ + public static function getProperties(ReflectionClass $ref) + { + $props = $ref->getProperties(); + $propsArr = array(); + + foreach ($props as $prop) { + $propertyName = $prop->getName(); + $propsArr[$propertyName] = $prop; + } + + if ($parentClass = $ref->getParentClass()) { + $parentPropsArr = self::getProperties($parentClass); + foreach ($propsArr as $key => $property) { + $parentPropsArr[$key] = $property; + } + + return $parentPropsArr; + } + + return $propsArr; + } + + /** + * Retrieves property by name from object and all its ancestors. + * + * @param object|string $object + * @param string $name + * + * @throws PropertyException + * @throws ReflectionException + * + * @return ReflectionProperty + */ + public static function getProperty($object, $name) + { + $reflection = is_object($object) ? new ReflectionObject($object) : new ReflectionClass($object); + + if ($reflection->hasProperty($name)) { + return $reflection->getProperty($name); + } + + if ($parentClass = $reflection->getParentClass()) { + return self::getProperty($parentClass->getName(), $name); + } + + throw new PropertyException( + sprintf( + 'The class "%s" doesn\'t have a property with the given name: "%s".', + is_object($object) ? get_class($object) : $object, + $name + ) + ); + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php new file mode 100644 index 0000000..becd1cf --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php @@ -0,0 +1,33 @@ + $propertyValue) { + $copy->{$propertyName} = $propertyValue; + } + + return $copy; + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DatePeriodFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DatePeriodFilter.php new file mode 100644 index 0000000..6bd2f7e --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DatePeriodFilter.php @@ -0,0 +1,42 @@ += 80200 && $element->include_end_date) { + $options |= DatePeriod::INCLUDE_END_DATE; + } + if (!$element->include_start_date) { + $options |= DatePeriod::EXCLUDE_START_DATE; + } + + if ($element->getEndDate()) { + return new DatePeriod($element->getStartDate(), $element->getDateInterval(), $element->getEndDate(), $options); + } + + if (PHP_VERSION_ID >= 70217) { + $recurrences = $element->getRecurrences(); + } else { + $recurrences = $element->recurrences - $element->include_start_date; + } + + return new DatePeriod($element->getStartDate(), $element->getDateInterval(), $recurrences, $options); + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php new file mode 100644 index 0000000..164f8b8 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php @@ -0,0 +1,30 @@ +callback = $callable; + } + + /** + * {@inheritdoc} + */ + public function apply($element) + { + return call_user_func($this->callback, $element); + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php new file mode 100644 index 0000000..a5fbd7a --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php @@ -0,0 +1,17 @@ +copier = $copier; + } + + /** + * {@inheritdoc} + */ + public function apply($arrayObject) + { + $clone = clone $arrayObject; + foreach ($arrayObject->getArrayCopy() as $k => $v) { + $clone->offsetSet($k, $this->copier->copy($v)); + } + + return $clone; + } +} + diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php new file mode 100644 index 0000000..c5644cf --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php @@ -0,0 +1,10 @@ +copier = $copier; + } + + /** + * {@inheritdoc} + */ + public function apply($element) + { + $newElement = clone $element; + + $copy = $this->createCopyClosure(); + + return $copy($newElement); + } + + private function createCopyClosure() + { + $copier = $this->copier; + + $copy = function (SplDoublyLinkedList $list) use ($copier) { + // Replace each element in the list with a deep copy of itself + for ($i = 1; $i <= $list->count(); $i++) { + $copy = $copier->recursiveCopy($list->shift()); + + $list->push($copy); + } + + return $list; + }; + + return Closure::bind($copy, null, DeepCopy::class); + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php new file mode 100644 index 0000000..5785a7d --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php @@ -0,0 +1,13 @@ +type = $type; + } + + /** + * @param mixed $element + * + * @return boolean + */ + public function matches($element) + { + return is_object($element) ? is_a($element, $this->type) : gettype($element) === $this->type; + } +} diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php b/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php new file mode 100644 index 0000000..55dcc92 --- /dev/null +++ b/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php @@ -0,0 +1,20 @@ +copy($value); + } +} diff --git a/vendor/nikic/php-parser/LICENSE b/vendor/nikic/php-parser/LICENSE new file mode 100644 index 0000000..2e56718 --- /dev/null +++ b/vendor/nikic/php-parser/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2011, Nikita Popov +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/nikic/php-parser/README.md b/vendor/nikic/php-parser/README.md new file mode 100644 index 0000000..edb3ed3 --- /dev/null +++ b/vendor/nikic/php-parser/README.md @@ -0,0 +1,233 @@ +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 parser written in PHP. Its purpose is to simplify static code analysis and +manipulation. + +[**Documentation for version 5.x**][doc_master] (current; for running on PHP >= 7.4; for parsing PHP 7.0 to PHP 8.4, with limited support for parsing PHP 5.x). + +[Documentation for version 4.x][doc_4_x] (supported; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.3). + +Features +-------- + +The main features provided by this library are: + + * Parsing PHP 7, and PHP 8 code into an abstract syntax tree (AST). + * Invalid code can be parsed into a partial AST. + * The AST contains accurate location information. + * Dumping the AST in human-readable form. + * Converting an AST back to PHP code. + * Formatting can be preserved for partially changed ASTs. + * Infrastructure to traverse and modify ASTs. + * Resolution of namespaced names. + * Evaluation of constant expressions. + * Builders to simplify AST construction for code generation. + * Converting an AST into JSON and back. + +Quick Start +----------- + +Install the library using [composer](https://getcomposer.org): + + php composer.phar require nikic/php-parser + +Parse some PHP code into an AST and dump the result in human-readable form: + +```php +createForNewestSupportedVersion(); +try { + $ast = $parser->parse($code); +} catch (Error $error) { + echo "Parse error: {$error->getMessage()}\n"; + return; +} + +$dumper = new NodeDumper; +echo $dumper->dump($ast) . "\n"; +``` + +This dumps an AST looking something like this: + +``` +array( + 0: Stmt_Function( + attrGroups: array( + ) + byRef: false + name: Identifier( + name: test + ) + params: array( + 0: Param( + attrGroups: array( + ) + flags: 0 + type: null + byRef: false + variadic: false + var: Expr_Variable( + name: foo + ) + default: null + ) + ) + returnType: null + stmts: array( + 0: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: var_dump + ) + args: array( + 0: Arg( + name: null + value: Expr_Variable( + name: foo + ) + byRef: false + unpack: false + ) + ) + ) + ) + ) + ) +) +``` + +Let's traverse the AST and perform some kind of modification. For example, drop all function bodies: + +```php +use PhpParser\Node; +use PhpParser\Node\Stmt\Function_; +use PhpParser\NodeTraverser; +use PhpParser\NodeVisitorAbstract; + +$traverser = new NodeTraverser(); +$traverser->addVisitor(new class extends NodeVisitorAbstract { + public function enterNode(Node $node) { + if ($node instanceof Function_) { + // Clean out the function body + $node->stmts = []; + } + } +}); + +$ast = $traverser->traverse($ast); +echo $dumper->dump($ast) . "\n"; +``` + +This gives us an AST where the `Function_::$stmts` are empty: + +``` +array( + 0: Stmt_Function( + attrGroups: array( + ) + byRef: false + name: Identifier( + name: test + ) + params: array( + 0: Param( + attrGroups: array( + ) + type: null + byRef: false + variadic: false + var: Expr_Variable( + name: foo + ) + default: null + ) + ) + returnType: null + stmts: array( + ) + ) +) +``` + +Finally, we can convert the new AST back to PHP code: + +```php +use PhpParser\PrettyPrinter; + +$prettyPrinter = new PrettyPrinter\Standard; +echo $prettyPrinter->prettyPrintFile($ast); +``` + +This gives us our original code, minus the `var_dump()` call inside the function: + +```php +createForVersion($attributes['version']); +$dumper = new PhpParser\NodeDumper([ + 'dumpComments' => true, + 'dumpPositions' => $attributes['with-positions'], +]); +$prettyPrinter = new PhpParser\PrettyPrinter\Standard; + +$traverser = new PhpParser\NodeTraverser(); +$traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver); + +foreach ($files as $file) { + if ($file === '-') { + $code = file_get_contents('php://stdin'); + fwrite(STDERR, "====> Stdin:\n"); + } else if (strpos($file, ' Code $code\n"); + } else { + if (!file_exists($file)) { + fwrite(STDERR, "File $file does not exist.\n"); + exit(1); + } + + $code = file_get_contents($file); + fwrite(STDERR, "====> File $file:\n"); + } + + if ($attributes['with-recovery']) { + $errorHandler = new PhpParser\ErrorHandler\Collecting; + $stmts = $parser->parse($code, $errorHandler); + foreach ($errorHandler->getErrors() as $error) { + $message = formatErrorMessage($error, $code, $attributes['with-column-info']); + fwrite(STDERR, $message . "\n"); + } + if (null === $stmts) { + continue; + } + } else { + try { + $stmts = $parser->parse($code); + } catch (PhpParser\Error $error) { + $message = formatErrorMessage($error, $code, $attributes['with-column-info']); + fwrite(STDERR, $message . "\n"); + exit(1); + } + } + + foreach ($operations as $operation) { + if ('dump' === $operation) { + fwrite(STDERR, "==> Node dump:\n"); + echo $dumper->dump($stmts, $code), "\n"; + } elseif ('pretty-print' === $operation) { + fwrite(STDERR, "==> Pretty print:\n"); + echo $prettyPrinter->prettyPrintFile($stmts), "\n"; + } elseif ('json-dump' === $operation) { + fwrite(STDERR, "==> JSON dump:\n"); + echo json_encode($stmts, JSON_PRETTY_PRINT), "\n"; + } elseif ('var-dump' === $operation) { + fwrite(STDERR, "==> var_dump():\n"); + var_dump($stmts); + } elseif ('resolve-names' === $operation) { + fwrite(STDERR, "==> Resolved names.\n"); + $stmts = $traverser->traverse($stmts); + } + } +} + +function formatErrorMessage(PhpParser\Error $e, $code, $withColumnInfo) { + if ($withColumnInfo && $e->hasColumnInfo()) { + return $e->getMessageWithColumnInfo($code); + } else { + return $e->getMessage(); + } +} + +function showHelp($error = '') { + if ($error) { + fwrite(STDERR, $error . "\n\n"); + } + fwrite($error ? STDERR : STDOUT, <<<'OUTPUT' +Usage: php-parse [operations] file1.php [file2.php ...] + or: php-parse [operations] " false, + 'with-positions' => false, + 'with-recovery' => false, + 'version' => PhpParser\PhpVersion::getNewestSupported(), + ]; + + array_shift($args); + $parseOptions = true; + foreach ($args as $arg) { + if (!$parseOptions) { + $files[] = $arg; + continue; + } + + switch ($arg) { + case '--dump': + case '-d': + $operations[] = 'dump'; + break; + case '--pretty-print': + case '-p': + $operations[] = 'pretty-print'; + break; + case '--json-dump': + case '-j': + $operations[] = 'json-dump'; + break; + case '--var-dump': + $operations[] = 'var-dump'; + break; + case '--resolve-names': + case '-N': + $operations[] = 'resolve-names'; + break; + case '--with-column-info': + case '-c': + $attributes['with-column-info'] = true; + break; + case '--with-positions': + case '-P': + $attributes['with-positions'] = true; + break; + case '--with-recovery': + case '-r': + $attributes['with-recovery'] = true; + break; + case '--help': + case '-h': + showHelp(); + break; + case '--': + $parseOptions = false; + break; + default: + if (preg_match('/^--version=(.*)$/', $arg, $matches)) { + $attributes['version'] = PhpParser\PhpVersion::fromString($matches[1]); + } elseif ($arg[0] === '-' && \strlen($arg[0]) > 1) { + showHelp("Invalid operation $arg."); + } else { + $files[] = $arg; + } + } + } + + return [$operations, $files, $attributes]; +} diff --git a/vendor/nikic/php-parser/composer.json b/vendor/nikic/php-parser/composer.json new file mode 100644 index 0000000..7a8591d --- /dev/null +++ b/vendor/nikic/php-parser/composer.json @@ -0,0 +1,43 @@ +{ + "name": "nikic/php-parser", + "type": "library", + "description": "A PHP parser written in PHP", + "keywords": [ + "php", + "parser" + ], + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Nikita Popov" + } + ], + "require": { + "php": ">=7.4", + "ext-tokenizer": "*", + "ext-json": "*", + "ext-ctype": "*" + }, + "require-dev": { + "phpunit/phpunit": "^9.0", + "ircmaxell/php-yacc": "^0.0.7" + }, + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "autoload-dev": { + "psr-4": { + "PhpParser\\": "test/PhpParser/" + } + }, + "bin": [ + "bin/php-parse" + ] +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder.php b/vendor/nikic/php-parser/lib/PhpParser/Builder.php new file mode 100644 index 0000000..d6aa124 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder.php @@ -0,0 +1,12 @@ + */ + protected array $attributes = []; + /** @var list */ + protected array $constants = []; + + /** @var list */ + protected array $attributeGroups = []; + /** @var Identifier|Node\Name|Node\ComplexType|null */ + protected ?Node $type = null; + + /** + * Creates a class constant builder + * + * @param string|Identifier $name Name + * @param Node\Expr|bool|null|int|float|string|array|\UnitEnum $value Value + */ + public function __construct($name, $value) { + $this->constants = [new Const_($name, BuilderHelpers::normalizeValue($value))]; + } + + /** + * Add another constant to const group + * + * @param string|Identifier $name Name + * @param Node\Expr|bool|null|int|float|string|array|\UnitEnum $value Value + * + * @return $this The builder instance (for fluid interface) + */ + public function addConst($name, $value) { + $this->constants[] = new Const_($name, BuilderHelpers::normalizeValue($value)); + + return $this; + } + + /** + * Makes the constant public. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePublic() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); + + return $this; + } + + /** + * Makes the constant protected. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeProtected() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); + + return $this; + } + + /** + * Makes the constant private. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePrivate() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); + + return $this; + } + + /** + * Makes the constant final. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeFinal() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); + + return $this; + } + + /** + * Sets doc comment for the constant. + * + * @param PhpParser\Comment\Doc|string $docComment Doc comment to set + * + * @return $this The builder instance (for fluid interface) + */ + public function setDocComment($docComment) { + $this->attributes = [ + 'comments' => [BuilderHelpers::normalizeDocComment($docComment)] + ]; + + return $this; + } + + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + + /** + * Sets the constant type. + * + * @param string|Node\Name|Identifier|Node\ComplexType $type + * + * @return $this + */ + public function setType($type) { + $this->type = BuilderHelpers::normalizeType($type); + + return $this; + } + + /** + * Returns the built class node. + * + * @return Stmt\ClassConst The built constant node + */ + public function getNode(): PhpParser\Node { + return new Stmt\ClassConst( + $this->constants, + $this->flags, + $this->attributes, + $this->attributeGroups, + $this->type + ); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php new file mode 100644 index 0000000..6f39431 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php @@ -0,0 +1,151 @@ + */ + protected array $implements = []; + protected int $flags = 0; + /** @var list */ + protected array $uses = []; + /** @var list */ + protected array $constants = []; + /** @var list */ + protected array $properties = []; + /** @var list */ + protected array $methods = []; + /** @var list */ + protected array $attributeGroups = []; + + /** + * Creates a class builder. + * + * @param string $name Name of the class + */ + public function __construct(string $name) { + $this->name = $name; + } + + /** + * Extends a class. + * + * @param Name|string $class Name of class to extend + * + * @return $this The builder instance (for fluid interface) + */ + public function extend($class) { + $this->extends = BuilderHelpers::normalizeName($class); + + return $this; + } + + /** + * Implements one or more interfaces. + * + * @param Name|string ...$interfaces Names of interfaces to implement + * + * @return $this The builder instance (for fluid interface) + */ + public function implement(...$interfaces) { + foreach ($interfaces as $interface) { + $this->implements[] = BuilderHelpers::normalizeName($interface); + } + + return $this; + } + + /** + * Makes the class abstract. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeAbstract() { + $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::ABSTRACT); + + return $this; + } + + /** + * Makes the class final. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeFinal() { + $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::FINAL); + + return $this; + } + + /** + * Makes the class readonly. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeReadonly() { + $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::READONLY); + + return $this; + } + + /** + * Adds a statement. + * + * @param Stmt|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addStmt($stmt) { + $stmt = BuilderHelpers::normalizeNode($stmt); + + if ($stmt instanceof Stmt\Property) { + $this->properties[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassMethod) { + $this->methods[] = $stmt; + } elseif ($stmt instanceof Stmt\TraitUse) { + $this->uses[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassConst) { + $this->constants[] = $stmt; + } else { + throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); + } + + return $this; + } + + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + + /** + * Returns the built class node. + * + * @return Stmt\Class_ The built class node + */ + public function getNode(): PhpParser\Node { + return new Stmt\Class_($this->name, [ + 'flags' => $this->flags, + 'extends' => $this->extends, + 'implements' => $this->implements, + 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), + 'attrGroups' => $this->attributeGroups, + ], $this->attributes); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php new file mode 100644 index 0000000..488b721 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php @@ -0,0 +1,50 @@ + */ + protected array $attributes = []; + + /** + * Adds a statement. + * + * @param PhpParser\Node\Stmt|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ + abstract public function addStmt($stmt); + + /** + * Adds multiple statements. + * + * @param (PhpParser\Node\Stmt|PhpParser\Builder)[] $stmts The statements to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addStmts(array $stmts) { + foreach ($stmts as $stmt) { + $this->addStmt($stmt); + } + + return $this; + } + + /** + * Sets doc comment for the declaration. + * + * @param PhpParser\Comment\Doc|string $docComment Doc comment to set + * + * @return $this The builder instance (for fluid interface) + */ + public function setDocComment($docComment) { + $this->attributes['comments'] = [ + BuilderHelpers::normalizeDocComment($docComment) + ]; + + return $this; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php new file mode 100644 index 0000000..c766321 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php @@ -0,0 +1,86 @@ + */ + protected array $attributes = []; + + /** @var list */ + protected array $attributeGroups = []; + + /** + * Creates an enum case builder. + * + * @param string|Identifier $name Name + */ + public function __construct($name) { + $this->name = $name; + } + + /** + * Sets the value. + * + * @param Node\Expr|string|int $value + * + * @return $this + */ + public function setValue($value) { + $this->value = BuilderHelpers::normalizeValue($value); + + return $this; + } + + /** + * Sets doc comment for the constant. + * + * @param PhpParser\Comment\Doc|string $docComment Doc comment to set + * + * @return $this The builder instance (for fluid interface) + */ + public function setDocComment($docComment) { + $this->attributes = [ + 'comments' => [BuilderHelpers::normalizeDocComment($docComment)] + ]; + + return $this; + } + + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + + /** + * Returns the built enum case node. + * + * @return Stmt\EnumCase The built constant node + */ + public function getNode(): PhpParser\Node { + return new Stmt\EnumCase( + $this->name, + $this->value, + $this->attributeGroups, + $this->attributes + ); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php new file mode 100644 index 0000000..c00df03 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php @@ -0,0 +1,116 @@ + */ + protected array $implements = []; + /** @var list */ + protected array $uses = []; + /** @var list */ + protected array $enumCases = []; + /** @var list */ + protected array $constants = []; + /** @var list */ + protected array $methods = []; + /** @var list */ + protected array $attributeGroups = []; + + /** + * Creates an enum builder. + * + * @param string $name Name of the enum + */ + public function __construct(string $name) { + $this->name = $name; + } + + /** + * Sets the scalar type. + * + * @param string|Identifier $scalarType + * + * @return $this + */ + public function setScalarType($scalarType) { + $this->scalarType = BuilderHelpers::normalizeType($scalarType); + + return $this; + } + + /** + * Implements one or more interfaces. + * + * @param Name|string ...$interfaces Names of interfaces to implement + * + * @return $this The builder instance (for fluid interface) + */ + public function implement(...$interfaces) { + foreach ($interfaces as $interface) { + $this->implements[] = BuilderHelpers::normalizeName($interface); + } + + return $this; + } + + /** + * Adds a statement. + * + * @param Stmt|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addStmt($stmt) { + $stmt = BuilderHelpers::normalizeNode($stmt); + + if ($stmt instanceof Stmt\EnumCase) { + $this->enumCases[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassMethod) { + $this->methods[] = $stmt; + } elseif ($stmt instanceof Stmt\TraitUse) { + $this->uses[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassConst) { + $this->constants[] = $stmt; + } else { + throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); + } + + return $this; + } + + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + + /** + * Returns the built class node. + * + * @return Stmt\Enum_ The built enum node + */ + public function getNode(): PhpParser\Node { + return new Stmt\Enum_($this->name, [ + 'scalarType' => $this->scalarType, + 'implements' => $this->implements, + 'stmts' => array_merge($this->uses, $this->enumCases, $this->constants, $this->methods), + 'attrGroups' => $this->attributeGroups, + ], $this->attributes); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php new file mode 100644 index 0000000..ff79cb6 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php @@ -0,0 +1,73 @@ +returnByRef = true; + + return $this; + } + + /** + * Adds a parameter. + * + * @param Node\Param|Param $param The parameter to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addParam($param) { + $param = BuilderHelpers::normalizeNode($param); + + if (!$param instanceof Node\Param) { + throw new \LogicException(sprintf('Expected parameter node, got "%s"', $param->getType())); + } + + $this->params[] = $param; + + return $this; + } + + /** + * Adds multiple parameters. + * + * @param (Node\Param|Param)[] $params The parameters to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addParams(array $params) { + foreach ($params as $param) { + $this->addParam($param); + } + + return $this; + } + + /** + * Sets the return type for PHP 7. + * + * @param string|Node\Name|Node\Identifier|Node\ComplexType $type + * + * @return $this The builder instance (for fluid interface) + */ + public function setReturnType($type) { + $this->returnType = BuilderHelpers::normalizeType($type); + + return $this; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php new file mode 100644 index 0000000..48f5f69 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php @@ -0,0 +1,67 @@ + */ + protected array $stmts = []; + + /** @var list */ + protected array $attributeGroups = []; + + /** + * Creates a function builder. + * + * @param string $name Name of the function + */ + public function __construct(string $name) { + $this->name = $name; + } + + /** + * Adds a statement. + * + * @param Node|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addStmt($stmt) { + $this->stmts[] = BuilderHelpers::normalizeStmt($stmt); + + return $this; + } + + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + + /** + * Returns the built function node. + * + * @return Stmt\Function_ The built function node + */ + public function getNode(): Node { + return new Stmt\Function_($this->name, [ + 'byRef' => $this->returnByRef, + 'params' => $this->params, + 'returnType' => $this->returnType, + 'stmts' => $this->stmts, + 'attrGroups' => $this->attributeGroups, + ], $this->attributes); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php new file mode 100644 index 0000000..13dd3f7 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php @@ -0,0 +1,94 @@ + */ + protected array $extends = []; + /** @var list */ + protected array $constants = []; + /** @var list */ + protected array $methods = []; + /** @var list */ + protected array $attributeGroups = []; + + /** + * Creates an interface builder. + * + * @param string $name Name of the interface + */ + public function __construct(string $name) { + $this->name = $name; + } + + /** + * Extends one or more interfaces. + * + * @param Name|string ...$interfaces Names of interfaces to extend + * + * @return $this The builder instance (for fluid interface) + */ + public function extend(...$interfaces) { + foreach ($interfaces as $interface) { + $this->extends[] = BuilderHelpers::normalizeName($interface); + } + + return $this; + } + + /** + * Adds a statement. + * + * @param Stmt|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addStmt($stmt) { + $stmt = BuilderHelpers::normalizeNode($stmt); + + if ($stmt instanceof Stmt\ClassConst) { + $this->constants[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassMethod) { + // we erase all statements in the body of an interface method + $stmt->stmts = null; + $this->methods[] = $stmt; + } else { + throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); + } + + return $this; + } + + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + + /** + * Returns the built interface node. + * + * @return Stmt\Interface_ The built interface node + */ + public function getNode(): PhpParser\Node { + return new Stmt\Interface_($this->name, [ + 'extends' => $this->extends, + 'stmts' => array_merge($this->constants, $this->methods), + 'attrGroups' => $this->attributeGroups, + ], $this->attributes); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php new file mode 100644 index 0000000..8358dbe --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php @@ -0,0 +1,147 @@ +|null */ + protected ?array $stmts = []; + + /** @var list */ + protected array $attributeGroups = []; + + /** + * Creates a method builder. + * + * @param string $name Name of the method + */ + public function __construct(string $name) { + $this->name = $name; + } + + /** + * Makes the method public. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePublic() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); + + return $this; + } + + /** + * Makes the method protected. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeProtected() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); + + return $this; + } + + /** + * Makes the method private. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePrivate() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); + + return $this; + } + + /** + * Makes the method static. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeStatic() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::STATIC); + + return $this; + } + + /** + * Makes the method abstract. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeAbstract() { + if (!empty($this->stmts)) { + throw new \LogicException('Cannot make method with statements abstract'); + } + + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::ABSTRACT); + $this->stmts = null; // abstract methods don't have statements + + return $this; + } + + /** + * Makes the method final. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeFinal() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); + + return $this; + } + + /** + * Adds a statement. + * + * @param Node|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addStmt($stmt) { + if (null === $this->stmts) { + throw new \LogicException('Cannot add statements to an abstract method'); + } + + $this->stmts[] = BuilderHelpers::normalizeStmt($stmt); + + return $this; + } + + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + + /** + * Returns the built method node. + * + * @return Stmt\ClassMethod The built method node + */ + public function getNode(): Node { + return new Stmt\ClassMethod($this->name, [ + 'flags' => $this->flags, + 'byRef' => $this->returnByRef, + 'params' => $this->params, + 'returnType' => $this->returnType, + 'stmts' => $this->stmts, + 'attrGroups' => $this->attributeGroups, + ], $this->attributes); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php new file mode 100644 index 0000000..80fe6f8 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php @@ -0,0 +1,45 @@ +name = null !== $name ? BuilderHelpers::normalizeName($name) : null; + } + + /** + * Adds a statement. + * + * @param Node|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addStmt($stmt) { + $this->stmts[] = BuilderHelpers::normalizeStmt($stmt); + + return $this; + } + + /** + * Returns the built node. + * + * @return Stmt\Namespace_ The built node + */ + public function getNode(): Node { + return new Stmt\Namespace_($this->name, $this->stmts, $this->attributes); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php new file mode 100644 index 0000000..324a32b --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php @@ -0,0 +1,171 @@ + */ + protected array $attributeGroups = []; + + /** + * Creates a parameter builder. + * + * @param string $name Name of the parameter + */ + public function __construct(string $name) { + $this->name = $name; + } + + /** + * Sets default value for the parameter. + * + * @param mixed $value Default value to use + * + * @return $this The builder instance (for fluid interface) + */ + public function setDefault($value) { + $this->default = BuilderHelpers::normalizeValue($value); + + return $this; + } + + /** + * Sets type for the parameter. + * + * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type + * + * @return $this The builder instance (for fluid interface) + */ + public function setType($type) { + $this->type = BuilderHelpers::normalizeType($type); + if ($this->type == 'void') { + throw new \LogicException('Parameter type cannot be void'); + } + + return $this; + } + + /** + * Make the parameter accept the value by reference. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeByRef() { + $this->byRef = true; + + return $this; + } + + /** + * Make the parameter variadic + * + * @return $this The builder instance (for fluid interface) + */ + public function makeVariadic() { + $this->variadic = true; + + return $this; + } + + /** + * Makes the (promoted) parameter public. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePublic() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); + + return $this; + } + + /** + * Makes the (promoted) parameter protected. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeProtected() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); + + return $this; + } + + /** + * Makes the (promoted) parameter private. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePrivate() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); + + return $this; + } + + /** + * Makes the (promoted) parameter readonly. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeReadonly() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::READONLY); + + return $this; + } + + /** + * Gives the promoted property private(set) visibility. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePrivateSet() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE_SET); + + return $this; + } + + /** + * Gives the promoted property protected(set) visibility. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeProtectedSet() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED_SET); + + return $this; + } + + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + + /** + * Returns the built parameter node. + * + * @return Node\Param The built parameter node + */ + public function getNode(): Node { + return new Node\Param( + new Node\Expr\Variable($this->name), + $this->default, $this->type, $this->byRef, $this->variadic, [], $this->flags, $this->attributeGroups + ); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php new file mode 100644 index 0000000..c80fe48 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php @@ -0,0 +1,223 @@ + */ + protected array $attributes = []; + /** @var null|Identifier|Name|ComplexType */ + protected ?Node $type = null; + /** @var list */ + protected array $attributeGroups = []; + /** @var list */ + protected array $hooks = []; + + /** + * Creates a property builder. + * + * @param string $name Name of the property + */ + public function __construct(string $name) { + $this->name = $name; + } + + /** + * Makes the property public. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePublic() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); + + return $this; + } + + /** + * Makes the property protected. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeProtected() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); + + return $this; + } + + /** + * Makes the property private. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePrivate() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); + + return $this; + } + + /** + * Makes the property static. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeStatic() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::STATIC); + + return $this; + } + + /** + * Makes the property readonly. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeReadonly() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::READONLY); + + return $this; + } + + /** + * Makes the property abstract. Requires at least one property hook to be specified as well. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeAbstract() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::ABSTRACT); + + return $this; + } + + /** + * Makes the property final. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeFinal() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); + + return $this; + } + + /** + * Gives the property private(set) visibility. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePrivateSet() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE_SET); + + return $this; + } + + /** + * Gives the property protected(set) visibility. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeProtectedSet() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED_SET); + + return $this; + } + + /** + * Sets default value for the property. + * + * @param mixed $value Default value to use + * + * @return $this The builder instance (for fluid interface) + */ + public function setDefault($value) { + $this->default = BuilderHelpers::normalizeValue($value); + + return $this; + } + + /** + * Sets doc comment for the property. + * + * @param PhpParser\Comment\Doc|string $docComment Doc comment to set + * + * @return $this The builder instance (for fluid interface) + */ + public function setDocComment($docComment) { + $this->attributes = [ + 'comments' => [BuilderHelpers::normalizeDocComment($docComment)] + ]; + + return $this; + } + + /** + * Sets the property type for PHP 7.4+. + * + * @param string|Name|Identifier|ComplexType $type + * + * @return $this + */ + public function setType($type) { + $this->type = BuilderHelpers::normalizeType($type); + + return $this; + } + + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + + /** + * Adds a property hook. + * + * @return $this The builder instance (for fluid interface) + */ + public function addHook(Node\PropertyHook $hook) { + $this->hooks[] = $hook; + + return $this; + } + + /** + * Returns the built class node. + * + * @return Stmt\Property The built property node + */ + public function getNode(): PhpParser\Node { + if ($this->flags & Modifiers::ABSTRACT && !$this->hooks) { + throw new PhpParser\Error('Only hooked properties may be declared abstract'); + } + + return new Stmt\Property( + $this->flags !== 0 ? $this->flags : Modifiers::PUBLIC, + [ + new Node\PropertyItem($this->name, $this->default) + ], + $this->attributes, + $this->type, + $this->attributeGroups, + $this->hooks + ); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php new file mode 100644 index 0000000..cf21c82 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php @@ -0,0 +1,65 @@ +and($trait); + } + } + + /** + * Adds used trait. + * + * @param Node\Name|string $trait Trait name + * + * @return $this The builder instance (for fluid interface) + */ + public function and($trait) { + $this->traits[] = BuilderHelpers::normalizeName($trait); + return $this; + } + + /** + * Adds trait adaptation. + * + * @param Stmt\TraitUseAdaptation|Builder\TraitUseAdaptation $adaptation Trait adaptation + * + * @return $this The builder instance (for fluid interface) + */ + public function with($adaptation) { + $adaptation = BuilderHelpers::normalizeNode($adaptation); + + if (!$adaptation instanceof Stmt\TraitUseAdaptation) { + throw new \LogicException('Adaptation must have type TraitUseAdaptation'); + } + + $this->adaptations[] = $adaptation; + return $this; + } + + /** + * Returns the built node. + * + * @return Node The built node + */ + public function getNode(): Node { + return new Stmt\TraitUse($this->traits, $this->adaptations); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php new file mode 100644 index 0000000..fee0958 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php @@ -0,0 +1,145 @@ +type = self::TYPE_UNDEFINED; + + $this->trait = is_null($trait) ? null : BuilderHelpers::normalizeName($trait); + $this->method = BuilderHelpers::normalizeIdentifier($method); + } + + /** + * Sets alias of method. + * + * @param Node\Identifier|string $alias Alias for adapted method + * + * @return $this The builder instance (for fluid interface) + */ + public function as($alias) { + if ($this->type === self::TYPE_UNDEFINED) { + $this->type = self::TYPE_ALIAS; + } + + if ($this->type !== self::TYPE_ALIAS) { + throw new \LogicException('Cannot set alias for not alias adaptation buider'); + } + + $this->alias = BuilderHelpers::normalizeIdentifier($alias); + return $this; + } + + /** + * Sets adapted method public. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePublic() { + $this->setModifier(Modifiers::PUBLIC); + return $this; + } + + /** + * Sets adapted method protected. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeProtected() { + $this->setModifier(Modifiers::PROTECTED); + return $this; + } + + /** + * Sets adapted method private. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePrivate() { + $this->setModifier(Modifiers::PRIVATE); + return $this; + } + + /** + * Adds overwritten traits. + * + * @param Node\Name|string ...$traits Traits for overwrite + * + * @return $this The builder instance (for fluid interface) + */ + public function insteadof(...$traits) { + if ($this->type === self::TYPE_UNDEFINED) { + if (is_null($this->trait)) { + throw new \LogicException('Precedence adaptation must have trait'); + } + + $this->type = self::TYPE_PRECEDENCE; + } + + if ($this->type !== self::TYPE_PRECEDENCE) { + throw new \LogicException('Cannot add overwritten traits for not precedence adaptation buider'); + } + + foreach ($traits as $trait) { + $this->insteadof[] = BuilderHelpers::normalizeName($trait); + } + + return $this; + } + + protected function setModifier(int $modifier): void { + if ($this->type === self::TYPE_UNDEFINED) { + $this->type = self::TYPE_ALIAS; + } + + if ($this->type !== self::TYPE_ALIAS) { + throw new \LogicException('Cannot set access modifier for not alias adaptation buider'); + } + + if (is_null($this->modifier)) { + $this->modifier = $modifier; + } else { + throw new \LogicException('Multiple access type modifiers are not allowed'); + } + } + + /** + * Returns the built node. + * + * @return Node The built node + */ + public function getNode(): Node { + switch ($this->type) { + case self::TYPE_ALIAS: + return new Stmt\TraitUseAdaptation\Alias($this->trait, $this->method, $this->modifier, $this->alias); + case self::TYPE_PRECEDENCE: + return new Stmt\TraitUseAdaptation\Precedence($this->trait, $this->method, $this->insteadof); + default: + throw new \LogicException('Type of adaptation is not defined'); + } + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php new file mode 100644 index 0000000..ffa1bd5 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php @@ -0,0 +1,83 @@ + */ + protected array $uses = []; + /** @var list */ + protected array $constants = []; + /** @var list */ + protected array $properties = []; + /** @var list */ + protected array $methods = []; + /** @var list */ + protected array $attributeGroups = []; + + /** + * Creates an interface builder. + * + * @param string $name Name of the interface + */ + public function __construct(string $name) { + $this->name = $name; + } + + /** + * Adds a statement. + * + * @param Stmt|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ + public function addStmt($stmt) { + $stmt = BuilderHelpers::normalizeNode($stmt); + + if ($stmt instanceof Stmt\Property) { + $this->properties[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassMethod) { + $this->methods[] = $stmt; + } elseif ($stmt instanceof Stmt\TraitUse) { + $this->uses[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassConst) { + $this->constants[] = $stmt; + } else { + throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); + } + + return $this; + } + + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + + /** + * Returns the built trait node. + * + * @return Stmt\Trait_ The built interface node + */ + public function getNode(): PhpParser\Node { + return new Stmt\Trait_( + $this->name, [ + 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), + 'attrGroups' => $this->attributeGroups, + ], $this->attributes + ); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php new file mode 100644 index 0000000..b82cf13 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php @@ -0,0 +1,49 @@ +name = BuilderHelpers::normalizeName($name); + $this->type = $type; + } + + /** + * Sets alias for used name. + * + * @param string $alias Alias to use (last component of full name by default) + * + * @return $this The builder instance (for fluid interface) + */ + public function as(string $alias) { + $this->alias = $alias; + return $this; + } + + /** + * Returns the built node. + * + * @return Stmt\Use_ The built node + */ + public function getNode(): Node { + return new Stmt\Use_([ + new Node\UseItem($this->name, $this->alias) + ], $this->type); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php new file mode 100644 index 0000000..07642f9 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php @@ -0,0 +1,375 @@ +args($args) + ); + } + + /** + * Creates a namespace builder. + * + * @param null|string|Node\Name $name Name of the namespace + * + * @return Builder\Namespace_ The created namespace builder + */ + public function namespace($name): Builder\Namespace_ { + return new Builder\Namespace_($name); + } + + /** + * Creates a class builder. + * + * @param string $name Name of the class + * + * @return Builder\Class_ The created class builder + */ + public function class(string $name): Builder\Class_ { + return new Builder\Class_($name); + } + + /** + * Creates an interface builder. + * + * @param string $name Name of the interface + * + * @return Builder\Interface_ The created interface builder + */ + public function interface(string $name): Builder\Interface_ { + return new Builder\Interface_($name); + } + + /** + * Creates a trait builder. + * + * @param string $name Name of the trait + * + * @return Builder\Trait_ The created trait builder + */ + public function trait(string $name): Builder\Trait_ { + return new Builder\Trait_($name); + } + + /** + * Creates an enum builder. + * + * @param string $name Name of the enum + * + * @return Builder\Enum_ The created enum builder + */ + public function enum(string $name): Builder\Enum_ { + return new Builder\Enum_($name); + } + + /** + * Creates a trait use builder. + * + * @param Node\Name|string ...$traits Trait names + * + * @return Builder\TraitUse The created trait use builder + */ + public function useTrait(...$traits): Builder\TraitUse { + return new Builder\TraitUse(...$traits); + } + + /** + * Creates a trait use adaptation builder. + * + * @param Node\Name|string|null $trait Trait name + * @param Node\Identifier|string $method Method name + * + * @return Builder\TraitUseAdaptation The created trait use adaptation builder + */ + public function traitUseAdaptation($trait, $method = null): Builder\TraitUseAdaptation { + if ($method === null) { + $method = $trait; + $trait = null; + } + + return new Builder\TraitUseAdaptation($trait, $method); + } + + /** + * Creates a method builder. + * + * @param string $name Name of the method + * + * @return Builder\Method The created method builder + */ + public function method(string $name): Builder\Method { + return new Builder\Method($name); + } + + /** + * Creates a parameter builder. + * + * @param string $name Name of the parameter + * + * @return Builder\Param The created parameter builder + */ + public function param(string $name): Builder\Param { + return new Builder\Param($name); + } + + /** + * Creates a property builder. + * + * @param string $name Name of the property + * + * @return Builder\Property The created property builder + */ + public function property(string $name): Builder\Property { + return new Builder\Property($name); + } + + /** + * Creates a function builder. + * + * @param string $name Name of the function + * + * @return Builder\Function_ The created function builder + */ + public function function(string $name): Builder\Function_ { + return new Builder\Function_($name); + } + + /** + * Creates a namespace/class use builder. + * + * @param Node\Name|string $name Name of the entity (namespace or class) to alias + * + * @return Builder\Use_ The created use builder + */ + public function use($name): Builder\Use_ { + return new Builder\Use_($name, Use_::TYPE_NORMAL); + } + + /** + * Creates a function use builder. + * + * @param Node\Name|string $name Name of the function to alias + * + * @return Builder\Use_ The created use function builder + */ + public function useFunction($name): Builder\Use_ { + return new Builder\Use_($name, Use_::TYPE_FUNCTION); + } + + /** + * Creates a constant use builder. + * + * @param Node\Name|string $name Name of the const to alias + * + * @return Builder\Use_ The created use const builder + */ + public function useConst($name): Builder\Use_ { + return new Builder\Use_($name, Use_::TYPE_CONSTANT); + } + + /** + * Creates a class constant builder. + * + * @param string|Identifier $name Name + * @param Node\Expr|bool|null|int|float|string|array $value Value + * + * @return Builder\ClassConst The created use const builder + */ + public function classConst($name, $value): Builder\ClassConst { + return new Builder\ClassConst($name, $value); + } + + /** + * Creates an enum case builder. + * + * @param string|Identifier $name Name + * + * @return Builder\EnumCase The created use const builder + */ + public function enumCase($name): Builder\EnumCase { + return new Builder\EnumCase($name); + } + + /** + * Creates node a for a literal value. + * + * @param Expr|bool|null|int|float|string|array|\UnitEnum $value $value + */ + public function val($value): Expr { + return BuilderHelpers::normalizeValue($value); + } + + /** + * Creates variable node. + * + * @param string|Expr $name Name + */ + public function var($name): Expr\Variable { + if (!\is_string($name) && !$name instanceof Expr) { + throw new \LogicException('Variable name must be string or Expr'); + } + + return new Expr\Variable($name); + } + + /** + * Normalizes an argument list. + * + * Creates Arg nodes for all arguments and converts literal values to expressions. + * + * @param array $args List of arguments to normalize + * + * @return list + */ + public function args(array $args): array { + $normalizedArgs = []; + foreach ($args as $key => $arg) { + if (!($arg instanceof Arg)) { + $arg = new Arg(BuilderHelpers::normalizeValue($arg)); + } + if (\is_string($key)) { + $arg->name = BuilderHelpers::normalizeIdentifier($key); + } + $normalizedArgs[] = $arg; + } + return $normalizedArgs; + } + + /** + * Creates a function call node. + * + * @param string|Name|Expr $name Function name + * @param array $args Function arguments + */ + public function funcCall($name, array $args = []): Expr\FuncCall { + return new Expr\FuncCall( + BuilderHelpers::normalizeNameOrExpr($name), + $this->args($args) + ); + } + + /** + * Creates a method call node. + * + * @param Expr $var Variable the method is called on + * @param string|Identifier|Expr $name Method name + * @param array $args Method arguments + */ + public function methodCall(Expr $var, $name, array $args = []): Expr\MethodCall { + return new Expr\MethodCall( + $var, + BuilderHelpers::normalizeIdentifierOrExpr($name), + $this->args($args) + ); + } + + /** + * Creates a static method call node. + * + * @param string|Name|Expr $class Class name + * @param string|Identifier|Expr $name Method name + * @param array $args Method arguments + */ + public function staticCall($class, $name, array $args = []): Expr\StaticCall { + return new Expr\StaticCall( + BuilderHelpers::normalizeNameOrExpr($class), + BuilderHelpers::normalizeIdentifierOrExpr($name), + $this->args($args) + ); + } + + /** + * Creates an object creation node. + * + * @param string|Name|Expr $class Class name + * @param array $args Constructor arguments + */ + public function new($class, array $args = []): Expr\New_ { + return new Expr\New_( + BuilderHelpers::normalizeNameOrExpr($class), + $this->args($args) + ); + } + + /** + * Creates a constant fetch node. + * + * @param string|Name $name Constant name + */ + public function constFetch($name): Expr\ConstFetch { + return new Expr\ConstFetch(BuilderHelpers::normalizeName($name)); + } + + /** + * Creates a property fetch node. + * + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Property name + */ + public function propertyFetch(Expr $var, $name): Expr\PropertyFetch { + return new Expr\PropertyFetch($var, BuilderHelpers::normalizeIdentifierOrExpr($name)); + } + + /** + * Creates a class constant fetch node. + * + * @param string|Name|Expr $class Class name + * @param string|Identifier|Expr $name Constant name + */ + public function classConstFetch($class, $name): Expr\ClassConstFetch { + return new Expr\ClassConstFetch( + BuilderHelpers::normalizeNameOrExpr($class), + BuilderHelpers::normalizeIdentifierOrExpr($name) + ); + } + + /** + * Creates nested Concat nodes from a list of expressions. + * + * @param Expr|string ...$exprs Expressions or literal strings + */ + public function concat(...$exprs): Concat { + $numExprs = count($exprs); + if ($numExprs < 2) { + throw new \LogicException('Expected at least two expressions'); + } + + $lastConcat = $this->normalizeStringExpr($exprs[0]); + for ($i = 1; $i < $numExprs; $i++) { + $lastConcat = new Concat($lastConcat, $this->normalizeStringExpr($exprs[$i])); + } + return $lastConcat; + } + + /** + * @param string|Expr $expr + */ + private function normalizeStringExpr($expr): Expr { + if ($expr instanceof Expr) { + return $expr; + } + + if (\is_string($expr)) { + return new String_($expr); + } + + throw new \LogicException('Expected string or Expr'); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php new file mode 100644 index 0000000..f29a691 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php @@ -0,0 +1,338 @@ +getNode(); + } + + if ($node instanceof Node) { + return $node; + } + + throw new \LogicException('Expected node or builder object'); + } + + /** + * Normalizes a node to a statement. + * + * Expressions are wrapped in a Stmt\Expression node. + * + * @param Node|Builder $node The node to normalize + * + * @return Stmt The normalized statement node + */ + public static function normalizeStmt($node): Stmt { + $node = self::normalizeNode($node); + if ($node instanceof Stmt) { + return $node; + } + + if ($node instanceof Expr) { + return new Stmt\Expression($node); + } + + throw new \LogicException('Expected statement or expression node'); + } + + /** + * Normalizes strings to Identifier. + * + * @param string|Identifier $name The identifier to normalize + * + * @return Identifier The normalized identifier + */ + public static function normalizeIdentifier($name): Identifier { + if ($name instanceof Identifier) { + return $name; + } + + if (\is_string($name)) { + return new Identifier($name); + } + + throw new \LogicException('Expected string or instance of Node\Identifier'); + } + + /** + * Normalizes strings to Identifier, also allowing expressions. + * + * @param string|Identifier|Expr $name The identifier to normalize + * + * @return Identifier|Expr The normalized identifier or expression + */ + public static function normalizeIdentifierOrExpr($name) { + if ($name instanceof Identifier || $name instanceof Expr) { + return $name; + } + + if (\is_string($name)) { + return new Identifier($name); + } + + throw new \LogicException('Expected string or instance of Node\Identifier or Node\Expr'); + } + + /** + * Normalizes a name: Converts string names to Name nodes. + * + * @param Name|string $name The name to normalize + * + * @return Name The normalized name + */ + public static function normalizeName($name): Name { + if ($name instanceof Name) { + return $name; + } + + if (is_string($name)) { + if (!$name) { + throw new \LogicException('Name cannot be empty'); + } + + if ($name[0] === '\\') { + return new Name\FullyQualified(substr($name, 1)); + } + + if (0 === strpos($name, 'namespace\\')) { + return new Name\Relative(substr($name, strlen('namespace\\'))); + } + + return new Name($name); + } + + throw new \LogicException('Name must be a string or an instance of Node\Name'); + } + + /** + * Normalizes a name: Converts string names to Name nodes, while also allowing expressions. + * + * @param Expr|Name|string $name The name to normalize + * + * @return Name|Expr The normalized name or expression + */ + public static function normalizeNameOrExpr($name) { + if ($name instanceof Expr) { + return $name; + } + + if (!is_string($name) && !($name instanceof Name)) { + throw new \LogicException( + 'Name must be a string or an instance of Node\Name or Node\Expr' + ); + } + + return self::normalizeName($name); + } + + /** + * Normalizes a type: Converts plain-text type names into proper AST representation. + * + * In particular, builtin types become Identifiers, custom types become Names and nullables + * are wrapped in NullableType nodes. + * + * @param string|Name|Identifier|ComplexType $type The type to normalize + * + * @return Name|Identifier|ComplexType The normalized type + */ + public static function normalizeType($type) { + if (!is_string($type)) { + if ( + !$type instanceof Name && !$type instanceof Identifier && + !$type instanceof ComplexType + ) { + throw new \LogicException( + 'Type must be a string, or an instance of Name, Identifier or ComplexType' + ); + } + return $type; + } + + $nullable = false; + if (strlen($type) > 0 && $type[0] === '?') { + $nullable = true; + $type = substr($type, 1); + } + + $builtinTypes = [ + 'array', + 'callable', + 'bool', + 'int', + 'float', + 'string', + 'iterable', + 'void', + 'object', + 'null', + 'false', + 'mixed', + 'never', + 'true', + ]; + + $lowerType = strtolower($type); + if (in_array($lowerType, $builtinTypes)) { + $type = new Identifier($lowerType); + } else { + $type = self::normalizeName($type); + } + + $notNullableTypes = [ + 'void', 'mixed', 'never', + ]; + if ($nullable && in_array((string) $type, $notNullableTypes)) { + throw new \LogicException(sprintf('%s type cannot be nullable', $type)); + } + + return $nullable ? new NullableType($type) : $type; + } + + /** + * Normalizes a value: Converts nulls, booleans, integers, + * floats, strings and arrays into their respective nodes + * + * @param Node\Expr|bool|null|int|float|string|array|\UnitEnum $value The value to normalize + * + * @return Expr The normalized value + */ + public static function normalizeValue($value): Expr { + if ($value instanceof Node\Expr) { + return $value; + } + + if (is_null($value)) { + return new Expr\ConstFetch( + new Name('null') + ); + } + + if (is_bool($value)) { + return new Expr\ConstFetch( + new Name($value ? 'true' : 'false') + ); + } + + if (is_int($value)) { + return new Scalar\Int_($value); + } + + if (is_float($value)) { + return new Scalar\Float_($value); + } + + if (is_string($value)) { + return new Scalar\String_($value); + } + + if (is_array($value)) { + $items = []; + $lastKey = -1; + foreach ($value as $itemKey => $itemValue) { + // for consecutive, numeric keys don't generate keys + if (null !== $lastKey && ++$lastKey === $itemKey) { + $items[] = new Node\ArrayItem( + self::normalizeValue($itemValue) + ); + } else { + $lastKey = null; + $items[] = new Node\ArrayItem( + self::normalizeValue($itemValue), + self::normalizeValue($itemKey) + ); + } + } + + return new Expr\Array_($items); + } + + if ($value instanceof \UnitEnum) { + return new Expr\ClassConstFetch(new FullyQualified(\get_class($value)), new Identifier($value->name)); + } + + throw new \LogicException('Invalid value'); + } + + /** + * Normalizes a doc comment: Converts plain strings to PhpParser\Comment\Doc. + * + * @param Comment\Doc|string $docComment The doc comment to normalize + * + * @return Comment\Doc The normalized doc comment + */ + public static function normalizeDocComment($docComment): Comment\Doc { + if ($docComment instanceof Comment\Doc) { + return $docComment; + } + + if (is_string($docComment)) { + return new Comment\Doc($docComment); + } + + throw new \LogicException('Doc comment must be a string or an instance of PhpParser\Comment\Doc'); + } + + /** + * Normalizes a attribute: Converts attribute to the Attribute Group if needed. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return Node\AttributeGroup The Attribute Group + */ + public static function normalizeAttribute($attribute): Node\AttributeGroup { + if ($attribute instanceof Node\AttributeGroup) { + return $attribute; + } + + if (!($attribute instanceof Node\Attribute)) { + throw new \LogicException('Attribute must be an instance of PhpParser\Node\Attribute or PhpParser\Node\AttributeGroup'); + } + + return new Node\AttributeGroup([$attribute]); + } + + /** + * Adds a modifier and returns new modifier bitmask. + * + * @param int $modifiers Existing modifiers + * @param int $modifier Modifier to set + * + * @return int New modifiers + */ + public static function addModifier(int $modifiers, int $modifier): int { + Modifiers::verifyModifier($modifiers, $modifier); + return $modifiers | $modifier; + } + + /** + * Adds a modifier and returns new modifier bitmask. + * @return int New modifiers + */ + public static function addClassModifier(int $existingModifiers, int $modifierToSet): int { + Modifiers::verifyClassModifier($existingModifiers, $modifierToSet); + return $existingModifiers | $modifierToSet; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Comment.php b/vendor/nikic/php-parser/lib/PhpParser/Comment.php new file mode 100644 index 0000000..01b341e --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Comment.php @@ -0,0 +1,209 @@ +text = $text; + $this->startLine = $startLine; + $this->startFilePos = $startFilePos; + $this->startTokenPos = $startTokenPos; + $this->endLine = $endLine; + $this->endFilePos = $endFilePos; + $this->endTokenPos = $endTokenPos; + } + + /** + * Gets the comment text. + * + * @return string The comment text (including comment delimiters like /*) + */ + public function getText(): string { + return $this->text; + } + + /** + * Gets the line number the comment started on. + * + * @return int Line number (or -1 if not available) + * @phpstan-return -1|positive-int + */ + public function getStartLine(): int { + return $this->startLine; + } + + /** + * Gets the file offset the comment started on. + * + * @return int File offset (or -1 if not available) + */ + public function getStartFilePos(): int { + return $this->startFilePos; + } + + /** + * Gets the token offset the comment started on. + * + * @return int Token offset (or -1 if not available) + */ + public function getStartTokenPos(): int { + return $this->startTokenPos; + } + + /** + * Gets the line number the comment ends on. + * + * @return int Line number (or -1 if not available) + * @phpstan-return -1|positive-int + */ + public function getEndLine(): int { + return $this->endLine; + } + + /** + * Gets the file offset the comment ends on. + * + * @return int File offset (or -1 if not available) + */ + public function getEndFilePos(): int { + return $this->endFilePos; + } + + /** + * Gets the token offset the comment ends on. + * + * @return int Token offset (or -1 if not available) + */ + public function getEndTokenPos(): int { + return $this->endTokenPos; + } + + /** + * Gets the comment text. + * + * @return string The comment text (including comment delimiters like /*) + */ + public function __toString(): string { + return $this->text; + } + + /** + * Gets the reformatted comment text. + * + * "Reformatted" here means that we try to clean up the whitespace at the + * starts of the lines. This is necessary because we receive the comments + * without leading whitespace on the first line, but with leading whitespace + * on all subsequent lines. + * + * Additionally, this normalizes CRLF newlines to LF newlines. + */ + public function getReformattedText(): string { + $text = str_replace("\r\n", "\n", $this->text); + $newlinePos = strpos($text, "\n"); + if (false === $newlinePos) { + // Single line comments don't need further processing + return $text; + } + if (preg_match('(^.*(?:\n\s+\*.*)+$)', $text)) { + // Multi line comment of the type + // + // /* + // * Some text. + // * Some more text. + // */ + // + // is handled by replacing the whitespace sequences before the * by a single space + return preg_replace('(^\s+\*)m', ' *', $text); + } + if (preg_match('(^/\*\*?\s*\n)', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) { + // Multi line comment of the type + // + // /* + // Some text. + // Some more text. + // */ + // + // is handled by removing the whitespace sequence on the line before the closing + // */ on all lines. So if the last line is " */", then " " is removed at the + // start of all lines. + return preg_replace('(^' . preg_quote($matches[1]) . ')m', '', $text); + } + if (preg_match('(^/\*\*?\s*(?!\s))', $text, $matches)) { + // Multi line comment of the type + // + // /* Some text. + // Some more text. + // Indented text. + // Even more text. */ + // + // is handled by removing the difference between the shortest whitespace prefix on all + // lines and the length of the "/* " opening sequence. + $prefixLen = $this->getShortestWhitespacePrefixLen(substr($text, $newlinePos + 1)); + $removeLen = $prefixLen - strlen($matches[0]); + return preg_replace('(^\s{' . $removeLen . '})m', '', $text); + } + + // No idea how to format this comment, so simply return as is + return $text; + } + + /** + * Get length of shortest whitespace prefix (at the start of a line). + * + * If there is a line with no prefix whitespace, 0 is a valid return value. + * + * @param string $str String to check + * @return int Length in characters. Tabs count as single characters. + */ + private function getShortestWhitespacePrefixLen(string $str): int { + $lines = explode("\n", $str); + $shortestPrefixLen = \PHP_INT_MAX; + foreach ($lines as $line) { + preg_match('(^\s*)', $line, $matches); + $prefixLen = strlen($matches[0]); + if ($prefixLen < $shortestPrefixLen) { + $shortestPrefixLen = $prefixLen; + } + } + return $shortestPrefixLen; + } + + /** + * @return array{nodeType:string, text:mixed, line:mixed, filePos:mixed} + */ + public function jsonSerialize(): array { + // Technically not a node, but we make it look like one anyway + $type = $this instanceof Comment\Doc ? 'Comment_Doc' : 'Comment'; + return [ + 'nodeType' => $type, + 'text' => $this->text, + // TODO: Rename these to include "start". + 'line' => $this->startLine, + 'filePos' => $this->startFilePos, + 'tokenPos' => $this->startTokenPos, + 'endLine' => $this->endLine, + 'endFilePos' => $this->endFilePos, + 'endTokenPos' => $this->endTokenPos, + ]; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php b/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php new file mode 100644 index 0000000..bb3e914 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php @@ -0,0 +1,6 @@ +fallbackEvaluator = $fallbackEvaluator ?? function (Expr $expr) { + throw new ConstExprEvaluationException( + "Expression of type {$expr->getType()} cannot be evaluated" + ); + }; + } + + /** + * Silently evaluates a constant expression into a PHP value. + * + * Thrown Errors, warnings or notices will be converted into a ConstExprEvaluationException. + * The original source of the exception is available through getPrevious(). + * + * If some part of the expression cannot be evaluated, the fallback evaluator passed to the + * constructor will be invoked. By default, if no fallback is provided, an exception of type + * ConstExprEvaluationException is thrown. + * + * See class doc comment for caveats and limitations. + * + * @param Expr $expr Constant expression to evaluate + * @return mixed Result of evaluation + * + * @throws ConstExprEvaluationException if the expression cannot be evaluated or an error occurred + */ + public function evaluateSilently(Expr $expr) { + set_error_handler(function ($num, $str, $file, $line) { + throw new \ErrorException($str, 0, $num, $file, $line); + }); + + try { + return $this->evaluate($expr); + } catch (\Throwable $e) { + if (!$e instanceof ConstExprEvaluationException) { + $e = new ConstExprEvaluationException( + "An error occurred during constant expression evaluation", 0, $e); + } + throw $e; + } finally { + restore_error_handler(); + } + } + + /** + * Directly evaluates a constant expression into a PHP value. + * + * May generate Error exceptions, warnings or notices. Use evaluateSilently() to convert these + * into a ConstExprEvaluationException. + * + * If some part of the expression cannot be evaluated, the fallback evaluator passed to the + * constructor will be invoked. By default, if no fallback is provided, an exception of type + * ConstExprEvaluationException is thrown. + * + * See class doc comment for caveats and limitations. + * + * @param Expr $expr Constant expression to evaluate + * @return mixed Result of evaluation + * + * @throws ConstExprEvaluationException if the expression cannot be evaluated + */ + public function evaluateDirectly(Expr $expr) { + return $this->evaluate($expr); + } + + /** @return mixed */ + private function evaluate(Expr $expr) { + if ($expr instanceof Scalar\Int_ + || $expr instanceof Scalar\Float_ + || $expr instanceof Scalar\String_ + ) { + return $expr->value; + } + + if ($expr instanceof Expr\Array_) { + return $this->evaluateArray($expr); + } + + // Unary operators + if ($expr instanceof Expr\UnaryPlus) { + return +$this->evaluate($expr->expr); + } + if ($expr instanceof Expr\UnaryMinus) { + return -$this->evaluate($expr->expr); + } + if ($expr instanceof Expr\BooleanNot) { + return !$this->evaluate($expr->expr); + } + if ($expr instanceof Expr\BitwiseNot) { + return ~$this->evaluate($expr->expr); + } + + if ($expr instanceof Expr\BinaryOp) { + return $this->evaluateBinaryOp($expr); + } + + if ($expr instanceof Expr\Ternary) { + return $this->evaluateTernary($expr); + } + + if ($expr instanceof Expr\ArrayDimFetch && null !== $expr->dim) { + return $this->evaluate($expr->var)[$this->evaluate($expr->dim)]; + } + + if ($expr instanceof Expr\ConstFetch) { + return $this->evaluateConstFetch($expr); + } + + return ($this->fallbackEvaluator)($expr); + } + + private function evaluateArray(Expr\Array_ $expr): array { + $array = []; + foreach ($expr->items as $item) { + if (null !== $item->key) { + $array[$this->evaluate($item->key)] = $this->evaluate($item->value); + } elseif ($item->unpack) { + $array = array_merge($array, $this->evaluate($item->value)); + } else { + $array[] = $this->evaluate($item->value); + } + } + return $array; + } + + /** @return mixed */ + private function evaluateTernary(Expr\Ternary $expr) { + if (null === $expr->if) { + return $this->evaluate($expr->cond) ?: $this->evaluate($expr->else); + } + + return $this->evaluate($expr->cond) + ? $this->evaluate($expr->if) + : $this->evaluate($expr->else); + } + + /** @return mixed */ + private function evaluateBinaryOp(Expr\BinaryOp $expr) { + if ($expr instanceof Expr\BinaryOp\Coalesce + && $expr->left instanceof Expr\ArrayDimFetch + ) { + // This needs to be special cased to respect BP_VAR_IS fetch semantics + return $this->evaluate($expr->left->var)[$this->evaluate($expr->left->dim)] + ?? $this->evaluate($expr->right); + } + + // The evaluate() calls are repeated in each branch, because some of the operators are + // short-circuiting and evaluating the RHS in advance may be illegal in that case + $l = $expr->left; + $r = $expr->right; + switch ($expr->getOperatorSigil()) { + case '&': return $this->evaluate($l) & $this->evaluate($r); + case '|': return $this->evaluate($l) | $this->evaluate($r); + case '^': return $this->evaluate($l) ^ $this->evaluate($r); + case '&&': return $this->evaluate($l) && $this->evaluate($r); + case '||': return $this->evaluate($l) || $this->evaluate($r); + case '??': return $this->evaluate($l) ?? $this->evaluate($r); + case '.': return $this->evaluate($l) . $this->evaluate($r); + case '/': return $this->evaluate($l) / $this->evaluate($r); + case '==': return $this->evaluate($l) == $this->evaluate($r); + case '>': return $this->evaluate($l) > $this->evaluate($r); + case '>=': return $this->evaluate($l) >= $this->evaluate($r); + case '===': return $this->evaluate($l) === $this->evaluate($r); + case 'and': return $this->evaluate($l) and $this->evaluate($r); + case 'or': return $this->evaluate($l) or $this->evaluate($r); + case 'xor': return $this->evaluate($l) xor $this->evaluate($r); + case '-': return $this->evaluate($l) - $this->evaluate($r); + case '%': return $this->evaluate($l) % $this->evaluate($r); + case '*': return $this->evaluate($l) * $this->evaluate($r); + case '!=': return $this->evaluate($l) != $this->evaluate($r); + case '!==': return $this->evaluate($l) !== $this->evaluate($r); + case '+': return $this->evaluate($l) + $this->evaluate($r); + case '**': return $this->evaluate($l) ** $this->evaluate($r); + case '<<': return $this->evaluate($l) << $this->evaluate($r); + case '>>': return $this->evaluate($l) >> $this->evaluate($r); + case '<': return $this->evaluate($l) < $this->evaluate($r); + case '<=': return $this->evaluate($l) <= $this->evaluate($r); + case '<=>': return $this->evaluate($l) <=> $this->evaluate($r); + case '|>': + $lval = $this->evaluate($l); + return $this->evaluate($r)($lval); + } + + throw new \Exception('Should not happen'); + } + + /** @return mixed */ + private function evaluateConstFetch(Expr\ConstFetch $expr) { + $name = $expr->name->toLowerString(); + switch ($name) { + case 'null': return null; + case 'false': return false; + case 'true': return true; + } + + return ($this->fallbackEvaluator)($expr); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Error.php b/vendor/nikic/php-parser/lib/PhpParser/Error.php new file mode 100644 index 0000000..f81f0c4 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Error.php @@ -0,0 +1,173 @@ + */ + protected array $attributes; + + /** + * Creates an Exception signifying a parse error. + * + * @param string $message Error message + * @param array $attributes Attributes of node/token where error occurred + */ + public function __construct(string $message, array $attributes = []) { + $this->rawMessage = $message; + $this->attributes = $attributes; + $this->updateMessage(); + } + + /** + * Gets the error message + * + * @return string Error message + */ + public function getRawMessage(): string { + return $this->rawMessage; + } + + /** + * Gets the line the error starts in. + * + * @return int Error start line + * @phpstan-return -1|positive-int + */ + public function getStartLine(): int { + return $this->attributes['startLine'] ?? -1; + } + + /** + * Gets the line the error ends in. + * + * @return int Error end line + * @phpstan-return -1|positive-int + */ + public function getEndLine(): int { + return $this->attributes['endLine'] ?? -1; + } + + /** + * Gets the attributes of the node/token the error occurred at. + * + * @return array + */ + public function getAttributes(): array { + return $this->attributes; + } + + /** + * Sets the attributes of the node/token the error occurred at. + * + * @param array $attributes + */ + public function setAttributes(array $attributes): void { + $this->attributes = $attributes; + $this->updateMessage(); + } + + /** + * Sets the line of the PHP file the error occurred in. + * + * @param string $message Error message + */ + public function setRawMessage(string $message): void { + $this->rawMessage = $message; + $this->updateMessage(); + } + + /** + * Sets the line the error starts in. + * + * @param int $line Error start line + */ + public function setStartLine(int $line): void { + $this->attributes['startLine'] = $line; + $this->updateMessage(); + } + + /** + * Returns whether the error has start and end column information. + * + * For column information enable the startFilePos and endFilePos in the lexer options. + */ + public function hasColumnInfo(): bool { + return isset($this->attributes['startFilePos'], $this->attributes['endFilePos']); + } + + /** + * Gets the start column (1-based) into the line where the error started. + * + * @param string $code Source code of the file + */ + public function getStartColumn(string $code): int { + if (!$this->hasColumnInfo()) { + throw new \RuntimeException('Error does not have column information'); + } + + return $this->toColumn($code, $this->attributes['startFilePos']); + } + + /** + * Gets the end column (1-based) into the line where the error ended. + * + * @param string $code Source code of the file + */ + public function getEndColumn(string $code): int { + if (!$this->hasColumnInfo()) { + throw new \RuntimeException('Error does not have column information'); + } + + return $this->toColumn($code, $this->attributes['endFilePos']); + } + + /** + * Formats message including line and column information. + * + * @param string $code Source code associated with the error, for calculation of the columns + * + * @return string Formatted message + */ + public function getMessageWithColumnInfo(string $code): string { + return sprintf( + '%s from %d:%d to %d:%d', $this->getRawMessage(), + $this->getStartLine(), $this->getStartColumn($code), + $this->getEndLine(), $this->getEndColumn($code) + ); + } + + /** + * Converts a file offset into a column. + * + * @param string $code Source code that $pos indexes into + * @param int $pos 0-based position in $code + * + * @return int 1-based column (relative to start of line) + */ + private function toColumn(string $code, int $pos): int { + if ($pos > strlen($code)) { + throw new \RuntimeException('Invalid position information'); + } + + $lineStartPos = strrpos($code, "\n", $pos - strlen($code)); + if (false === $lineStartPos) { + $lineStartPos = -1; + } + + return $pos - $lineStartPos; + } + + /** + * Updates the exception message after a change to rawMessage or rawLine. + */ + protected function updateMessage(): void { + $this->message = $this->rawMessage; + + if (-1 === $this->getStartLine()) { + $this->message .= ' on unknown line'; + } else { + $this->message .= ' on line ' . $this->getStartLine(); + } + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php new file mode 100644 index 0000000..51ad730 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php @@ -0,0 +1,12 @@ +errors[] = $error; + } + + /** + * Get collected errors. + * + * @return Error[] + */ + public function getErrors(): array { + return $this->errors; + } + + /** + * Check whether there are any errors. + */ + public function hasErrors(): bool { + return !empty($this->errors); + } + + /** + * Reset/clear collected errors. + */ + public function clearErrors(): void { + $this->errors = []; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php new file mode 100644 index 0000000..dff33dd --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php @@ -0,0 +1,17 @@ +type = $type; + $this->old = $old; + $this->new = $new; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php new file mode 100644 index 0000000..253e175 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php @@ -0,0 +1,178 @@ +isEqual = $isEqual; + } + + /** + * Calculate diff (edit script) from $old to $new. + * + * @param T[] $old Original array + * @param T[] $new New array + * + * @return DiffElem[] Diff (edit script) + */ + public function diff(array $old, array $new): array { + $old = \array_values($old); + $new = \array_values($new); + list($trace, $x, $y) = $this->calculateTrace($old, $new); + return $this->extractDiff($trace, $x, $y, $old, $new); + } + + /** + * Calculate diff, including "replace" operations. + * + * If a sequence of remove operations is followed by the same number of add operations, these + * will be coalesced into replace operations. + * + * @param T[] $old Original array + * @param T[] $new New array + * + * @return DiffElem[] Diff (edit script), including replace operations + */ + public function diffWithReplacements(array $old, array $new): array { + return $this->coalesceReplacements($this->diff($old, $new)); + } + + /** + * @param T[] $old + * @param T[] $new + * @return array{array>, int, int} + */ + private function calculateTrace(array $old, array $new): array { + $n = \count($old); + $m = \count($new); + $max = $n + $m; + $v = [1 => 0]; + $trace = []; + for ($d = 0; $d <= $max; $d++) { + $trace[] = $v; + for ($k = -$d; $k <= $d; $k += 2) { + if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { + $x = $v[$k + 1]; + } else { + $x = $v[$k - 1] + 1; + } + + $y = $x - $k; + while ($x < $n && $y < $m && ($this->isEqual)($old[$x], $new[$y])) { + $x++; + $y++; + } + + $v[$k] = $x; + if ($x >= $n && $y >= $m) { + return [$trace, $x, $y]; + } + } + } + throw new \Exception('Should not happen'); + } + + /** + * @param array> $trace + * @param T[] $old + * @param T[] $new + * @return DiffElem[] + */ + private function extractDiff(array $trace, int $x, int $y, array $old, array $new): array { + $result = []; + for ($d = \count($trace) - 1; $d >= 0; $d--) { + $v = $trace[$d]; + $k = $x - $y; + + if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { + $prevK = $k + 1; + } else { + $prevK = $k - 1; + } + + $prevX = $v[$prevK]; + $prevY = $prevX - $prevK; + + while ($x > $prevX && $y > $prevY) { + $result[] = new DiffElem(DiffElem::TYPE_KEEP, $old[$x - 1], $new[$y - 1]); + $x--; + $y--; + } + + if ($d === 0) { + break; + } + + while ($x > $prevX) { + $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $old[$x - 1], null); + $x--; + } + + while ($y > $prevY) { + $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $new[$y - 1]); + $y--; + } + } + return array_reverse($result); + } + + /** + * Coalesce equal-length sequences of remove+add into a replace operation. + * + * @param DiffElem[] $diff + * @return DiffElem[] + */ + private function coalesceReplacements(array $diff): array { + $newDiff = []; + $c = \count($diff); + for ($i = 0; $i < $c; $i++) { + $diffType = $diff[$i]->type; + if ($diffType !== DiffElem::TYPE_REMOVE) { + $newDiff[] = $diff[$i]; + continue; + } + + $j = $i; + while ($j < $c && $diff[$j]->type === DiffElem::TYPE_REMOVE) { + $j++; + } + + $k = $j; + while ($k < $c && $diff[$k]->type === DiffElem::TYPE_ADD) { + $k++; + } + + if ($j - $i === $k - $j) { + $len = $j - $i; + for ($n = 0; $n < $len; $n++) { + $newDiff[] = new DiffElem( + DiffElem::TYPE_REPLACE, $diff[$i + $n]->old, $diff[$j + $n]->new + ); + } + } else { + for (; $i < $k; $i++) { + $newDiff[] = $diff[$i]; + } + } + $i = $k - 1; + } + return $newDiff; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php new file mode 100644 index 0000000..b30a99a --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php @@ -0,0 +1,71 @@ + $attributes Attributes + */ + public function __construct( + array $attrGroups, int $flags, array $args, ?Node\Name $extends, array $implements, + array $stmts, array $attributes + ) { + parent::__construct($attributes); + $this->attrGroups = $attrGroups; + $this->flags = $flags; + $this->args = $args; + $this->extends = $extends; + $this->implements = $implements; + $this->stmts = $stmts; + } + + public static function fromNewNode(Expr\New_ $newNode): self { + $class = $newNode->class; + assert($class instanceof Node\Stmt\Class_); + // 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( + $class->attrGroups, $class->flags, $newNode->args, $class->extends, $class->implements, + $class->stmts, $newNode->getAttributes() + ); + } + + public function getType(): string { + return 'Expr_PrintableNewAnonClass'; + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'flags', 'args', 'extends', 'implements', 'stmts']; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php new file mode 100644 index 0000000..36022d0 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php @@ -0,0 +1,237 @@ += 80000) { + class TokenPolyfill extends \PhpToken { + } + return; +} + +/** + * This is a polyfill for the PhpToken class introduced in PHP 8.0. We do not actually polyfill + * PhpToken, because composer might end up picking a different polyfill implementation, which does + * not meet our requirements. + * + * @internal + */ +class TokenPolyfill { + /** @var int The ID of the token. Either a T_* constant of a character code < 256. */ + public int $id; + /** @var string The textual content of the token. */ + public string $text; + /** @var int The 1-based starting line of the token (or -1 if unknown). */ + public int $line; + /** @var int The 0-based starting position of the token (or -1 if unknown). */ + public int $pos; + + /** @var array Tokens ignored by the PHP parser. */ + private const IGNORABLE_TOKENS = [ + \T_WHITESPACE => true, + \T_COMMENT => true, + \T_DOC_COMMENT => true, + \T_OPEN_TAG => true, + ]; + + /** @var array Tokens that may be part of a T_NAME_* identifier. */ + private static array $identifierTokens; + + /** + * Create a Token with the given ID and text, as well optional line and position information. + */ + final public function __construct(int $id, string $text, int $line = -1, int $pos = -1) { + $this->id = $id; + $this->text = $text; + $this->line = $line; + $this->pos = $pos; + } + + /** + * Get the name of the token. For single-char tokens this will be the token character. + * Otherwise it will be a T_* style name, or null if the token ID is unknown. + */ + public function getTokenName(): ?string { + if ($this->id < 256) { + return \chr($this->id); + } + + $name = token_name($this->id); + return $name === 'UNKNOWN' ? null : $name; + } + + /** + * Check whether the token is of the given kind. The kind may be either an integer that matches + * the token ID, a string that matches the token text, or an array of integers/strings. In the + * latter case, the function returns true if any of the kinds in the array match. + * + * @param int|string|(int|string)[] $kind + */ + public function is($kind): bool { + if (\is_int($kind)) { + return $this->id === $kind; + } + if (\is_string($kind)) { + return $this->text === $kind; + } + if (\is_array($kind)) { + foreach ($kind as $entry) { + if (\is_int($entry)) { + if ($this->id === $entry) { + return true; + } + } elseif (\is_string($entry)) { + if ($this->text === $entry) { + return true; + } + } else { + throw new \TypeError( + 'Argument #1 ($kind) must only have elements of type string|int, ' . + gettype($entry) . ' given'); + } + } + return false; + } + throw new \TypeError( + 'Argument #1 ($kind) must be of type string|int|array, ' .gettype($kind) . ' given'); + } + + /** + * Check whether this token would be ignored by the PHP parser. Returns true for T_WHITESPACE, + * T_COMMENT, T_DOC_COMMENT and T_OPEN_TAG, and false for everything else. + */ + public function isIgnorable(): bool { + return isset(self::IGNORABLE_TOKENS[$this->id]); + } + + /** + * Return the textual content of the token. + */ + public function __toString(): string { + return $this->text; + } + + /** + * Tokenize the given source code and return an array of tokens. + * + * This performs certain canonicalizations to match the PHP 8.0 token format: + * * Bad characters are represented using T_BAD_CHARACTER rather than omitted. + * * T_COMMENT does not include trailing newlines, instead the newline is part of a following + * T_WHITESPACE token. + * * Namespaced names are represented using T_NAME_* tokens. + * + * @return static[] + */ + public static function tokenize(string $code, int $flags = 0): array { + self::init(); + + $tokens = []; + $line = 1; + $pos = 0; + $origTokens = \token_get_all($code, $flags); + + $numTokens = \count($origTokens); + for ($i = 0; $i < $numTokens; $i++) { + $token = $origTokens[$i]; + if (\is_string($token)) { + if (\strlen($token) === 2) { + // b" and B" are tokenized as single-char tokens, even though they aren't. + $tokens[] = new static(\ord('"'), $token, $line, $pos); + $pos += 2; + } else { + $tokens[] = new static(\ord($token), $token, $line, $pos); + $pos++; + } + } else { + $id = $token[0]; + $text = $token[1]; + + // Emulate PHP 8.0 comment format, which does not include trailing whitespace anymore. + if ($id === \T_COMMENT && \substr($text, 0, 2) !== '/*' && + \preg_match('/(\r\n|\n|\r)$/D', $text, $matches) + ) { + $trailingNewline = $matches[0]; + $text = \substr($text, 0, -\strlen($trailingNewline)); + $tokens[] = new static($id, $text, $line, $pos); + $pos += \strlen($text); + + if ($i + 1 < $numTokens && $origTokens[$i + 1][0] === \T_WHITESPACE) { + // Move trailing newline into following T_WHITESPACE token, if it already exists. + $origTokens[$i + 1][1] = $trailingNewline . $origTokens[$i + 1][1]; + $origTokens[$i + 1][2]--; + } else { + // Otherwise, we need to create a new T_WHITESPACE token. + $tokens[] = new static(\T_WHITESPACE, $trailingNewline, $line, $pos); + $line++; + $pos += \strlen($trailingNewline); + } + continue; + } + + // Emulate PHP 8.0 T_NAME_* tokens, by combining sequences of T_NS_SEPARATOR and + // T_STRING into a single token. + if (($id === \T_NS_SEPARATOR || isset(self::$identifierTokens[$id]))) { + $newText = $text; + $lastWasSeparator = $id === \T_NS_SEPARATOR; + for ($j = $i + 1; $j < $numTokens; $j++) { + if ($lastWasSeparator) { + if (!isset(self::$identifierTokens[$origTokens[$j][0]])) { + break; + } + $lastWasSeparator = false; + } else { + if ($origTokens[$j][0] !== \T_NS_SEPARATOR) { + break; + } + $lastWasSeparator = true; + } + $newText .= $origTokens[$j][1]; + } + if ($lastWasSeparator) { + // Trailing separator is not part of the name. + $j--; + $newText = \substr($newText, 0, -1); + } + if ($j > $i + 1) { + if ($id === \T_NS_SEPARATOR) { + $id = \T_NAME_FULLY_QUALIFIED; + } elseif ($id === \T_NAMESPACE) { + $id = \T_NAME_RELATIVE; + } else { + $id = \T_NAME_QUALIFIED; + } + $tokens[] = new static($id, $newText, $line, $pos); + $pos += \strlen($newText); + $i = $j - 1; + continue; + } + } + + $tokens[] = new static($id, $text, $line, $pos); + $line += \substr_count($text, "\n"); + $pos += \strlen($text); + } + } + return $tokens; + } + + /** Initialize private static state needed by tokenize(). */ + private static function init(): void { + if (isset(self::$identifierTokens)) { + return; + } + + // Based on semi_reserved production. + self::$identifierTokens = \array_fill_keys([ + \T_STRING, + \T_STATIC, \T_ABSTRACT, \T_FINAL, \T_PRIVATE, \T_PROTECTED, \T_PUBLIC, \T_READONLY, + \T_INCLUDE, \T_INCLUDE_ONCE, \T_EVAL, \T_REQUIRE, \T_REQUIRE_ONCE, \T_LOGICAL_OR, \T_LOGICAL_XOR, \T_LOGICAL_AND, + \T_INSTANCEOF, \T_NEW, \T_CLONE, \T_EXIT, \T_IF, \T_ELSEIF, \T_ELSE, \T_ENDIF, \T_ECHO, \T_DO, \T_WHILE, + \T_ENDWHILE, \T_FOR, \T_ENDFOR, \T_FOREACH, \T_ENDFOREACH, \T_DECLARE, \T_ENDDECLARE, \T_AS, \T_TRY, \T_CATCH, + \T_FINALLY, \T_THROW, \T_USE, \T_INSTEADOF, \T_GLOBAL, \T_VAR, \T_UNSET, \T_ISSET, \T_EMPTY, \T_CONTINUE, \T_GOTO, + \T_FUNCTION, \T_CONST, \T_RETURN, \T_PRINT, \T_YIELD, \T_LIST, \T_SWITCH, \T_ENDSWITCH, \T_CASE, \T_DEFAULT, + \T_BREAK, \T_ARRAY, \T_CALLABLE, \T_EXTENDS, \T_IMPLEMENTS, \T_NAMESPACE, \T_TRAIT, \T_INTERFACE, \T_CLASS, + \T_CLASS_C, \T_TRAIT_C, \T_FUNC_C, \T_METHOD_C, \T_LINE, \T_FILE, \T_DIR, \T_NS_C, \T_HALT_COMPILER, \T_FN, + \T_MATCH, + ], true); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php new file mode 100644 index 0000000..cdbe2bd --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php @@ -0,0 +1,282 @@ +tokens = $tokens; + $this->indentMap = $this->calcIndentMap($tabWidth); + } + + /** + * Whether the given position is immediately surrounded by parenthesis. + * + * @param int $startPos Start position + * @param int $endPos End position + */ + public function haveParens(int $startPos, int $endPos): bool { + return $this->haveTokenImmediatelyBefore($startPos, '(') + && $this->haveTokenImmediatelyAfter($endPos, ')'); + } + + /** + * Whether the given position is immediately surrounded by braces. + * + * @param int $startPos Start position + * @param int $endPos End position + */ + public function haveBraces(int $startPos, int $endPos): bool { + return ($this->haveTokenImmediatelyBefore($startPos, '{') + || $this->haveTokenImmediatelyBefore($startPos, T_CURLY_OPEN)) + && $this->haveTokenImmediatelyAfter($endPos, '}'); + } + + /** + * Check whether the position is directly preceded by a certain token type. + * + * During this check whitespace and comments are skipped. + * + * @param int $pos Position before which the token should occur + * @param int|string $expectedTokenType Token to check for + * + * @return bool Whether the expected token was found + */ + public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType): bool { + $tokens = $this->tokens; + $pos--; + for (; $pos >= 0; $pos--) { + $token = $tokens[$pos]; + if ($token->is($expectedTokenType)) { + return true; + } + if (!$token->isIgnorable()) { + break; + } + } + return false; + } + + /** + * Check whether the position is directly followed by a certain token type. + * + * During this check whitespace and comments are skipped. + * + * @param int $pos Position after which the token should occur + * @param int|string $expectedTokenType Token to check for + * + * @return bool Whether the expected token was found + */ + public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType): bool { + $tokens = $this->tokens; + $pos++; + for ($c = \count($tokens); $pos < $c; $pos++) { + $token = $tokens[$pos]; + if ($token->is($expectedTokenType)) { + return true; + } + if (!$token->isIgnorable()) { + break; + } + } + return false; + } + + /** @param int|string|(int|string)[] $skipTokenType */ + public function skipLeft(int $pos, $skipTokenType): int { + $tokens = $this->tokens; + + $pos = $this->skipLeftWhitespace($pos); + if ($skipTokenType === \T_WHITESPACE) { + return $pos; + } + + if (!$tokens[$pos]->is($skipTokenType)) { + // Shouldn't happen. The skip token MUST be there + throw new \Exception('Encountered unexpected token'); + } + $pos--; + + return $this->skipLeftWhitespace($pos); + } + + /** @param int|string|(int|string)[] $skipTokenType */ + public function skipRight(int $pos, $skipTokenType): int { + $tokens = $this->tokens; + + $pos = $this->skipRightWhitespace($pos); + if ($skipTokenType === \T_WHITESPACE) { + return $pos; + } + + if (!$tokens[$pos]->is($skipTokenType)) { + // Shouldn't happen. The skip token MUST be there + throw new \Exception('Encountered unexpected token'); + } + $pos++; + + return $this->skipRightWhitespace($pos); + } + + /** + * Return first non-whitespace token position smaller or equal to passed position. + * + * @param int $pos Token position + * @return int Non-whitespace token position + */ + public function skipLeftWhitespace(int $pos): int { + $tokens = $this->tokens; + for (; $pos >= 0; $pos--) { + if (!$tokens[$pos]->isIgnorable()) { + break; + } + } + return $pos; + } + + /** + * Return first non-whitespace position greater or equal to passed position. + * + * @param int $pos Token position + * @return int Non-whitespace token position + */ + public function skipRightWhitespace(int $pos): int { + $tokens = $this->tokens; + for ($count = \count($tokens); $pos < $count; $pos++) { + if (!$tokens[$pos]->isIgnorable()) { + break; + } + } + return $pos; + } + + /** @param int|string|(int|string)[] $findTokenType */ + public function findRight(int $pos, $findTokenType): int { + $tokens = $this->tokens; + for ($count = \count($tokens); $pos < $count; $pos++) { + if ($tokens[$pos]->is($findTokenType)) { + return $pos; + } + } + return -1; + } + + /** + * Whether the given position range contains a certain token type. + * + * @param int $startPos Starting position (inclusive) + * @param int $endPos Ending position (exclusive) + * @param int|string $tokenType Token type to look for + * @return bool Whether the token occurs in the given range + */ + public function haveTokenInRange(int $startPos, int $endPos, $tokenType): bool { + $tokens = $this->tokens; + for ($pos = $startPos; $pos < $endPos; $pos++) { + if ($tokens[$pos]->is($tokenType)) { + return true; + } + } + return false; + } + + public function haveTagInRange(int $startPos, int $endPos): bool { + return $this->haveTokenInRange($startPos, $endPos, \T_OPEN_TAG) + || $this->haveTokenInRange($startPos, $endPos, \T_CLOSE_TAG); + } + + /** + * Get indentation before token position. + * + * @param int $pos Token position + * + * @return int Indentation depth (in spaces) + */ + public function getIndentationBefore(int $pos): int { + return $this->indentMap[$pos]; + } + + /** + * Get the code corresponding to a token offset range, optionally adjusted for indentation. + * + * @param int $from Token start position (inclusive) + * @param int $to Token end position (exclusive) + * @param int $indent By how much the code should be indented (can be negative as well) + * + * @return string Code corresponding to token range, adjusted for indentation + */ + public function getTokenCode(int $from, int $to, int $indent): string { + $tokens = $this->tokens; + $result = ''; + for ($pos = $from; $pos < $to; $pos++) { + $token = $tokens[$pos]; + $id = $token->id; + $text = $token->text; + if ($id === \T_CONSTANT_ENCAPSED_STRING || $id === \T_ENCAPSED_AND_WHITESPACE) { + $result .= $text; + } else { + // TODO Handle non-space indentation + if ($indent < 0) { + $result .= str_replace("\n" . str_repeat(" ", -$indent), "\n", $text); + } elseif ($indent > 0) { + $result .= str_replace("\n", "\n" . str_repeat(" ", $indent), $text); + } else { + $result .= $text; + } + } + } + return $result; + } + + /** + * Precalculate the indentation at every token position. + * + * @return int[] Token position to indentation map + */ + private function calcIndentMap(int $tabWidth): array { + $indentMap = []; + $indent = 0; + foreach ($this->tokens as $i => $token) { + $indentMap[] = $indent; + + if ($token->id === \T_WHITESPACE) { + $content = $token->text; + $newlinePos = \strrpos($content, "\n"); + if (false !== $newlinePos) { + $indent = $this->getIndent(\substr($content, $newlinePos + 1), $tabWidth); + } elseif ($i === 1 && $this->tokens[0]->id === \T_OPEN_TAG && + $this->tokens[0]->text[\strlen($this->tokens[0]->text) - 1] === "\n") { + // Special case: Newline at the end of opening tag followed by whitespace. + $indent = $this->getIndent($content, $tabWidth); + } + } + } + + // Add a sentinel for one past end of the file + $indentMap[] = $indent; + + return $indentMap; + } + + private function getIndent(string $ws, int $tabWidth): int { + $spaces = \substr_count($ws, " "); + $tabs = \substr_count($ws, "\t"); + assert(\strlen($ws) === $spaces + $tabs); + return $spaces + $tabs * $tabWidth; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php b/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php new file mode 100644 index 0000000..7be4142 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php @@ -0,0 +1,108 @@ +[] Node type to reflection class map */ + private array $reflectionClassCache; + + /** @return mixed */ + public function decode(string $json) { + $value = json_decode($json, true); + if (json_last_error()) { + throw new \RuntimeException('JSON decoding error: ' . json_last_error_msg()); + } + + return $this->decodeRecursive($value); + } + + /** + * @param mixed $value + * @return mixed + */ + private function decodeRecursive($value) { + if (\is_array($value)) { + if (isset($value['nodeType'])) { + if ($value['nodeType'] === 'Comment' || $value['nodeType'] === 'Comment_Doc') { + return $this->decodeComment($value); + } + return $this->decodeNode($value); + } + return $this->decodeArray($value); + } + return $value; + } + + private function decodeArray(array $array): array { + $decodedArray = []; + foreach ($array as $key => $value) { + $decodedArray[$key] = $this->decodeRecursive($value); + } + return $decodedArray; + } + + private function decodeNode(array $value): Node { + $nodeType = $value['nodeType']; + if (!\is_string($nodeType)) { + throw new \RuntimeException('Node type must be a string'); + } + + $reflectionClass = $this->reflectionClassFromNodeType($nodeType); + $node = $reflectionClass->newInstanceWithoutConstructor(); + + if (isset($value['attributes'])) { + if (!\is_array($value['attributes'])) { + throw new \RuntimeException('Attributes must be an array'); + } + + $node->setAttributes($this->decodeArray($value['attributes'])); + } + + foreach ($value as $name => $subNode) { + if ($name === 'nodeType' || $name === 'attributes') { + continue; + } + + $node->$name = $this->decodeRecursive($subNode); + } + + return $node; + } + + private function decodeComment(array $value): Comment { + $className = $value['nodeType'] === 'Comment' ? Comment::class : Comment\Doc::class; + if (!isset($value['text'])) { + throw new \RuntimeException('Comment must have text'); + } + + return new $className( + $value['text'], + $value['line'] ?? -1, $value['filePos'] ?? -1, $value['tokenPos'] ?? -1, + $value['endLine'] ?? -1, $value['endFilePos'] ?? -1, $value['endTokenPos'] ?? -1 + ); + } + + /** @return \ReflectionClass */ + private function reflectionClassFromNodeType(string $nodeType): \ReflectionClass { + if (!isset($this->reflectionClassCache[$nodeType])) { + $className = $this->classNameFromNodeType($nodeType); + $this->reflectionClassCache[$nodeType] = new \ReflectionClass($className); + } + return $this->reflectionClassCache[$nodeType]; + } + + /** @return class-string */ + private function classNameFromNodeType(string $nodeType): string { + $className = 'PhpParser\\Node\\' . strtr($nodeType, '_', '\\'); + if (class_exists($className)) { + return $className; + } + + $className .= '_'; + if (class_exists($className)) { + return $className; + } + + throw new \RuntimeException("Unknown node type \"$nodeType\""); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer.php new file mode 100644 index 0000000..5e2ece9 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer.php @@ -0,0 +1,116 @@ +postprocessTokens($tokens, $errorHandler); + + if (false !== $scream) { + ini_set('xdebug.scream', $scream); + } + + return $tokens; + } + + private function handleInvalidCharacter(Token $token, ErrorHandler $errorHandler): void { + $chr = $token->text; + if ($chr === "\0") { + // PHP cuts error message after null byte, so need special case + $errorMsg = 'Unexpected null byte'; + } else { + $errorMsg = sprintf( + 'Unexpected character "%s" (ASCII %d)', $chr, ord($chr) + ); + } + + $errorHandler->handleError(new Error($errorMsg, [ + 'startLine' => $token->line, + 'endLine' => $token->line, + 'startFilePos' => $token->pos, + 'endFilePos' => $token->pos, + ])); + } + + private function isUnterminatedComment(Token $token): bool { + return $token->is([\T_COMMENT, \T_DOC_COMMENT]) + && substr($token->text, 0, 2) === '/*' + && substr($token->text, -2) !== '*/'; + } + + /** + * @param list $tokens + */ + protected function postprocessTokens(array &$tokens, ErrorHandler $errorHandler): void { + // This function reports errors (bad characters and unterminated comments) in the token + // array, and performs certain canonicalizations: + // * Use PHP 8.1 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG and + // T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG tokens used to disambiguate intersection types. + // * Add a sentinel token with ID 0. + + $numTokens = \count($tokens); + if ($numTokens === 0) { + // Empty input edge case: Just add the sentinel token. + $tokens[] = new Token(0, "\0", 1, 0); + return; + } + + for ($i = 0; $i < $numTokens; $i++) { + $token = $tokens[$i]; + if ($token->id === \T_BAD_CHARACTER) { + $this->handleInvalidCharacter($token, $errorHandler); + } + + if ($token->id === \ord('&')) { + $next = $i + 1; + while (isset($tokens[$next]) && $tokens[$next]->id === \T_WHITESPACE) { + $next++; + } + $followedByVarOrVarArg = isset($tokens[$next]) && + $tokens[$next]->is([\T_VARIABLE, \T_ELLIPSIS]); + $token->id = $followedByVarOrVarArg + ? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG + : \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; + } + } + + // Check for unterminated comment + $lastToken = $tokens[$numTokens - 1]; + if ($this->isUnterminatedComment($lastToken)) { + $errorHandler->handleError(new Error('Unterminated comment', [ + 'startLine' => $lastToken->line, + 'endLine' => $lastToken->getEndLine(), + 'startFilePos' => $lastToken->pos, + 'endFilePos' => $lastToken->getEndPos(), + ])); + } + + // Add sentinel token. + $tokens[] = new Token(0, "\0", $lastToken->getEndLine(), $lastToken->getEndPos()); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php new file mode 100644 index 0000000..3185e80 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php @@ -0,0 +1,230 @@ + */ + private array $emulators = []; + + private PhpVersion $targetPhpVersion; + + private PhpVersion $hostPhpVersion; + + /** + * @param PhpVersion|null $phpVersion PHP version to emulate. Defaults to newest supported. + */ + public function __construct(?PhpVersion $phpVersion = null) { + $this->targetPhpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); + $this->hostPhpVersion = PhpVersion::getHostVersion(); + + $emulators = [ + new MatchTokenEmulator(), + new NullsafeTokenEmulator(), + new AttributeEmulator(), + new EnumTokenEmulator(), + new ReadonlyTokenEmulator(), + new ExplicitOctalEmulator(), + new ReadonlyFunctionTokenEmulator(), + new PropertyTokenEmulator(), + new AsymmetricVisibilityTokenEmulator(), + new PipeOperatorEmulator(), + new VoidCastEmulator(), + ]; + + // Collect emulators that are relevant for the PHP version we're running + // and the PHP version we're targeting for emulation. + foreach ($emulators as $emulator) { + $emulatorPhpVersion = $emulator->getPhpVersion(); + if ($this->isForwardEmulationNeeded($emulatorPhpVersion)) { + $this->emulators[] = $emulator; + } elseif ($this->isReverseEmulationNeeded($emulatorPhpVersion)) { + $this->emulators[] = new ReverseEmulator($emulator); + } + } + } + + public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array { + $emulators = array_filter($this->emulators, function ($emulator) use ($code) { + return $emulator->isEmulationNeeded($code); + }); + + if (empty($emulators)) { + // Nothing to emulate, yay + return parent::tokenize($code, $errorHandler); + } + + if ($errorHandler === null) { + $errorHandler = new ErrorHandler\Throwing(); + } + + $this->patches = []; + foreach ($emulators as $emulator) { + $code = $emulator->preprocessCode($code, $this->patches); + } + + $collector = new ErrorHandler\Collecting(); + $tokens = parent::tokenize($code, $collector); + $this->sortPatches(); + $tokens = $this->fixupTokens($tokens); + + $errors = $collector->getErrors(); + if (!empty($errors)) { + $this->fixupErrors($errors); + foreach ($errors as $error) { + $errorHandler->handleError($error); + } + } + + foreach ($emulators as $emulator) { + $tokens = $emulator->emulate($code, $tokens); + } + + return $tokens; + } + + private function isForwardEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { + return $this->hostPhpVersion->older($emulatorPhpVersion) + && $this->targetPhpVersion->newerOrEqual($emulatorPhpVersion); + } + + private function isReverseEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { + return $this->hostPhpVersion->newerOrEqual($emulatorPhpVersion) + && $this->targetPhpVersion->older($emulatorPhpVersion); + } + + private function sortPatches(): void { + // Patches may be contributed by different emulators. + // Make sure they are sorted by increasing patch position. + usort($this->patches, function ($p1, $p2) { + return $p1[0] <=> $p2[0]; + }); + } + + /** + * @param list $tokens + * @return list + */ + private function fixupTokens(array $tokens): array { + if (\count($this->patches) === 0) { + return $tokens; + } + + // 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 + $posDelta = 0; + $lineDelta = 0; + for ($i = 0, $c = \count($tokens); $i < $c; $i++) { + $token = $tokens[$i]; + $pos = $token->pos; + $token->pos += $posDelta; + $token->line += $lineDelta; + $localPosDelta = 0; + $len = \strlen($token->text); + while ($patchPos >= $pos && $patchPos < $pos + $len) { + $patchTextLen = \strlen($patchText); + if ($patchType === 'remove') { + if ($patchPos === $pos && $patchTextLen === $len) { + // Remove token entirely + array_splice($tokens, $i, 1, []); + $i--; + $c--; + } else { + // Remove from token string + $token->text = substr_replace( + $token->text, '', $patchPos - $pos + $localPosDelta, $patchTextLen + ); + $localPosDelta -= $patchTextLen; + } + $lineDelta -= \substr_count($patchText, "\n"); + } elseif ($patchType === 'add') { + // Insert into the token string + $token->text = substr_replace( + $token->text, $patchText, $patchPos - $pos + $localPosDelta, 0 + ); + $localPosDelta += $patchTextLen; + $lineDelta += \substr_count($patchText, "\n"); + } elseif ($patchType === 'replace') { + // Replace inside the token string + $token->text = substr_replace( + $token->text, $patchText, $patchPos - $pos + $localPosDelta, $patchTextLen + ); + } else { + assert(false); + } + + // Fetch the next patch + $patchIdx++; + if ($patchIdx >= \count($this->patches)) { + // No more patches. However, we still need to adjust position. + $patchPos = \PHP_INT_MAX; + break; + } + + list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; + } + + $posDelta += $localPosDelta; + } + return $tokens; + } + + /** + * Fixup line and position information in errors. + * + * @param Error[] $errors + */ + private function fixupErrors(array $errors): void { + foreach ($errors as $error) { + $attrs = $error->getAttributes(); + + $posDelta = 0; + $lineDelta = 0; + foreach ($this->patches as $patch) { + list($patchPos, $patchType, $patchText) = $patch; + if ($patchPos >= $attrs['startFilePos']) { + // No longer relevant + break; + } + + if ($patchType === 'add') { + $posDelta += strlen($patchText); + $lineDelta += substr_count($patchText, "\n"); + } elseif ($patchType === 'remove') { + $posDelta -= strlen($patchText); + $lineDelta -= substr_count($patchText, "\n"); + } + } + + $attrs['startFilePos'] += $posDelta; + $attrs['endFilePos'] += $posDelta; + $attrs['startLine'] += $lineDelta; + $attrs['endLine'] += $lineDelta; + $error->setAttributes($attrs); + } + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php new file mode 100644 index 0000000..084bb75 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php @@ -0,0 +1,93 @@ + \T_PUBLIC_SET, + \T_PROTECTED => \T_PROTECTED_SET, + \T_PRIVATE => \T_PRIVATE_SET, + ]; + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if (isset($map[$token->id]) && $i + 3 < $c && $tokens[$i + 1]->text === '(' && + $tokens[$i + 2]->id === \T_STRING && \strtolower($tokens[$i + 2]->text) === 'set' && + $tokens[$i + 3]->text === ')' && + $this->isKeywordContext($tokens, $i) + ) { + array_splice($tokens, $i, 4, [ + new Token( + $map[$token->id], $token->text . '(' . $tokens[$i + 2]->text . ')', + $token->line, $token->pos), + ]); + $c -= 3; + } + } + + return $tokens; + } + + public function reverseEmulate(string $code, array $tokens): array { + $reverseMap = [ + \T_PUBLIC_SET => \T_PUBLIC, + \T_PROTECTED_SET => \T_PROTECTED, + \T_PRIVATE_SET => \T_PRIVATE, + ]; + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if (isset($reverseMap[$token->id]) && + \preg_match('/(public|protected|private)\((set)\)/i', $token->text, $matches) + ) { + [, $modifier, $set] = $matches; + $modifierLen = \strlen($modifier); + array_splice($tokens, $i, 1, [ + new Token($reverseMap[$token->id], $modifier, $token->line, $token->pos), + new Token(\ord('('), '(', $token->line, $token->pos + $modifierLen), + new Token(\T_STRING, $set, $token->line, $token->pos + $modifierLen + 1), + new Token(\ord(')'), ')', $token->line, $token->pos + $modifierLen + 4), + ]); + $i += 3; + $c += 3; + } + } + + return $tokens; + } + + /** @param Token[] $tokens */ + protected function isKeywordContext(array $tokens, int $pos): bool { + $prevToken = $this->getPreviousNonSpaceToken($tokens, $pos); + if ($prevToken === null) { + return false; + } + return $prevToken->id !== \T_OBJECT_OPERATOR + && $prevToken->id !== \T_NULLSAFE_OBJECT_OPERATOR; + } + + /** @param Token[] $tokens */ + private function getPreviousNonSpaceToken(array $tokens, int $start): ?Token { + for ($i = $start - 1; $i >= 0; --$i) { + if ($tokens[$i]->id === T_WHITESPACE) { + continue; + } + + return $tokens[$i]; + } + + return null; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php new file mode 100644 index 0000000..2c12f33 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php @@ -0,0 +1,49 @@ +text === '#' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '[') { + array_splice($tokens, $i, 2, [ + new Token(\T_ATTRIBUTE, '#[', $token->line, $token->pos), + ]); + $c--; + continue; + } + } + + return $tokens; + } + + public function reverseEmulate(string $code, array $tokens): array { + // TODO + return $tokens; + } + + public function preprocessCode(string $code, array &$patches): string { + $pos = 0; + while (false !== $pos = strpos($code, '#[', $pos)) { + // Replace #[ with %[ + $code[$pos] = '%'; + $patches[] = [$pos, 'replace', '#']; + $pos += 2; + } + return $code; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php new file mode 100644 index 0000000..5418f52 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php @@ -0,0 +1,26 @@ +id === \T_WHITESPACE + && $tokens[$pos + 2]->id === \T_STRING; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php new file mode 100644 index 0000000..9cadf42 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php @@ -0,0 +1,45 @@ +id == \T_LNUMBER && $token->text === '0' && + isset($tokens[$i + 1]) && $tokens[$i + 1]->id == \T_STRING && + preg_match('/[oO][0-7]+(?:_[0-7]+)*/', $tokens[$i + 1]->text) + ) { + $tokenKind = $this->resolveIntegerOrFloatToken($tokens[$i + 1]->text); + array_splice($tokens, $i, 2, [ + new Token($tokenKind, '0' . $tokens[$i + 1]->text, $token->line, $token->pos), + ]); + $c--; + } + } + return $tokens; + } + + private function resolveIntegerOrFloatToken(string $str): int { + $str = substr($str, 1); + $str = str_replace('_', '', $str); + $num = octdec($str); + return is_float($num) ? \T_DNUMBER : \T_LNUMBER; + } + + public function reverseEmulate(string $code, array $tokens): array { + // Explicit octals were not legal code previously, don't bother. + return $tokens; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php new file mode 100644 index 0000000..066e7cd --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php @@ -0,0 +1,60 @@ +getKeywordString()) !== false; + } + + /** @param Token[] $tokens */ + protected function isKeywordContext(array $tokens, int $pos): bool { + $prevToken = $this->getPreviousNonSpaceToken($tokens, $pos); + if ($prevToken === null) { + return false; + } + return $prevToken->id !== \T_OBJECT_OPERATOR + && $prevToken->id !== \T_NULLSAFE_OBJECT_OPERATOR; + } + + public function emulate(string $code, array $tokens): array { + $keywordString = $this->getKeywordString(); + foreach ($tokens as $i => $token) { + if ($token->id === T_STRING && strtolower($token->text) === $keywordString + && $this->isKeywordContext($tokens, $i)) { + $token->id = $this->getKeywordToken(); + } + } + + return $tokens; + } + + /** @param Token[] $tokens */ + private function getPreviousNonSpaceToken(array $tokens, int $start): ?Token { + for ($i = $start - 1; $i >= 0; --$i) { + if ($tokens[$i]->id === T_WHITESPACE) { + continue; + } + + return $tokens[$i]; + } + + return null; + } + + public function reverseEmulate(string $code, array $tokens): array { + $keywordToken = $this->getKeywordToken(); + foreach ($tokens as $token) { + if ($token->id === $keywordToken) { + $token->id = \T_STRING; + } + } + + return $tokens; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php new file mode 100644 index 0000000..0fa5fbc --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php @@ -0,0 +1,19 @@ +') !== false; + } + + public function emulate(string $code, array $tokens): array { + // We need to manually iterate and manage a count because we'll change + // the tokens array on the way + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if ($token->text === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1]->id === \T_OBJECT_OPERATOR) { + array_splice($tokens, $i, 2, [ + new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), + ]); + $c--; + continue; + } + + // Handle ?-> inside encapsed string. + if ($token->id === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1]) + && $tokens[$i - 1]->id === \T_VARIABLE + && preg_match('/^\?->([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)/', $token->text, $matches) + ) { + $replacement = [ + new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), + new Token(\T_STRING, $matches[1], $token->line, $token->pos + 3), + ]; + $matchLen = \strlen($matches[0]); + if ($matchLen !== \strlen($token->text)) { + $replacement[] = new Token( + \T_ENCAPSED_AND_WHITESPACE, + \substr($token->text, $matchLen), + $token->line, $token->pos + $matchLen + ); + } + array_splice($tokens, $i, 1, $replacement); + $c += \count($replacement) - 1; + continue; + } + } + + return $tokens; + } + + public function reverseEmulate(string $code, array $tokens): array { + // ?-> was not valid code previously, don't bother. + return $tokens; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php new file mode 100644 index 0000000..b561692 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php @@ -0,0 +1,45 @@ +') !== false; + } + + public function emulate(string $code, array $tokens): array { + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if ($token->text === '|' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '>') { + array_splice($tokens, $i, 2, [ + new Token(\T_PIPE, '|>', $token->line, $token->pos), + ]); + $c--; + } + } + return $tokens; + } + + public function reverseEmulate(string $code, array $tokens): array { + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if ($token->id === \T_PIPE) { + array_splice($tokens, $i, 1, [ + new Token(\ord('|'), '|', $token->line, $token->pos), + new Token(\ord('>'), '>', $token->line, $token->pos + 1), + ]); + $i++; + $c++; + } + } + return $tokens; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php new file mode 100644 index 0000000..71b7fc2 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php @@ -0,0 +1,19 @@ +text === '(' || + ($tokens[$pos + 1]->id === \T_WHITESPACE && + isset($tokens[$pos + 2]) && + $tokens[$pos + 2]->text === '('))); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php new file mode 100644 index 0000000..851b5c4 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php @@ -0,0 +1,37 @@ +emulator = $emulator; + } + + public function getPhpVersion(): PhpVersion { + return $this->emulator->getPhpVersion(); + } + + public function isEmulationNeeded(string $code): bool { + return $this->emulator->isEmulationNeeded($code); + } + + public function emulate(string $code, array $tokens): array { + return $this->emulator->reverseEmulate($code, $tokens); + } + + public function reverseEmulate(string $code, array $tokens): array { + return $this->emulator->emulate($code, $tokens); + } + + public function preprocessCode(string $code, array &$patches): string { + return $code; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php new file mode 100644 index 0000000..fec2f19 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php @@ -0,0 +1,30 @@ +text !== '(') { + continue; + } + + $numTokens = 1; + $text = '('; + $j = $i + 1; + if ($j < $c && $tokens[$j]->id === \T_WHITESPACE && preg_match('/[ \t]+/', $tokens[$j]->text)) { + $text .= $tokens[$j]->text; + $numTokens++; + $j++; + } + + if ($j >= $c || $tokens[$j]->id !== \T_STRING || \strtolower($tokens[$j]->text) !== 'void') { + continue; + } + + $text .= $tokens[$j]->text; + $numTokens++; + $k = $j + 1; + if ($k < $c && $tokens[$k]->id === \T_WHITESPACE && preg_match('/[ \t]+/', $tokens[$k]->text)) { + $text .= $tokens[$k]->text; + $numTokens++; + $k++; + } + + if ($k >= $c || $tokens[$k]->text !== ')') { + continue; + } + + $text .= ')'; + $numTokens++; + array_splice($tokens, $i, $numTokens, [ + new Token(\T_VOID_CAST, $text, $token->line, $token->pos), + ]); + $c -= $numTokens - 1; + } + return $tokens; + } + + public function reverseEmulate(string $code, array $tokens): array { + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if ($token->id !== \T_VOID_CAST) { + continue; + } + + if (!preg_match('/^\(([ \t]*)(void)([ \t]*)\)$/i', $token->text, $match)) { + throw new \LogicException('Unexpected T_VOID_CAST contents'); + } + + $newTokens = []; + $pos = $token->pos; + + $newTokens[] = new Token(\ord('('), '(', $token->line, $pos); + $pos++; + + if ($match[1] !== '') { + $newTokens[] = new Token(\T_WHITESPACE, $match[1], $token->line, $pos); + $pos += \strlen($match[1]); + } + + $newTokens[] = new Token(\T_STRING, $match[2], $token->line, $pos); + $pos += \strlen($match[2]); + + if ($match[3] !== '') { + $newTokens[] = new Token(\T_WHITESPACE, $match[3], $token->line, $pos); + $pos += \strlen($match[3]); + } + + $newTokens[] = new Token(\ord(')'), ')', $token->line, $pos); + + array_splice($tokens, $i, 1, $newTokens); + $i += \count($newTokens) - 1; + $c += \count($newTokens) - 1; + } + return $tokens; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Modifiers.php b/vendor/nikic/php-parser/lib/PhpParser/Modifiers.php new file mode 100644 index 0000000..0f0f22d --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Modifiers.php @@ -0,0 +1,85 @@ + 'public', + self::PROTECTED => 'protected', + self::PRIVATE => 'private', + self::STATIC => 'static', + self::ABSTRACT => 'abstract', + self::FINAL => 'final', + self::READONLY => 'readonly', + self::PUBLIC_SET => 'public(set)', + self::PROTECTED_SET => 'protected(set)', + self::PRIVATE_SET => 'private(set)', + ]; + + public static function toString(int $modifier): string { + if (!isset(self::TO_STRING_MAP[$modifier])) { + throw new \InvalidArgumentException("Unknown modifier $modifier"); + } + return self::TO_STRING_MAP[$modifier]; + } + + private static function isValidModifier(int $modifier): bool { + $isPow2 = ($modifier & ($modifier - 1)) == 0 && $modifier != 0; + return $isPow2 && $modifier <= self::PRIVATE_SET; + } + + /** + * @internal + */ + public static function verifyClassModifier(int $a, int $b): void { + assert(self::isValidModifier($b)); + if (($a & $b) != 0) { + throw new Error( + 'Multiple ' . self::toString($b) . ' modifiers are not allowed'); + } + + if ($a & 48 && $b & 48) { + throw new Error('Cannot use the final modifier on an abstract class'); + } + } + + /** + * @internal + */ + public static function verifyModifier(int $a, int $b): void { + assert(self::isValidModifier($b)); + if (($a & Modifiers::VISIBILITY_MASK && $b & Modifiers::VISIBILITY_MASK) || + ($a & Modifiers::VISIBILITY_SET_MASK && $b & Modifiers::VISIBILITY_SET_MASK) + ) { + throw new Error('Multiple access type modifiers are not allowed'); + } + + if (($a & $b) != 0) { + throw new Error( + 'Multiple ' . self::toString($b) . ' modifiers are not allowed'); + } + + if ($a & 48 && $b & 48) { + throw new Error('Cannot use the final modifier on an abstract class member'); + } + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NameContext.php b/vendor/nikic/php-parser/lib/PhpParser/NameContext.php new file mode 100644 index 0000000..2265ecc --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NameContext.php @@ -0,0 +1,284 @@ + [aliasName => originalName]] */ + protected array $aliases = []; + + /** @var Name[][] Same as $aliases but preserving original case */ + protected array $origAliases = []; + + /** @var ErrorHandler Error handler */ + protected ErrorHandler $errorHandler; + + /** + * Create a name context. + * + * @param ErrorHandler $errorHandler Error handling used to report errors + */ + public function __construct(ErrorHandler $errorHandler) { + $this->errorHandler = $errorHandler; + } + + /** + * Start a new namespace. + * + * This also resets the alias table. + * + * @param Name|null $namespace Null is the global namespace + */ + public function startNamespace(?Name $namespace = null): void { + $this->namespace = $namespace; + $this->origAliases = $this->aliases = [ + Stmt\Use_::TYPE_NORMAL => [], + Stmt\Use_::TYPE_FUNCTION => [], + Stmt\Use_::TYPE_CONSTANT => [], + ]; + } + + /** + * Add an alias / import. + * + * @param Name $name Original name + * @param string $aliasName Aliased name + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* + * @param array $errorAttrs Attributes to use to report an error + */ + public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []): void { + // Constant names are case sensitive, everything else case insensitive + if ($type === Stmt\Use_::TYPE_CONSTANT) { + $aliasLookupName = $aliasName; + } else { + $aliasLookupName = strtolower($aliasName); + } + + if (isset($this->aliases[$type][$aliasLookupName])) { + $typeStringMap = [ + Stmt\Use_::TYPE_NORMAL => '', + Stmt\Use_::TYPE_FUNCTION => 'function ', + Stmt\Use_::TYPE_CONSTANT => 'const ', + ]; + + $this->errorHandler->handleError(new Error( + sprintf( + 'Cannot use %s%s as %s because the name is already in use', + $typeStringMap[$type], $name, $aliasName + ), + $errorAttrs + )); + return; + } + + $this->aliases[$type][$aliasLookupName] = $name; + $this->origAliases[$type][$aliasName] = $name; + } + + /** + * Get current namespace. + * + * @return null|Name Namespace (or null if global namespace) + */ + public function getNamespace(): ?Name { + return $this->namespace; + } + + /** + * Get resolved name. + * + * @param Name $name Name to resolve + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_{FUNCTION|CONSTANT} + * + * @return null|Name Resolved name, or null if static resolution is not possible + */ + public function getResolvedName(Name $name, int $type): ?Name { + // don't resolve special class names + if ($type === Stmt\Use_::TYPE_NORMAL && $name->isSpecialClassName()) { + if (!$name->isUnqualified()) { + $this->errorHandler->handleError(new Error( + sprintf("'\\%s' is an invalid class name", $name->toString()), + $name->getAttributes() + )); + } + return $name; + } + + // fully qualified names are already resolved + if ($name->isFullyQualified()) { + return $name; + } + + // Try to resolve aliases + if (null !== $resolvedName = $this->resolveAlias($name, $type)) { + return $resolvedName; + } + + if ($type !== Stmt\Use_::TYPE_NORMAL && $name->isUnqualified()) { + if (null === $this->namespace) { + // outside of a namespace unaliased unqualified is same as fully qualified + return new FullyQualified($name, $name->getAttributes()); + } + + // Cannot resolve statically + return null; + } + + // if no alias exists prepend current namespace + return FullyQualified::concat($this->namespace, $name, $name->getAttributes()); + } + + /** + * Get resolved class name. + * + * @param Name $name Class ame to resolve + * + * @return Name Resolved name + */ + public function getResolvedClassName(Name $name): Name { + return $this->getResolvedName($name, Stmt\Use_::TYPE_NORMAL); + } + + /** + * Get possible ways of writing a fully qualified name (e.g., by making use of aliases). + * + * @param string $name Fully-qualified name (without leading namespace separator) + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* + * + * @return Name[] Possible representations of the name + */ + public function getPossibleNames(string $name, int $type): array { + $lcName = strtolower($name); + + if ($type === Stmt\Use_::TYPE_NORMAL) { + // self, parent and static must always be unqualified + if ($lcName === "self" || $lcName === "parent" || $lcName === "static") { + return [new Name($name)]; + } + } + + // Collect possible ways to write this name, starting with the fully-qualified name + $possibleNames = [new FullyQualified($name)]; + + if (null !== $nsRelativeName = $this->getNamespaceRelativeName($name, $lcName, $type)) { + // Make sure there is no alias that makes the normally namespace-relative name + // into something else + if (null === $this->resolveAlias($nsRelativeName, $type)) { + $possibleNames[] = $nsRelativeName; + } + } + + // Check for relevant namespace use statements + foreach ($this->origAliases[Stmt\Use_::TYPE_NORMAL] as $alias => $orig) { + $lcOrig = $orig->toLowerString(); + if (0 === strpos($lcName, $lcOrig . '\\')) { + $possibleNames[] = new Name($alias . substr($name, strlen($lcOrig))); + } + } + + // Check for relevant type-specific use statements + foreach ($this->origAliases[$type] as $alias => $orig) { + if ($type === Stmt\Use_::TYPE_CONSTANT) { + // Constants are complicated-sensitive + $normalizedOrig = $this->normalizeConstName($orig->toString()); + if ($normalizedOrig === $this->normalizeConstName($name)) { + $possibleNames[] = new Name($alias); + } + } else { + // Everything else is case-insensitive + if ($orig->toLowerString() === $lcName) { + $possibleNames[] = new Name($alias); + } + } + } + + return $possibleNames; + } + + /** + * Get shortest representation of this fully-qualified name. + * + * @param string $name Fully-qualified name (without leading namespace separator) + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* + * + * @return Name Shortest representation + */ + public function getShortName(string $name, int $type): Name { + $possibleNames = $this->getPossibleNames($name, $type); + + // Find shortest name + $shortestName = null; + $shortestLength = \INF; + foreach ($possibleNames as $possibleName) { + $length = strlen($possibleName->toCodeString()); + if ($length < $shortestLength) { + $shortestName = $possibleName; + $shortestLength = $length; + } + } + + return $shortestName; + } + + private function resolveAlias(Name $name, int $type): ?FullyQualified { + $firstPart = $name->getFirst(); + + if ($name->isQualified()) { + // resolve aliases for qualified names, always against class alias table + $checkName = strtolower($firstPart); + if (isset($this->aliases[Stmt\Use_::TYPE_NORMAL][$checkName])) { + $alias = $this->aliases[Stmt\Use_::TYPE_NORMAL][$checkName]; + return FullyQualified::concat($alias, $name->slice(1), $name->getAttributes()); + } + } elseif ($name->isUnqualified()) { + // constant aliases are case-sensitive, function aliases case-insensitive + $checkName = $type === Stmt\Use_::TYPE_CONSTANT ? $firstPart : strtolower($firstPart); + if (isset($this->aliases[$type][$checkName])) { + // resolve unqualified aliases + return new FullyQualified($this->aliases[$type][$checkName], $name->getAttributes()); + } + } + + // No applicable aliases + return null; + } + + private function getNamespaceRelativeName(string $name, string $lcName, int $type): ?Name { + if (null === $this->namespace) { + return new Name($name); + } + + if ($type === Stmt\Use_::TYPE_CONSTANT) { + // The constants true/false/null always resolve to the global symbols, even inside a + // namespace, so they may be used without qualification + if ($lcName === "true" || $lcName === "false" || $lcName === "null") { + return new Name($name); + } + } + + $namespacePrefix = strtolower($this->namespace . '\\'); + if (0 === strpos($lcName, $namespacePrefix)) { + return new Name(substr($name, strlen($namespacePrefix))); + } + + return null; + } + + private function normalizeConstName(string $name): string { + $nsSep = strrpos($name, '\\'); + if (false === $nsSep) { + return $name; + } + + // Constants have case-insensitive namespace and case-sensitive short-name + $ns = substr($name, 0, $nsSep); + $shortName = substr($name, $nsSep + 1); + return strtolower($ns) . '\\' . $shortName; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node.php b/vendor/nikic/php-parser/lib/PhpParser/Node.php new file mode 100644 index 0000000..fd2a9b7 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node.php @@ -0,0 +1,150 @@ + + */ + public function getAttributes(): array; + + /** + * Replaces all the attributes of this node. + * + * @param array $attributes + */ + public function setAttributes(array $attributes): void; +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php new file mode 100644 index 0000000..6680efa --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php @@ -0,0 +1,44 @@ + $attributes Additional attributes + * @param Identifier|null $name Parameter name (for named parameters) + */ + public function __construct( + Expr $value, bool $byRef = false, bool $unpack = false, array $attributes = [], + ?Identifier $name = null + ) { + $this->attributes = $attributes; + $this->name = $name; + $this->value = $value; + $this->byRef = $byRef; + $this->unpack = $unpack; + } + + public function getSubNodeNames(): array { + return ['name', 'value', 'byRef', 'unpack']; + } + + public function getType(): string { + return 'Arg'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php new file mode 100644 index 0000000..fa1cff5 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php @@ -0,0 +1,43 @@ + $attributes Additional attributes + */ + public function __construct(Expr $value, ?Expr $key = null, bool $byRef = false, array $attributes = [], bool $unpack = false) { + $this->attributes = $attributes; + $this->key = $key; + $this->value = $value; + $this->byRef = $byRef; + $this->unpack = $unpack; + } + + public function getSubNodeNames(): array { + return ['key', 'value', 'byRef', 'unpack']; + } + + public function getType(): string { + return 'ArrayItem'; + } +} + +// @deprecated compatibility alias +class_alias(ArrayItem::class, Expr\ArrayItem::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php new file mode 100644 index 0000000..9d89243 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php @@ -0,0 +1,33 @@ + Attribute arguments */ + public array $args; + + /** + * @param Node\Name $name Attribute name + * @param list $args Attribute arguments + * @param array $attributes Additional node attributes + */ + public function __construct(Name $name, array $args = [], array $attributes = []) { + $this->attributes = $attributes; + $this->name = $name; + $this->args = $args; + } + + public function getSubNodeNames(): array { + return ['name', 'args']; + } + + public function getType(): string { + return 'Attribute'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php b/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php new file mode 100644 index 0000000..b9eb588 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php @@ -0,0 +1,27 @@ + $attributes Additional node attributes + */ + public function __construct(array $attrs, array $attributes = []) { + $this->attributes = $attributes; + $this->attrs = $attrs; + } + + public function getSubNodeNames(): array { + return ['attrs']; + } + + public function getType(): string { + return 'AttributeGroup'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php new file mode 100644 index 0000000..e313280 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php @@ -0,0 +1,36 @@ + $attributes Additional attributes + */ + public function __construct(Expr\Variable $var, bool $byRef = false, array $attributes = []) { + $this->attributes = $attributes; + $this->var = $var; + $this->byRef = $byRef; + } + + public function getSubNodeNames(): array { + return ['var', 'byRef']; + } + + public function getType(): string { + return 'ClosureUse'; + } +} + +// @deprecated compatibility alias +class_alias(ClosureUse::class, Expr\ClosureUse::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php new file mode 100644 index 0000000..05a5e5e --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php @@ -0,0 +1,13 @@ + $attributes Additional attributes + */ + public function __construct($name, Expr $value, array $attributes = []) { + $this->attributes = $attributes; + $this->name = \is_string($name) ? new Identifier($name) : $name; + $this->value = $value; + } + + public function getSubNodeNames(): array { + return ['name', 'value']; + } + + public function getType(): string { + return 'Const'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php new file mode 100644 index 0000000..55c1fe4 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php @@ -0,0 +1,37 @@ +value pair node. + * + * @param string|Node\Identifier $key Key + * @param Node\Expr $value Value + * @param array $attributes Additional attributes + */ + public function __construct($key, Node\Expr $value, array $attributes = []) { + $this->attributes = $attributes; + $this->key = \is_string($key) ? new Node\Identifier($key) : $key; + $this->value = $value; + } + + public function getSubNodeNames(): array { + return ['key', 'value']; + } + + public function getType(): string { + return 'DeclareItem'; + } +} + +// @deprecated compatibility alias +class_alias(DeclareItem::class, Stmt\DeclareDeclare::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php new file mode 100644 index 0000000..8b7dbb6 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php @@ -0,0 +1,8 @@ + $attributes Additional attributes + */ + public function __construct(Expr $var, ?Expr $dim = null, array $attributes = []) { + $this->attributes = $attributes; + $this->var = $var; + $this->dim = $dim; + } + + public function getSubNodeNames(): array { + return ['var', 'dim']; + } + + public function getType(): string { + return 'Expr_ArrayDimFetch'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php new file mode 100644 index 0000000..55ef163 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php @@ -0,0 +1,15 @@ + $attributes Additional attributes + */ + public function __construct(array $items = [], array $attributes = []) { + $this->attributes = $attributes; + $this->items = $items; + } + + public function getSubNodeNames(): array { + return ['items']; + } + + public function getType(): string { + return 'Expr_Array'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php new file mode 100644 index 0000000..0e98ce9 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php @@ -0,0 +1,84 @@ + false : Whether the closure is static + * 'byRef' => false : Whether to return by reference + * 'params' => array() : Parameters + * 'returnType' => null : Return type + * 'attrGroups' => array() : PHP attribute groups + * @param array $attributes Additional attributes + */ + public function __construct(array $subNodes, array $attributes = []) { + $this->attributes = $attributes; + $this->static = $subNodes['static'] ?? false; + $this->byRef = $subNodes['byRef'] ?? false; + $this->params = $subNodes['params'] ?? []; + $this->returnType = $subNodes['returnType'] ?? null; + $this->expr = $subNodes['expr']; + $this->attrGroups = $subNodes['attrGroups'] ?? []; + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'static', 'byRef', 'params', 'returnType', 'expr']; + } + + public function returnsByRef(): bool { + return $this->byRef; + } + + public function getParams(): array { + return $this->params; + } + + public function getReturnType() { + return $this->returnType; + } + + public function getAttrGroups(): array { + return $this->attrGroups; + } + + /** + * @return Node\Stmt\Return_[] + */ + public function getStmts(): array { + return [new Node\Stmt\Return_($this->expr)]; + } + + public function getType(): string { + return 'Expr_ArrowFunction'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php new file mode 100644 index 0000000..dcbf84d --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php @@ -0,0 +1,33 @@ + $attributes Additional attributes + */ + public function __construct(Expr $var, Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->var = $var; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['var', 'expr']; + } + + public function getType(): string { + return 'Expr_Assign'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php new file mode 100644 index 0000000..5209a64 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Expr $var, Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->var = $var; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['var', 'expr']; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php new file mode 100644 index 0000000..4f3623f --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php @@ -0,0 +1,11 @@ + $attributes Additional attributes + */ + public function __construct(Expr $var, Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->var = $var; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['var', 'expr']; + } + + public function getType(): string { + return 'Expr_AssignRef'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php new file mode 100644 index 0000000..1b92bd4 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php @@ -0,0 +1,37 @@ + $attributes Additional attributes + */ + public function __construct(Expr $left, Expr $right, array $attributes = []) { + $this->attributes = $attributes; + $this->left = $left; + $this->right = $right; + } + + public function getSubNodeNames(): array { + return ['left', 'right']; + } + + /** + * Get the operator sigil for this binary operation. + * + * In the case there are multiple possible sigils for an operator, this method does not + * necessarily return the one used in the parsed code. + */ + abstract public function getOperatorSigil(): string; +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php new file mode 100644 index 0000000..5930c54 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php @@ -0,0 +1,15 @@ +'; + } + + public function getType(): string { + return 'Expr_BinaryOp_Greater'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php new file mode 100644 index 0000000..4d440b1 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php @@ -0,0 +1,15 @@ +='; + } + + public function getType(): string { + return 'Expr_BinaryOp_GreaterOrEqual'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php new file mode 100644 index 0000000..e25d17c --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php @@ -0,0 +1,15 @@ +'; + } + + public function getType(): string { + return 'Expr_BinaryOp_Pipe'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php new file mode 100644 index 0000000..fe34b84 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php @@ -0,0 +1,15 @@ +>'; + } + + public function getType(): string { + return 'Expr_BinaryOp_ShiftRight'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php new file mode 100644 index 0000000..01e9b23 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php @@ -0,0 +1,15 @@ +'; + } + + public function getType(): string { + return 'Expr_BinaryOp_Spaceship'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php new file mode 100644 index 0000000..b7175a7 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['expr']; + } + + public function getType(): string { + return 'Expr_BitwiseNot'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php new file mode 100644 index 0000000..c66d233 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['expr']; + } + + public function getType(): string { + return 'Expr_BooleanNot'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php new file mode 100644 index 0000000..86e781c --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php @@ -0,0 +1,60 @@ + + */ + abstract public function getRawArgs(): array; + + /** + * Returns whether this call expression is actually a first class callable. + */ + public function isFirstClassCallable(): bool { + $rawArgs = $this->getRawArgs(); + return count($rawArgs) === 1 && current($rawArgs) instanceof VariadicPlaceholder; + } + + /** + * Assert that this is not a first-class callable and return only ordinary Args. + * + * @return Arg[] + */ + public function getArgs(): array { + assert(!$this->isFirstClassCallable()); + return $this->getRawArgs(); + } + + /** + * Retrieves a specific argument from the raw arguments. + * + * Returns the named argument that matches the given `$name`, or the + * positional (unnamed) argument that exists at the given `$position`, + * otherwise, returns `null` for first-class callables or if no match is found. + */ + public function getArg(string $name, int $position): ?Arg { + if ($this->isFirstClassCallable()) { + return null; + } + foreach ($this->getRawArgs() as $i => $arg) { + if ($arg->unpack) { + continue; + } + if ( + ($arg->name !== null && $arg->name->toString() === $name) + || ($arg->name === null && $i === $position) + ) { + return $arg; + } + } + return null; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php new file mode 100644 index 0000000..c2751de --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php @@ -0,0 +1,25 @@ + $attributes Additional attributes + */ + public function __construct(Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['expr']; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php new file mode 100644 index 0000000..471cb82 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php @@ -0,0 +1,11 @@ + $attributes Additional attributes + */ + public function __construct(Node $class, $name, array $attributes = []) { + $this->attributes = $attributes; + $this->class = $class; + $this->name = \is_string($name) ? new Identifier($name) : $name; + } + + public function getSubNodeNames(): array { + return ['class', 'name']; + } + + public function getType(): string { + return 'Expr_ClassConstFetch'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php new file mode 100644 index 0000000..d85bc9a --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['expr']; + } + + public function getType(): string { + return 'Expr_Clone'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php new file mode 100644 index 0000000..0680446 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php @@ -0,0 +1,86 @@ + false : Whether the closure is static + * 'byRef' => false : Whether to return by reference + * 'params' => array(): Parameters + * 'uses' => array(): use()s + * 'returnType' => null : Return type + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attributes groups + * @param array $attributes Additional attributes + */ + public function __construct(array $subNodes = [], array $attributes = []) { + $this->attributes = $attributes; + $this->static = $subNodes['static'] ?? false; + $this->byRef = $subNodes['byRef'] ?? false; + $this->params = $subNodes['params'] ?? []; + $this->uses = $subNodes['uses'] ?? []; + $this->returnType = $subNodes['returnType'] ?? null; + $this->stmts = $subNodes['stmts'] ?? []; + $this->attrGroups = $subNodes['attrGroups'] ?? []; + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'static', 'byRef', 'params', 'uses', 'returnType', 'stmts']; + } + + public function returnsByRef(): bool { + return $this->byRef; + } + + public function getParams(): array { + return $this->params; + } + + public function getReturnType() { + return $this->returnType; + } + + /** @return Node\Stmt[] */ + public function getStmts(): array { + return $this->stmts; + } + + public function getAttrGroups(): array { + return $this->attrGroups; + } + + public function getType(): string { + return 'Expr_Closure'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php new file mode 100644 index 0000000..279aa26 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php @@ -0,0 +1,15 @@ + $attributes Additional attributes + */ + public function __construct(Name $name, array $attributes = []) { + $this->attributes = $attributes; + $this->name = $name; + } + + public function getSubNodeNames(): array { + return ['name']; + } + + public function getType(): string { + return 'Expr_ConstFetch'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php new file mode 100644 index 0000000..d2f3050 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['expr']; + } + + public function getType(): string { + return 'Expr_Empty'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php new file mode 100644 index 0000000..43010ac --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php @@ -0,0 +1,30 @@ + $attributes Additional attributes + */ + public function __construct(array $attributes = []) { + $this->attributes = $attributes; + } + + public function getSubNodeNames(): array { + return []; + } + + public function getType(): string { + return 'Expr_Error'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php new file mode 100644 index 0000000..32625a2 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['expr']; + } + + public function getType(): string { + return 'Expr_ErrorSuppress'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php new file mode 100644 index 0000000..5120b1b --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['expr']; + } + + public function getType(): string { + return 'Expr_Eval'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php new file mode 100644 index 0000000..cf00246 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php @@ -0,0 +1,33 @@ + $attributes Additional attributes + */ + public function __construct(?Expr $expr = null, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['expr']; + } + + public function getType(): string { + return 'Expr_Exit'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php new file mode 100644 index 0000000..0b85840 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php @@ -0,0 +1,38 @@ + Arguments */ + public array $args; + + /** + * Constructs a function call node. + * + * @param Node\Name|Expr $name Function name + * @param array $args Arguments + * @param array $attributes Additional attributes + */ + public function __construct(Node $name, array $args = [], array $attributes = []) { + $this->attributes = $attributes; + $this->name = $name; + $this->args = $args; + } + + public function getSubNodeNames(): array { + return ['name', 'args']; + } + + public function getType(): string { + return 'Expr_FuncCall'; + } + + public function getRawArgs(): array { + return $this->args; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php new file mode 100644 index 0000000..e1187b1 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php @@ -0,0 +1,38 @@ + $attributes Additional attributes + */ + public function __construct(Expr $expr, int $type, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + $this->type = $type; + } + + public function getSubNodeNames(): array { + return ['expr', 'type']; + } + + public function getType(): string { + return 'Expr_Include'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php new file mode 100644 index 0000000..a2783cb --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php @@ -0,0 +1,35 @@ + $attributes Additional attributes + */ + public function __construct(Expr $expr, Node $class, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + $this->class = $class; + } + + public function getSubNodeNames(): array { + return ['expr', 'class']; + } + + public function getType(): string { + return 'Expr_Instanceof'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php new file mode 100644 index 0000000..4f80fff --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(array $vars, array $attributes = []) { + $this->attributes = $attributes; + $this->vars = $vars; + } + + public function getSubNodeNames(): array { + return ['vars']; + } + + public function getType(): string { + return 'Expr_Isset'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php new file mode 100644 index 0000000..496b7b3 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php @@ -0,0 +1,34 @@ + $attributes Additional attributes + */ + public function __construct(array $items, array $attributes = []) { + $this->attributes = $attributes; + $this->items = $items; + } + + public function getSubNodeNames(): array { + return ['items']; + } + + public function getType(): string { + return 'Expr_List'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php new file mode 100644 index 0000000..cd028a2 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php @@ -0,0 +1,32 @@ + $attributes Additional attributes + */ + public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) { + $this->attributes = $attributes; + $this->cond = $cond; + $this->arms = $arms; + } + + public function getSubNodeNames(): array { + return ['cond', 'arms']; + } + + public function getType(): string { + return 'Expr_Match'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php new file mode 100644 index 0000000..2703c75 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php @@ -0,0 +1,45 @@ + Arguments */ + public array $args; + + /** + * Constructs a function call node. + * + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Method name + * @param array $args Arguments + * @param array $attributes Additional attributes + */ + public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { + $this->attributes = $attributes; + $this->var = $var; + $this->name = \is_string($name) ? new Identifier($name) : $name; + $this->args = $args; + } + + public function getSubNodeNames(): array { + return ['var', 'name', 'args']; + } + + public function getType(): string { + return 'Expr_MethodCall'; + } + + public function getRawArgs(): array { + return $this->args; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php new file mode 100644 index 0000000..eedaaa1 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php @@ -0,0 +1,40 @@ + Arguments */ + public array $args; + + /** + * Constructs a function call node. + * + * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) + * @param array $args Arguments + * @param array $attributes Additional attributes + */ + public function __construct(Node $class, array $args = [], array $attributes = []) { + $this->attributes = $attributes; + $this->class = $class; + $this->args = $args; + } + + public function getSubNodeNames(): array { + return ['class', 'args']; + } + + public function getType(): string { + return 'Expr_New'; + } + + public function getRawArgs(): array { + return $this->args; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php new file mode 100644 index 0000000..a151f71 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php @@ -0,0 +1,45 @@ + Arguments */ + public array $args; + + /** + * Constructs a nullsafe method call node. + * + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Method name + * @param array $args Arguments + * @param array $attributes Additional attributes + */ + public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { + $this->attributes = $attributes; + $this->var = $var; + $this->name = \is_string($name) ? new Identifier($name) : $name; + $this->args = $args; + } + + public function getSubNodeNames(): array { + return ['var', 'name', 'args']; + } + + public function getType(): string { + return 'Expr_NullsafeMethodCall'; + } + + public function getRawArgs(): array { + return $this->args; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php new file mode 100644 index 0000000..6f73a16 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php @@ -0,0 +1,35 @@ + $attributes Additional attributes + */ + public function __construct(Expr $var, $name, array $attributes = []) { + $this->attributes = $attributes; + $this->var = $var; + $this->name = \is_string($name) ? new Identifier($name) : $name; + } + + public function getSubNodeNames(): array { + return ['var', 'name']; + } + + public function getType(): string { + return 'Expr_NullsafePropertyFetch'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php new file mode 100644 index 0000000..3dca8fd --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Expr $var, array $attributes = []) { + $this->attributes = $attributes; + $this->var = $var; + } + + public function getSubNodeNames(): array { + return ['var']; + } + + public function getType(): string { + return 'Expr_PostDec'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php new file mode 100644 index 0000000..bc990c3 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Expr $var, array $attributes = []) { + $this->attributes = $attributes; + $this->var = $var; + } + + public function getSubNodeNames(): array { + return ['var']; + } + + public function getType(): string { + return 'Expr_PostInc'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php new file mode 100644 index 0000000..2f16873 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Expr $var, array $attributes = []) { + $this->attributes = $attributes; + $this->var = $var; + } + + public function getSubNodeNames(): array { + return ['var']; + } + + public function getType(): string { + return 'Expr_PreDec'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php new file mode 100644 index 0000000..fd455f5 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Expr $var, array $attributes = []) { + $this->attributes = $attributes; + $this->var = $var; + } + + public function getSubNodeNames(): array { + return ['var']; + } + + public function getType(): string { + return 'Expr_PreInc'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php new file mode 100644 index 0000000..6057476 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['expr']; + } + + public function getType(): string { + return 'Expr_Print'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php new file mode 100644 index 0000000..8c416a8 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php @@ -0,0 +1,35 @@ + $attributes Additional attributes + */ + public function __construct(Expr $var, $name, array $attributes = []) { + $this->attributes = $attributes; + $this->var = $var; + $this->name = \is_string($name) ? new Identifier($name) : $name; + } + + public function getSubNodeNames(): array { + return ['var', 'name']; + } + + public function getType(): string { + return 'Expr_PropertyFetch'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php new file mode 100644 index 0000000..e400351 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php @@ -0,0 +1,30 @@ + $attributes Additional attributes + */ + public function __construct(array $parts, array $attributes = []) { + $this->attributes = $attributes; + $this->parts = $parts; + } + + public function getSubNodeNames(): array { + return ['parts']; + } + + public function getType(): string { + return 'Expr_ShellExec'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php new file mode 100644 index 0000000..707f34b --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php @@ -0,0 +1,45 @@ + Arguments */ + public array $args; + + /** + * Constructs a static method call node. + * + * @param Node\Name|Expr $class Class name + * @param string|Identifier|Expr $name Method name + * @param array $args Arguments + * @param array $attributes Additional attributes + */ + public function __construct(Node $class, $name, array $args = [], array $attributes = []) { + $this->attributes = $attributes; + $this->class = $class; + $this->name = \is_string($name) ? new Identifier($name) : $name; + $this->args = $args; + } + + public function getSubNodeNames(): array { + return ['class', 'name', 'args']; + } + + public function getType(): string { + return 'Expr_StaticCall'; + } + + public function getRawArgs(): array { + return $this->args; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php new file mode 100644 index 0000000..4836a65 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php @@ -0,0 +1,36 @@ + $attributes Additional attributes + */ + public function __construct(Node $class, $name, array $attributes = []) { + $this->attributes = $attributes; + $this->class = $class; + $this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name; + } + + public function getSubNodeNames(): array { + return ['class', 'name']; + } + + public function getType(): string { + return 'Expr_StaticPropertyFetch'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php new file mode 100644 index 0000000..d4837e6 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php @@ -0,0 +1,37 @@ + $attributes Additional attributes + */ + public function __construct(Expr $cond, ?Expr $if, Expr $else, array $attributes = []) { + $this->attributes = $attributes; + $this->cond = $cond; + $this->if = $if; + $this->else = $else; + } + + public function getSubNodeNames(): array { + return ['cond', 'if', 'else']; + } + + public function getType(): string { + return 'Expr_Ternary'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php new file mode 100644 index 0000000..ee49f83 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Node\Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['expr']; + } + + public function getType(): string { + return 'Expr_Throw'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php new file mode 100644 index 0000000..cd06f74 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['expr']; + } + + public function getType(): string { + return 'Expr_UnaryMinus'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php new file mode 100644 index 0000000..1b44f7b --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['expr']; + } + + public function getType(): string { + return 'Expr_UnaryPlus'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php new file mode 100644 index 0000000..bab7492 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct($name, array $attributes = []) { + $this->attributes = $attributes; + $this->name = $name; + } + + public function getSubNodeNames(): array { + return ['name']; + } + + public function getType(): string { + return 'Expr_Variable'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php new file mode 100644 index 0000000..5cff88f --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['expr']; + } + + public function getType(): string { + return 'Expr_YieldFrom'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php new file mode 100644 index 0000000..bd81e69 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php @@ -0,0 +1,33 @@ + $attributes Additional attributes + */ + public function __construct(?Expr $value = null, ?Expr $key = null, array $attributes = []) { + $this->attributes = $attributes; + $this->key = $key; + $this->value = $value; + } + + public function getSubNodeNames(): array { + return ['key', 'value']; + } + + public function getType(): string { + return 'Expr_Yield'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php new file mode 100644 index 0000000..58f653a --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php @@ -0,0 +1,40 @@ + */ + private static array $specialClassNames = [ + 'self' => true, + 'parent' => true, + 'static' => true, + ]; + + /** + * Constructs an identifier node. + * + * @param string $name Identifier as string + * @param array $attributes Additional attributes + */ + public function __construct(string $name, array $attributes = []) { + if ($name === '') { + throw new \InvalidArgumentException('Identifier name cannot be empty'); + } + + $this->attributes = $attributes; + $this->name = $name; + } + + public function getSubNodeNames(): array { + return ['name']; + } + + /** + * Get identifier as string. + * + * @psalm-return non-empty-string + * @return string Identifier as string. + */ + public function toString(): string { + return $this->name; + } + + /** + * Get lowercased identifier as string. + * + * @psalm-return non-empty-string&lowercase-string + * @return string Lowercased identifier as string + */ + public function toLowerString(): string { + return strtolower($this->name); + } + + /** + * Checks whether the identifier is a special class name (self, parent or static). + * + * @return bool Whether identifier is a special class name + */ + public function isSpecialClassName(): bool { + return isset(self::$specialClassNames[strtolower($this->name)]); + } + + /** + * Get identifier as string. + * + * @psalm-return non-empty-string + * @return string Identifier as string + */ + public function __toString(): string { + return $this->name; + } + + public function getType(): string { + return 'Identifier'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php b/vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php new file mode 100644 index 0000000..576dac4 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php @@ -0,0 +1,32 @@ + $attributes Additional attributes + */ + public function __construct(string $value, array $attributes = []) { + $this->attributes = $attributes; + $this->value = $value; + } + + public function getSubNodeNames(): array { + return ['value']; + } + + public function getType(): string { + return 'InterpolatedStringPart'; + } +} + +// @deprecated compatibility alias +class_alias(InterpolatedStringPart::class, Scalar\EncapsedStringPart::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php new file mode 100644 index 0000000..3b39cf1 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php @@ -0,0 +1,27 @@ + $attributes Additional attributes + */ + public function __construct(array $types, array $attributes = []) { + $this->attributes = $attributes; + $this->types = $types; + } + + public function getSubNodeNames(): array { + return ['types']; + } + + public function getType(): string { + return 'IntersectionType'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php b/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php new file mode 100644 index 0000000..192216d --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php @@ -0,0 +1,29 @@ + */ + public ?array $conds; + public Expr $body; + + /** + * @param null|list $conds + */ + public function __construct(?array $conds, Node\Expr $body, array $attributes = []) { + $this->conds = $conds; + $this->body = $body; + $this->attributes = $attributes; + } + + public function getSubNodeNames(): array { + return ['conds', 'body']; + } + + public function getType(): string { + return 'MatchArm'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php new file mode 100644 index 0000000..932080b --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php @@ -0,0 +1,278 @@ + */ + private static array $specialClassNames = [ + 'self' => true, + 'parent' => true, + 'static' => true, + ]; + + /** + * Constructs a name node. + * + * @param string|string[]|self $name Name as string, part array or Name instance (copy ctor) + * @param array $attributes Additional attributes + */ + final public function __construct($name, array $attributes = []) { + $this->attributes = $attributes; + $this->name = self::prepareName($name); + } + + public function getSubNodeNames(): array { + return ['name']; + } + + /** + * Get parts of name (split by the namespace separator). + * + * @psalm-return non-empty-list + * @return string[] Parts of name + */ + public function getParts(): array { + return \explode('\\', $this->name); + } + + /** + * Gets the first part of the name, i.e. everything before the first namespace separator. + * + * @return string First part of the name + */ + public function getFirst(): string { + if (false !== $pos = \strpos($this->name, '\\')) { + return \substr($this->name, 0, $pos); + } + return $this->name; + } + + /** + * Gets the last part of the name, i.e. everything after the last namespace separator. + * + * @return string Last part of the name + */ + public function getLast(): string { + if (false !== $pos = \strrpos($this->name, '\\')) { + return \substr($this->name, $pos + 1); + } + return $this->name; + } + + /** + * Checks whether the name is unqualified. (E.g. Name) + * + * @return bool Whether the name is unqualified + */ + public function isUnqualified(): bool { + return false === \strpos($this->name, '\\'); + } + + /** + * Checks whether the name is qualified. (E.g. Name\Name) + * + * @return bool Whether the name is qualified + */ + public function isQualified(): bool { + return false !== \strpos($this->name, '\\'); + } + + /** + * Checks whether the name is fully qualified. (E.g. \Name) + * + * @return bool Whether the name is fully qualified + */ + public function isFullyQualified(): bool { + return false; + } + + /** + * Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name) + * + * @return bool Whether the name is relative + */ + public function isRelative(): bool { + return false; + } + + /** + * Returns a string representation of the name itself, without taking the name type into + * account (e.g., not including a leading backslash for fully qualified names). + * + * @psalm-return non-empty-string + * @return string String representation + */ + public function toString(): string { + return $this->name; + } + + /** + * Returns a string representation of the name as it would occur in code (e.g., including + * leading backslash for fully qualified names. + * + * @psalm-return non-empty-string + * @return string String representation + */ + public function toCodeString(): string { + return $this->toString(); + } + + /** + * Returns lowercased string representation of the name, without taking the name type into + * account (e.g., no leading backslash for fully qualified names). + * + * @psalm-return non-empty-string&lowercase-string + * @return string Lowercased string representation + */ + public function toLowerString(): string { + return strtolower($this->name); + } + + /** + * Checks whether the identifier is a special class name (self, parent or static). + * + * @return bool Whether identifier is a special class name + */ + public function isSpecialClassName(): bool { + return isset(self::$specialClassNames[strtolower($this->name)]); + } + + /** + * Returns a string representation of the name by imploding the namespace parts with the + * namespace separator. + * + * @psalm-return non-empty-string + * @return string String representation + */ + public function __toString(): string { + return $this->name; + } + + /** + * Gets a slice of a name (similar to array_slice). + * + * This method returns a new instance of the same type as the original and with the same + * attributes. + * + * If the slice is empty, null is returned. The null value will be correctly handled in + * concatenations using concat(). + * + * Offset and length have the same meaning as in array_slice(). + * + * @param int $offset Offset to start the slice at (may be negative) + * @param int|null $length Length of the slice (may be negative) + * + * @return static|null Sliced name + */ + public function slice(int $offset, ?int $length = null) { + if ($offset === 1 && $length === null) { + // Short-circuit the common case. + if (false !== $pos = \strpos($this->name, '\\')) { + return new static(\substr($this->name, $pos + 1)); + } + return null; + } + + $parts = \explode('\\', $this->name); + $numParts = \count($parts); + + $realOffset = $offset < 0 ? $offset + $numParts : $offset; + if ($realOffset < 0 || $realOffset > $numParts) { + throw new \OutOfBoundsException(sprintf('Offset %d is out of bounds', $offset)); + } + + if (null === $length) { + $realLength = $numParts - $realOffset; + } else { + $realLength = $length < 0 ? $length + $numParts - $realOffset : $length; + if ($realLength < 0 || $realLength > $numParts - $realOffset) { + throw new \OutOfBoundsException(sprintf('Length %d is out of bounds', $length)); + } + } + + if ($realLength === 0) { + // Empty slice is represented as null + return null; + } + + return new static(array_slice($parts, $realOffset, $realLength), $this->attributes); + } + + /** + * Concatenate two names, yielding a new Name instance. + * + * The type of the generated instance depends on which class this method is called on, for + * example Name\FullyQualified::concat() will yield a Name\FullyQualified instance. + * + * If one of the arguments is null, a new instance of the other name will be returned. If both + * arguments are null, null will be returned. As such, writing + * Name::concat($namespace, $shortName) + * where $namespace is a Name node or null will work as expected. + * + * @param string|string[]|self|null $name1 The first name + * @param string|string[]|self|null $name2 The second name + * @param array $attributes Attributes to assign to concatenated name + * + * @return static|null Concatenated name + */ + public static function concat($name1, $name2, array $attributes = []) { + if (null === $name1 && null === $name2) { + return null; + } + if (null === $name1) { + return new static($name2, $attributes); + } + if (null === $name2) { + return new static($name1, $attributes); + } else { + return new static( + self::prepareName($name1) . '\\' . self::prepareName($name2), $attributes + ); + } + } + + /** + * Prepares a (string, array or Name node) name for use in name changing methods by converting + * it to a string. + * + * @param string|string[]|self $name Name to prepare + * + * @psalm-return non-empty-string + * @return string Prepared name + */ + private static function prepareName($name): string { + if (\is_string($name)) { + if ('' === $name) { + throw new \InvalidArgumentException('Name cannot be empty'); + } + + return $name; + } + if (\is_array($name)) { + if (empty($name)) { + throw new \InvalidArgumentException('Name cannot be empty'); + } + + return implode('\\', $name); + } + if ($name instanceof self) { + return $name->name; + } + + throw new \InvalidArgumentException( + 'Expected string, array of parts or Name instance' + ); + } + + public function getType(): string { + return 'Name'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php new file mode 100644 index 0000000..2118378 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php @@ -0,0 +1,49 @@ +toString(); + } + + public function getType(): string { + return 'Name_FullyQualified'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php new file mode 100644 index 0000000..0226a4e --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php @@ -0,0 +1,49 @@ +toString(); + } + + public function getType(): string { + return 'Name_Relative'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php new file mode 100644 index 0000000..b99acd1 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(Node $type, array $attributes = []) { + $this->attributes = $attributes; + $this->type = $type; + } + + public function getSubNodeNames(): array { + return ['type']; + } + + public function getType(): string { + return 'NullableType'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php new file mode 100644 index 0000000..6cbb84c --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php @@ -0,0 +1,123 @@ + $attributes Additional attributes + * @param int $flags Optional visibility flags + * @param list $attrGroups PHP attribute groups + * @param PropertyHook[] $hooks Property hooks for promoted properties + */ + public function __construct( + Expr $var, ?Expr $default = null, ?Node $type = null, + bool $byRef = false, bool $variadic = false, + array $attributes = [], + int $flags = 0, + array $attrGroups = [], + array $hooks = [] + ) { + $this->attributes = $attributes; + $this->type = $type; + $this->byRef = $byRef; + $this->variadic = $variadic; + $this->var = $var; + $this->default = $default; + $this->flags = $flags; + $this->attrGroups = $attrGroups; + $this->hooks = $hooks; + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default', 'hooks']; + } + + public function getType(): string { + return 'Param'; + } + + /** + * Whether this parameter uses constructor property promotion. + */ + public function isPromoted(): bool { + return $this->flags !== 0 || $this->hooks !== []; + } + + public function isFinal(): bool { + return (bool) ($this->flags & Modifiers::FINAL); + } + + public function isPublic(): bool { + $public = (bool) ($this->flags & Modifiers::PUBLIC); + if ($public) { + return true; + } + + if (!$this->isPromoted()) { + return false; + } + + return ($this->flags & Modifiers::VISIBILITY_MASK) === 0; + } + + public function isProtected(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED); + } + + public function isPrivate(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE); + } + + public function isReadonly(): bool { + return (bool) ($this->flags & Modifiers::READONLY); + } + + /** + * Whether the promoted property has explicit public(set) visibility. + */ + public function isPublicSet(): bool { + return (bool) ($this->flags & Modifiers::PUBLIC_SET); + } + + /** + * Whether the promoted property has explicit protected(set) visibility. + */ + public function isProtectedSet(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED_SET); + } + + /** + * Whether the promoted property has explicit private(set) visibility. + */ + public function isPrivateSet(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE_SET); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php b/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php new file mode 100644 index 0000000..349b9ce --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php @@ -0,0 +1,105 @@ + 0 : Flags + * 'byRef' => false : Whether hook returns by reference + * 'params' => array(): Parameters + * 'attrGroups' => array(): PHP attribute groups + * @param array $attributes Additional attributes + */ + public function __construct($name, $body, array $subNodes = [], array $attributes = []) { + $this->attributes = $attributes; + $this->name = \is_string($name) ? new Identifier($name) : $name; + $this->body = $body; + $this->flags = $subNodes['flags'] ?? 0; + $this->byRef = $subNodes['byRef'] ?? false; + $this->params = $subNodes['params'] ?? []; + $this->attrGroups = $subNodes['attrGroups'] ?? []; + } + + public function returnsByRef(): bool { + return $this->byRef; + } + + public function getParams(): array { + return $this->params; + } + + public function getReturnType() { + return null; + } + + /** + * Whether the property hook is final. + */ + public function isFinal(): bool { + return (bool) ($this->flags & Modifiers::FINAL); + } + + public function getStmts(): ?array { + if ($this->body instanceof Expr) { + $name = $this->name->toLowerString(); + if ($name === 'get') { + return [new Return_($this->body)]; + } + if ($name === 'set') { + if (!$this->hasAttribute('propertyName')) { + throw new \LogicException( + 'Can only use getStmts() on a "set" hook if the "propertyName" attribute is set'); + } + + $propName = $this->getAttribute('propertyName'); + $prop = new PropertyFetch(new Variable('this'), (string) $propName); + return [new Expression(new Assign($prop, $this->body))]; + } + throw new \LogicException('Unknown property hook "' . $name . '"'); + } + return $this->body; + } + + public function getAttrGroups(): array { + return $this->attrGroups; + } + + public function getType(): string { + return 'PropertyHook'; + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'body']; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php new file mode 100644 index 0000000..101611e --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php @@ -0,0 +1,37 @@ + $attributes Additional attributes + */ + public function __construct($name, ?Node\Expr $default = null, array $attributes = []) { + $this->attributes = $attributes; + $this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name; + $this->default = $default; + } + + public function getSubNodeNames(): array { + return ['name', 'default']; + } + + public function getType(): string { + return 'PropertyItem'; + } +} + +// @deprecated compatibility alias +class_alias(PropertyItem::class, Stmt\PropertyProperty::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php new file mode 100644 index 0000000..3df2572 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php @@ -0,0 +1,6 @@ + $attributes Additional attributes + */ + public function __construct(float $value, array $attributes = []) { + $this->attributes = $attributes; + $this->value = $value; + } + + public function getSubNodeNames(): array { + return ['value']; + } + + /** + * @param mixed[] $attributes + */ + public static function fromString(string $str, array $attributes = []): Float_ { + $attributes['rawValue'] = $str; + $float = self::parse($str); + + return new Float_($float, $attributes); + } + + /** + * @internal + * + * Parses a DNUMBER token like PHP would. + * + * @param string $str A string number + * + * @return float The parsed number + */ + public static function parse(string $str): float { + $str = str_replace('_', '', $str); + + // Check whether this is one of the special integer notations. + if ('0' === $str[0]) { + // hex + if ('x' === $str[1] || 'X' === $str[1]) { + return hexdec($str); + } + + // bin + if ('b' === $str[1] || 'B' === $str[1]) { + return bindec($str); + } + + // oct, but only if the string does not contain any of '.eE'. + if (false === strpbrk($str, '.eE')) { + // substr($str, 0, strcspn($str, '89')) cuts the string at the first invalid digit + // (8 or 9) so that only the digits before that are used. + return octdec(substr($str, 0, strcspn($str, '89'))); + } + } + + // dec + return (float) $str; + } + + public function getType(): string { + return 'Scalar_Float'; + } +} + +// @deprecated compatibility alias +class_alias(Float_::class, DNumber::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php new file mode 100644 index 0000000..bcc257a --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php @@ -0,0 +1,82 @@ + $attributes Additional attributes + */ + public function __construct(int $value, array $attributes = []) { + $this->attributes = $attributes; + $this->value = $value; + } + + public function getSubNodeNames(): array { + return ['value']; + } + + /** + * Constructs an Int node from a string number literal. + * + * @param string $str String number literal (decimal, octal, hex or binary) + * @param array $attributes Additional attributes + * @param bool $allowInvalidOctal Whether to allow invalid octal numbers (PHP 5) + * + * @return Int_ The constructed LNumber, including kind attribute + */ + public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false): Int_ { + $attributes['rawValue'] = $str; + + $str = str_replace('_', '', $str); + + if ('0' !== $str[0] || '0' === $str) { + $attributes['kind'] = Int_::KIND_DEC; + return new Int_((int) $str, $attributes); + } + + if ('x' === $str[1] || 'X' === $str[1]) { + $attributes['kind'] = Int_::KIND_HEX; + return new Int_(hexdec($str), $attributes); + } + + if ('b' === $str[1] || 'B' === $str[1]) { + $attributes['kind'] = Int_::KIND_BIN; + return new Int_(bindec($str), $attributes); + } + + if (!$allowInvalidOctal && strpbrk($str, '89')) { + throw new Error('Invalid numeric literal', $attributes); + } + + // Strip optional explicit octal prefix. + if ('o' === $str[1] || 'O' === $str[1]) { + $str = substr($str, 2); + } + + // use intval instead of octdec to get proper cutting behavior with malformed numbers + $attributes['kind'] = Int_::KIND_OCT; + return new Int_(intval($str, 8), $attributes); + } + + public function getType(): string { + return 'Scalar_Int'; + } +} + +// @deprecated compatibility alias +class_alias(Int_::class, LNumber::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php new file mode 100644 index 0000000..9336dfe --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php @@ -0,0 +1,34 @@ + $attributes Additional attributes + */ + public function __construct(array $parts, array $attributes = []) { + $this->attributes = $attributes; + $this->parts = $parts; + } + + public function getSubNodeNames(): array { + return ['parts']; + } + + public function getType(): string { + return 'Scalar_InterpolatedString'; + } +} + +// @deprecated compatibility alias +class_alias(InterpolatedString::class, Encapsed::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php new file mode 100644 index 0000000..868d78f --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php @@ -0,0 +1,15 @@ + $attributes Additional attributes + */ + public function __construct(array $attributes = []) { + $this->attributes = $attributes; + } + + public function getSubNodeNames(): array { + return []; + } + + /** + * Get name of magic constant. + * + * @return string Name of magic constant + */ + abstract public function getName(): string; +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php new file mode 100644 index 0000000..732ed14 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php @@ -0,0 +1,15 @@ + Escaped character to its decoded value */ + protected static array $replacements = [ + '\\' => '\\', + '$' => '$', + 'n' => "\n", + 'r' => "\r", + 't' => "\t", + 'f' => "\f", + 'v' => "\v", + 'e' => "\x1B", + ]; + + /** + * Constructs a string scalar node. + * + * @param string $value Value of the string + * @param array $attributes Additional attributes + */ + public function __construct(string $value, array $attributes = []) { + $this->attributes = $attributes; + $this->value = $value; + } + + public function getSubNodeNames(): array { + return ['value']; + } + + /** + * @param array $attributes + * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes + */ + public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self { + $attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B'))) + ? Scalar\String_::KIND_SINGLE_QUOTED + : Scalar\String_::KIND_DOUBLE_QUOTED; + + $attributes['rawValue'] = $str; + + $string = self::parse($str, $parseUnicodeEscape); + + return new self($string, $attributes); + } + + /** + * @internal + * + * Parses a string token. + * + * @param string $str String token content + * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes + * + * @return string The parsed string + */ + public static function parse(string $str, bool $parseUnicodeEscape = true): string { + $bLength = 0; + if ('b' === $str[0] || 'B' === $str[0]) { + $bLength = 1; + } + + if ('\'' === $str[$bLength]) { + return str_replace( + ['\\\\', '\\\''], + ['\\', '\''], + substr($str, $bLength + 1, -1) + ); + } else { + return self::parseEscapeSequences( + substr($str, $bLength + 1, -1), '"', $parseUnicodeEscape + ); + } + } + + /** + * @internal + * + * Parses escape sequences in strings (all string types apart from single quoted). + * + * @param string $str String without quotes + * @param null|string $quote Quote type + * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes + * + * @return string String with escape sequences parsed + */ + public static function parseEscapeSequences(string $str, ?string $quote, bool $parseUnicodeEscape = true): string { + if (null !== $quote) { + $str = str_replace('\\' . $quote, $quote, $str); + } + + $extra = ''; + if ($parseUnicodeEscape) { + $extra = '|u\{([0-9a-fA-F]+)\}'; + } + + return preg_replace_callback( + '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~', + function ($matches) { + $str = $matches[1]; + + if (isset(self::$replacements[$str])) { + return self::$replacements[$str]; + } + if ('x' === $str[0] || 'X' === $str[0]) { + return chr(hexdec(substr($str, 1))); + } + if ('u' === $str[0]) { + $dec = hexdec($matches[2]); + // If it overflowed to float, treat as INT_MAX, it will throw an error anyway. + return self::codePointToUtf8(\is_int($dec) ? $dec : \PHP_INT_MAX); + } else { + return chr(octdec($str) & 255); + } + }, + $str + ); + } + + /** + * Converts a Unicode code point to its UTF-8 encoded representation. + * + * @param int $num Code point + * + * @return string UTF-8 representation of code point + */ + private static function codePointToUtf8(int $num): string { + if ($num <= 0x7F) { + return chr($num); + } + if ($num <= 0x7FF) { + return chr(($num >> 6) + 0xC0) . chr(($num & 0x3F) + 0x80); + } + if ($num <= 0xFFFF) { + return chr(($num >> 12) + 0xE0) . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80); + } + if ($num <= 0x1FFFFF) { + return chr(($num >> 18) + 0xF0) . chr((($num >> 12) & 0x3F) + 0x80) + . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80); + } + throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large'); + } + + public function getType(): string { + return 'Scalar_String'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php new file mode 100644 index 0000000..517c0ed --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php @@ -0,0 +1,39 @@ + $attributes Additional attributes + */ + public function __construct( + Expr\Variable $var, ?Node\Expr $default = null, array $attributes = [] + ) { + $this->attributes = $attributes; + $this->var = $var; + $this->default = $default; + } + + public function getSubNodeNames(): array { + return ['var', 'default']; + } + + public function getType(): string { + return 'StaticVar'; + } +} + +// @deprecated compatibility alias +class_alias(StaticVar::class, Stmt\StaticVar::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php new file mode 100644 index 0000000..481d31a --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php @@ -0,0 +1,8 @@ + $attributes Additional attributes + */ + public function __construct(array $stmts, array $attributes = []) { + $this->attributes = $attributes; + $this->stmts = $stmts; + } + + public function getType(): string { + return 'Stmt_Block'; + } + + public function getSubNodeNames(): array { + return ['stmts']; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php new file mode 100644 index 0000000..d2bcc5e --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(?Node\Expr $num = null, array $attributes = []) { + $this->attributes = $attributes; + $this->num = $num; + } + + public function getSubNodeNames(): array { + return ['num']; + } + + public function getType(): string { + return 'Stmt_Break'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php new file mode 100644 index 0000000..a06ca18 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php @@ -0,0 +1,33 @@ + $attributes Additional attributes + */ + public function __construct(?Node\Expr $cond, array $stmts = [], array $attributes = []) { + $this->attributes = $attributes; + $this->cond = $cond; + $this->stmts = $stmts; + } + + public function getSubNodeNames(): array { + return ['cond', 'stmts']; + } + + public function getType(): string { + return 'Stmt_Case'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php new file mode 100644 index 0000000..e8d39c9 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php @@ -0,0 +1,40 @@ + $attributes Additional attributes + */ + public function __construct( + array $types, ?Expr\Variable $var = null, array $stmts = [], array $attributes = [] + ) { + $this->attributes = $attributes; + $this->types = $types; + $this->var = $var; + $this->stmts = $stmts; + } + + public function getSubNodeNames(): array { + return ['types', 'var', 'stmts']; + } + + public function getType(): string { + return 'Stmt_Catch'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php new file mode 100644 index 0000000..9bdce1f --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php @@ -0,0 +1,77 @@ + $attributes Additional attributes + * @param list $attrGroups PHP attribute groups + * @param null|Node\Identifier|Node\Name|Node\ComplexType $type Type declaration + */ + public function __construct( + array $consts, + int $flags = 0, + array $attributes = [], + array $attrGroups = [], + ?Node $type = null + ) { + $this->attributes = $attributes; + $this->flags = $flags; + $this->consts = $consts; + $this->attrGroups = $attrGroups; + $this->type = $type; + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'flags', 'type', 'consts']; + } + + /** + * Whether constant is explicitly or implicitly public. + */ + public function isPublic(): bool { + return ($this->flags & Modifiers::PUBLIC) !== 0 + || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; + } + + /** + * Whether constant is protected. + */ + public function isProtected(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED); + } + + /** + * Whether constant is private. + */ + public function isPrivate(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE); + } + + /** + * Whether constant is final. + */ + public function isFinal(): bool { + return (bool) ($this->flags & Modifiers::FINAL); + } + + public function getType(): string { + return 'Stmt_ClassConst'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php new file mode 100644 index 0000000..e652177 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php @@ -0,0 +1,109 @@ + + */ + public function getTraitUses(): array { + $traitUses = []; + foreach ($this->stmts as $stmt) { + if ($stmt instanceof TraitUse) { + $traitUses[] = $stmt; + } + } + return $traitUses; + } + + /** + * @return list + */ + public function getConstants(): array { + $constants = []; + foreach ($this->stmts as $stmt) { + if ($stmt instanceof ClassConst) { + $constants[] = $stmt; + } + } + return $constants; + } + + /** + * @return list + */ + public function getProperties(): array { + $properties = []; + foreach ($this->stmts as $stmt) { + if ($stmt instanceof Property) { + $properties[] = $stmt; + } + } + return $properties; + } + + /** + * Gets property with the given name defined directly in this class/interface/trait. + * + * @param string $name Name of the property + * + * @return Property|null Property node or null if the property does not exist + */ + public function getProperty(string $name): ?Property { + foreach ($this->stmts as $stmt) { + if ($stmt instanceof Property) { + foreach ($stmt->props as $prop) { + if ($prop instanceof PropertyItem && $name === $prop->name->toString()) { + return $stmt; + } + } + } + } + return null; + } + + /** + * Gets all methods defined directly in this class/interface/trait + * + * @return list + */ + public function getMethods(): array { + $methods = []; + foreach ($this->stmts as $stmt) { + if ($stmt instanceof ClassMethod) { + $methods[] = $stmt; + } + } + return $methods; + } + + /** + * Gets method with the given name defined directly in this class/interface/trait. + * + * @param string $name Name of the method (compared case-insensitively) + * + * @return ClassMethod|null Method node or null if the method does not exist + */ + public function getMethod(string $name): ?ClassMethod { + $lowerName = strtolower($name); + foreach ($this->stmts as $stmt) { + if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) { + return $stmt; + } + } + return null; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php new file mode 100644 index 0000000..59c0519 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -0,0 +1,154 @@ + */ + private static array $magicNames = [ + '__construct' => true, + '__destruct' => true, + '__call' => true, + '__callstatic' => true, + '__get' => true, + '__set' => true, + '__isset' => true, + '__unset' => true, + '__sleep' => true, + '__wakeup' => true, + '__tostring' => true, + '__set_state' => true, + '__clone' => true, + '__invoke' => true, + '__debuginfo' => true, + '__serialize' => true, + '__unserialize' => true, + ]; + + /** + * Constructs a class method node. + * + * @param string|Node\Identifier $name Name + * @param array{ + * flags?: int, + * byRef?: bool, + * params?: Node\Param[], + * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, + * stmts?: Node\Stmt[]|null, + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'flags => 0 : Flags + * 'byRef' => false : Whether to return by reference + * 'params' => array() : Parameters + * 'returnType' => null : Return type + * 'stmts' => array() : Statements + * 'attrGroups' => array() : PHP attribute groups + * @param array $attributes Additional attributes + */ + public function __construct($name, array $subNodes = [], array $attributes = []) { + $this->attributes = $attributes; + $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0; + $this->byRef = $subNodes['byRef'] ?? false; + $this->name = \is_string($name) ? new Node\Identifier($name) : $name; + $this->params = $subNodes['params'] ?? []; + $this->returnType = $subNodes['returnType'] ?? null; + $this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : []; + $this->attrGroups = $subNodes['attrGroups'] ?? []; + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'returnType', 'stmts']; + } + + public function returnsByRef(): bool { + return $this->byRef; + } + + public function getParams(): array { + return $this->params; + } + + public function getReturnType() { + return $this->returnType; + } + + public function getStmts(): ?array { + return $this->stmts; + } + + public function getAttrGroups(): array { + return $this->attrGroups; + } + + /** + * Whether the method is explicitly or implicitly public. + */ + public function isPublic(): bool { + return ($this->flags & Modifiers::PUBLIC) !== 0 + || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; + } + + /** + * Whether the method is protected. + */ + public function isProtected(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED); + } + + /** + * Whether the method is private. + */ + public function isPrivate(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE); + } + + /** + * Whether the method is abstract. + */ + public function isAbstract(): bool { + return (bool) ($this->flags & Modifiers::ABSTRACT); + } + + /** + * Whether the method is final. + */ + public function isFinal(): bool { + return (bool) ($this->flags & Modifiers::FINAL); + } + + /** + * Whether the method is static. + */ + public function isStatic(): bool { + return (bool) ($this->flags & Modifiers::STATIC); + } + + /** + * Whether the method is magic. + */ + public function isMagic(): bool { + return isset(self::$magicNames[$this->name->toLowerString()]); + } + + public function getType(): string { + return 'Stmt_ClassMethod'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php new file mode 100644 index 0000000..3f492b7 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php @@ -0,0 +1,94 @@ + 0 : Flags + * 'extends' => null : Name of extended class + * 'implements' => array(): Names of implemented interfaces + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attribute groups + * @param array $attributes Additional attributes + */ + public function __construct($name, array $subNodes = [], array $attributes = []) { + $this->attributes = $attributes; + $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0; + $this->name = \is_string($name) ? new Node\Identifier($name) : $name; + $this->extends = $subNodes['extends'] ?? null; + $this->implements = $subNodes['implements'] ?? []; + $this->stmts = $subNodes['stmts'] ?? []; + $this->attrGroups = $subNodes['attrGroups'] ?? []; + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'flags', 'name', 'extends', 'implements', 'stmts']; + } + + /** + * Whether the class is explicitly abstract. + */ + public function isAbstract(): bool { + return (bool) ($this->flags & Modifiers::ABSTRACT); + } + + /** + * Whether the class is final. + */ + public function isFinal(): bool { + return (bool) ($this->flags & Modifiers::FINAL); + } + + public function isReadonly(): bool { + return (bool) ($this->flags & Modifiers::READONLY); + } + + /** + * Whether the class is anonymous. + */ + public function isAnonymous(): bool { + return null === $this->name; + } + + public function getType(): string { + return 'Stmt_Class'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php new file mode 100644 index 0000000..c54d678 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php @@ -0,0 +1,37 @@ + $attributes Additional attributes + * @param list $attrGroups PHP attribute groups + */ + public function __construct( + array $consts, + array $attributes = [], + array $attrGroups = [] + ) { + $this->attributes = $attributes; + $this->attrGroups = $attrGroups; + $this->consts = $consts; + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'consts']; + } + + public function getType(): string { + return 'Stmt_Const'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php new file mode 100644 index 0000000..54e979d --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(?Node\Expr $num = null, array $attributes = []) { + $this->attributes = $attributes; + $this->num = $num; + } + + public function getSubNodeNames(): array { + return ['num']; + } + + public function getType(): string { + return 'Stmt_Continue'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php new file mode 100644 index 0000000..c186134 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php @@ -0,0 +1,17 @@ + $attributes Additional attributes + */ + public function __construct(array $declares, ?array $stmts = null, array $attributes = []) { + $this->attributes = $attributes; + $this->declares = $declares; + $this->stmts = $stmts; + } + + public function getSubNodeNames(): array { + return ['declares', 'stmts']; + } + + public function getType(): string { + return 'Stmt_Declare'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php new file mode 100644 index 0000000..6124442 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php @@ -0,0 +1,33 @@ + $attributes Additional attributes + */ + public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { + $this->attributes = $attributes; + $this->cond = $cond; + $this->stmts = $stmts; + } + + public function getSubNodeNames(): array { + return ['stmts', 'cond']; + } + + public function getType(): string { + return 'Stmt_Do'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php new file mode 100644 index 0000000..4d42452 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(array $exprs, array $attributes = []) { + $this->attributes = $attributes; + $this->exprs = $exprs; + } + + public function getSubNodeNames(): array { + return ['exprs']; + } + + public function getType(): string { + return 'Stmt_Echo'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php new file mode 100644 index 0000000..b26d59c --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php @@ -0,0 +1,33 @@ + $attributes Additional attributes + */ + public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { + $this->attributes = $attributes; + $this->cond = $cond; + $this->stmts = $stmts; + } + + public function getSubNodeNames(): array { + return ['cond', 'stmts']; + } + + public function getType(): string { + return 'Stmt_ElseIf'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php new file mode 100644 index 0000000..3d2b066 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(array $stmts = [], array $attributes = []) { + $this->attributes = $attributes; + $this->stmts = $stmts; + } + + public function getSubNodeNames(): array { + return ['stmts']; + } + + public function getType(): string { + return 'Stmt_Else'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php new file mode 100644 index 0000000..c071a0a --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php @@ -0,0 +1,36 @@ + $attrGroups PHP attribute groups + * @param array $attributes Additional attributes + */ + public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) { + parent::__construct($attributes); + $this->name = \is_string($name) ? new Node\Identifier($name) : $name; + $this->expr = $expr; + $this->attrGroups = $attrGroups; + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'name', 'expr']; + } + + public function getType(): string { + return 'Stmt_EnumCase'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php new file mode 100644 index 0000000..7eea6a6 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php @@ -0,0 +1,44 @@ + null : Scalar type + * 'implements' => array() : Names of implemented interfaces + * 'stmts' => array() : Statements + * 'attrGroups' => array() : PHP attribute groups + * @param array $attributes Additional attributes + */ + public function __construct($name, array $subNodes = [], array $attributes = []) { + $this->name = \is_string($name) ? new Node\Identifier($name) : $name; + $this->scalarType = $subNodes['scalarType'] ?? null; + $this->implements = $subNodes['implements'] ?? []; + $this->stmts = $subNodes['stmts'] ?? []; + $this->attrGroups = $subNodes['attrGroups'] ?? []; + + parent::__construct($attributes); + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'name', 'scalarType', 'implements', 'stmts']; + } + + public function getType(): string { + return 'Stmt_Enum'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php new file mode 100644 index 0000000..89751fa --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php @@ -0,0 +1,32 @@ + $attributes Additional attributes + */ + public function __construct(Node\Expr $expr, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['expr']; + } + + public function getType(): string { + return 'Stmt_Expression'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php new file mode 100644 index 0000000..69ecf25 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(array $stmts = [], array $attributes = []) { + $this->attributes = $attributes; + $this->stmts = $stmts; + } + + public function getSubNodeNames(): array { + return ['stmts']; + } + + public function getType(): string { + return 'Stmt_Finally'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php new file mode 100644 index 0000000..6f2fbb9 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php @@ -0,0 +1,47 @@ + array(): Init expressions + * 'cond' => array(): Loop conditions + * 'loop' => array(): Loop expressions + * 'stmts' => array(): Statements + * @param array $attributes Additional attributes + */ + public function __construct(array $subNodes = [], array $attributes = []) { + $this->attributes = $attributes; + $this->init = $subNodes['init'] ?? []; + $this->cond = $subNodes['cond'] ?? []; + $this->loop = $subNodes['loop'] ?? []; + $this->stmts = $subNodes['stmts'] ?? []; + } + + public function getSubNodeNames(): array { + return ['init', 'cond', 'loop', 'stmts']; + } + + public function getType(): string { + return 'Stmt_For'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php new file mode 100644 index 0000000..c5d9a8b --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php @@ -0,0 +1,50 @@ + null : Variable to assign key to + * 'byRef' => false : Whether to assign value by reference + * 'stmts' => array(): Statements + * @param array $attributes Additional attributes + */ + public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = [], array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + $this->keyVar = $subNodes['keyVar'] ?? null; + $this->byRef = $subNodes['byRef'] ?? false; + $this->valueVar = $valueVar; + $this->stmts = $subNodes['stmts'] ?? []; + } + + public function getSubNodeNames(): array { + return ['expr', 'keyVar', 'byRef', 'valueVar', 'stmts']; + } + + public function getType(): string { + return 'Stmt_Foreach'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php new file mode 100644 index 0000000..2111bab --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php @@ -0,0 +1,81 @@ + false : Whether to return by reference + * 'params' => array(): Parameters + * 'returnType' => null : Return type + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attribute groups + * @param array $attributes Additional attributes + */ + public function __construct($name, array $subNodes = [], array $attributes = []) { + $this->attributes = $attributes; + $this->byRef = $subNodes['byRef'] ?? false; + $this->name = \is_string($name) ? new Node\Identifier($name) : $name; + $this->params = $subNodes['params'] ?? []; + $this->returnType = $subNodes['returnType'] ?? null; + $this->stmts = $subNodes['stmts'] ?? []; + $this->attrGroups = $subNodes['attrGroups'] ?? []; + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'byRef', 'name', 'params', 'returnType', 'stmts']; + } + + public function returnsByRef(): bool { + return $this->byRef; + } + + public function getParams(): array { + return $this->params; + } + + public function getReturnType() { + return $this->returnType; + } + + public function getAttrGroups(): array { + return $this->attrGroups; + } + + /** @return Node\Stmt[] */ + public function getStmts(): array { + return $this->stmts; + } + + public function getType(): string { + return 'Stmt_Function'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php new file mode 100644 index 0000000..d3ab12f --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(array $vars, array $attributes = []) { + $this->attributes = $attributes; + $this->vars = $vars; + } + + public function getSubNodeNames(): array { + return ['vars']; + } + + public function getType(): string { + return 'Stmt_Global'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php new file mode 100644 index 0000000..26a0d01 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php @@ -0,0 +1,30 @@ + $attributes Additional attributes + */ + public function __construct($name, array $attributes = []) { + $this->attributes = $attributes; + $this->name = \is_string($name) ? new Identifier($name) : $name; + } + + public function getSubNodeNames(): array { + return ['name']; + } + + public function getType(): string { + return 'Stmt_Goto'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php new file mode 100644 index 0000000..0ec8e9d --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php @@ -0,0 +1,41 @@ + $attributes Additional attributes + */ + public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NORMAL, array $attributes = []) { + $this->attributes = $attributes; + $this->type = $type; + $this->prefix = $prefix; + $this->uses = $uses; + } + + public function getSubNodeNames(): array { + return ['type', 'prefix', 'uses']; + } + + public function getType(): string { + return 'Stmt_GroupUse'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php new file mode 100644 index 0000000..665bacd --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(string $remaining, array $attributes = []) { + $this->attributes = $attributes; + $this->remaining = $remaining; + } + + public function getSubNodeNames(): array { + return ['remaining']; + } + + public function getType(): string { + return 'Stmt_HaltCompiler'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php new file mode 100644 index 0000000..544390f --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php @@ -0,0 +1,46 @@ + array(): Statements + * 'elseifs' => array(): Elseif clauses + * 'else' => null : Else clause + * @param array $attributes Additional attributes + */ + public function __construct(Node\Expr $cond, array $subNodes = [], array $attributes = []) { + $this->attributes = $attributes; + $this->cond = $cond; + $this->stmts = $subNodes['stmts'] ?? []; + $this->elseifs = $subNodes['elseifs'] ?? []; + $this->else = $subNodes['else'] ?? null; + } + + public function getSubNodeNames(): array { + return ['cond', 'stmts', 'elseifs', 'else']; + } + + public function getType(): string { + return 'Stmt_If'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php new file mode 100644 index 0000000..0515d02 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(string $value, array $attributes = []) { + $this->attributes = $attributes; + $this->value = $value; + } + + public function getSubNodeNames(): array { + return ['value']; + } + + public function getType(): string { + return 'Stmt_InlineHTML'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php new file mode 100644 index 0000000..9359064 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php @@ -0,0 +1,40 @@ + array(): Name of extended interfaces + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attribute groups + * @param array $attributes Additional attributes + */ + public function __construct($name, array $subNodes = [], array $attributes = []) { + $this->attributes = $attributes; + $this->name = \is_string($name) ? new Node\Identifier($name) : $name; + $this->extends = $subNodes['extends'] ?? []; + $this->stmts = $subNodes['stmts'] ?? []; + $this->attrGroups = $subNodes['attrGroups'] ?? []; + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'name', 'extends', 'stmts']; + } + + public function getType(): string { + return 'Stmt_Interface'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php new file mode 100644 index 0000000..658468d --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php @@ -0,0 +1,30 @@ + $attributes Additional attributes + */ + public function __construct($name, array $attributes = []) { + $this->attributes = $attributes; + $this->name = \is_string($name) ? new Identifier($name) : $name; + } + + public function getSubNodeNames(): array { + return ['name']; + } + + public function getType(): string { + return 'Stmt_Label'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php new file mode 100644 index 0000000..f5b59ad --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php @@ -0,0 +1,37 @@ + $attributes Additional attributes + */ + public function __construct(?Node\Name $name = null, ?array $stmts = [], array $attributes = []) { + $this->attributes = $attributes; + $this->name = $name; + $this->stmts = $stmts; + } + + public function getSubNodeNames(): array { + return ['name', 'stmts']; + } + + public function getType(): string { + return 'Stmt_Namespace'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php new file mode 100644 index 0000000..3acfa46 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php @@ -0,0 +1,16 @@ + $attributes Additional attributes + * @param null|Identifier|Name|ComplexType $type Type declaration + * @param Node\AttributeGroup[] $attrGroups PHP attribute groups + * @param Node\PropertyHook[] $hooks Property hooks + */ + public function __construct(int $flags, array $props, array $attributes = [], ?Node $type = null, array $attrGroups = [], array $hooks = []) { + $this->attributes = $attributes; + $this->flags = $flags; + $this->props = $props; + $this->type = $type; + $this->attrGroups = $attrGroups; + $this->hooks = $hooks; + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'flags', 'type', 'props', 'hooks']; + } + + /** + * Whether the property is explicitly or implicitly public. + */ + public function isPublic(): bool { + return ($this->flags & Modifiers::PUBLIC) !== 0 + || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; + } + + /** + * Whether the property is protected. + */ + public function isProtected(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED); + } + + /** + * Whether the property is private. + */ + public function isPrivate(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE); + } + + /** + * Whether the property is static. + */ + public function isStatic(): bool { + return (bool) ($this->flags & Modifiers::STATIC); + } + + /** + * Whether the property is readonly. + */ + public function isReadonly(): bool { + return (bool) ($this->flags & Modifiers::READONLY); + } + + /** + * Whether the property is abstract. + */ + public function isAbstract(): bool { + return (bool) ($this->flags & Modifiers::ABSTRACT); + } + + /** + * Whether the property is final. + */ + public function isFinal(): bool { + return (bool) ($this->flags & Modifiers::FINAL); + } + + /** + * Whether the property has explicit public(set) visibility. + */ + public function isPublicSet(): bool { + return (bool) ($this->flags & Modifiers::PUBLIC_SET); + } + + /** + * Whether the property has explicit protected(set) visibility. + */ + public function isProtectedSet(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED_SET); + } + + /** + * Whether the property has explicit private(set) visibility. + */ + public function isPrivateSet(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE_SET); + } + + public function getType(): string { + return 'Stmt_Property'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php new file mode 100644 index 0000000..62556e7 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php @@ -0,0 +1,17 @@ + $attributes Additional attributes + */ + public function __construct(?Node\Expr $expr = null, array $attributes = []) { + $this->attributes = $attributes; + $this->expr = $expr; + } + + public function getSubNodeNames(): array { + return ['expr']; + } + + public function getType(): string { + return 'Stmt_Return'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php new file mode 100644 index 0000000..a3c5fa6 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php @@ -0,0 +1,15 @@ + $attributes Additional attributes + */ + public function __construct(array $vars, array $attributes = []) { + $this->attributes = $attributes; + $this->vars = $vars; + } + + public function getSubNodeNames(): array { + return ['vars']; + } + + public function getType(): string { + return 'Stmt_Static'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php new file mode 100644 index 0000000..21e5efa --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php @@ -0,0 +1,33 @@ + $attributes Additional attributes + */ + public function __construct(Node\Expr $cond, array $cases, array $attributes = []) { + $this->attributes = $attributes; + $this->cond = $cond; + $this->cases = $cases; + } + + public function getSubNodeNames(): array { + return ['cond', 'cases']; + } + + public function getType(): string { + return 'Stmt_Switch'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php new file mode 100644 index 0000000..7705a57 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php @@ -0,0 +1,33 @@ + $attributes Additional attributes + */ + public function __construct(array $traits, array $adaptations = [], array $attributes = []) { + $this->attributes = $attributes; + $this->traits = $traits; + $this->adaptations = $adaptations; + } + + public function getSubNodeNames(): array { + return ['traits', 'adaptations']; + } + + public function getType(): string { + return 'Stmt_TraitUse'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php new file mode 100644 index 0000000..987bc88 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php @@ -0,0 +1,12 @@ + $attributes Additional attributes + */ + public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attributes = []) { + $this->attributes = $attributes; + $this->trait = $trait; + $this->method = \is_string($method) ? new Node\Identifier($method) : $method; + $this->newModifier = $newModifier; + $this->newName = \is_string($newName) ? new Node\Identifier($newName) : $newName; + } + + public function getSubNodeNames(): array { + return ['trait', 'method', 'newModifier', 'newName']; + } + + public function getType(): string { + return 'Stmt_TraitUseAdaptation_Alias'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php new file mode 100644 index 0000000..7bc4083 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php @@ -0,0 +1,33 @@ + $attributes Additional attributes + */ + public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = []) { + $this->attributes = $attributes; + $this->trait = $trait; + $this->method = \is_string($method) ? new Node\Identifier($method) : $method; + $this->insteadof = $insteadof; + } + + public function getSubNodeNames(): array { + return ['trait', 'method', 'insteadof']; + } + + public function getType(): string { + return 'Stmt_TraitUseAdaptation_Precedence'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php new file mode 100644 index 0000000..5f2b330 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php @@ -0,0 +1,34 @@ + array(): Statements + * 'attrGroups' => array(): PHP attribute groups + * @param array $attributes Additional attributes + */ + public function __construct($name, array $subNodes = [], array $attributes = []) { + $this->attributes = $attributes; + $this->name = \is_string($name) ? new Node\Identifier($name) : $name; + $this->stmts = $subNodes['stmts'] ?? []; + $this->attrGroups = $subNodes['attrGroups'] ?? []; + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'name', 'stmts']; + } + + public function getType(): string { + return 'Stmt_Trait'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php new file mode 100644 index 0000000..6414c46 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php @@ -0,0 +1,37 @@ + $attributes Additional attributes + */ + public function __construct(array $stmts, array $catches, ?Finally_ $finally = null, array $attributes = []) { + $this->attributes = $attributes; + $this->stmts = $stmts; + $this->catches = $catches; + $this->finally = $finally; + } + + public function getSubNodeNames(): array { + return ['stmts', 'catches', 'finally']; + } + + public function getType(): string { + return 'Stmt_TryCatch'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php new file mode 100644 index 0000000..c211beb --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(array $vars, array $attributes = []) { + $this->attributes = $attributes; + $this->vars = $vars; + } + + public function getSubNodeNames(): array { + return ['vars']; + } + + public function getType(): string { + return 'Stmt_Unset'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php new file mode 100644 index 0000000..9e504f8 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php @@ -0,0 +1,17 @@ + $attributes Additional attributes + */ + public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $attributes = []) { + $this->attributes = $attributes; + $this->type = $type; + $this->uses = $uses; + } + + public function getSubNodeNames(): array { + return ['type', 'uses']; + } + + public function getType(): string { + return 'Stmt_Use'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php new file mode 100644 index 0000000..2f7aed2 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php @@ -0,0 +1,33 @@ + $attributes Additional attributes + */ + public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { + $this->attributes = $attributes; + $this->cond = $cond; + $this->stmts = $stmts; + } + + public function getSubNodeNames(): array { + return ['cond', 'stmts']; + } + + public function getType(): string { + return 'Stmt_While'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php new file mode 100644 index 0000000..bad88d2 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php @@ -0,0 +1,27 @@ + $attributes Additional attributes + */ + public function __construct(array $types, array $attributes = []) { + $this->attributes = $attributes; + $this->types = $types; + } + + public function getSubNodeNames(): array { + return ['types']; + } + + public function getType(): string { + return 'UnionType'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php new file mode 100644 index 0000000..a7d9fc4 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php @@ -0,0 +1,55 @@ + $attributes Additional attributes + */ + public function __construct(Node\Name $name, $alias = null, int $type = Use_::TYPE_UNKNOWN, array $attributes = []) { + $this->attributes = $attributes; + $this->type = $type; + $this->name = $name; + $this->alias = \is_string($alias) ? new Identifier($alias) : $alias; + } + + public function getSubNodeNames(): array { + return ['type', 'name', 'alias']; + } + + /** + * Get alias. If not explicitly given this is the last component of the used name. + */ + public function getAlias(): Identifier { + if (null !== $this->alias) { + return $this->alias; + } + + return new Identifier($this->name->getLast()); + } + + public function getType(): string { + return 'UseItem'; + } +} + +// @deprecated compatibility alias +class_alias(UseItem::class, Stmt\UseUse::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php b/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php new file mode 100644 index 0000000..9baa6fe --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php @@ -0,0 +1,16 @@ + $attributes Additional attributes + */ + public function __construct(array $attributes = []) { + $this->attributes = $attributes; + } + + public function getType(): string { + return 'VariadicPlaceholder'; + } + + public function getSubNodeNames(): array { + return []; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php new file mode 100644 index 0000000..a6a50ae --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php @@ -0,0 +1,181 @@ + Attributes */ + protected array $attributes; + + /** + * Creates a Node. + * + * @param array $attributes Array of attributes + */ + public function __construct(array $attributes = []) { + $this->attributes = $attributes; + } + + /** + * Gets line the node started in (alias of getStartLine). + * + * @return int Start line (or -1 if not available) + * @phpstan-return -1|positive-int + */ + public function getLine(): int { + return $this->attributes['startLine'] ?? -1; + } + + /** + * Gets line the node started in. + * + * Requires the 'startLine' attribute to be enabled in the lexer (enabled by default). + * + * @return int Start line (or -1 if not available) + * @phpstan-return -1|positive-int + */ + public function getStartLine(): int { + return $this->attributes['startLine'] ?? -1; + } + + /** + * Gets the line the node ended in. + * + * Requires the 'endLine' attribute to be enabled in the lexer (enabled by default). + * + * @return int End line (or -1 if not available) + * @phpstan-return -1|positive-int + */ + public function getEndLine(): int { + return $this->attributes['endLine'] ?? -1; + } + + /** + * Gets the token offset of the first token that is part of this node. + * + * The offset is an index into the array returned by Lexer::getTokens(). + * + * Requires the 'startTokenPos' attribute to be enabled in the lexer (DISABLED by default). + * + * @return int Token start position (or -1 if not available) + */ + public function getStartTokenPos(): int { + return $this->attributes['startTokenPos'] ?? -1; + } + + /** + * Gets the token offset of the last token that is part of this node. + * + * The offset is an index into the array returned by Lexer::getTokens(). + * + * Requires the 'endTokenPos' attribute to be enabled in the lexer (DISABLED by default). + * + * @return int Token end position (or -1 if not available) + */ + public function getEndTokenPos(): int { + return $this->attributes['endTokenPos'] ?? -1; + } + + /** + * Gets the file offset of the first character that is part of this node. + * + * Requires the 'startFilePos' attribute to be enabled in the lexer (DISABLED by default). + * + * @return int File start position (or -1 if not available) + */ + public function getStartFilePos(): int { + return $this->attributes['startFilePos'] ?? -1; + } + + /** + * Gets the file offset of the last character that is part of this node. + * + * Requires the 'endFilePos' attribute to be enabled in the lexer (DISABLED by default). + * + * @return int File end position (or -1 if not available) + */ + public function getEndFilePos(): int { + return $this->attributes['endFilePos'] ?? -1; + } + + /** + * Gets all comments directly preceding this node. + * + * The comments are also available through the "comments" attribute. + * + * @return Comment[] + */ + public function getComments(): array { + return $this->attributes['comments'] ?? []; + } + + /** + * Gets the doc comment of the node. + * + * @return null|Comment\Doc Doc comment object or null + */ + public function getDocComment(): ?Comment\Doc { + $comments = $this->getComments(); + for ($i = count($comments) - 1; $i >= 0; $i--) { + $comment = $comments[$i]; + if ($comment instanceof Comment\Doc) { + return $comment; + } + } + + return null; + } + + /** + * Sets the doc comment of the node. + * + * This will either replace an existing doc comment or add it to the comments array. + * + * @param Comment\Doc $docComment Doc comment to set + */ + public function setDocComment(Comment\Doc $docComment): void { + $comments = $this->getComments(); + for ($i = count($comments) - 1; $i >= 0; $i--) { + if ($comments[$i] instanceof Comment\Doc) { + // Replace existing doc comment. + $comments[$i] = $docComment; + $this->setAttribute('comments', $comments); + return; + } + } + + // Append new doc comment. + $comments[] = $docComment; + $this->setAttribute('comments', $comments); + } + + public function setAttribute(string $key, $value): void { + $this->attributes[$key] = $value; + } + + public function hasAttribute(string $key): bool { + return array_key_exists($key, $this->attributes); + } + + public function getAttribute(string $key, $default = null) { + if (array_key_exists($key, $this->attributes)) { + return $this->attributes[$key]; + } + + return $default; + } + + public function getAttributes(): array { + return $this->attributes; + } + + public function setAttributes(array $attributes): void { + $this->attributes = $attributes; + } + + /** + * @return array + */ + public function jsonSerialize(): array { + return ['nodeType' => $this->getType()] + get_object_vars($this); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php b/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php new file mode 100644 index 0000000..7d62d03 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php @@ -0,0 +1,299 @@ + true, + 'startLine' => true, + 'endLine' => true, + 'startFilePos' => true, + 'endFilePos' => true, + 'startTokenPos' => true, + 'endTokenPos' => true, + ]; + + /** + * Constructs a NodeDumper. + * + * Supported options: + * * bool dumpComments: Whether comments should be dumped. + * * bool dumpPositions: Whether line/offset information should be dumped. To dump offset + * information, the code needs to be passed to dump(). + * * bool dumpOtherAttributes: Whether non-comment, non-position attributes should be dumped. + * + * @param array $options Options (see description) + */ + public function __construct(array $options = []) { + $this->dumpComments = !empty($options['dumpComments']); + $this->dumpPositions = !empty($options['dumpPositions']); + $this->dumpOtherAttributes = !empty($options['dumpOtherAttributes']); + } + + /** + * Dumps a node or array. + * + * @param array|Node $node Node or array to dump + * @param string|null $code Code corresponding to dumped AST. This only needs to be passed if + * the dumpPositions option is enabled and the dumping of node offsets + * is desired. + * + * @return string Dumped value + */ + public function dump($node, ?string $code = null): string { + $this->code = $code; + $this->res = ''; + $this->nl = "\n"; + $this->dumpRecursive($node, false); + return $this->res; + } + + /** @param mixed $node */ + protected function dumpRecursive($node, bool $indent = true): void { + if ($indent) { + $this->nl .= " "; + } + if ($node instanceof Node) { + $this->res .= $node->getType(); + if ($this->dumpPositions && null !== $p = $this->dumpPosition($node)) { + $this->res .= $p; + } + $this->res .= '('; + + foreach ($node->getSubNodeNames() as $key) { + $this->res .= "$this->nl " . $key . ': '; + + $value = $node->$key; + if (\is_int($value)) { + if ('flags' === $key || 'newModifier' === $key) { + $this->res .= $this->dumpFlags($value); + continue; + } + if ('type' === $key && $node instanceof Include_) { + $this->res .= $this->dumpIncludeType($value); + continue; + } + if ('type' === $key + && ($node instanceof Use_ || $node instanceof UseItem || $node instanceof GroupUse)) { + $this->res .= $this->dumpUseType($value); + continue; + } + } + $this->dumpRecursive($value); + } + + if ($this->dumpComments && $comments = $node->getComments()) { + $this->res .= "$this->nl comments: "; + $this->dumpRecursive($comments); + } + + if ($this->dumpOtherAttributes) { + foreach ($node->getAttributes() as $key => $value) { + if (isset(self::IGNORE_ATTRIBUTES[$key])) { + continue; + } + + $this->res .= "$this->nl $key: "; + if (\is_int($value)) { + if ('kind' === $key) { + if ($node instanceof Int_) { + $this->res .= $this->dumpIntKind($value); + continue; + } + if ($node instanceof String_ || $node instanceof InterpolatedString) { + $this->res .= $this->dumpStringKind($value); + continue; + } + if ($node instanceof Array_) { + $this->res .= $this->dumpArrayKind($value); + continue; + } + if ($node instanceof List_) { + $this->res .= $this->dumpListKind($value); + continue; + } + } + } + $this->dumpRecursive($value); + } + } + $this->res .= "$this->nl)"; + } elseif (\is_array($node)) { + $this->res .= 'array('; + foreach ($node as $key => $value) { + $this->res .= "$this->nl " . $key . ': '; + $this->dumpRecursive($value); + } + $this->res .= "$this->nl)"; + } elseif ($node instanceof Comment) { + $this->res .= \str_replace("\n", $this->nl, $node->getReformattedText()); + } elseif (\is_string($node)) { + $this->res .= \str_replace("\n", $this->nl, $node); + } elseif (\is_int($node) || \is_float($node)) { + $this->res .= $node; + } elseif (null === $node) { + $this->res .= 'null'; + } elseif (false === $node) { + $this->res .= 'false'; + } elseif (true === $node) { + $this->res .= 'true'; + } else { + throw new \InvalidArgumentException('Can only dump nodes and arrays.'); + } + if ($indent) { + $this->nl = \substr($this->nl, 0, -4); + } + } + + protected function dumpFlags(int $flags): string { + $strs = []; + if ($flags & Modifiers::PUBLIC) { + $strs[] = 'PUBLIC'; + } + if ($flags & Modifiers::PROTECTED) { + $strs[] = 'PROTECTED'; + } + if ($flags & Modifiers::PRIVATE) { + $strs[] = 'PRIVATE'; + } + if ($flags & Modifiers::ABSTRACT) { + $strs[] = 'ABSTRACT'; + } + if ($flags & Modifiers::STATIC) { + $strs[] = 'STATIC'; + } + if ($flags & Modifiers::FINAL) { + $strs[] = 'FINAL'; + } + if ($flags & Modifiers::READONLY) { + $strs[] = 'READONLY'; + } + if ($flags & Modifiers::PUBLIC_SET) { + $strs[] = 'PUBLIC_SET'; + } + if ($flags & Modifiers::PROTECTED_SET) { + $strs[] = 'PROTECTED_SET'; + } + if ($flags & Modifiers::PRIVATE_SET) { + $strs[] = 'PRIVATE_SET'; + } + + if ($strs) { + return implode(' | ', $strs) . ' (' . $flags . ')'; + } else { + return (string) $flags; + } + } + + /** @param array $map */ + private function dumpEnum(int $value, array $map): string { + if (!isset($map[$value])) { + return (string) $value; + } + return $map[$value] . ' (' . $value . ')'; + } + + private function dumpIncludeType(int $type): string { + return $this->dumpEnum($type, [ + Include_::TYPE_INCLUDE => 'TYPE_INCLUDE', + Include_::TYPE_INCLUDE_ONCE => 'TYPE_INCLUDE_ONCE', + Include_::TYPE_REQUIRE => 'TYPE_REQUIRE', + Include_::TYPE_REQUIRE_ONCE => 'TYPE_REQUIRE_ONCE', + ]); + } + + private function dumpUseType(int $type): string { + return $this->dumpEnum($type, [ + Use_::TYPE_UNKNOWN => 'TYPE_UNKNOWN', + Use_::TYPE_NORMAL => 'TYPE_NORMAL', + Use_::TYPE_FUNCTION => 'TYPE_FUNCTION', + Use_::TYPE_CONSTANT => 'TYPE_CONSTANT', + ]); + } + + private function dumpIntKind(int $kind): string { + return $this->dumpEnum($kind, [ + Int_::KIND_BIN => 'KIND_BIN', + Int_::KIND_OCT => 'KIND_OCT', + Int_::KIND_DEC => 'KIND_DEC', + Int_::KIND_HEX => 'KIND_HEX', + ]); + } + + private function dumpStringKind(int $kind): string { + return $this->dumpEnum($kind, [ + String_::KIND_SINGLE_QUOTED => 'KIND_SINGLE_QUOTED', + String_::KIND_DOUBLE_QUOTED => 'KIND_DOUBLE_QUOTED', + String_::KIND_HEREDOC => 'KIND_HEREDOC', + String_::KIND_NOWDOC => 'KIND_NOWDOC', + ]); + } + + private function dumpArrayKind(int $kind): string { + return $this->dumpEnum($kind, [ + Array_::KIND_LONG => 'KIND_LONG', + Array_::KIND_SHORT => 'KIND_SHORT', + ]); + } + + private function dumpListKind(int $kind): string { + return $this->dumpEnum($kind, [ + List_::KIND_LIST => 'KIND_LIST', + List_::KIND_ARRAY => 'KIND_ARRAY', + ]); + } + + /** + * Dump node position, if possible. + * + * @param Node $node Node for which to dump position + * + * @return string|null Dump of position, or null if position information not available + */ + protected function dumpPosition(Node $node): ?string { + if (!$node->hasAttribute('startLine') || !$node->hasAttribute('endLine')) { + return null; + } + + $start = $node->getStartLine(); + $end = $node->getEndLine(); + if ($node->hasAttribute('startFilePos') && $node->hasAttribute('endFilePos') + && null !== $this->code + ) { + $start .= ':' . $this->toColumn($this->code, $node->getStartFilePos()); + $end .= ':' . $this->toColumn($this->code, $node->getEndFilePos()); + } + return "[$start - $end]"; + } + + // Copied from Error class + private function toColumn(string $code, int $pos): int { + if ($pos > strlen($code)) { + throw new \RuntimeException('Invalid position information'); + } + + $lineStartPos = strrpos($code, "\n", $pos - strlen($code)); + if (false === $lineStartPos) { + $lineStartPos = -1; + } + + return $pos - $lineStartPos; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php b/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php new file mode 100644 index 0000000..96c8452 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php @@ -0,0 +1,90 @@ +traverse($nodes); + + return $visitor->getFoundNodes(); + } + + /** + * Find all nodes that are instances of a certain class. + + * @template TNode as Node + * + * @param Node|Node[] $nodes Single node or array of nodes to search in + * @param class-string $class Class name + * + * @return TNode[] Found nodes (all instances of $class) + */ + public function findInstanceOf($nodes, string $class): array { + return $this->find($nodes, function ($node) use ($class) { + return $node instanceof $class; + }); + } + + /** + * Find first node satisfying a filter callback. + * + * @param Node|Node[] $nodes Single node or array of nodes to search in + * @param callable $filter Filter callback: function(Node $node) : bool + * + * @return null|Node Found node (or null if none found) + */ + public function findFirst($nodes, callable $filter): ?Node { + if ($nodes === []) { + return null; + } + + if (!is_array($nodes)) { + $nodes = [$nodes]; + } + + $visitor = new FirstFindingVisitor($filter); + + $traverser = new NodeTraverser($visitor); + $traverser->traverse($nodes); + + return $visitor->getFoundNode(); + } + + /** + * Find first node that is an instance of a certain class. + * + * @template TNode as Node + * + * @param Node|Node[] $nodes Single node or array of nodes to search in + * @param class-string $class Class name + * + * @return null|TNode Found node, which is an instance of $class (or null if none found) + */ + public function findFirstInstanceOf($nodes, string $class): ?Node { + return $this->findFirst($nodes, function ($node) use ($class) { + return $node instanceof $class; + }); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php new file mode 100644 index 0000000..6a5c2ad --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php @@ -0,0 +1,287 @@ + Visitors */ + protected array $visitors = []; + + /** @var bool Whether traversal should be stopped */ + protected bool $stopTraversal; + + /** + * Create a traverser with the given visitors. + * + * @param NodeVisitor ...$visitors Node visitors + */ + public function __construct(NodeVisitor ...$visitors) { + $this->visitors = $visitors; + } + + /** + * Adds a visitor. + * + * @param NodeVisitor $visitor Visitor to add + */ + public function addVisitor(NodeVisitor $visitor): void { + $this->visitors[] = $visitor; + } + + /** + * Removes an added visitor. + */ + public function removeVisitor(NodeVisitor $visitor): void { + $index = array_search($visitor, $this->visitors); + if ($index !== false) { + array_splice($this->visitors, $index, 1, []); + } + } + + /** + * Traverses an array of nodes using the registered visitors. + * + * @param Node[] $nodes Array of nodes + * + * @return Node[] Traversed array of nodes + */ + public function traverse(array $nodes): array { + $this->stopTraversal = false; + + foreach ($this->visitors as $visitor) { + if (null !== $return = $visitor->beforeTraverse($nodes)) { + $nodes = $return; + } + } + + $nodes = $this->traverseArray($nodes); + + for ($i = \count($this->visitors) - 1; $i >= 0; --$i) { + $visitor = $this->visitors[$i]; + if (null !== $return = $visitor->afterTraverse($nodes)) { + $nodes = $return; + } + } + + return $nodes; + } + + /** + * Recursively traverse a node. + * + * @param Node $node Node to traverse. + */ + protected function traverseNode(Node $node): void { + foreach ($node->getSubNodeNames() as $name) { + $subNode = $node->$name; + + if (\is_array($subNode)) { + $node->$name = $this->traverseArray($subNode); + if ($this->stopTraversal) { + break; + } + + continue; + } + + if (!$subNode instanceof Node) { + continue; + } + + $traverseChildren = true; + $visitorIndex = -1; + + foreach ($this->visitors as $visitorIndex => $visitor) { + $return = $visitor->enterNode($subNode); + if (null !== $return) { + if ($return instanceof Node) { + $this->ensureReplacementReasonable($subNode, $return); + $subNode = $node->$name = $return; + } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { + $traverseChildren = false; + } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { + $traverseChildren = false; + break; + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { + $this->stopTraversal = true; + break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + $node->$name = null; + continue 2; + } else { + throw new \LogicException( + 'enterNode() returned invalid value of type ' . gettype($return) + ); + } + } + } + + if ($traverseChildren) { + $this->traverseNode($subNode); + if ($this->stopTraversal) { + break; + } + } + + for (; $visitorIndex >= 0; --$visitorIndex) { + $visitor = $this->visitors[$visitorIndex]; + $return = $visitor->leaveNode($subNode); + + if (null !== $return) { + if ($return instanceof Node) { + $this->ensureReplacementReasonable($subNode, $return); + $subNode = $node->$name = $return; + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { + $this->stopTraversal = true; + break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + $node->$name = null; + break; + } elseif (\is_array($return)) { + throw new \LogicException( + 'leaveNode() may only return an array ' . + 'if the parent structure is an array' + ); + } else { + throw new \LogicException( + 'leaveNode() returned invalid value of type ' . gettype($return) + ); + } + } + } + } + } + + /** + * Recursively traverse array (usually of nodes). + * + * @param Node[] $nodes Array to traverse + * + * @return Node[] Result of traversal (may be original array or changed one) + */ + protected function traverseArray(array $nodes): array { + $doNodes = []; + + foreach ($nodes as $i => $node) { + if (!$node instanceof Node) { + if (\is_array($node)) { + throw new \LogicException('Invalid node structure: Contains nested arrays'); + } + continue; + } + + $traverseChildren = true; + $visitorIndex = -1; + + foreach ($this->visitors as $visitorIndex => $visitor) { + $return = $visitor->enterNode($node); + if (null !== $return) { + if ($return instanceof Node) { + $this->ensureReplacementReasonable($node, $return); + $nodes[$i] = $node = $return; + } elseif (\is_array($return)) { + $doNodes[] = [$i, $return]; + continue 2; + } elseif (NodeVisitor::REMOVE_NODE === $return) { + $doNodes[] = [$i, []]; + continue 2; + } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { + $traverseChildren = false; + } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { + $traverseChildren = false; + break; + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { + $this->stopTraversal = true; + break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + throw new \LogicException( + 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); + } else { + throw new \LogicException( + 'enterNode() returned invalid value of type ' . gettype($return) + ); + } + } + } + + if ($traverseChildren) { + $this->traverseNode($node); + if ($this->stopTraversal) { + break; + } + } + + for (; $visitorIndex >= 0; --$visitorIndex) { + $visitor = $this->visitors[$visitorIndex]; + $return = $visitor->leaveNode($node); + + if (null !== $return) { + if ($return instanceof Node) { + $this->ensureReplacementReasonable($node, $return); + $nodes[$i] = $node = $return; + } elseif (\is_array($return)) { + $doNodes[] = [$i, $return]; + break; + } elseif (NodeVisitor::REMOVE_NODE === $return) { + $doNodes[] = [$i, []]; + break; + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { + $this->stopTraversal = true; + break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + throw new \LogicException( + 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); + } else { + throw new \LogicException( + 'leaveNode() returned invalid value of type ' . gettype($return) + ); + } + } + } + } + + if (!empty($doNodes)) { + while (list($i, $replace) = array_pop($doNodes)) { + array_splice($nodes, $i, 1, $replace); + } + } + + return $nodes; + } + + private function ensureReplacementReasonable(Node $old, Node $new): void { + if ($old instanceof Node\Stmt && $new instanceof Node\Expr) { + throw new \LogicException( + "Trying to replace statement ({$old->getType()}) " . + "with expression ({$new->getType()}). Are you missing a " . + "Stmt_Expression wrapper?" + ); + } + + if ($old instanceof Node\Expr && $new instanceof Node\Stmt) { + throw new \LogicException( + "Trying to replace expression ({$old->getType()}) " . + "with statement ({$new->getType()})" + ); + } + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php new file mode 100644 index 0000000..c3992b3 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php @@ -0,0 +1,26 @@ + $node stays as-is + * * array (of Nodes) + * => The return value is merged into the parent array (at the position of the $node) + * * NodeVisitor::REMOVE_NODE + * => $node is removed from the parent array + * * NodeVisitor::REPLACE_WITH_NULL + * => $node is replaced with null + * * NodeVisitor::DONT_TRAVERSE_CHILDREN + * => Children of $node are not traversed. $node stays as-is + * * NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN + * => Further visitors for the current node are skipped, and its children are not + * traversed. $node stays as-is. + * * NodeVisitor::STOP_TRAVERSAL + * => Traversal is aborted. $node stays as-is + * * otherwise + * => $node is set to the return value + * + * @param Node $node Node + * + * @return null|int|Node|Node[] Replacement node (or special return value) + */ + public function enterNode(Node $node); + + /** + * Called when leaving a node. + * + * Return value semantics: + * * null + * => $node stays as-is + * * NodeVisitor::REMOVE_NODE + * => $node is removed from the parent array + * * NodeVisitor::REPLACE_WITH_NULL + * => $node is replaced with null + * * NodeVisitor::STOP_TRAVERSAL + * => Traversal is aborted. $node stays as-is + * * array (of Nodes) + * => The return value is merged into the parent array (at the position of the $node) + * * otherwise + * => $node is set to the return value + * + * @param Node $node Node + * + * @return null|int|Node|Node[] Replacement node (or special return value) + */ + public function leaveNode(Node $node); + + /** + * Called once after traversal. + * + * Return value semantics: + * * null: $nodes stays as-is + * * otherwise: $nodes is set to the return value + * + * @param Node[] $nodes Array of nodes + * + * @return null|Node[] Array of nodes + */ + public function afterTraverse(array $nodes); +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php new file mode 100644 index 0000000..cba9249 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php @@ -0,0 +1,19 @@ +setAttribute('origNode', $origNode); + return $node; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php new file mode 100644 index 0000000..5e2aed3 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php @@ -0,0 +1,82 @@ + Token positions of comments */ + private array $commentPositions = []; + + /** + * Create a comment annotation visitor. + * + * @param Token[] $tokens Token array + */ + public function __construct(array $tokens) { + $this->tokens = $tokens; + + // Collect positions of comments. We use this to avoid traversing parts of the AST where + // there are no comments. + foreach ($tokens as $i => $token) { + if ($token->id === \T_COMMENT || $token->id === \T_DOC_COMMENT) { + $this->commentPositions[] = $i; + } + } + } + + public function enterNode(Node $node) { + $nextCommentPos = current($this->commentPositions); + if ($nextCommentPos === false) { + // No more comments. + return self::STOP_TRAVERSAL; + } + + $oldPos = $this->pos; + $this->pos = $pos = $node->getStartTokenPos(); + if ($nextCommentPos > $oldPos && $nextCommentPos < $pos) { + $comments = []; + while (--$pos >= $oldPos) { + $token = $this->tokens[$pos]; + if ($token->id === \T_DOC_COMMENT) { + $comments[] = new Comment\Doc( + $token->text, $token->line, $token->pos, $pos, + $token->getEndLine(), $token->getEndPos() - 1, $pos); + continue; + } + if ($token->id === \T_COMMENT) { + $comments[] = new Comment( + $token->text, $token->line, $token->pos, $pos, + $token->getEndLine(), $token->getEndPos() - 1, $pos); + continue; + } + if ($token->id !== \T_WHITESPACE) { + break; + } + } + if (!empty($comments)) { + $node->setAttribute('comments', array_reverse($comments)); + } + + do { + $nextCommentPos = next($this->commentPositions); + } while ($nextCommentPos !== false && $nextCommentPos < $this->pos); + } + + $endPos = $node->getEndTokenPos(); + if ($nextCommentPos > $endPos) { + // Skip children if there are no comments located inside this node. + $this->pos = $endPos; + return self::DONT_TRAVERSE_CHILDREN; + } + + return null; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php new file mode 100644 index 0000000..65a1bd3 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php @@ -0,0 +1,47 @@ + Found nodes */ + protected array $foundNodes; + + public function __construct(callable $filterCallback) { + $this->filterCallback = $filterCallback; + } + + /** + * Get found nodes satisfying the filter callback. + * + * Nodes are returned in pre-order. + * + * @return list Found nodes + */ + public function getFoundNodes(): array { + return $this->foundNodes; + } + + public function beforeTraverse(array $nodes): ?array { + $this->foundNodes = []; + + return null; + } + + public function enterNode(Node $node) { + $filterCallback = $this->filterCallback; + if ($filterCallback($node)) { + $this->foundNodes[] = $node; + } + + return null; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php new file mode 100644 index 0000000..05deed5 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php @@ -0,0 +1,49 @@ +filterCallback = $filterCallback; + } + + /** + * Get found node satisfying the filter callback. + * + * Returns null if no node satisfies the filter callback. + * + * @return null|Node Found node (or null if not found) + */ + public function getFoundNode(): ?Node { + return $this->foundNode; + } + + public function beforeTraverse(array $nodes): ?array { + $this->foundNode = null; + + return null; + } + + public function enterNode(Node $node) { + $filterCallback = $this->filterCallback; + if ($filterCallback($node)) { + $this->foundNode = $node; + return NodeVisitor::STOP_TRAVERSAL; + } + + return null; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php new file mode 100644 index 0000000..e0066f2 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php @@ -0,0 +1,269 @@ +nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing()); + $this->preserveOriginalNames = $options['preserveOriginalNames'] ?? false; + $this->replaceNodes = $options['replaceNodes'] ?? true; + } + + /** + * Get name resolution context. + */ + public function getNameContext(): NameContext { + return $this->nameContext; + } + + public function beforeTraverse(array $nodes): ?array { + $this->nameContext->startNamespace(); + return null; + } + + public function enterNode(Node $node) { + if ($node instanceof Stmt\Namespace_) { + $this->nameContext->startNamespace($node->name); + } elseif ($node instanceof Stmt\Use_) { + foreach ($node->uses as $use) { + $this->addAlias($use, $node->type, null); + } + } elseif ($node instanceof Stmt\GroupUse) { + foreach ($node->uses as $use) { + $this->addAlias($use, $node->type, $node->prefix); + } + } elseif ($node instanceof Stmt\Class_) { + if (null !== $node->extends) { + $node->extends = $this->resolveClassName($node->extends); + } + + foreach ($node->implements as &$interface) { + $interface = $this->resolveClassName($interface); + } + + $this->resolveAttrGroups($node); + if (null !== $node->name) { + $this->addNamespacedName($node); + } else { + $node->namespacedName = null; + } + } elseif ($node instanceof Stmt\Interface_) { + foreach ($node->extends as &$interface) { + $interface = $this->resolveClassName($interface); + } + + $this->resolveAttrGroups($node); + $this->addNamespacedName($node); + } elseif ($node instanceof Stmt\Enum_) { + foreach ($node->implements as &$interface) { + $interface = $this->resolveClassName($interface); + } + + $this->resolveAttrGroups($node); + $this->addNamespacedName($node); + } elseif ($node instanceof Stmt\Trait_) { + $this->resolveAttrGroups($node); + $this->addNamespacedName($node); + } elseif ($node instanceof Stmt\Function_) { + $this->resolveSignature($node); + $this->resolveAttrGroups($node); + $this->addNamespacedName($node); + } elseif ($node instanceof Stmt\ClassMethod + || $node instanceof Expr\Closure + || $node instanceof Expr\ArrowFunction + ) { + $this->resolveSignature($node); + $this->resolveAttrGroups($node); + } elseif ($node instanceof Stmt\Property) { + if (null !== $node->type) { + $node->type = $this->resolveType($node->type); + } + $this->resolveAttrGroups($node); + } elseif ($node instanceof Node\PropertyHook) { + foreach ($node->params as $param) { + $param->type = $this->resolveType($param->type); + $this->resolveAttrGroups($param); + } + $this->resolveAttrGroups($node); + } elseif ($node instanceof Stmt\Const_) { + foreach ($node->consts as $const) { + $this->addNamespacedName($const); + } + $this->resolveAttrGroups($node); + } elseif ($node instanceof Stmt\ClassConst) { + if (null !== $node->type) { + $node->type = $this->resolveType($node->type); + } + $this->resolveAttrGroups($node); + } elseif ($node instanceof Stmt\EnumCase) { + $this->resolveAttrGroups($node); + } elseif ($node instanceof Expr\StaticCall + || $node instanceof Expr\StaticPropertyFetch + || $node instanceof Expr\ClassConstFetch + || $node instanceof Expr\New_ + || $node instanceof Expr\Instanceof_ + ) { + if ($node->class instanceof Name) { + $node->class = $this->resolveClassName($node->class); + } + } elseif ($node instanceof Stmt\Catch_) { + foreach ($node->types as &$type) { + $type = $this->resolveClassName($type); + } + } elseif ($node instanceof Expr\FuncCall) { + if ($node->name instanceof Name) { + $node->name = $this->resolveName($node->name, Stmt\Use_::TYPE_FUNCTION); + } + } elseif ($node instanceof Expr\ConstFetch) { + $node->name = $this->resolveName($node->name, Stmt\Use_::TYPE_CONSTANT); + } elseif ($node instanceof Stmt\TraitUse) { + foreach ($node->traits as &$trait) { + $trait = $this->resolveClassName($trait); + } + + foreach ($node->adaptations as $adaptation) { + if (null !== $adaptation->trait) { + $adaptation->trait = $this->resolveClassName($adaptation->trait); + } + + if ($adaptation instanceof Stmt\TraitUseAdaptation\Precedence) { + foreach ($adaptation->insteadof as &$insteadof) { + $insteadof = $this->resolveClassName($insteadof); + } + } + } + } + + return null; + } + + /** @param Stmt\Use_::TYPE_* $type */ + private function addAlias(Node\UseItem $use, int $type, ?Name $prefix = null): void { + // Add prefix for group uses + $name = $prefix ? Name::concat($prefix, $use->name) : $use->name; + // Type is determined either by individual element or whole use declaration + $type |= $use->type; + + $this->nameContext->addAlias( + $name, (string) $use->getAlias(), $type, $use->getAttributes() + ); + } + + /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure|Expr\ArrowFunction $node */ + private function resolveSignature($node): void { + foreach ($node->params as $param) { + $param->type = $this->resolveType($param->type); + $this->resolveAttrGroups($param); + } + $node->returnType = $this->resolveType($node->returnType); + } + + /** + * @template T of Node\Identifier|Name|Node\ComplexType|null + * @param T $node + * @return T + */ + private function resolveType(?Node $node): ?Node { + if ($node instanceof Name) { + return $this->resolveClassName($node); + } + if ($node instanceof Node\NullableType) { + $node->type = $this->resolveType($node->type); + return $node; + } + if ($node instanceof Node\UnionType || $node instanceof Node\IntersectionType) { + foreach ($node->types as &$type) { + $type = $this->resolveType($type); + } + return $node; + } + return $node; + } + + /** + * Resolve name, according to name resolver options. + * + * @param Name $name Function or constant name to resolve + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* + * + * @return Name Resolved name, or original name with attribute + */ + protected function resolveName(Name $name, int $type): Name { + if (!$this->replaceNodes) { + $resolvedName = $this->nameContext->getResolvedName($name, $type); + if (null !== $resolvedName) { + $name->setAttribute('resolvedName', $resolvedName); + } else { + $name->setAttribute('namespacedName', FullyQualified::concat( + $this->nameContext->getNamespace(), $name, $name->getAttributes())); + } + return $name; + } + + if ($this->preserveOriginalNames) { + // Save the original name + $originalName = $name; + $name = clone $originalName; + $name->setAttribute('originalName', $originalName); + } + + $resolvedName = $this->nameContext->getResolvedName($name, $type); + if (null !== $resolvedName) { + return $resolvedName; + } + + // unqualified names inside a namespace cannot be resolved at compile-time + // add the namespaced version of the name as an attribute + $name->setAttribute('namespacedName', FullyQualified::concat( + $this->nameContext->getNamespace(), $name, $name->getAttributes())); + return $name; + } + + protected function resolveClassName(Name $name): Name { + return $this->resolveName($name, Stmt\Use_::TYPE_NORMAL); + } + + protected function addNamespacedName(Node $node): void { + $node->namespacedName = Name::concat( + $this->nameContext->getNamespace(), (string) $node->name); + } + + protected function resolveAttrGroups(Node $node): void { + foreach ($node->attrGroups as $attrGroup) { + foreach ($attrGroup->attrs as $attr) { + $attr->name = $this->resolveClassName($attr->name); + } + } + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php new file mode 100644 index 0000000..70e051e --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php @@ -0,0 +1,73 @@ +$weakReferences=false on the child node, the parent node can be accessed through + * $node->getAttribute('parent'), the previous + * node can be accessed through $node->getAttribute('previous'), + * and the next node can be accessed through $node->getAttribute('next'). + * + * With $weakReferences=true attribute names are prefixed by "weak_", e.g. "weak_parent". + */ +final class NodeConnectingVisitor extends NodeVisitorAbstract { + /** + * @var Node[] + */ + private array $stack = []; + + /** + * @var ?Node + */ + private $previous; + + private bool $weakReferences; + + public function __construct(bool $weakReferences = false) { + $this->weakReferences = $weakReferences; + } + + public function beforeTraverse(array $nodes) { + $this->stack = []; + $this->previous = null; + } + + public function enterNode(Node $node) { + if (!empty($this->stack)) { + $parent = $this->stack[count($this->stack) - 1]; + if ($this->weakReferences) { + $node->setAttribute('weak_parent', \WeakReference::create($parent)); + } else { + $node->setAttribute('parent', $parent); + } + } + + if ($this->previous !== null) { + if ( + $this->weakReferences + ) { + if ($this->previous->getAttribute('weak_parent') === $node->getAttribute('weak_parent')) { + $node->setAttribute('weak_previous', \WeakReference::create($this->previous)); + $this->previous->setAttribute('weak_next', \WeakReference::create($node)); + } + } elseif ($this->previous->getAttribute('parent') === $node->getAttribute('parent')) { + $node->setAttribute('previous', $this->previous); + $this->previous->setAttribute('next', $node); + } + } + + $this->stack[] = $node; + } + + public function leaveNode(Node $node) { + $this->previous = $node; + + array_pop($this->stack); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php new file mode 100644 index 0000000..abf6e37 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php @@ -0,0 +1,51 @@ +$weakReferences=false on the child node, the parent node can be accessed through + * $node->getAttribute('parent'). + * + * With $weakReferences=true the attribute name is "weak_parent" instead. + */ +final class ParentConnectingVisitor extends NodeVisitorAbstract { + /** + * @var Node[] + */ + private array $stack = []; + + private bool $weakReferences; + + public function __construct(bool $weakReferences = false) { + $this->weakReferences = $weakReferences; + } + + public function beforeTraverse(array $nodes) { + $this->stack = []; + } + + public function enterNode(Node $node) { + if (!empty($this->stack)) { + $parent = $this->stack[count($this->stack) - 1]; + if ($this->weakReferences) { + $node->setAttribute('weak_parent', \WeakReference::create($parent)); + } else { + $node->setAttribute('parent', $parent); + } + } + + $this->stack[] = $node; + } + + public function leaveNode(Node $node) { + array_pop($this->stack); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php new file mode 100644 index 0000000..6fb15cc --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php @@ -0,0 +1,24 @@ +'", + "T_IS_GREATER_OR_EQUAL", + "T_SL", + "T_SR", + "'+'", + "'-'", + "'.'", + "'*'", + "'/'", + "'%'", + "'!'", + "T_INSTANCEOF", + "'~'", + "T_INC", + "T_DEC", + "T_INT_CAST", + "T_DOUBLE_CAST", + "T_STRING_CAST", + "T_ARRAY_CAST", + "T_OBJECT_CAST", + "T_BOOL_CAST", + "T_UNSET_CAST", + "'@'", + "T_POW", + "'['", + "T_NEW", + "T_CLONE", + "T_EXIT", + "T_IF", + "T_ELSEIF", + "T_ELSE", + "T_ENDIF", + "T_LNUMBER", + "T_DNUMBER", + "T_STRING", + "T_STRING_VARNAME", + "T_VARIABLE", + "T_NUM_STRING", + "T_INLINE_HTML", + "T_ENCAPSED_AND_WHITESPACE", + "T_CONSTANT_ENCAPSED_STRING", + "T_ECHO", + "T_DO", + "T_WHILE", + "T_ENDWHILE", + "T_FOR", + "T_ENDFOR", + "T_FOREACH", + "T_ENDFOREACH", + "T_DECLARE", + "T_ENDDECLARE", + "T_AS", + "T_SWITCH", + "T_MATCH", + "T_ENDSWITCH", + "T_CASE", + "T_DEFAULT", + "T_BREAK", + "T_CONTINUE", + "T_GOTO", + "T_FUNCTION", + "T_FN", + "T_CONST", + "T_RETURN", + "T_TRY", + "T_CATCH", + "T_FINALLY", + "T_USE", + "T_INSTEADOF", + "T_GLOBAL", + "T_STATIC", + "T_ABSTRACT", + "T_FINAL", + "T_PRIVATE", + "T_PROTECTED", + "T_PUBLIC", + "T_READONLY", + "T_PUBLIC_SET", + "T_PROTECTED_SET", + "T_PRIVATE_SET", + "T_VAR", + "T_UNSET", + "T_ISSET", + "T_EMPTY", + "T_HALT_COMPILER", + "T_CLASS", + "T_TRAIT", + "T_INTERFACE", + "T_ENUM", + "T_EXTENDS", + "T_IMPLEMENTS", + "T_OBJECT_OPERATOR", + "T_NULLSAFE_OBJECT_OPERATOR", + "T_LIST", + "T_ARRAY", + "T_CALLABLE", + "T_CLASS_C", + "T_TRAIT_C", + "T_METHOD_C", + "T_FUNC_C", + "T_PROPERTY_C", + "T_LINE", + "T_FILE", + "T_START_HEREDOC", + "T_END_HEREDOC", + "T_DOLLAR_OPEN_CURLY_BRACES", + "T_CURLY_OPEN", + "T_PAAMAYIM_NEKUDOTAYIM", + "T_NAMESPACE", + "T_NS_C", + "T_DIR", + "T_NS_SEPARATOR", + "T_ELLIPSIS", + "T_NAME_FULLY_QUALIFIED", + "T_NAME_QUALIFIED", + "T_NAME_RELATIVE", + "T_ATTRIBUTE", + "';'", + "']'", + "'('", + "')'", + "'{'", + "'}'", + "'`'", + "'\"'", + "'$'" + ); + + protected array $tokenToSymbol = array( + 0, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 57, 171, 173, 172, 56, 173, 173, + 166, 167, 54, 51, 9, 52, 53, 55, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 32, 164, + 45, 17, 47, 31, 69, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 71, 173, 165, 37, 173, 170, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 168, 36, 169, 59, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 1, 2, 3, 4, + 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, + 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 33, 34, 35, 38, 39, 40, + 41, 42, 43, 44, 46, 48, 49, 50, 58, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 70, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163 + ); + + protected array $action = array( + 133, 134, 135, 575, 136, 137, 1049, 766, 767, 768, + 138, 41, 850, -341, 495, 1390,-32766,-32766,-32766, 1008, + 841, 1145, 1146, 1147, 1141, 1140, 1139, 1148, 1142, 1143, + 1144,-32766,-32766,-32766, -195, 760, 759,-32766, -194,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, + -32767, 0,-32766, 3, 4, 769, 1145, 1146, 1147, 1141, + 1140, 1139, 1148, 1142, 1143, 1144, 388, 389, 448, 272, + 53, 391, 773, 774, 775, 776, 433, 5, 434, 571, + 337, 39, 254, 29, 298, 830, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 806, 576, 807, 808, + 809, 810, 798, 799, 353, 354, 801, 802, 787, 788, + 789, 791, 792, 793, 364, 833, 834, 835, 836, 837, + 577, -382, 306, -382, 794, 795, 578, 579, 244, 818, + 816, 817, 829, 813, 814, 1313, 38, 580, 581, 812, + 582, 583, 584, 585, 1325, 586, 587, 481, 482, -628, + 496, 1009, 815, 588, 589, 140, 139, -628, 133, 134, + 135, 575, 136, 137, 1085, 766, 767, 768, 138, 41, + -32766, -341, 1046, 1041, 1040, 1039, 1045, 1042, 1043, 1044, + -32766,-32766,-32766,-32767,-32767,-32767,-32767, 106, 107, 108, + 109, 110, -195, 760, 759, 1058, -194,-32766,-32766,-32766, + 149,-32766, 852,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + 936, 303, 257, 769,-32766,-32766,-32766, 850,-32766, 297, + -32766,-32766,-32766,-32766,-32766, 1371, 1355, 272, 53, 391, + 773, 774, 775, 776, -625,-32766, 434,-32766,-32766,-32766, + -32766, 730, -625, 830, 777, 778, 779, 780, 781, 782, + 783, 784, 785, 786, 806, 576, 807, 808, 809, 810, + 798, 799, 353, 354, 801, 802, 787, 788, 789, 791, + 792, 793, 364, 833, 834, 835, 836, 837, 577, -579, + -275, 317, 794, 795, 578, 579, -577, 818, 816, 817, + 829, 813, 814, 957, 926, 580, 581, 812, 582, 583, + 584, 585, 144, 586, 587, 841, 336,-32766,-32766,-32766, + 815, 588, 589, -628, 139, -628, 133, 134, 135, 575, + 136, 137, 1082, 766, 767, 768, 138, 41,-32766, 1375, + -32766,-32766,-32766,-32766,-32766,-32766,-32766, 1374, 629, 388, + 389,-32766,-32766,-32766,-32766,-32766, -579, -579, 1081, 433, + 321, 760, 759, -577, -577,-32766, 1293,-32766,-32766, 111, + 112, 113, -579, 282, 843, 851, 623, 1400, 936, -577, + 1401, 769, 333, 938, -585, 114, -579, 725, 294, 298, + 1119, -584, 349, -577, 752, 272, 53, 391, 773, 774, + 775, 776, 145, 86, 434, 306, 336, 336, -625, 731, + -625, 830, 777, 778, 779, 780, 781, 782, 783, 784, + 785, 786, 806, 576, 807, 808, 809, 810, 798, 799, + 353, 354, 801, 802, 787, 788, 789, 791, 792, 793, + 364, 833, 834, 835, 836, 837, 577, -576, 850, -578, + 794, 795, 578, 579, 845, 818, 816, 817, 829, 813, + 814, 727, 926, 580, 581, 812, 582, 583, 584, 585, + 740, 586, 587, 243, 1055,-32766,-32766, -85, 815, 588, + 589, 878, 152, 879, 133, 134, 135, 575, 136, 137, + 1087, 766, 767, 768, 138, 41, 350, 961, 960, 1058, + 1058, 1058,-32766,-32766,-32766, 841,-32766, 131, 977, 978, + 400, 1055, 10, 979, -576, -576, -578, -578, 378, 760, + 759, 936, 973, 290, 297, 297,-32766, 846, 936, 154, + -576, 79, -578, 382, 849, 936, 1058, 336, 878, 769, + 879, 938, -583, -85, -576, 725, -578, 959, 108, 109, + 110, 1058, 732, 272, 53, 391, 773, 774, 775, 776, + 290, 155, 434, 470, 471, 472, 735, 760, 759, 830, + 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, + 806, 576, 807, 808, 809, 810, 798, 799, 353, 354, + 801, 802, 787, 788, 789, 791, 792, 793, 364, 833, + 834, 835, 836, 837, 577, 926, 434, 847, 794, 795, + 578, 579, 926, 818, 816, 817, 829, 813, 814, 926, + 398, 580, 581, 812, 582, 583, 584, 585, 452, 586, + 587, 157, 87, 88, 89, 453, 815, 588, 589, 454, + 152, 790, 761, 762, 763, 764, 765, 158, 766, 767, + 768, 803, 804, 40, 27, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 1134, + 282, 1055, 455,-32766, 994, 1288, 1287, 1289, 725, 390, + 389, 938, 114, 856, 1120, 725, 769, 159, 938, 433, + 672, 23, 725, 1118, 691, 692, 1058,-32766, 153, 416, + 770, 771, 772, 773, 774, 775, 776, -78, -619, 839, + -619, -581, 386, 387, 392, 393, 830, 777, 778, 779, + 780, 781, 782, 783, 784, 785, 786, 806, 828, 807, + 808, 809, 810, 798, 799, 800, 827, 801, 802, 787, + 788, 789, 791, 792, 793, 832, 833, 834, 835, 836, + 837, 838, 161, 663, 664, 794, 795, 796, 797, 36, + 818, 816, 817, 829, 813, 814, -58, -57, 805, 811, + 812, 819, 820, 822, 821, -87, 823, 824, -581, -581, + 128, 129, 141, 815, 826, 825, 54, 55, 56, 57, + 527, 58, 59, 142, -110, 148, 162, 60, 61, -110, + 62, -110, 936, 163, 164, 165, 313, 166, -581, -110, + -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, + 1293, -84, 953, -78, -73, -72, -71, -70, -69, -68, + -67, -66, -65, 742, -46, 63, 64, -18, -575, 1286, + 146, 65, 51, 66, 251, 252, 67, 68, 69, 70, + 71, 72, 73, 74, 281, 31, 273, 47, 450, 528, + 291, -357, 741, 1319, 1320, 529, 744, 850, 935, 151, + 295, 1317, 45, 22, 530, 1284, 531, -309, 532, -305, + 533, 286, 936, 534, 535, 287, 926, 292, 48, 49, + 456, 385, 384, 293, 50, 536, 342, 296, 282, 1057, + 376, 348, 850, 299, 300, -575, -575, 1279, 114, 307, + 308, 701, 538, 539, 540, 150, 841,-32766, 1288, 1287, + 1289, -575, 850, 294, 542, 543, 1402, 1305, 1306, 1307, + 1308, 1310, 1302, 1303, 305, -575, 716, -110, -110, 130, + 1309, 1304, -110, 593, 1288, 1287, 1289, 306, 13, 673, + 75, -110, 1152, 678, 331, 332, 336, -154, -154, -154, + -32766, 718, 694, -4, 936, 938, 926, 314, 478, 725, + 506, 1324, -154, 705, -154, 679, -154, 695, -154, 974, + 1326, -541, 306, 312, 311, 79, 849, 661, 383, 43, + 320, 336, 37, 1252, 0, 0, 52, 0, 0, 977, + 978, 0, 760, 759, 537,-32766, 0, 0, 0, 706, + 0, 0, 912, 973, -110, -110, -110, 35, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, -531, 11, 707, 708, 31, 274, 30, 380, 955, + 599, -613, 306, 627, 0, 938, 0, 850, 926, 725, + -154, 1317, 1288, 1287, 1289, 44, -612, 749, 290, 750, + 1194, 1196, 869, 309, 310, 917, 1018, 995, 1002, 992, + 383, -575, 446, 1003, 915, 990, 1123, 304, 1126, 381, + 1127, 977, 978, 1124, 1125, 1131, 537, 1279, 1314, 861, + 330, 760, 759, 132, 541, 973, -110, -110, -110, 1341, + 1359, 1393, 1293, 666, 542, 543, -611, 1305, 1306, 1307, + 1308, 1310, 1302, 1303, -585, -584, -583, -582, 21, -525, + 1309, 1304, 1, 32, 760, 759, 33, 938,-32766, -278, + 77, 725, -4, -16, 1286, 332, 336, 42, -575, -575, + 46,-32766,-32766,-32766, 76,-32766, 80,-32766, 81,-32766, + 82, 83,-32766, 84, -575, 85, 147,-32766,-32766,-32766, + 156,-32766, 160,-32766,-32766, 249, 379, 1286, -575,-32766, + 430, 31, 273, 338,-32766,-32766,-32766, 365,-32766, 366, + -32766,-32766,-32766, 850, 850,-32766, 367, 1317, 368, 369, + -32766,-32766,-32766, 370, 371, 372,-32766,-32766, 373, 374, + 375, 377,-32766, 430, 447, 570, 31, 274, -276, -275, + 15, 16, 78, 17,-32766, 18, 20, 414, 850, -110, + -110, 497, 1317, 1279, -110, 498, 505, 508, 509, 510, + 511, 515, 516, -110, 517, 525, 604, 711, 1088, 1084, + 1234, 543,-32766, 1305, 1306, 1307, 1308, 1310, 1302, 1303, + 1315, 1086, 1083, -50, 1064, 1274, 1309, 1304, 1279, 1060, + -280, -102, 14, 19, 306, 24, 77, 79, 415, 303, + 413, 332, 336, 336, 618, 624, 543, 652, 1305, 1306, + 1307, 1308, 1310, 1302, 1303, 717, 143, 1238, 1292, 1235, + 1372, 1309, 1304, 726, 729, 733,-32766, 734, 736, 737, + 738, 77, 1286, 419, 739, 743, 332, 336, 728,-32766, + -32766,-32766, 746,-32766, 913,-32766, 1397,-32766, 1399, 872, + -32766, 871, 967, 1010, 1398,-32766,-32766,-32766, 966,-32766, + 964,-32766,-32766, 965, 968, 1286, 1267,-32766, 430, 946, + 956, 944,-32766,-32766,-32766, 1000,-32766, 1001,-32766,-32766, + -32766, 650, 1396,-32766, 1353, 1342, 1360, 1369,-32766,-32766, + -32766, 1318,-32766, 336,-32766,-32766, 936, 0, 1286, 0, + -32766, 430, 0, 0, 0,-32766,-32766,-32766, 0,-32766, + 0,-32766,-32766,-32766, 0, 0,-32766, 0, 0, 936, + 0,-32766,-32766,-32766, 0,-32766, 0,-32766,-32766, 0, + 0, 1286, 0,-32766, 430, 0, 0, 0,-32766,-32766, + -32766, 0,-32766, 0,-32766,-32766,-32766, 0, 0,-32766, + 0, 0, 0, 501,-32766,-32766,-32766, 0,-32766, 0, + -32766,-32766, 0, 0, 1286, 606,-32766, 430, 0, 0, + 0,-32766,-32766,-32766, 0,-32766, 0,-32766,-32766,-32766, + 926, 0,-32766, 2, 0, 0, 0,-32766,-32766,-32766, + 0, 0, 0,-32766,-32766, 0, -253, -253, -253,-32766, + 430, 0, 383, 926, 0, 0, 0, 0, 0, 0, + 0,-32766, 0, 977, 978, 0, 0, 0, 537, -252, + -252, -252, 0, 0, 0, 383, 912, 973, -110, -110, + -110, 0, 0, 0, 0, 0, 977, 978, 0, 0, + 0, 537, 0, 0, 0, 0, 0, 0, 0, 912, + 973, -110, -110, -110,-32766, 0, 0, 0, 0, 938, + 1286, 0, 0, 725, -253, 0, 0,-32766,-32766,-32766, + 0,-32766, 0,-32766, 0,-32766, 0, 0,-32766, 0, + 0, 0, 938,-32766,-32766,-32766, 725, -252, 0,-32766, + -32766, 0, 0, 0, 0,-32766, 430, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,-32766 + ); + + protected array $actionCheck = array( + 3, 4, 5, 6, 7, 8, 1, 10, 11, 12, + 13, 14, 83, 9, 32, 86, 10, 11, 12, 32, + 81, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 10, 11, 12, 9, 38, 39, 31, 9, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 0, 31, 9, 9, 58, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 107, 108, 109, 72, + 73, 74, 75, 76, 77, 78, 117, 9, 81, 86, + 71, 152, 153, 9, 31, 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, 107, 163, 109, 127, 128, 129, 130, 15, 132, + 133, 134, 135, 136, 137, 1, 9, 140, 141, 142, + 143, 144, 145, 146, 151, 148, 149, 138, 139, 1, + 168, 164, 155, 156, 157, 9, 159, 9, 3, 4, + 5, 6, 7, 8, 167, 10, 11, 12, 13, 14, + 117, 167, 119, 120, 121, 122, 123, 124, 125, 126, + 10, 11, 12, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 167, 38, 39, 142, 167, 10, 11, 12, + 9, 31, 1, 33, 34, 35, 36, 37, 38, 39, + 1, 167, 9, 58, 10, 11, 12, 83, 31, 166, + 33, 34, 35, 36, 37, 1, 1, 72, 73, 74, + 75, 76, 77, 78, 1, 31, 81, 33, 34, 35, + 36, 32, 9, 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, 71, + 167, 9, 127, 128, 129, 130, 71, 132, 133, 134, + 135, 136, 137, 1, 85, 140, 141, 142, 143, 144, + 145, 146, 168, 148, 149, 81, 172, 10, 11, 12, + 155, 156, 157, 165, 159, 167, 3, 4, 5, 6, + 7, 8, 167, 10, 11, 12, 13, 14, 31, 1, + 33, 34, 35, 10, 10, 11, 12, 9, 52, 107, + 108, 10, 11, 12, 10, 11, 138, 139, 1, 117, + 9, 38, 39, 138, 139, 31, 1, 33, 34, 54, + 55, 56, 154, 58, 81, 164, 1, 81, 1, 154, + 84, 58, 9, 164, 166, 70, 168, 168, 31, 31, + 164, 166, 9, 168, 168, 72, 73, 74, 75, 76, + 77, 78, 168, 168, 81, 163, 172, 172, 165, 32, + 167, 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, 71, 83, 71, + 127, 128, 129, 130, 161, 132, 133, 134, 135, 136, + 137, 168, 85, 140, 141, 142, 143, 144, 145, 146, + 168, 148, 149, 98, 117, 117, 117, 32, 155, 156, + 157, 107, 159, 109, 3, 4, 5, 6, 7, 8, + 167, 10, 11, 12, 13, 14, 9, 73, 74, 142, + 142, 142, 10, 11, 12, 81, 141, 15, 118, 119, + 107, 117, 109, 123, 138, 139, 138, 139, 9, 38, + 39, 1, 132, 166, 166, 166, 117, 81, 1, 15, + 154, 166, 154, 9, 160, 1, 142, 172, 107, 58, + 109, 164, 166, 98, 168, 168, 168, 123, 51, 52, + 53, 142, 32, 72, 73, 74, 75, 76, 77, 78, + 166, 15, 81, 133, 134, 135, 32, 38, 39, 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, 85, 81, 161, 127, 128, + 129, 130, 85, 132, 133, 134, 135, 136, 137, 85, + 9, 140, 141, 142, 143, 144, 145, 146, 9, 148, + 149, 15, 10, 11, 12, 9, 155, 156, 157, 9, + 159, 3, 4, 5, 6, 7, 8, 15, 10, 11, + 12, 13, 14, 31, 102, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 127, + 58, 117, 9, 117, 164, 160, 161, 162, 168, 107, + 108, 164, 70, 9, 169, 168, 58, 15, 164, 117, + 76, 77, 168, 1, 76, 77, 142, 141, 102, 103, + 72, 73, 74, 75, 76, 77, 78, 17, 165, 81, + 167, 71, 107, 108, 107, 108, 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, 15, 112, 113, 127, 128, 129, 130, 15, + 132, 133, 134, 135, 136, 137, 17, 17, 140, 141, + 142, 143, 144, 145, 146, 32, 148, 149, 138, 139, + 17, 17, 17, 155, 156, 157, 2, 3, 4, 5, + 6, 7, 8, 17, 102, 17, 17, 13, 14, 107, + 16, 109, 1, 17, 17, 17, 114, 17, 168, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 1, 32, 39, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 51, 52, 32, 71, 81, + 32, 57, 71, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 32, 71, 72, 73, 74, 75, + 32, 169, 32, 79, 80, 81, 32, 83, 32, 32, + 38, 87, 88, 89, 90, 117, 92, 36, 94, 36, + 96, 36, 1, 99, 100, 36, 85, 36, 104, 105, + 106, 107, 108, 36, 110, 111, 36, 38, 58, 141, + 116, 117, 83, 38, 38, 138, 139, 123, 70, 138, + 139, 78, 128, 129, 130, 71, 81, 86, 160, 161, + 162, 154, 83, 31, 140, 141, 84, 143, 144, 145, + 146, 147, 148, 149, 150, 168, 81, 118, 119, 168, + 156, 157, 123, 90, 160, 161, 162, 163, 98, 91, + 166, 132, 83, 97, 170, 171, 172, 76, 77, 78, + 141, 93, 95, 0, 1, 164, 85, 115, 98, 168, + 98, 151, 91, 81, 93, 101, 95, 101, 97, 132, + 151, 154, 163, 137, 136, 166, 160, 114, 107, 164, + 136, 172, 168, 170, -1, -1, 71, -1, -1, 118, + 119, -1, 38, 39, 123, 141, -1, -1, -1, 117, + -1, -1, 131, 132, 133, 134, 135, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 154, 154, 141, 142, 71, 72, 154, 154, 159, + 158, 166, 163, 158, -1, 164, -1, 83, 85, 168, + 169, 87, 160, 161, 162, 164, 166, 164, 166, 164, + 60, 61, 164, 138, 139, 164, 164, 164, 164, 164, + 107, 71, 109, 164, 164, 164, 164, 114, 164, 154, + 164, 118, 119, 164, 164, 164, 123, 123, 165, 165, + 168, 38, 39, 168, 131, 132, 133, 134, 135, 165, + 165, 165, 1, 165, 140, 141, 166, 143, 144, 145, + 146, 147, 148, 149, 166, 166, 166, 166, 155, 166, + 156, 157, 166, 166, 38, 39, 166, 164, 75, 167, + 166, 168, 169, 32, 81, 171, 172, 166, 138, 139, + 166, 88, 89, 90, 166, 92, 166, 94, 166, 96, + 166, 166, 99, 166, 154, 166, 166, 104, 105, 106, + 166, 75, 166, 110, 111, 166, 168, 81, 168, 116, + 117, 71, 72, 166, 88, 89, 90, 166, 92, 166, + 94, 128, 96, 83, 83, 99, 166, 87, 166, 166, + 104, 105, 106, 166, 166, 166, 110, 111, 166, 166, + 166, 166, 116, 117, 166, 166, 71, 72, 167, 167, + 167, 167, 159, 167, 128, 167, 167, 167, 83, 118, + 119, 167, 87, 123, 123, 167, 167, 167, 167, 167, + 167, 167, 167, 132, 167, 167, 167, 167, 167, 167, + 167, 141, 141, 143, 144, 145, 146, 147, 148, 149, + 167, 167, 167, 32, 167, 167, 156, 157, 123, 167, + 167, 167, 167, 167, 163, 167, 166, 166, 169, 167, + 167, 171, 172, 172, 167, 167, 141, 167, 143, 144, + 145, 146, 147, 148, 149, 167, 32, 167, 167, 167, + 167, 156, 157, 168, 168, 168, 75, 168, 168, 168, + 168, 166, 81, 169, 168, 168, 171, 172, 168, 88, + 89, 90, 169, 92, 169, 94, 169, 96, 169, 169, + 99, 169, 169, 169, 169, 104, 105, 106, 169, 75, + 169, 110, 111, 169, 169, 81, 169, 116, 117, 169, + 169, 169, 88, 89, 90, 169, 92, 169, 94, 128, + 96, 169, 169, 99, 169, 169, 169, 169, 104, 105, + 106, 171, 75, 172, 110, 111, 1, -1, 81, -1, + 116, 117, -1, -1, -1, 88, 89, 90, -1, 92, + -1, 94, 128, 96, -1, -1, 99, -1, -1, 1, + -1, 104, 105, 106, -1, 75, -1, 110, 111, -1, + -1, 81, -1, 116, 117, -1, -1, -1, 88, 89, + 90, -1, 92, -1, 94, 128, 96, -1, -1, 99, + -1, -1, -1, 103, 104, 105, 106, -1, 75, -1, + 110, 111, -1, -1, 81, 82, 116, 117, -1, -1, + -1, 88, 89, 90, -1, 92, -1, 94, 128, 96, + 85, -1, 99, 166, -1, -1, -1, 104, 105, 106, + -1, -1, -1, 110, 111, -1, 101, 102, 103, 116, + 117, -1, 107, 85, -1, -1, -1, -1, -1, -1, + -1, 128, -1, 118, 119, -1, -1, -1, 123, 101, + 102, 103, -1, -1, -1, 107, 131, 132, 133, 134, + 135, -1, -1, -1, -1, -1, 118, 119, -1, -1, + -1, 123, -1, -1, -1, -1, -1, -1, -1, 131, + 132, 133, 134, 135, 75, -1, -1, -1, -1, 164, + 81, -1, -1, 168, 169, -1, -1, 88, 89, 90, + -1, 92, -1, 94, -1, 96, -1, -1, 99, -1, + -1, -1, 164, 104, 105, 106, 168, 169, -1, 110, + 111, -1, -1, -1, -1, 116, 117, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 128 + ); + + protected array $actionBase = array( + 0, 155, -3, 313, 471, 471, 881, 963, 1365, 1388, + 892, 134, 515, -61, 367, 524, 524, 801, 524, 209, + 510, 283, 517, 517, 517, 920, 855, 628, 628, 855, + 628, 1053, 1053, 1053, 1053, 1086, 1086, 1320, 1320, 1353, + 1254, 1221, 1449, 1449, 1449, 1449, 1449, 1287, 1449, 1449, + 1449, 1449, 1449, 1287, 1449, 1449, 1449, 1449, 1449, 1449, + 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, + 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, + 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, + 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, + 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, + 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, + 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, + 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, + 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, + 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, + 1449, 1449, 1449, 1449, 1449, 1449, 1449, 201, -13, 44, + 365, 744, 1102, 1120, 1107, 1121, 1096, 1095, 1103, 1108, + 1122, 1183, 1185, 837, 1186, 1187, 1182, 1188, 1110, 938, + 1098, 1118, 612, 612, 612, 612, 612, 612, 612, 612, + 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, + 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, + 323, 482, 334, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 964, 964, 21, 21, 21, 324, 1135, + 1100, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 297, + 204, 1000, 187, 170, 170, 6, 6, 6, 6, 6, + 692, 53, 1101, 819, 819, 138, 138, 138, 138, 542, + 14, 347, 355, -41, 348, 232, 384, 384, 487, 487, + 554, 554, 349, 349, 554, 554, 554, 399, 399, 399, + 399, 208, 215, 366, 364, -7, 864, 224, 224, 224, + 224, 864, 864, 864, 864, 829, 1190, 864, 1011, 1027, + 864, 864, 368, 767, 767, 925, 305, 305, 305, 767, + 421, -71, -71, 421, 380, -71, 225, 286, 556, 847, + 572, 543, 556, 640, 771, 233, 148, 826, 605, 826, + 1094, 831, 831, 802, 792, 921, 1140, 1123, 874, 1176, + 876, 1178, 420, 9, 791, 1093, 1093, 1093, 1093, 1093, + 1093, 1093, 1093, 1093, 1093, 1093, 1191, 519, 1094, 436, + 1191, 1191, 1191, 519, 519, 519, 519, 519, 519, 519, + 519, 805, 519, 519, 641, 436, 614, 618, 436, 860, + 519, 877, 201, 201, 201, 201, 201, 201, 201, 201, + 201, 201, 201, -18, 201, 201, -13, 292, 292, 201, + 216, 5, 292, 292, 292, 292, 201, 201, 201, 201, + 605, 840, 882, 607, 435, 885, 29, 840, 840, 840, + 4, 113, 25, 841, 843, 393, 835, 835, 835, 869, + 956, 956, 835, 839, 835, 869, 835, 835, 956, 956, + 879, 956, 146, 609, 373, 514, 616, 956, 272, 835, + 835, 835, 835, 854, 956, 45, 68, 620, 835, 203, + 191, 835, 835, 854, 848, 828, 846, 956, 956, 956, + 854, 499, 846, 846, 846, 893, 895, 873, 822, 363, + 341, 674, 127, 783, 822, 822, 835, 601, 873, 822, + 873, 822, 880, 822, 822, 822, 873, 822, 839, 477, + 822, 779, 786, 663, 74, 822, 51, 978, 980, 743, + 982, 971, 984, 1038, 985, 987, 1125, 953, 999, 974, + 989, 1039, 960, 957, 836, 763, 764, 878, 827, 951, + 838, 838, 838, 948, 949, 838, 838, 838, 838, 838, + 838, 838, 838, 763, 923, 884, 853, 1013, 765, 776, + 1069, 820, 1145, 823, 1011, 978, 987, 789, 974, 989, + 960, 957, 800, 799, 797, 798, 796, 795, 793, 794, + 808, 1071, 1072, 990, 825, 778, 1049, 1020, 1143, 922, + 1022, 1023, 1050, 1073, 898, 1083, 1147, 844, 1149, 1150, + 924, 1028, 1126, 838, 940, 875, 934, 1027, 950, 763, + 935, 1084, 1085, 1043, 824, 1054, 1058, 998, 870, 842, + 936, 1152, 1029, 1032, 1033, 1127, 1129, 891, 1044, 962, + 1059, 872, 1099, 1060, 1061, 1062, 1063, 1130, 1153, 1131, + 890, 1132, 901, 858, 1041, 856, 1154, 504, 851, 857, + 866, 1035, 536, 1007, 1136, 1134, 1155, 1064, 1065, 1067, + 1159, 1161, 994, 902, 1046, 867, 1048, 1042, 903, 904, + 606, 865, 1087, 845, 849, 859, 622, 672, 1164, 1165, + 1167, 996, 830, 833, 905, 909, 1088, 832, 1092, 1170, + 737, 910, 1171, 1070, 787, 788, 690, 750, 749, 790, + 868, 1137, 883, 852, 850, 1034, 788, 834, 911, 1172, + 912, 914, 916, 1068, 919, 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, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 628, 628, 628, 628, 784, 784, + 784, 784, 784, 784, 784, 628, 784, 784, 784, 628, + 628, 0, 0, 628, 0, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 612, 612, 612, 612, 612, 612, 612, 612, 612, + 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, + 612, 612, 612, 612, 612, 612, 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, 612, 612, 612, 612, 612, 612, + 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, + 612, 612, 612, 612, 612, 612, 612, 758, 758, 612, + 612, 612, 612, 758, 758, 758, 758, 758, 758, 758, + 758, 758, 758, 612, 612, 0, 612, 612, 612, 612, + 612, 612, 612, 612, 879, 758, 758, 758, 758, 305, + 305, 305, 305, -96, -96, 758, 758, 380, 758, 380, + 758, 758, 305, 305, 758, 758, 758, 758, 758, 758, + 758, 758, 758, 758, 758, 0, 0, 0, 436, -71, + 758, 839, 839, 839, 839, 758, 758, 758, 758, -71, + -71, 758, 414, 414, 758, 758, 0, 0, 0, 0, + 0, 0, 0, 0, 436, 0, 0, 436, 0, 0, + 839, 839, 758, 380, 879, 328, 758, 0, 0, 0, + 0, 436, 839, 436, 519, -71, -71, 519, 519, 292, + 201, 328, 596, 596, 596, 596, 0, 0, 605, 879, + 879, 879, 879, 879, 879, 879, 879, 879, 879, 879, + 839, 0, 879, 0, 839, 839, 839, 0, 0, 0, + 0, 0, 0, 0, 0, 956, 0, 0, 0, 0, + 0, 0, 0, 839, 0, 956, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 839, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 838, 870, 0, 0, 870, + 0, 838, 838, 838, 0, 0, 0, 865, 832 + ); + + protected array $actionDefault = array( + 3,32767,32767,32767, 102, 102,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, + 32767, 631, 631, 631, 631,32767,32767, 257, 102,32767, + 32767, 500, 415, 415, 415,32767,32767,32767, 573, 573, + 573, 573, 573, 17,32767,32767,32767,32767,32767,32767, + 32767, 500,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 36, 7, 8, 10, 11, 49, 338, + 100,32767,32767,32767,32767,32767,32767,32767,32767, 102, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 624,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 403, 494, 504, 482, 483, 485, 486, 414, + 574, 630, 344, 627, 342, 413, 146, 354, 343, 245, + 261, 505, 262, 506, 509, 510, 218, 400, 150, 151, + 446, 501, 448, 499, 503, 447, 420, 427, 428, 429, + 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, + 418, 419, 502,32767,32767, 479, 478, 477, 444,32767, + 32767,32767,32767,32767,32767,32767,32767, 102,32767, 445, + 449, 417, 452, 450, 451, 468, 469, 466, 467, 470, + 32767, 323,32767,32767,32767, 471, 472, 473, 474, 381, + 379,32767,32767, 111, 323, 111,32767,32767, 459, 460, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 517, 567, 476,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 102,32767,32767, + 32767, 100, 569, 441, 443, 537, 454, 455, 453, 421, + 32767, 542,32767, 102,32767, 544,32767,32767,32767,32767, + 32767,32767,32767, 568,32767, 575, 575,32767, 530, 100, + 196,32767, 543, 196, 196,32767,32767,32767,32767,32767, + 32767,32767,32767, 638, 530, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110,32767, 196, 110,32767, + 32767,32767, 100, 196, 196, 196, 196, 196, 196, 196, + 196, 545, 196, 196, 191,32767, 271, 273, 102, 592, + 196, 547,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, + 530, 464, 139,32767, 532, 139, 575, 456, 457, 458, + 575, 575, 575, 319, 296,32767,32767,32767,32767,32767, + 545, 545, 100, 100, 100, 100,32767,32767,32767,32767, + 111, 516, 99, 99, 99, 99, 99, 103, 101,32767, + 32767,32767,32767, 226,32767, 101, 101, 99,32767, 101, + 101,32767,32767, 226, 228, 215, 230,32767, 596, 597, + 226, 101, 230, 230, 230, 250, 250, 519, 325, 101, + 99, 101, 101, 198, 325, 325,32767, 101, 519, 325, + 519, 325, 200, 325, 325, 325, 519, 325,32767, 101, + 325, 217, 403, 99, 99, 325,32767,32767,32767, 532, + 32767,32767,32767,32767,32767,32767,32767, 225,32767,32767, + 32767,32767,32767,32767,32767,32767, 562,32767, 580, 594, + 462, 463, 465, 579, 577, 487, 488, 489, 490, 491, + 492, 493, 496, 626,32767, 536,32767,32767,32767, 353, + 32767, 636,32767,32767,32767, 9, 74, 525, 42, 43, + 51, 57, 551, 552, 553, 554, 548, 549, 555, 550, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 637,32767, 575,32767, + 32767,32767,32767, 461, 557, 602,32767,32767, 576, 629, + 32767,32767,32767,32767,32767,32767,32767,32767, 139,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 562, + 32767, 137,32767,32767,32767,32767,32767,32767,32767,32767, + 558,32767,32767,32767, 575,32767,32767,32767,32767, 321, + 318,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 575,32767,32767, + 32767,32767,32767, 298,32767, 315,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 399, 532, 301, 303, 304,32767, + 32767,32767,32767, 375,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 153, 153, 3, 3, 356, + 153, 153, 153, 356, 356, 153, 356, 356, 356, 153, + 153, 153, 153, 153, 153, 283, 186, 265, 268, 250, + 250, 153, 367, 153 + ); + + protected array $goto = array( + 202, 169, 202, 202, 202, 1056, 842, 712, 359, 670, + 671, 598, 688, 689, 690, 748, 653, 655, 591, 929, + 675, 930, 1090, 721, 699, 702, 1028, 710, 719, 1024, + 171, 171, 171, 171, 226, 203, 199, 199, 181, 183, + 221, 199, 199, 199, 199, 199, 1180, 200, 200, 200, + 200, 200, 1180, 193, 194, 195, 196, 197, 198, 223, + 221, 224, 550, 551, 431, 552, 555, 556, 557, 558, + 559, 560, 561, 562, 172, 173, 174, 201, 175, 176, + 177, 170, 178, 179, 180, 182, 220, 222, 225, 245, + 248, 259, 260, 262, 263, 264, 265, 266, 267, 268, + 269, 275, 276, 277, 278, 288, 289, 326, 327, 328, + 437, 438, 439, 613, 227, 228, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 184, + 242, 185, 194, 195, 196, 197, 198, 223, 204, 205, + 206, 207, 246, 186, 187, 208, 188, 209, 205, 189, + 247, 204, 168, 210, 211, 190, 212, 213, 214, 191, + 215, 216, 192, 217, 218, 219, 285, 283, 285, 285, + 870, 1089, 1091, 1094, 615, 255, 255, 255, 255, 255, + 441, 677, 614, 1130, 884, 867, 436, 329, 323, 324, + 345, 608, 440, 346, 442, 654, 724, 492, 521, 715, + 896, 1128, 993, 883, 494, 253, 253, 253, 253, 250, + 256, 489, 1361, 1362, 1386, 1386, 925, 920, 921, 934, + 876, 922, 873, 923, 924, 874, 877, 363, 928, 881, + 480, 480, 868, 880, 1386, 848, 474, 363, 363, 480, + 1117, 1112, 1113, 1114, 1229, 351, 362, 362, 362, 362, + 1389, 1389, 429, 363, 363, 1017, 902, 363, 989, 1403, + 747, 360, 361, 566, 1026, 1021, 1056, 1285, 1285, 1285, + 569, 352, 351, 363, 363, 605, 1056, 1285, 848, 1056, + 848, 1056, 1056, 1137, 1138, 1056, 1056, 1056, 1056, 1056, + 1056, 1056, 1056, 1056, 1056, 1056, 357, 1261, 962, 637, + 674, 1285, 1262, 1265, 963, 1266, 1285, 1285, 1285, 1285, + 1376, 435, 1285, 628, 402, 1285, 1285, 1368, 1368, 1368, + 1368, 1347, 574, 567, 1062, 1061, 1059, 1059, 958, 958, + 697, 970, 1014, 942, 1051, 1067, 1068, 943, 565, 565, + 565, 603, 513, 522, 514, 863, 676, 863, 565, 709, + 520, 1176, 318, 567, 574, 600, 601, 319, 611, 617, + 844, 633, 634, 1080, 8, 709, 9, 449, 709, 28, + 1065, 1066, 467, 335, 316, 569, 698, 987, 987, 987, + 987, 1363, 1364, 467, 639, 639, 981, 988, 609, 631, + 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, + 1335, 1335, 863, 469, 682, 469, 1335, 1335, 1335, 1335, + 1335, 1335, 1335, 1335, 1335, 1335, 347, 258, 258, 626, + 640, 643, 644, 645, 646, 667, 668, 669, 723, 632, + 460, 860, 460, 460, 460, 1358, 1358, 1358, 553, 553, + 1278, 985, 420, 720, 553, 1358, 553, 553, 553, 553, + 553, 553, 553, 553, 451, 889, 568, 595, 568, 647, + 649, 651, 568, 976, 595, 411, 405, 473, 886, 1276, + 1370, 1370, 1370, 1370, 909, 866, 909, 909, 1036, 483, + 612, 484, 485, 751, 563, 563, 563, 563, 894, 619, + 1101, 1394, 1395, 412, 1332, 1332, 898, 490, 1151, 1354, + 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, + 279, 1105, 334, 334, 334, 998, 892, 0, 1280, 1047, + 0, 0, 863, 0, 0, 460, 460, 460, 460, 460, + 460, 460, 460, 460, 460, 460, 0, 0, 460, 1103, + 554, 554, 0, 1356, 1356, 1103, 554, 554, 554, 554, + 554, 554, 554, 554, 554, 554, 621, 622, 417, 418, + 947, 1166, 0, 686, 0, 687, 0, 422, 423, 424, + 0, 700, 1033, 0, 425, 1281, 1282, 0, 1268, 355, + 888, 0, 680, 1012, 858, 0, 0, 0, 882, 443, + 0, 1268, 0, 897, 885, 1100, 1104, 0, 0, 0, + 1275, 0, 443, 0, 1283, 1344, 1345, 996, 0, 0, + 1063, 1063, 0, 0, 0, 681, 1074, 1070, 1071, 404, + 407, 616, 620, 0, 0, 0, 0, 0, 0, 0, + 986, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1149, 901, 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, 1031, 1031 + ); + + protected array $gotoCheck = array( + 42, 42, 42, 42, 42, 73, 6, 73, 97, 86, + 86, 48, 86, 86, 86, 48, 48, 48, 127, 65, + 48, 65, 131, 9, 48, 48, 48, 48, 48, 48, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 23, 23, 23, 23, + 15, 130, 130, 130, 134, 5, 5, 5, 5, 5, + 66, 66, 8, 8, 35, 26, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 8, 84, 8, 8, + 35, 8, 49, 35, 84, 5, 5, 5, 5, 5, + 5, 185, 185, 185, 191, 191, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 14, 15, 15, + 157, 157, 27, 15, 191, 12, 159, 14, 14, 157, + 15, 15, 15, 15, 159, 177, 24, 24, 24, 24, + 191, 191, 43, 14, 14, 50, 45, 14, 50, 14, + 50, 97, 97, 50, 50, 50, 73, 73, 73, 73, + 14, 177, 177, 14, 14, 181, 73, 73, 12, 73, + 12, 73, 73, 148, 148, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 188, 79, 79, 56, + 56, 73, 79, 79, 79, 79, 73, 73, 73, 73, + 190, 13, 73, 13, 62, 73, 73, 9, 9, 9, + 9, 14, 76, 76, 119, 119, 89, 89, 9, 9, + 89, 89, 103, 73, 89, 89, 89, 73, 19, 19, + 19, 104, 163, 14, 163, 22, 64, 22, 19, 7, + 163, 158, 76, 76, 76, 76, 76, 76, 76, 76, + 7, 76, 76, 115, 46, 7, 46, 113, 7, 76, + 120, 120, 19, 178, 178, 14, 117, 19, 19, 19, + 19, 187, 187, 19, 108, 108, 19, 19, 2, 2, + 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, + 179, 179, 22, 83, 121, 83, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 29, 5, 5, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 80, + 23, 18, 23, 23, 23, 134, 134, 134, 165, 165, + 14, 93, 93, 93, 165, 134, 165, 165, 165, 165, + 165, 165, 165, 165, 83, 39, 9, 9, 9, 85, + 85, 85, 9, 92, 9, 28, 9, 9, 37, 169, + 134, 134, 134, 134, 25, 25, 25, 25, 110, 9, + 9, 9, 9, 99, 107, 107, 107, 107, 9, 107, + 133, 9, 9, 31, 180, 180, 41, 160, 151, 134, + 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, + 24, 136, 24, 24, 24, 96, 9, -1, 20, 114, + -1, -1, 22, -1, -1, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, -1, -1, 23, 134, + 182, 182, -1, 134, 134, 134, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 17, 17, 82, 82, + 17, 17, -1, 82, -1, 82, -1, 82, 82, 82, + -1, 82, 17, -1, 82, 20, 20, -1, 20, 82, + 17, -1, 17, 17, 20, -1, -1, -1, 17, 118, + -1, 20, -1, 16, 16, 16, 16, -1, -1, -1, + 17, -1, 118, -1, 20, 20, 20, 16, -1, -1, + 118, 118, -1, -1, -1, 118, 118, 118, 118, 59, + 59, 59, 59, -1, -1, -1, -1, -1, -1, -1, + 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 16, 16, -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, 107, 107 + ); + + protected array $gotoBase = array( + 0, 0, -339, 0, 0, 174, -7, 339, 171, 10, + 0, 0, -69, -36, -78, -186, 130, 81, 114, 66, + 117, 0, 62, 160, 240, 468, 178, 225, 118, 112, + 0, 45, 0, 0, 0, -195, 0, 119, 0, 122, + 0, 44, -1, 226, 0, 227, -387, 0, -715, 182, + 241, 0, 0, 0, 0, 0, 256, 0, 0, 570, + 0, 0, 269, 0, 102, 3, -63, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -31, 0, 0, -120, + 110, 53, 54, 120, -286, -33, -724, 0, 0, 40, + 0, 0, 124, 129, 0, 0, 61, -488, 0, 67, + 0, 0, 0, 294, 295, 0, 0, 453, 141, 0, + 100, 0, 0, 83, -3, 82, 0, 86, 318, 38, + 78, 107, 0, 0, 0, 0, 0, 16, 0, 0, + 168, 20, 0, 108, 163, 0, 58, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, + 0, 43, 0, 0, 0, 0, 0, 193, 101, -38, + 46, 0, 0, -166, 0, 195, 0, 0, 0, 92, + 0, 0, 0, 0, 0, 0, 0, -60, 42, 157, + 251, 243, 297, 0, 0, -97, 0, 1, 263, 0, + 276, -101, 0, 0 + ); + + protected array $gotoDefault = array( + -32768, 526, 755, 7, 756, 951, 831, 840, 590, 544, + 722, 356, 641, 432, 1352, 927, 1165, 610, 859, 1294, + 1300, 468, 862, 340, 745, 939, 910, 911, 408, 395, + 875, 406, 665, 642, 507, 895, 464, 887, 499, 890, + 463, 899, 167, 428, 524, 903, 6, 906, 572, 937, + 991, 396, 914, 397, 693, 916, 594, 918, 919, 403, + 409, 410, 1170, 602, 638, 931, 261, 596, 932, 394, + 933, 941, 399, 401, 703, 479, 518, 512, 421, 1132, + 597, 625, 662, 457, 486, 636, 648, 635, 493, 444, + 426, 339, 975, 983, 500, 477, 997, 358, 1005, 753, + 1178, 656, 502, 1013, 657, 1020, 1023, 545, 546, 491, + 1035, 271, 1038, 503, 1048, 26, 683, 1053, 1054, 684, + 658, 1076, 659, 685, 660, 1078, 476, 592, 1179, 475, + 1093, 1099, 465, 1102, 1340, 466, 1106, 270, 1109, 284, + 427, 445, 1115, 1116, 12, 1122, 713, 714, 25, 280, + 523, 1150, 704,-32768,-32768,-32768,-32768, 462, 1177, 461, + 1249, 1251, 573, 504, 1269, 301, 1272, 696, 519, 1277, + 458, 1343, 459, 547, 487, 325, 548, 1387, 315, 343, + 322, 564, 302, 344, 549, 488, 1349, 1357, 341, 34, + 1377, 1388, 607, 630 + ); + + protected array $ruleToNonTerminal = array( + 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, + 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, + 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, + 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 29, 29, 30, 30, 32, 34, + 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, + 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, + 45, 45, 46, 46, 48, 47, 47, 47, 47, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 25, 25, 50, 69, 69, 72, 72, + 71, 70, 70, 63, 75, 75, 76, 76, 77, 77, + 78, 78, 79, 79, 80, 80, 80, 80, 26, 26, + 27, 27, 27, 27, 27, 88, 88, 90, 90, 83, + 83, 91, 91, 92, 92, 92, 84, 84, 87, 87, + 85, 85, 93, 94, 94, 57, 57, 65, 65, 68, + 68, 68, 67, 95, 95, 96, 58, 58, 58, 58, + 97, 97, 98, 98, 99, 99, 100, 101, 101, 102, + 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, + 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, + 81, 109, 109, 111, 111, 112, 112, 112, 112, 112, + 112, 112, 112, 110, 110, 110, 115, 115, 115, 115, + 89, 89, 118, 118, 118, 119, 119, 116, 116, 120, + 120, 122, 122, 123, 123, 117, 124, 124, 121, 125, + 125, 125, 125, 113, 113, 82, 82, 82, 20, 20, + 20, 128, 128, 128, 128, 129, 129, 129, 127, 126, + 126, 131, 131, 131, 130, 130, 60, 132, 132, 133, + 61, 135, 135, 136, 136, 137, 137, 86, 138, 138, + 138, 138, 138, 138, 138, 143, 143, 144, 144, 145, + 145, 145, 145, 145, 146, 147, 147, 142, 142, 139, + 139, 141, 141, 149, 149, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 140, 150, 150, 152, 151, + 151, 153, 153, 114, 154, 154, 156, 156, 156, 155, + 155, 62, 104, 157, 157, 56, 56, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 164, 165, 165, 166, 158, 158, 163, + 163, 167, 168, 168, 169, 170, 171, 171, 171, 171, + 19, 19, 73, 73, 73, 73, 159, 159, 159, 159, + 173, 173, 162, 162, 162, 160, 160, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 180, 180, 180, + 108, 182, 182, 182, 182, 161, 161, 161, 161, 161, + 161, 161, 161, 59, 59, 176, 176, 176, 176, 176, + 183, 183, 172, 172, 172, 172, 184, 184, 184, 184, + 184, 184, 74, 74, 66, 66, 66, 66, 134, 134, + 134, 134, 187, 186, 175, 175, 175, 175, 175, 175, + 175, 174, 174, 174, 185, 185, 185, 185, 107, 181, + 189, 189, 188, 188, 190, 190, 190, 190, 190, 190, + 190, 190, 178, 178, 178, 178, 177, 192, 191, 191, + 191, 191, 191, 191, 191, 191, 193, 193, 193, 193 + ); + + protected array $ruleToLength = array( + 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, + 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, + 4, 1, 3, 4, 1, 1, 8, 7, 2, 3, + 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, + 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, + 3, 3, 2, 0, 1, 1, 1, 1, 1, 3, + 7, 10, 5, 7, 9, 5, 3, 3, 3, 3, + 3, 3, 1, 2, 5, 7, 9, 6, 5, 6, + 3, 2, 1, 1, 1, 1, 0, 2, 1, 3, + 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, + 0, 1, 3, 1, 1, 1, 1, 1, 8, 9, + 7, 8, 7, 6, 8, 0, 2, 0, 2, 1, + 2, 1, 2, 1, 1, 1, 0, 2, 0, 2, + 0, 2, 2, 1, 3, 1, 4, 1, 4, 1, + 1, 4, 2, 1, 3, 3, 3, 4, 4, 5, + 0, 2, 4, 3, 1, 1, 7, 0, 2, 1, + 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, + 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, + 0, 1, 3, 0, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 7, 9, 6, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, + 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, + 2, 1, 1, 0, 1, 0, 2, 2, 2, 4, + 3, 2, 4, 4, 3, 3, 1, 3, 1, 1, + 3, 2, 2, 3, 1, 1, 2, 3, 1, 1, + 2, 3, 1, 1, 3, 2, 0, 1, 5, 5, + 6, 10, 3, 5, 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, 1, 1, 1, 1, 2, 1, 3, 1, 1, + 3, 0, 2, 0, 5, 8, 1, 3, 3, 0, + 2, 2, 2, 3, 1, 0, 1, 1, 3, 3, + 3, 4, 4, 1, 1, 2, 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, 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, 2, 1, 3, 2, + 1, 2, 4, 2, 2, 8, 9, 8, 9, 9, + 10, 9, 10, 8, 3, 2, 2, 1, 1, 0, + 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 5, 3, + 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, + 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 3, 1, 1, 1, 4, 4, 1, + 4, 4, 0, 1, 1, 1, 3, 3, 1, 4, + 2, 2, 1, 3, 1, 4, 4, 3, 3, 3, + 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, + 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, + 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, + 3, 3, 3, 3, 6, 3, 1, 1, 2, 1 + ); + + protected function initReduceCallbacks(): void { + $this->reduceCallbacks = [ + 0 => null, + 1 => static function ($self, $stackPos) { + $self->semValue = $self->handleNamespaces($self->semStack[$stackPos-(1-1)]); + }, + 2 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; + }, + 3 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 4 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; + if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 5 => null, + 6 => null, + 7 => null, + 8 => null, + 9 => null, + 10 => null, + 11 => null, + 12 => null, + 13 => null, + 14 => null, + 15 => null, + 16 => null, + 17 => null, + 18 => null, + 19 => null, + 20 => null, + 21 => null, + 22 => null, + 23 => null, + 24 => null, + 25 => null, + 26 => null, + 27 => null, + 28 => null, + 29 => null, + 30 => null, + 31 => null, + 32 => null, + 33 => null, + 34 => null, + 35 => null, + 36 => null, + 37 => null, + 38 => null, + 39 => null, + 40 => null, + 41 => null, + 42 => null, + 43 => null, + 44 => null, + 45 => null, + 46 => null, + 47 => null, + 48 => null, + 49 => null, + 50 => null, + 51 => null, + 52 => null, + 53 => null, + 54 => null, + 55 => null, + 56 => null, + 57 => null, + 58 => null, + 59 => null, + 60 => null, + 61 => null, + 62 => null, + 63 => null, + 64 => null, + 65 => null, + 66 => null, + 67 => null, + 68 => null, + 69 => null, + 70 => null, + 71 => null, + 72 => null, + 73 => null, + 74 => null, + 75 => null, + 76 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; if ($self->semValue === "emitError(new Error('Cannot use "getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); + }, + 77 => null, + 78 => null, + 79 => null, + 80 => null, + 81 => null, + 82 => null, + 83 => null, + 84 => null, + 85 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 86 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 87 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 88 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 89 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 90 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 91 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 92 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 93 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 94 => null, + 95 => static function ($self, $stackPos) { + $self->semValue = new Name(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 96 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 97 => static function ($self, $stackPos) { + /* nothing */ + }, + 98 => static function ($self, $stackPos) { + /* nothing */ + }, + 99 => static function ($self, $stackPos) { + /* nothing */ + }, + 100 => static function ($self, $stackPos) { + $self->emitError(new Error('A trailing comma is not allowed here', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); + }, + 101 => null, + 102 => null, + 103 => static function ($self, $stackPos) { + $self->semValue = new Node\Attribute($self->semStack[$stackPos-(1-1)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 104 => static function ($self, $stackPos) { + $self->semValue = new Node\Attribute($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 105 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 106 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 107 => static function ($self, $stackPos) { + $self->semValue = new Node\AttributeGroup($self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 108 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 109 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 110 => static function ($self, $stackPos) { + $self->semValue = []; + }, + 111 => null, + 112 => null, + 113 => null, + 114 => null, + 115 => static function ($self, $stackPos) { + $self->semValue = new Stmt\HaltCompiler($self->handleHaltCompiler(), $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 116 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(3-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); + $self->checkNamespace($self->semValue); + }, + 117 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $self->checkNamespace($self->semValue); + }, + 118 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_(null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $self->checkNamespace($self->semValue); + }, + 119 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 120 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 121 => null, + 122 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), []); + }, + 123 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(4-1)]); + $self->checkConstantAttributes($self->semValue); + }, + 124 => static function ($self, $stackPos) { + $self->semValue = Stmt\Use_::TYPE_FUNCTION; + }, + 125 => static function ($self, $stackPos) { + $self->semValue = Stmt\Use_::TYPE_CONSTANT; + }, + 126 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + }, + 127 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + }, + 128 => null, + 129 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 130 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 131 => null, + 132 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 133 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 134 => null, + 135 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 136 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 137 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); + }, + 138 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); + }, + 139 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); + }, + 140 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); + }, + 141 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->semValue->type = Stmt\Use_::TYPE_NORMAL; + }, + 142 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; $self->semValue->type = $self->semStack[$stackPos-(2-1)]; + }, + 143 => null, + 144 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 145 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 146 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 147 => null, + 148 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 149 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 150 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 151 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 152 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; + }, + 153 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 154 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; + if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 155 => null, + 156 => null, + 157 => null, + 158 => static function ($self, $stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 159 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Block($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 160 => static function ($self, $stackPos) { + $self->semValue = new Stmt\If_($self->semStack[$stackPos-(7-3)], ['stmts' => $self->semStack[$stackPos-(7-5)], 'elseifs' => $self->semStack[$stackPos-(7-6)], 'else' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + }, + 161 => static function ($self, $stackPos) { + $self->semValue = new Stmt\If_($self->semStack[$stackPos-(10-3)], ['stmts' => $self->semStack[$stackPos-(10-6)], 'elseifs' => $self->semStack[$stackPos-(10-7)], 'else' => $self->semStack[$stackPos-(10-8)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); + }, + 162 => static function ($self, $stackPos) { + $self->semValue = new Stmt\While_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 163 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Do_($self->semStack[$stackPos-(7-5)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + }, + 164 => static function ($self, $stackPos) { + $self->semValue = new Stmt\For_(['init' => $self->semStack[$stackPos-(9-3)], 'cond' => $self->semStack[$stackPos-(9-5)], 'loop' => $self->semStack[$stackPos-(9-7)], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 165 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Switch_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 166 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Break_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 167 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Continue_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 168 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Return_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 169 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Global_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 170 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Static_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 171 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Echo_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 172 => static function ($self, $stackPos) { + + $self->semValue = new Stmt\InlineHTML($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('hasLeadingNewline', $self->inlineHtmlHasLeadingNewline($stackPos-(1-1))); + + }, + 173 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Expression($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 174 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Unset_($self->semStack[$stackPos-(5-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 175 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $self->semStack[$stackPos-(7-5)][1], 'stmts' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + }, + 176 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-7)][0], ['keyVar' => $self->semStack[$stackPos-(9-5)], 'byRef' => $self->semStack[$stackPos-(9-7)][1], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 177 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(6-3)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-4)], $self->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $self->semStack[$stackPos-(6-6)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + }, + 178 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Declare_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 179 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TryCatch($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->checkTryCatch($self->semValue); + }, + 180 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Goto_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 181 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Label($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 182 => static function ($self, $stackPos) { + $self->semValue = null; /* means: no statement */ + }, + 183 => null, + 184 => static function ($self, $stackPos) { + $self->semValue = $self->maybeCreateNop($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); + }, + 185 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; + }, + 186 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 187 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 188 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 189 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 190 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Catch_($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-7)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + }, + 191 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 192 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Finally_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 193 => null, + 194 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 195 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 196 => static function ($self, $stackPos) { + $self->semValue = false; + }, + 197 => static function ($self, $stackPos) { + $self->semValue = true; + }, + 198 => static function ($self, $stackPos) { + $self->semValue = false; + }, + 199 => static function ($self, $stackPos) { + $self->semValue = true; + }, + 200 => static function ($self, $stackPos) { + $self->semValue = false; + }, + 201 => static function ($self, $stackPos) { + $self->semValue = true; + }, + 202 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 203 => static function ($self, $stackPos) { + $self->semValue = []; + }, + 204 => null, + 205 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 206 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 207 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 208 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + }, + 209 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 210 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(7-2)], ['type' => $self->semStack[$stackPos-(7-1)], 'extends' => $self->semStack[$stackPos-(7-3)], 'implements' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + $self->checkClass($self->semValue, $stackPos-(7-2)); + }, + 211 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(8-3)], ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->checkClass($self->semValue, $stackPos-(8-3)); + }, + 212 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Interface_($self->semStack[$stackPos-(7-3)], ['extends' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => $self->semStack[$stackPos-(7-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + $self->checkInterface($self->semValue, $stackPos-(7-3)); + }, + 213 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Trait_($self->semStack[$stackPos-(6-3)], ['stmts' => $self->semStack[$stackPos-(6-5)], 'attrGroups' => $self->semStack[$stackPos-(6-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + }, + 214 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Enum_($self->semStack[$stackPos-(8-3)], ['scalarType' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->checkEnum($self->semValue, $stackPos-(8-3)); + }, + 215 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 216 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 217 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 218 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 219 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 220 => null, + 221 => null, + 222 => static function ($self, $stackPos) { + $self->checkClassModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; + }, + 223 => static function ($self, $stackPos) { + $self->semValue = Modifiers::ABSTRACT; + }, + 224 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, + 225 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, + 226 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 227 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 228 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 229 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 230 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 231 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 232 => null, + 233 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 234 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 235 => null, + 236 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 237 => null, + 238 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 239 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; + }, + 240 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 241 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 242 => null, + 243 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 244 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 245 => static function ($self, $stackPos) { + $self->semValue = new Node\DeclareItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 246 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 247 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-3)]; + }, + 248 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 249 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(5-3)]; + }, + 250 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 251 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 252 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Case_($self->semStack[$stackPos-(4-2)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 253 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 254 => null, + 255 => null, + 256 => static function ($self, $stackPos) { + $self->semValue = new Expr\Match_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + }, + 257 => static function ($self, $stackPos) { + $self->semValue = []; + }, + 258 => null, + 259 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 260 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 261 => static function ($self, $stackPos) { + $self->semValue = new Node\MatchArm($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 262 => static function ($self, $stackPos) { + $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 263 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 264 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 265 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 266 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 267 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 268 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 269 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 270 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); + }, + 271 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 272 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 273 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 274 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); + }, + 275 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)], false); + }, + 276 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(2-2)], true); + }, + 277 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)], false); + }, + 278 => static function ($self, $stackPos) { + $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos-(1-1)]), false); + }, + 279 => null, + 280 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 281 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 282 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 283 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 284 => static function ($self, $stackPos) { + $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; + }, + 285 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC; + }, + 286 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED; + }, + 287 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE; + }, + 288 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC_SET; + }, + 289 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED_SET; + }, + 290 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE_SET; + }, + 291 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, + 292 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, + 293 => static function ($self, $stackPos) { + $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); + $self->checkParam($self->semValue); + $self->addPropertyNameToHooks($self->semValue); + }, + 294 => static function ($self, $stackPos) { + $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); + $self->checkParam($self->semValue); + $self->addPropertyNameToHooks($self->semValue); + }, + 295 => static function ($self, $stackPos) { + $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); + }, + 296 => null, + 297 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 298 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 299 => null, + 300 => null, + 301 => static function ($self, $stackPos) { + $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 302 => static function ($self, $stackPos) { + $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); + }, + 303 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 304 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 305 => null, + 306 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 307 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, + 308 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 309 => null, + 310 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 311 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, + 312 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 313 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, + 314 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 315 => static function ($self, $stackPos) { + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 316 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, + 317 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 318 => static function ($self, $stackPos) { + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 319 => null, + 320 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 321 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 322 => null, + 323 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 324 => null, + 325 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 326 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 327 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 328 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 329 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 330 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-2)]); + }, + 331 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 332 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 333 => static function ($self, $stackPos) { + $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(4-2)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); + }, + 334 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-2)]); + }, + 335 => static function ($self, $stackPos) { + $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(3-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)]); + }, + 336 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 337 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 338 => static function ($self, $stackPos) { + $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 339 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 340 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 341 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 342 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 343 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); + }, + 344 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 345 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 346 => null, + 347 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 348 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 349 => null, + 350 => null, + 351 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 352 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 353 => static function ($self, $stackPos) { + $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 354 => static function ($self, $stackPos) { + $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 355 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } + }, + 356 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 357 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; + if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 358 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); + }, + 359 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); + $self->checkClassConst($self->semValue, $stackPos-(5-2)); + }, + 360 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); + $self->checkClassConst($self->semValue, $stackPos-(6-2)); + }, + 361 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); + $self->checkClassMethod($self->semValue, $stackPos-(10-2)); + }, + 362 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 363 => static function ($self, $stackPos) { + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 364 => static function ($self, $stackPos) { + $self->semValue = null; /* will be skipped */ + }, + 365 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 366 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 367 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 368 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 369 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 370 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 371 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 372 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 373 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 374 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, + 375 => null, + 376 => static function ($self, $stackPos) { + $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); + }, + 377 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 378 => null, + 379 => null, + 380 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 381 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 382 => null, + 383 => null, + 384 => static function ($self, $stackPos) { + $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; + }, + 385 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC; + }, + 386 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED; + }, + 387 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE; + }, + 388 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC_SET; + }, + 389 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED_SET; + }, + 390 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE_SET; + }, + 391 => static function ($self, $stackPos) { + $self->semValue = Modifiers::STATIC; + }, + 392 => static function ($self, $stackPos) { + $self->semValue = Modifiers::ABSTRACT; + }, + 393 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, + 394 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, + 395 => null, + 396 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 397 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 398 => static function ($self, $stackPos) { + $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 399 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 400 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 401 => static function ($self, $stackPos) { + $self->semValue = []; + }, + 402 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 403 => static function ($self, $stackPos) { + $self->semValue = []; + }, + 404 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->checkPropertyHook($self->semValue, null); + }, + 405 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); + }, + 406 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 407 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 408 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 409 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 410 => static function ($self, $stackPos) { + $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; + }, + 411 => null, + 412 => null, + 413 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 414 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 415 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 416 => null, + 417 => null, + 418 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 419 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 420 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 421 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 422 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + if (!$self->phpVersion->allowsAssignNewByReference()) { + $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); + } + + }, + 423 => null, + 424 => null, + 425 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall(new Node\Name($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos-(2-1)])), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 426 => static function ($self, $stackPos) { + $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 427 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 428 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 429 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 430 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 431 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 432 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 433 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 434 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 435 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 436 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 437 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 438 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 439 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 440 => static function ($self, $stackPos) { + $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 441 => static function ($self, $stackPos) { + $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 442 => static function ($self, $stackPos) { + $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 443 => static function ($self, $stackPos) { + $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 444 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 445 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 446 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 447 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 448 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 449 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 450 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 451 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 452 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 453 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 454 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 455 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 456 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 457 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 458 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 459 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 460 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 461 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 462 => static function ($self, $stackPos) { + $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 463 => static function ($self, $stackPos) { + $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 464 => static function ($self, $stackPos) { + $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 465 => static function ($self, $stackPos) { + $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 466 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 467 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 468 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 469 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 470 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 471 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 472 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 473 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 474 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 475 => static function ($self, $stackPos) { + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 476 => static function ($self, $stackPos) { + + $self->semValue = $self->semStack[$stackPos-(3-2)]; + if ($self->semValue instanceof Expr\ArrowFunction) { + $self->parenthesizedArrowFunctions->offsetSet($self->semValue); + } + + }, + 477 => static function ($self, $stackPos) { + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 478 => static function ($self, $stackPos) { + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 479 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 480 => static function ($self, $stackPos) { + $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 481 => static function ($self, $stackPos) { + $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 482 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 483 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 484 => static function ($self, $stackPos) { + $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 485 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 486 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 487 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getIntCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $attrs); + }, + 488 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); + }, + 489 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getStringCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $attrs); + }, + 490 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 491 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 492 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getBoolCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $attrs); + }, + 493 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 494 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Void_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 495 => static function ($self, $stackPos) { + $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 496 => static function ($self, $stackPos) { + $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 497 => null, + 498 => static function ($self, $stackPos) { + $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 499 => static function ($self, $stackPos) { + $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 500 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 501 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 502 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 503 => static function ($self, $stackPos) { + $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 504 => static function ($self, $stackPos) { + $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 505 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + }, + 506 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 507 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + }, + 508 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 509 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 510 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); + }, + 511 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 512 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); + }, + 513 => static function ($self, $stackPos) { + $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); + $self->checkClass($self->semValue[0], -1); + }, + 514 => static function ($self, $stackPos) { + $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 515 => static function ($self, $stackPos) { + list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 516 => static function ($self, $stackPos) { + $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 517 => null, + 518 => null, + 519 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 520 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-3)]; + }, + 521 => null, + 522 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 523 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 524 => static function ($self, $stackPos) { + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 525 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 526 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 527 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 528 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 529 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 530 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 531 => null, + 532 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 533 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 534 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 535 => static function ($self, $stackPos) { + $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 536 => null, + 537 => null, + 538 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 539 => static function ($self, $stackPos) { + $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; + }, + 540 => null, + 541 => null, + 542 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 543 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; + }, + 544 => static function ($self, $stackPos) { + foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 545 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 546 => null, + 547 => static function ($self, $stackPos) { + $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 548 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 549 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 550 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 551 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 552 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 553 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 554 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 555 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 556 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 557 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 558 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 559 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; + }, + 560 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; + $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); + }, + 561 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; + $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); + $self->createdArrays->offsetSet($self->semValue); + }, + 562 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->offsetSet($self->semValue); + }, + 563 => static function ($self, $stackPos) { + $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); + }, + 564 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); + }, + 565 => static function ($self, $stackPos) { + $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); + }, + 566 => static function ($self, $stackPos) { + $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 567 => null, + 568 => null, + 569 => null, + 570 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); + }, + 571 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); + }, + 572 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); + }, + 573 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 574 => null, + 575 => null, + 576 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 577 => null, + 578 => null, + 579 => null, + 580 => null, + 581 => null, + 582 => null, + 583 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 584 => null, + 585 => null, + 586 => null, + 587 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 588 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 589 => null, + 590 => static function ($self, $stackPos) { + $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 591 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 592 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 593 => null, + 594 => null, + 595 => null, + 596 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 597 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 598 => null, + 599 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 600 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 601 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; + }, + 602 => static function ($self, $stackPos) { + $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; + }, + 603 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 604 => null, + 605 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 606 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 607 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 608 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 609 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 610 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 611 => null, + 612 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 613 => null, + 614 => null, + 615 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 616 => null, + 617 => static function ($self, $stackPos) { + $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; + }, + 618 => static function ($self, $stackPos) { + $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); + $self->postprocessList($self->semValue); + }, + 619 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); + }, + 620 => null, + 621 => static function ($self, $stackPos) { + /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ + }, + 622 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 623 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 624 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 625 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 626 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 627 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 628 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 629 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 630 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); + }, + 631 => static function ($self, $stackPos) { + /* Create an Error node now to remember the position. We'll later either report an error, + or convert this into a null element, depending on whether this is a creation or destructuring context. */ + $attrs = $self->createEmptyElemAttributes($self->tokenPos); + $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); + }, + 632 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 633 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 634 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 635 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); + }, + 636 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); + }, + 637 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 638 => null, + 639 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 640 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 641 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 642 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 643 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 644 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + }, + 645 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 646 => static function ($self, $stackPos) { + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 647 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 648 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 649 => null, + ]; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php new file mode 100644 index 0000000..aed45d7 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php @@ -0,0 +1,2917 @@ +'", + "T_IS_GREATER_OR_EQUAL", + "T_PIPE", + "'.'", + "T_SL", + "T_SR", + "'+'", + "'-'", + "'*'", + "'/'", + "'%'", + "'!'", + "T_INSTANCEOF", + "'~'", + "T_INC", + "T_DEC", + "T_INT_CAST", + "T_DOUBLE_CAST", + "T_STRING_CAST", + "T_ARRAY_CAST", + "T_OBJECT_CAST", + "T_BOOL_CAST", + "T_UNSET_CAST", + "'@'", + "T_POW", + "'['", + "T_NEW", + "T_CLONE", + "T_EXIT", + "T_IF", + "T_ELSEIF", + "T_ELSE", + "T_ENDIF", + "T_LNUMBER", + "T_DNUMBER", + "T_STRING", + "T_STRING_VARNAME", + "T_VARIABLE", + "T_NUM_STRING", + "T_INLINE_HTML", + "T_ENCAPSED_AND_WHITESPACE", + "T_CONSTANT_ENCAPSED_STRING", + "T_ECHO", + "T_DO", + "T_WHILE", + "T_ENDWHILE", + "T_FOR", + "T_ENDFOR", + "T_FOREACH", + "T_ENDFOREACH", + "T_DECLARE", + "T_ENDDECLARE", + "T_AS", + "T_SWITCH", + "T_MATCH", + "T_ENDSWITCH", + "T_CASE", + "T_DEFAULT", + "T_BREAK", + "T_CONTINUE", + "T_GOTO", + "T_FUNCTION", + "T_FN", + "T_CONST", + "T_RETURN", + "T_TRY", + "T_CATCH", + "T_FINALLY", + "T_USE", + "T_INSTEADOF", + "T_GLOBAL", + "T_STATIC", + "T_ABSTRACT", + "T_FINAL", + "T_PRIVATE", + "T_PROTECTED", + "T_PUBLIC", + "T_READONLY", + "T_PUBLIC_SET", + "T_PROTECTED_SET", + "T_PRIVATE_SET", + "T_VAR", + "T_UNSET", + "T_ISSET", + "T_EMPTY", + "T_HALT_COMPILER", + "T_CLASS", + "T_TRAIT", + "T_INTERFACE", + "T_ENUM", + "T_EXTENDS", + "T_IMPLEMENTS", + "T_OBJECT_OPERATOR", + "T_NULLSAFE_OBJECT_OPERATOR", + "T_LIST", + "T_ARRAY", + "T_CALLABLE", + "T_CLASS_C", + "T_TRAIT_C", + "T_METHOD_C", + "T_FUNC_C", + "T_PROPERTY_C", + "T_LINE", + "T_FILE", + "T_START_HEREDOC", + "T_END_HEREDOC", + "T_DOLLAR_OPEN_CURLY_BRACES", + "T_CURLY_OPEN", + "T_PAAMAYIM_NEKUDOTAYIM", + "T_NAMESPACE", + "T_NS_C", + "T_DIR", + "T_NS_SEPARATOR", + "T_ELLIPSIS", + "T_NAME_FULLY_QUALIFIED", + "T_NAME_QUALIFIED", + "T_NAME_RELATIVE", + "T_ATTRIBUTE", + "';'", + "']'", + "'('", + "')'", + "'{'", + "'}'", + "'`'", + "'\"'", + "'$'" + ); + + protected array $tokenToSymbol = array( + 0, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 58, 172, 174, 173, 57, 174, 174, + 167, 168, 55, 53, 9, 54, 50, 56, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 32, 165, + 45, 17, 47, 31, 70, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 72, 174, 166, 37, 174, 171, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 169, 36, 170, 60, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 1, 2, 3, 4, + 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, + 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 33, 34, 35, 38, 39, 40, + 41, 42, 43, 44, 46, 48, 49, 51, 52, 59, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164 + ); + + protected array $action = array( + 132, 133, 134, 582, 135, 136, 162, 779, 780, 781, + 137, 41, 863,-32766, 970, 1404, -584, 974, 973, 1302, + 0, 395, 396, 455, 246, 854,-32766,-32766,-32766,-32766, + -32766, 440,-32766, 27,-32766, 773, 772,-32766,-32766,-32766, + -32766, 508,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + 131,-32766,-32766,-32766,-32766, 437, 782, 859, 1148,-32766, + 949,-32766,-32766,-32766,-32766,-32766,-32766, 972, 1385, 300, + 271, 53, 398, 786, 787, 788, 789, 305, 865, 441, + -341, 39, 254, -584, -584, -195, 843, 790, 791, 792, + 793, 794, 795, 796, 797, 798, 799, 819, 583, 820, + 821, 822, 823, 811, 812, 353, 354, 814, 815, 800, + 801, 802, 804, 805, 806, 368, 846, 847, 848, 849, + 850, 584, 1062, -194, 856, 807, 808, 585, 586, 3, + 831, 829, 830, 842, 826, 827, 4, 860, 587, 588, + 825, 589, 590, 591, 592, 939, 593, 594, 5, 854, + -32766,-32766,-32766, 828, 595, 596,-32766, 138, 764, 132, + 133, 134, 582, 135, 136, 1098, 779, 780, 781, 137, + 41,-32766,-32766,-32766,-32766,-32766,-32766, -275, 1302, 613, + 153, 1071, 749, 990, 991,-32766,-32766,-32766, 992,-32766, + 891,-32766, 892,-32766, 773, 772,-32766, 986, 1309, 397, + 396,-32766,-32766,-32766, 858, 299, 630,-32766,-32766, 440, + 502, 736,-32766,-32766, 437, 782,-32767,-32767,-32767,-32767, + 106, 107, 108, 109, 951,-32766, 1021, 29, 734, 271, + 53, 398, 786, 787, 788, 789, 144, 1071, 441, -341, + 332, 38, 864, 862, -195, 843, 790, 791, 792, 793, + 794, 795, 796, 797, 798, 799, 819, 583, 820, 821, + 822, 823, 811, 812, 353, 354, 814, 815, 800, 801, + 802, 804, 805, 806, 368, 846, 847, 848, 849, 850, + 584, 863, -194, 139, 807, 808, 585, 586, 323, 831, + 829, 830, 842, 826, 827, 1370, 148, 587, 588, 825, + 589, 590, 591, 592, 245, 593, 594, 395, 396,-32766, + -32766,-32766, 828, 595, 596, -85, 138, 440, 132, 133, + 134, 582, 135, 136, 1095, 779, 780, 781, 137, 41, + -32766,-32766,-32766,-32766,-32766, 51, 578, 1302, 257,-32766, + 636, 107, 108, 109,-32766,-32766,-32766, 503,-32766, 316, + -32766,-32766,-32766, 773, 772,-32766, -383, 166, -383, 1022, + -32766,-32766,-32766, 305, 79, 1133,-32766,-32766, 1414, 762, + 332, 1415,-32766, 437, 782,-32766, 1071, 110, 111, 112, + 113, 114, -85, 283,-32766, 477, 478, 479, 271, 53, + 398, 786, 787, 788, 789, 115, 407, 441, 10,-32766, + 299, 1341, 306, 307, 843, 790, 791, 792, 793, 794, + 795, 796, 797, 798, 799, 819, 583, 820, 821, 822, + 823, 811, 812, 353, 354, 814, 815, 800, 801, 802, + 804, 805, 806, 368, 846, 847, 848, 849, 850, 584, + 320, 1068, -582, 807, 808, 585, 586, 1389, 831, 829, + 830, 842, 826, 827, 329, 1388, 587, 588, 825, 589, + 590, 591, 592, 86, 593, 594, 1071, 332,-32766,-32766, + -32766, 828, 595, 596, 349, 151, -581, 132, 133, 134, + 582, 135, 136, 1100, 779, 780, 781, 137, 41,-32766, + 290,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767, + -32767,-32767,-32767,-32766,-32766,-32766, 891, 1175, 892, -582, + -582, 754, 773, 772, 1159, 1160, 1161, 1155, 1154, 1153, + 1162, 1156, 1157, 1158,-32766, -582,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 782,-32766,-32766,-32766, -588, -78,-32766, + -32766,-32766, 350, -581, -581,-32766,-32766, 271, 53, 398, + 786, 787, 788, 789, 383,-32766, 441,-32766,-32766, -581, + -32766, 773, 772, 843, 790, 791, 792, 793, 794, 795, + 796, 797, 798, 799, 819, 583, 820, 821, 822, 823, + 811, 812, 353, 354, 814, 815, 800, 801, 802, 804, + 805, 806, 368, 846, 847, 848, 849, 850, 584, -620, + 1068, -620, 807, 808, 585, 586, 389, 831, 829, 830, + 842, 826, 827, 441, 405, 587, 588, 825, 589, 590, + 591, 592, 333, 593, 594, 1071, 87, 88, 89, 459, + 828, 595, 596, 460, 151, 803, 774, 775, 776, 777, + 778, 854, 779, 780, 781, 816, 817, 40, 461, 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, 462, 283, 1329, 1159, 1160, 1161, + 1155, 1154, 1153, 1162, 1156, 1157, 1158, 115, 869, 488, + 489, 782, 1304, 1303, 1305, 108, 109, 1132, 154,-32766, + -32766, 1134, 679, 23, 156, 783, 784, 785, 786, 787, + 788, 789, 698, 699, 852, 152, 423, -580, 393, 394, + 157, 843, 790, 791, 792, 793, 794, 795, 796, 797, + 798, 799, 819, 841, 820, 821, 822, 823, 811, 812, + 813, 840, 814, 815, 800, 801, 802, 804, 805, 806, + 845, 846, 847, 848, 849, 850, 851, 1094, -578, 863, + 807, 808, 809, 810, -58, 831, 829, 830, 842, 826, + 827, 399, 400, 818, 824, 825, 832, 833, 835, 834, + 294, 836, 837, 158, -580, -580, 160, 294, 828, 839, + 838, 54, 55, 56, 57, 534, 58, 59, 36, -110, + -580, -57, 60, 61, -110, 62, -110, 670, 671, 129, + 130, 312, -587, 140, -110, -110, -110, -110, -110, -110, + -110, -110, -110, -110, -110, -578, -578, 141, 147, 949, + 161, 712, -87, 163, 164, 165, -84, 949, -78, -73, + -72, -578, 63, 64, 143, -309, -71, 65, 332, 66, + 251, 252, 67, 68, 69, 70, 71, 72, 73, 74, + 739, 31, 276, 47, 457, 535, -357, 713, 740, 1335, + 1336, 536, -70, 863, 1068, -69, -68, 1333, 45, 22, + 537, 949, 538, -67, 539, -66, 540, 52, -65, 541, + 542, 714, 715, -46, 48, 49, 463, 392, 391, 1071, + 50, 543, -18, 145, 281, 1302, 381, 348, 291, 750, + 1304, 1303, 1305, 1295, 939, 753, 290, 948, 545, 546, + 547, 150, 939, 290, -305, 295, 288, 289, 292, 293, + 549, 550, 338, 1321, 1322, 1323, 1324, 1326, 1318, 1319, + 304, 1300, 296, 301, 302, 283, 1325, 1320, 773, 772, + 1304, 1303, 1305, 305, 308, 309, 75, -154, -154, -154, + 327, 328, 332, 966, 854, 1070, 939, 149, 115, 1416, + 388, 680, -154, 708, -154, 725, -154, 13, -154, 668, + 723, 313, 31, 277, 1304, 1303, 1305, 863, 390,-32766, + 600, 1166, 987, 951, 863, 310, 701, 734, 1333, 990, + 991, 951,-32766, 686, 544, 734, 949, 685, 606, 1340, + 485, 513, 925, 986, -110, -110, -110, 35, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 702, 949, 634, 1295, 773, 772, 741, -579, 305, + -614, 1334, 0, 0, 0, 951, 311, 949, 0, 734, + -154, 549, 550, 319, 1321, 1322, 1323, 1324, 1326, 1318, + 1319, 1209, 1211, 744, 0, 1342, 0, 1325, 1320, -544, + -534, 0, -578,-32766, -4, 949, 11, 77, 751, 1302, + 30, 387, 328, 332, 862, 43,-32766,-32766,-32766, -613, + -32766, 939,-32766, 968,-32766, 44, 759,-32766, 1330, 773, + 772, 760,-32766,-32766,-32766, -579, -579, 882,-32766,-32766, + 930, 1031, 1008, 1015,-32766, 437, 1005, 939, 1016, 928, + 1003, -579, 1137, 1140, 1141, 1138,-32766, 1177, 1139, 1145, + 37, 874, 939, -586, 1357, 1374, 1407,-32766, 673, -578, + -578, -612, -588, 1302, -587, -586, -585, 31, 276, -528, + -32766,-32766,-32766, 1,-32766, -578,-32766, 78,-32766, 863, + 939,-32766, 32, 1333, -278, 33,-32766,-32766,-32766, 42, + 1007, 46,-32766,-32766, 734, 76, 80, 81,-32766, 437, + 82, 83, 390, 84, 453, 31, 277, 85, 146, 303, + -32766, 155, 159, 990, 991, 249, 951, 863, 544, 1295, + 734, 1333, 334, 369, 370, 371, 548, 986, -110, -110, + -110, 951, 372, 326, 373, 734, 374, 550, 375, 1321, + 1322, 1323, 1324, 1326, 1318, 1319, 376, 377, 422, 378, + 21, -50, 1325, 1320, 379, 382, 454, 1295, 577, 951, + 380, 384, 77, 734, -4, -276, -275, 328, 332, 15, + 16, 17, 18, 20, 363, 550, 421, 1321, 1322, 1323, + 1324, 1326, 1318, 1319, 142, 504, 505, 512, 515, 516, + 1325, 1320, 949, 517, 518,-32766, 522, 523, 524, 531, + 77, 1302, 611, 718, 1101, 328, 332, 1097,-32766,-32766, + -32766, 1250,-32766, 1331,-32766, 949,-32766, 1099, 1096,-32766, + 1077, 1290, 1309, 1073,-32766,-32766,-32766, -280,-32766, -102, + -32766,-32766, 14, 19, 1302, 24,-32766, 437, 323, 420, + 625,-32766,-32766,-32766, 631,-32766, 659,-32766,-32766,-32766, + 724, 1254,-32766, -16, 1308, 1251, 1386,-32766,-32766,-32766, + 735,-32766, 738,-32766,-32766, 742, 743, 1302, 745,-32766, + 437, 746, 747, 748,-32766,-32766,-32766, 939,-32766, 300, + -32766,-32766,-32766, 752, 1309,-32766, 764, 737, 332, 765, + -32766,-32766,-32766, -253, -253, -253,-32766,-32766, 426, 390, + 939, 756,-32766, 437, 926, 863, 1411, 1413, 885, 884, + 990, 991, 980, 1023,-32766, 544, -252, -252, -252, 1412, + 979, 977, 390, 925, 986, -110, -110, -110, 978, 981, + 1283, 959, 969, 990, 991, 957, 1176, 1172, 544, 1126, + -110, -110, 1013, 1014, 657, -110, 925, 986, -110, -110, + -110, 1410, 2, 1368, -110, 1268, 951, 1383, 0, 0, + 734, -253, 0,-32766, 0, 0,-32766, 863, 1059, 1054, + 1053, 1052, 1058, 1055, 1056, 1057, 0, 0, 0, 951, + 0, 0, 0, 734, -252, 305, 0, 0, 79, 0, + 0, 1071, 0, 0, 332, 0, 0, 0, 0, 0, + 0, 0, -110, -110, 0, 0, 0, -110, 0, 0, + 0, 0, 0, 0, 0, 299, -110, 0, 0, 0, + 0, 0, 0, 0, 0,-32766, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 305, 0, 0, + 79, 0, 0, 0, 0, 0, 332 + ); + + protected array $actionCheck = array( + 3, 4, 5, 6, 7, 8, 17, 10, 11, 12, + 13, 14, 84, 76, 1, 87, 72, 74, 75, 82, + 0, 108, 109, 110, 15, 82, 89, 90, 91, 10, + 93, 118, 95, 103, 97, 38, 39, 100, 10, 11, + 12, 104, 105, 106, 107, 10, 11, 12, 111, 112, + 15, 10, 11, 12, 117, 118, 59, 82, 128, 31, + 1, 33, 34, 35, 36, 37, 129, 124, 1, 31, + 73, 74, 75, 76, 77, 78, 79, 164, 1, 82, + 9, 153, 154, 139, 140, 9, 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, 1, 9, 82, 128, 129, 130, 131, 9, + 133, 134, 135, 136, 137, 138, 9, 162, 141, 142, + 143, 144, 145, 146, 147, 86, 149, 150, 9, 82, + 10, 11, 12, 156, 157, 158, 118, 160, 169, 3, + 4, 5, 6, 7, 8, 168, 10, 11, 12, 13, + 14, 31, 76, 33, 34, 35, 36, 168, 82, 83, + 15, 143, 169, 119, 120, 89, 90, 91, 124, 93, + 108, 95, 110, 97, 38, 39, 100, 133, 1, 108, + 109, 105, 106, 107, 162, 167, 1, 111, 112, 118, + 32, 169, 118, 117, 118, 59, 45, 46, 47, 48, + 49, 50, 51, 52, 165, 129, 32, 9, 169, 73, + 74, 75, 76, 77, 78, 79, 169, 143, 82, 168, + 173, 9, 165, 161, 168, 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, 84, 168, 9, 128, 129, 130, 131, 168, 133, + 134, 135, 136, 137, 138, 1, 9, 141, 142, 143, + 144, 145, 146, 147, 99, 149, 150, 108, 109, 10, + 11, 12, 156, 157, 158, 32, 160, 118, 3, 4, + 5, 6, 7, 8, 168, 10, 11, 12, 13, 14, + 31, 76, 33, 34, 35, 72, 87, 82, 9, 142, + 54, 50, 51, 52, 89, 90, 91, 169, 93, 9, + 95, 118, 97, 38, 39, 100, 108, 15, 110, 165, + 105, 106, 107, 164, 167, 165, 111, 112, 82, 169, + 173, 85, 117, 118, 59, 118, 143, 53, 54, 55, + 56, 57, 99, 59, 129, 134, 135, 136, 73, 74, + 75, 76, 77, 78, 79, 71, 108, 82, 110, 142, + 167, 152, 139, 140, 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, + 9, 118, 72, 128, 129, 130, 131, 1, 133, 134, + 135, 136, 137, 138, 9, 9, 141, 142, 143, 144, + 145, 146, 147, 169, 149, 150, 143, 173, 10, 11, + 12, 156, 157, 158, 9, 160, 72, 3, 4, 5, + 6, 7, 8, 168, 10, 11, 12, 13, 14, 31, + 167, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 10, 11, 12, 108, 165, 110, 139, + 140, 169, 38, 39, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 31, 155, 33, 34, 35, 36, + 37, 38, 39, 59, 10, 11, 12, 167, 17, 10, + 11, 12, 9, 139, 140, 10, 11, 73, 74, 75, + 76, 77, 78, 79, 9, 31, 82, 33, 34, 155, + 31, 38, 39, 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, 166, + 118, 168, 128, 129, 130, 131, 9, 133, 134, 135, + 136, 137, 138, 82, 9, 141, 142, 143, 144, 145, + 146, 147, 72, 149, 150, 143, 10, 11, 12, 9, + 156, 157, 158, 9, 160, 3, 4, 5, 6, 7, + 8, 82, 10, 11, 12, 13, 14, 31, 9, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 9, 59, 1, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 71, 9, 139, + 140, 59, 161, 162, 163, 51, 52, 1, 15, 53, + 54, 170, 77, 78, 15, 73, 74, 75, 76, 77, + 78, 79, 77, 78, 82, 103, 104, 72, 108, 109, + 15, 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, 1, 72, 84, + 128, 129, 130, 131, 17, 133, 134, 135, 136, 137, + 138, 108, 109, 141, 142, 143, 144, 145, 146, 147, + 31, 149, 150, 15, 139, 140, 15, 31, 156, 157, + 158, 2, 3, 4, 5, 6, 7, 8, 15, 103, + 155, 17, 13, 14, 108, 16, 110, 113, 114, 17, + 17, 115, 167, 17, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 139, 140, 17, 17, 1, + 17, 82, 32, 17, 17, 17, 32, 1, 32, 32, + 32, 155, 53, 54, 169, 36, 32, 58, 173, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 32, 72, 73, 74, 75, 76, 170, 118, 32, 80, + 81, 82, 32, 84, 118, 32, 32, 88, 89, 90, + 91, 1, 93, 32, 95, 32, 97, 72, 32, 100, + 101, 142, 143, 32, 105, 106, 107, 108, 109, 143, + 111, 112, 32, 32, 32, 82, 117, 118, 32, 32, + 161, 162, 163, 124, 86, 32, 167, 32, 129, 130, + 131, 32, 86, 167, 36, 38, 36, 36, 36, 36, + 141, 142, 36, 144, 145, 146, 147, 148, 149, 150, + 151, 118, 38, 38, 38, 59, 157, 158, 38, 39, + 161, 162, 163, 164, 139, 140, 167, 77, 78, 79, + 171, 172, 173, 39, 82, 142, 86, 72, 71, 85, + 155, 92, 92, 79, 94, 94, 96, 99, 98, 115, + 82, 116, 72, 73, 161, 162, 163, 84, 108, 87, + 91, 84, 133, 165, 84, 137, 96, 169, 88, 119, + 120, 165, 142, 102, 124, 169, 1, 98, 159, 152, + 99, 99, 132, 133, 134, 135, 136, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 102, 1, 159, 124, 38, 39, 32, 72, 164, + 167, 172, -1, -1, -1, 165, 138, 1, -1, 169, + 170, 141, 142, 137, 144, 145, 146, 147, 148, 149, + 150, 61, 62, 32, -1, 152, -1, 157, 158, 155, + 155, -1, 72, 76, 0, 1, 155, 167, 32, 82, + 155, 155, 172, 173, 161, 165, 89, 90, 91, 167, + 93, 86, 95, 160, 97, 165, 165, 100, 166, 38, + 39, 165, 105, 106, 107, 139, 140, 165, 111, 112, + 165, 165, 165, 165, 117, 118, 165, 86, 165, 165, + 165, 155, 165, 165, 165, 165, 129, 165, 165, 165, + 169, 166, 86, 167, 166, 166, 166, 76, 166, 139, + 140, 167, 167, 82, 167, 167, 167, 72, 73, 167, + 89, 90, 91, 167, 93, 155, 95, 160, 97, 84, + 86, 100, 167, 88, 168, 167, 105, 106, 107, 167, + 165, 167, 111, 112, 169, 167, 167, 167, 117, 118, + 167, 167, 108, 167, 110, 72, 73, 167, 167, 115, + 129, 167, 167, 119, 120, 167, 165, 84, 124, 124, + 169, 88, 167, 167, 167, 167, 132, 133, 134, 135, + 136, 165, 167, 169, 167, 169, 167, 142, 167, 144, + 145, 146, 147, 148, 149, 150, 167, 167, 170, 167, + 156, 32, 157, 158, 167, 167, 167, 124, 167, 165, + 167, 169, 167, 169, 170, 168, 168, 172, 173, 168, + 168, 168, 168, 168, 168, 142, 168, 144, 145, 146, + 147, 148, 149, 150, 32, 168, 168, 168, 168, 168, + 157, 158, 1, 168, 168, 76, 168, 168, 168, 168, + 167, 82, 168, 168, 168, 172, 173, 168, 89, 90, + 91, 168, 93, 168, 95, 1, 97, 168, 168, 100, + 168, 168, 1, 168, 105, 106, 107, 168, 76, 168, + 111, 112, 168, 168, 82, 168, 117, 118, 168, 168, + 168, 89, 90, 91, 168, 93, 168, 95, 129, 97, + 168, 168, 100, 32, 168, 168, 168, 105, 106, 107, + 169, 76, 169, 111, 112, 169, 169, 82, 169, 117, + 118, 169, 169, 169, 89, 90, 91, 86, 93, 31, + 95, 129, 97, 169, 1, 100, 169, 169, 173, 169, + 105, 106, 107, 102, 103, 104, 111, 112, 170, 108, + 86, 170, 117, 118, 170, 84, 170, 170, 170, 170, + 119, 120, 170, 170, 129, 124, 102, 103, 104, 170, + 170, 170, 108, 132, 133, 134, 135, 136, 170, 170, + 170, 170, 170, 119, 120, 170, 170, 170, 124, 170, + 119, 120, 170, 170, 170, 124, 132, 133, 134, 135, + 136, 170, 167, 170, 133, 171, 165, 170, -1, -1, + 169, 170, -1, 142, -1, -1, 118, 84, 120, 121, + 122, 123, 124, 125, 126, 127, -1, -1, -1, 165, + -1, -1, -1, 169, 170, 164, -1, -1, 167, -1, + -1, 143, -1, -1, 173, -1, -1, -1, -1, -1, + -1, -1, 119, 120, -1, -1, -1, 124, -1, -1, + -1, -1, -1, -1, -1, 167, 133, -1, -1, -1, + -1, -1, -1, -1, -1, 142, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 164, -1, -1, + 167, -1, -1, -1, -1, -1, 173 + ); + + protected array $actionBase = array( + 0, 156, -3, 315, 474, 474, 880, 1074, 1271, 1294, + 749, 675, 531, 559, 836, 1031, 1031, 1046, 1031, 828, + 1005, 42, 59, 59, 59, 963, 898, 632, 632, 898, + 632, 997, 997, 997, 997, 1061, 1061, -63, -63, 96, + 1232, 1199, 255, 255, 255, 255, 255, 1265, 255, 255, + 255, 255, 255, 1265, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 77, 194, 120, + 205, 1197, 783, 1150, 1163, 1152, 1166, 1145, 1144, 1151, + 1156, 1167, 1261, 1263, 889, 1254, 1267, 1158, 972, 1147, + 1162, 962, 616, 616, 616, 616, 616, 616, 616, 616, + 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, + 616, 616, 616, 616, 616, 616, 616, 616, 616, 19, + 35, 535, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 529, 529, 529, 910, 910, 524, 299, 1113, + 1075, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 140, + 28, 1000, 493, 493, 458, 458, 458, 458, 458, 696, + 1328, 1301, 171, 171, 171, 171, 1363, 1363, -70, 523, + 248, 756, 291, 197, -87, 644, 38, 199, 323, 323, + 482, 482, 233, 233, 482, 482, 482, 324, 324, 94, + 94, 94, 94, 82, 249, 860, 67, 67, 67, 67, + 860, 860, 860, 860, 913, 869, 860, 1036, 1049, 860, + 860, 370, 645, 966, 646, 646, 398, -72, -72, 398, + 64, -72, 294, 286, 257, 859, 91, 433, 257, 1073, + 404, 686, 686, 815, 686, 686, 686, 923, 610, 923, + 1141, 902, 902, 861, 807, 964, 1198, 1168, 901, 1252, + 929, 1253, 1200, 342, 251, -56, 263, 550, 806, 1139, + 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, + 1139, 1195, 523, 1141, -25, 1247, 1249, 1195, 1195, 1195, + 523, 523, 523, 523, 523, 523, 523, 523, 870, 523, + 523, 694, -25, 625, 635, -25, 896, 523, 915, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 178, 77, 77, 194, 13, 13, 77, 200, 121, 13, + 13, 13, -11, 13, 77, 77, 77, 610, 886, 849, + 663, 283, 874, 114, 886, 886, 886, 71, 9, 76, + 809, 888, 288, 882, 882, 882, 907, 986, 986, 882, + 903, 882, 907, 882, 882, 986, 986, 875, 986, 274, + 620, 465, 597, 624, 986, 340, 882, 882, 882, 882, + 916, 986, 127, 139, 639, 882, 329, 287, 882, 882, + 916, 858, 876, 908, 986, 986, 986, 916, 545, 908, + 908, 908, 931, 936, 864, 872, 445, 431, 679, 232, + 924, 872, 872, 882, 605, 864, 872, 864, 872, 933, + 872, 872, 872, 864, 872, 903, 533, 872, 813, 665, + 218, 872, 882, 20, 1008, 1009, 800, 1010, 1002, 1013, + 1069, 1014, 1016, 1171, 982, 1028, 1004, 1020, 1071, 998, + 995, 885, 792, 793, 921, 914, 979, 897, 897, 897, + 975, 977, 897, 897, 897, 897, 897, 897, 897, 897, + 792, 932, 926, 899, 1037, 796, 810, 1114, 857, 1214, + 1264, 1036, 1008, 1016, 804, 1004, 1020, 998, 995, 856, + 853, 844, 851, 843, 840, 808, 814, 871, 1116, 1119, + 1021, 920, 811, 1085, 1038, 1211, 1044, 1045, 1047, 1088, + 1123, 942, 1125, 1216, 895, 1217, 1218, 965, 1051, 1173, + 897, 974, 873, 968, 1049, 978, 792, 969, 1129, 1130, + 1081, 961, 1097, 1098, 1072, 911, 884, 970, 1219, 1059, + 1060, 1062, 1176, 1177, 930, 1082, 996, 1099, 912, 1058, + 1100, 1101, 1105, 1106, 1179, 1222, 1182, 922, 1183, 945, + 879, 1077, 909, 1223, 165, 892, 893, 906, 1068, 683, + 1035, 1184, 1208, 1229, 1108, 1109, 1110, 1230, 1231, 1024, + 946, 1083, 900, 1084, 1078, 947, 948, 689, 905, 1132, + 890, 891, 904, 705, 768, 1238, 1239, 1240, 1025, 877, + 894, 951, 953, 1133, 887, 1135, 1241, 771, 954, 1242, + 1115, 816, 817, 521, 784, 747, 818, 881, 1194, 925, + 865, 878, 1067, 817, 883, 955, 1245, 957, 958, 959, + 1111, 960, 1086, 1246, 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, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 632, 632, 632, + 632, 789, 789, 789, 789, 789, 789, 789, 632, 789, + 789, 789, 632, 632, 0, 0, 632, 0, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 616, 616, 616, 616, 616, 616, + 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, + 616, 616, 616, 616, 616, 616, 616, 616, 616, 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, 616, 616, 616, 616, + 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, + 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, + 616, 616, 823, 823, 616, 616, 823, 823, 823, 823, + 823, 823, 823, 823, 823, 823, 616, 616, 0, 616, + 616, 616, 616, 616, 616, 616, 875, 823, 823, 324, + 324, 324, 324, 823, 823, 396, 396, 396, 823, 324, + 823, 64, 324, 823, 64, 823, 823, 823, 823, 823, + 823, 823, 823, 823, 0, 0, 823, 823, 823, 823, + -25, -72, 823, 903, 903, 903, 903, 823, 823, 823, + 823, -72, -72, 823, -57, -57, 823, 823, 0, 0, + 0, 324, 324, -25, 0, 0, -25, 0, 0, 903, + 903, 823, 64, 875, 446, 823, 342, 0, 0, 0, + 0, 0, 0, 0, -25, 903, -25, 523, -72, -72, + 523, 523, 13, 77, 446, 612, 612, 612, 612, 77, + 0, 0, 0, 0, 0, 610, 875, 875, 875, 875, + 875, 875, 875, 875, 875, 875, 875, 875, 903, 0, + 875, 0, 875, 875, 903, 903, 903, 0, 0, 0, + 0, 0, 0, 0, 0, 986, 0, 0, 0, 0, + 0, 0, 0, 903, 0, 986, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 903, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 897, 911, 0, 0, 911, + 0, 897, 897, 897, 0, 0, 0, 905, 887 + ); + + protected array $actionDefault = array( + 3,32767,32767,32767, 102, 102,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, + 32767, 632, 632, 632, 632,32767,32767, 257, 102,32767, + 32767, 503, 417, 417, 417,32767,32767,32767, 576, 576, + 576, 576, 576, 17,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, + 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, 36, 7, 8, 10, 11, 49, 338, 100, + 32767,32767,32767,32767,32767,32767,32767,32767, 102,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 404, 625,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 497, 507, 485, 486, 488, 489, 416, 577, + 631, 344, 628, 342, 415, 146, 354, 343, 245, 261, + 508, 262, 509, 512, 513, 218, 401, 150, 151, 448, + 504, 450, 502, 506, 449, 422, 429, 430, 431, 432, + 433, 434, 435, 436, 437, 438, 439, 440, 441, 420, + 421, 505, 482, 481, 480,32767,32767, 446, 447,32767, + 32767,32767,32767,32767,32767,32767,32767, 102,32767, 451, + 454, 419, 452, 453, 470, 471, 468, 469, 472,32767, + 323,32767, 473, 474, 475, 476,32767,32767, 382, 196, + 380,32767, 477,32767, 111, 455, 323, 111,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 461, 462,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 102,32767,32767,32767, + 100, 520, 570, 479, 456, 457,32767, 545,32767, 102, + 32767, 547,32767,32767,32767,32767,32767,32767,32767,32767, + 572, 443, 445, 540, 626, 423, 629,32767, 533, 100, + 196,32767, 546, 196, 196,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 571,32767, 639, 533, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 110,32767, 196, 110,32767, 110, 110,32767,32767, 100, + 196, 196, 196, 196, 196, 196, 196, 196, 548, 196, + 196, 191,32767, 271, 273, 102, 594, 196, 550,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 404,32767,32767,32767,32767, 533, 466, 139, + 32767, 535, 139, 578, 458, 459, 460, 578, 578, 578, + 319, 296,32767,32767,32767,32767,32767, 548, 548, 100, + 100, 100, 100,32767,32767,32767,32767, 111, 519, 99, + 99, 99, 99, 99, 103, 101,32767,32767,32767,32767, + 226,32767, 101, 101, 99,32767, 101, 101,32767,32767, + 226, 228, 215, 230,32767, 598, 599, 226, 101, 230, + 230, 230, 250, 250, 522, 325, 101, 99, 101, 101, + 198, 325, 325,32767, 101, 522, 325, 522, 325, 200, + 325, 325, 325, 522, 325,32767, 101, 325, 217, 99, + 99, 325,32767,32767,32767,32767, 535,32767,32767,32767, + 32767,32767,32767,32767, 225,32767,32767,32767,32767,32767, + 32767,32767,32767, 565,32767, 583, 596, 464, 465, 467, + 582, 580, 490, 491, 492, 493, 494, 495, 496, 499, + 627,32767, 539,32767,32767,32767, 353,32767, 637,32767, + 32767,32767, 9, 74, 528, 42, 43, 51, 57, 554, + 555, 556, 557, 551, 552, 558, 553,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 638,32767, 578,32767,32767,32767,32767, + 463, 560, 604,32767,32767, 579, 630,32767,32767,32767, + 32767,32767,32767,32767,32767, 139,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 565,32767, 137,32767, + 32767,32767,32767,32767,32767,32767,32767, 561,32767,32767, + 32767, 578,32767,32767,32767,32767, 321, 318,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 578,32767,32767,32767,32767,32767, + 298,32767, 315,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 400, 535, 301, 303, 304,32767,32767,32767,32767, + 376,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 153, 153, 3, 3, 356, 153, + 153, 153, 356, 356, 153, 356, 356, 356, 153, 153, + 153, 153, 153, 153, 153, 283, 186, 265, 268, 250, + 250, 153, 368, 153, 402, 402, 411 + ); + + protected array $goto = array( + 201, 169, 201, 201, 201, 1069, 598, 719, 448, 684, + 644, 681, 443, 345, 341, 342, 344, 615, 447, 346, + 449, 661, 481, 728, 570, 570, 570, 570, 1245, 626, + 172, 172, 172, 172, 225, 202, 198, 198, 182, 184, + 220, 198, 198, 198, 198, 198, 1195, 199, 199, 199, + 199, 199, 1195, 192, 193, 194, 195, 196, 197, 222, + 220, 223, 557, 558, 438, 559, 562, 563, 564, 565, + 566, 567, 568, 569, 173, 174, 175, 200, 176, 177, + 178, 170, 179, 180, 181, 183, 219, 221, 224, 242, + 247, 248, 259, 260, 262, 263, 264, 265, 266, 267, + 268, 272, 273, 274, 275, 282, 285, 297, 298, 324, + 325, 444, 445, 446, 620, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 193, 194, 195, 196, 197, 222, 203, 204, 205, + 206, 243, 185, 186, 207, 187, 208, 204, 188, 244, + 203, 168, 209, 210, 189, 211, 212, 213, 190, 214, + 215, 171, 216, 217, 218, 191, 287, 284, 287, 287, + 883, 255, 255, 255, 255, 255, 1125, 605, 487, 487, + 622, 758, 660, 662, 1103, 359, 682, 487, 1075, 1074, + 706, 709, 1041, 717, 726, 1037, 733, 922, 879, 922, + 922, 253, 253, 253, 253, 250, 256, 646, 646, 1078, + 1079, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, + 1332, 880, 351, 938, 933, 934, 947, 889, 935, 886, + 936, 937, 887, 890, 476, 941, 894, 476, 1044, 1044, + 893, 364, 364, 364, 364, 352, 351, 532, 1131, 1127, + 1128, 1351, 1351, 331, 315, 1351, 1351, 1351, 1351, 1351, + 1351, 1351, 1351, 1351, 1351, 1069, 1301, 1072, 1072, 704, + 983, 1301, 1301, 1064, 1080, 1081, 1069, 942, 1301, 943, + 458, 1069, 881, 1069, 1069, 1069, 1069, 1069, 1069, 1069, + 1069, 1069, 897, 855, 1069, 1069, 1069, 1069, 677, 678, + 1301, 695, 696, 697, 1006, 1301, 1301, 1301, 1301, 450, + 909, 1301, 436, 896, 1301, 1301, 1382, 1382, 1382, 1382, + 915, 581, 574, 499, 612, 450, 367, 971, 971, 955, + 501, 1076, 1076, 956, 1400, 1400, 367, 367, 688, 1087, + 1083, 1084, 572, 411, 414, 623, 627, 572, 572, 367, + 367, 1400, 357, 367, 572, 1417, 1377, 1378, 317, 574, + 581, 607, 608, 318, 618, 624, 1390, 640, 641, 1027, + 576, 1403, 1403, 367, 367, 28, 474, 520, 442, 521, + 635, 1000, 1000, 1000, 1000, 527, 409, 474, 1348, 1348, + 994, 1001, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, + 1348, 1348, 633, 647, 650, 651, 652, 653, 674, 675, + 676, 730, 732, 561, 561, 258, 258, 561, 561, 561, + 561, 561, 561, 561, 561, 561, 561, 610, 1362, 467, + 683, 467, 876, 616, 638, 876, 467, 467, 1191, 861, + 1373, 360, 361, 1093, 456, 1373, 1373, 560, 560, 705, + 432, 560, 1373, 560, 560, 560, 560, 560, 560, 560, + 560, 1277, 975, 575, 602, 575, 1278, 1281, 976, 575, + 1282, 602, 689, 412, 480, 1384, 1384, 1384, 1384, 347, + 873, 716, 576, 861, 876, 861, 490, 619, 491, 492, + 639, 8, 857, 9, 902, 907, 989, 716, 1408, 1409, + 716, 1369, 418, 1296, 278, 899, 330, 1174, 424, 425, + 1292, 330, 330, 693, 1049, 694, 1114, 429, 430, 431, + 761, 707, 1060, 905, 433, 1102, 1104, 1107, 355, 467, + 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, + 467, 419, 339, 467, 911, 467, 467, 1294, 628, 629, + 1116, 497, 960, 1181, 621, 1144, 1371, 1371, 1116, 1118, + 1297, 1298, 1011, 1284, 1046, 1151, 1179, 1152, 731, 871, + 528, 722, 901, 1142, 687, 1025, 1284, 496, 1375, 1376, + 895, 910, 898, 1113, 1117, 998, 427, 727, 1165, 1299, + 1359, 1360, 1291, 1030, 386, 1009, 1002, 0, 757, 0, + 0, 573, 1039, 1034, 654, 656, 658, 0, 0, 0, + 0, 0, 0, 0, 0, 876, 0, 0, 999, 0, + 766, 766, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1163, 914 + ); + + protected array $gotoCheck = array( + 42, 42, 42, 42, 42, 73, 127, 73, 66, 66, + 56, 56, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 159, 9, 107, 107, 107, 107, 159, 107, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 23, 23, 23, 23, + 15, 5, 5, 5, 5, 5, 15, 48, 157, 157, + 134, 48, 48, 48, 131, 97, 48, 157, 119, 119, + 48, 48, 48, 48, 48, 48, 48, 25, 25, 25, + 25, 5, 5, 5, 5, 5, 5, 108, 108, 120, + 120, 108, 108, 108, 108, 108, 108, 108, 108, 108, + 108, 26, 177, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 83, 15, 15, 83, 107, 107, + 15, 24, 24, 24, 24, 177, 177, 76, 15, 15, + 15, 179, 179, 178, 178, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 73, 73, 89, 89, 89, + 89, 73, 73, 89, 89, 89, 73, 65, 73, 65, + 83, 73, 27, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 35, 6, 73, 73, 73, 73, 86, 86, + 73, 86, 86, 86, 49, 73, 73, 73, 73, 118, + 35, 73, 43, 35, 73, 73, 9, 9, 9, 9, + 45, 76, 76, 84, 181, 118, 14, 9, 9, 73, + 84, 118, 118, 73, 191, 191, 14, 14, 118, 118, + 118, 118, 19, 59, 59, 59, 59, 19, 19, 14, + 14, 191, 188, 14, 19, 14, 187, 187, 76, 76, + 76, 76, 76, 76, 76, 76, 190, 76, 76, 103, + 14, 191, 191, 14, 14, 76, 19, 163, 13, 163, + 13, 19, 19, 19, 19, 163, 62, 19, 180, 180, + 19, 19, 180, 180, 180, 180, 180, 180, 180, 180, + 180, 180, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 182, 182, 5, 5, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 104, 14, 23, + 64, 23, 22, 2, 2, 22, 23, 23, 158, 12, + 134, 97, 97, 115, 113, 134, 134, 165, 165, 117, + 14, 165, 134, 165, 165, 165, 165, 165, 165, 165, + 165, 79, 79, 9, 9, 9, 79, 79, 79, 9, + 79, 9, 121, 9, 9, 134, 134, 134, 134, 29, + 18, 7, 14, 12, 22, 12, 9, 9, 9, 9, + 80, 46, 7, 46, 39, 9, 92, 7, 9, 9, + 7, 134, 28, 20, 24, 37, 24, 156, 82, 82, + 169, 24, 24, 82, 110, 82, 133, 82, 82, 82, + 99, 82, 114, 9, 82, 130, 130, 130, 82, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 31, 9, 23, 41, 23, 23, 14, 17, 17, + 134, 160, 17, 17, 8, 8, 134, 134, 134, 136, + 20, 20, 96, 20, 17, 149, 149, 149, 8, 20, + 8, 8, 17, 8, 17, 17, 20, 185, 185, 185, + 17, 16, 16, 16, 16, 93, 93, 93, 152, 20, + 20, 20, 17, 50, 141, 16, 50, -1, 50, -1, + -1, 50, 50, 50, 85, 85, 85, -1, -1, -1, + -1, -1, -1, -1, -1, 22, -1, -1, 16, -1, + 24, 24, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 16, 16 + ); + + protected array $gotoBase = array( + 0, 0, -303, 0, 0, 170, 280, 471, 543, 10, + 0, 0, 136, 31, 22, -186, 111, 66, 164, 71, + 95, 0, 148, 160, 235, 191, 214, 275, 155, 176, + 0, 86, 0, 0, 0, -92, 0, 156, 0, 165, + 0, 85, -1, 286, 0, 291, -270, 0, -558, 284, + 579, 0, 0, 0, 0, 0, -33, 0, 0, 294, + 0, 0, 341, 0, 184, 261, -237, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -32, 0, 0, 37, + 172, 32, -3, -50, -167, 105, -444, 0, 0, -21, + 0, 0, 161, 274, 0, 0, 101, -318, 0, 97, + 0, 0, 0, 331, 381, 0, 0, -7, -38, 0, + 131, 0, 0, 158, 90, 162, 0, 159, 39, -100, + -83, 173, 0, 0, 0, 0, 0, 4, 0, 0, + 522, 182, 0, 127, 169, 0, 99, 0, 0, 0, + 0, -171, 0, 0, 0, 0, 0, 0, 0, 287, + 0, 0, 126, 0, 0, 0, 144, 141, 188, -255, + 93, 0, 0, -138, 0, 202, 0, 0, 0, 128, + 0, 0, 0, 0, 0, 0, 0, -82, -74, 6, + 143, 292, 168, 0, 0, 270, 0, -31, 319, 0, + 332, 20, 0, 0 + ); + + protected array $gotoDefault = array( + -32768, 533, 768, 7, 769, 964, 844, 853, 597, 551, + 729, 356, 648, 439, 1367, 940, 1180, 617, 872, 1310, + 1316, 475, 875, 336, 755, 952, 923, 924, 415, 402, + 888, 413, 672, 649, 514, 908, 471, 900, 506, 903, + 470, 912, 167, 435, 530, 916, 6, 919, 579, 950, + 1004, 403, 927, 404, 700, 929, 601, 931, 932, 410, + 416, 417, 1185, 609, 645, 944, 261, 603, 945, 401, + 946, 954, 406, 408, 710, 486, 525, 519, 428, 1146, + 604, 632, 669, 464, 493, 643, 655, 642, 500, 451, + 434, 335, 988, 996, 507, 484, 1010, 358, 1018, 763, + 1193, 663, 509, 1026, 664, 1033, 1036, 552, 553, 498, + 1048, 270, 1051, 510, 1061, 26, 690, 1066, 1067, 691, + 665, 1089, 666, 692, 667, 1091, 483, 599, 1194, 482, + 1106, 1112, 472, 1115, 1356, 473, 1119, 269, 1122, 286, + 362, 385, 452, 1129, 1130, 12, 1136, 720, 721, 25, + 280, 529, 1164, 711, 1170, 279, 1173, 469, 1192, 468, + 1265, 1267, 580, 511, 1285, 321, 1288, 703, 526, 1293, + 465, 1358, 466, 554, 494, 343, 555, 1401, 314, 365, + 340, 571, 322, 366, 556, 495, 1364, 1372, 337, 34, + 1391, 1402, 614, 637 + ); + + protected array $ruleToNonTerminal = array( + 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, + 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, + 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, + 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 29, 29, 30, 30, 32, 34, + 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, + 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, + 45, 45, 46, 46, 48, 47, 47, 47, 47, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 25, 25, 50, 69, 69, 72, 72, + 71, 70, 70, 63, 75, 75, 76, 76, 77, 77, + 78, 78, 79, 79, 80, 80, 80, 80, 26, 26, + 27, 27, 27, 27, 27, 88, 88, 90, 90, 83, + 83, 91, 91, 92, 92, 92, 84, 84, 87, 87, + 85, 85, 93, 94, 94, 57, 57, 65, 65, 68, + 68, 68, 67, 95, 95, 96, 58, 58, 58, 58, + 97, 97, 98, 98, 99, 99, 100, 101, 101, 102, + 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, + 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, + 81, 109, 109, 111, 111, 112, 112, 112, 112, 112, + 112, 112, 112, 110, 110, 110, 115, 115, 115, 115, + 89, 89, 118, 118, 118, 119, 119, 116, 116, 120, + 120, 122, 122, 123, 123, 117, 124, 124, 121, 125, + 125, 125, 125, 113, 113, 82, 82, 82, 20, 20, + 20, 128, 128, 128, 128, 129, 129, 129, 127, 126, + 126, 131, 131, 131, 130, 130, 60, 132, 132, 133, + 61, 135, 135, 136, 136, 137, 137, 86, 138, 138, + 138, 138, 138, 138, 138, 138, 144, 144, 145, 145, + 146, 146, 146, 146, 146, 147, 148, 148, 143, 143, + 139, 139, 142, 142, 150, 150, 149, 149, 149, 149, + 149, 149, 149, 149, 149, 149, 140, 151, 151, 153, + 152, 152, 141, 141, 114, 114, 154, 154, 156, 156, + 156, 155, 155, 62, 104, 157, 157, 56, 56, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 164, 165, 165, 166, + 158, 158, 163, 163, 167, 168, 168, 169, 170, 171, + 171, 171, 171, 19, 19, 73, 73, 73, 73, 159, + 159, 159, 159, 173, 173, 162, 162, 162, 160, 160, + 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, + 180, 180, 180, 108, 182, 182, 182, 182, 161, 161, + 161, 161, 161, 161, 161, 161, 59, 59, 176, 176, + 176, 176, 176, 183, 183, 172, 172, 172, 172, 184, + 184, 184, 184, 184, 74, 74, 66, 66, 66, 66, + 134, 134, 134, 134, 187, 186, 175, 175, 175, 175, + 175, 175, 174, 174, 174, 185, 185, 185, 185, 107, + 181, 189, 189, 188, 188, 190, 190, 190, 190, 190, + 190, 190, 190, 178, 178, 178, 178, 177, 192, 191, + 191, 191, 191, 191, 191, 191, 191, 193, 193, 193, + 193 + ); + + protected array $ruleToLength = array( + 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, + 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, + 4, 1, 3, 4, 1, 1, 8, 7, 2, 3, + 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, + 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, + 3, 3, 2, 0, 1, 1, 1, 1, 1, 3, + 7, 10, 5, 7, 9, 5, 3, 3, 3, 3, + 3, 3, 1, 2, 5, 7, 9, 6, 5, 6, + 3, 2, 1, 1, 1, 1, 0, 2, 1, 3, + 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, + 0, 1, 3, 1, 1, 1, 1, 1, 8, 9, + 7, 8, 7, 6, 8, 0, 2, 0, 2, 1, + 2, 1, 2, 1, 1, 1, 0, 2, 0, 2, + 0, 2, 2, 1, 3, 1, 4, 1, 4, 1, + 1, 4, 2, 1, 3, 3, 3, 4, 4, 5, + 0, 2, 4, 3, 1, 1, 7, 0, 2, 1, + 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, + 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, + 0, 1, 3, 0, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 7, 9, 6, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, + 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, + 2, 1, 1, 0, 1, 0, 2, 2, 2, 4, + 3, 2, 4, 4, 3, 3, 1, 3, 1, 1, + 3, 2, 2, 3, 1, 1, 2, 3, 1, 1, + 2, 3, 1, 1, 3, 2, 0, 1, 5, 7, + 5, 6, 10, 3, 5, 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, 1, 1, 1, 1, 2, 1, 3, 1, + 1, 3, 0, 2, 0, 3, 5, 8, 1, 3, + 3, 0, 2, 2, 2, 3, 1, 0, 1, 1, + 3, 3, 3, 4, 4, 1, 1, 2, 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, 3, 3, 3, 2, 2, 2, 2, 3, 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, 2, + 1, 3, 2, 1, 2, 4, 2, 2, 8, 9, + 8, 9, 9, 10, 9, 10, 8, 3, 2, 2, + 1, 1, 0, 4, 2, 1, 3, 2, 1, 2, + 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 0, 1, 1, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 5, 3, 3, 4, 1, 1, 3, 1, 1, + 1, 1, 1, 3, 2, 3, 0, 1, 1, 3, + 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, + 4, 1, 4, 4, 0, 1, 1, 1, 3, 3, + 1, 4, 2, 2, 1, 3, 1, 4, 3, 3, + 3, 3, 1, 3, 1, 1, 3, 1, 1, 4, + 1, 1, 1, 3, 1, 1, 2, 1, 3, 4, + 3, 2, 0, 2, 2, 1, 2, 1, 1, 1, + 4, 3, 3, 3, 3, 6, 3, 1, 1, 2, + 1 + ); + + protected function initReduceCallbacks(): void { + $this->reduceCallbacks = [ + 0 => null, + 1 => static function ($self, $stackPos) { + $self->semValue = $self->handleNamespaces($self->semStack[$stackPos-(1-1)]); + }, + 2 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; + }, + 3 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 4 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; + if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 5 => null, + 6 => null, + 7 => null, + 8 => null, + 9 => null, + 10 => null, + 11 => null, + 12 => null, + 13 => null, + 14 => null, + 15 => null, + 16 => null, + 17 => null, + 18 => null, + 19 => null, + 20 => null, + 21 => null, + 22 => null, + 23 => null, + 24 => null, + 25 => null, + 26 => null, + 27 => null, + 28 => null, + 29 => null, + 30 => null, + 31 => null, + 32 => null, + 33 => null, + 34 => null, + 35 => null, + 36 => null, + 37 => null, + 38 => null, + 39 => null, + 40 => null, + 41 => null, + 42 => null, + 43 => null, + 44 => null, + 45 => null, + 46 => null, + 47 => null, + 48 => null, + 49 => null, + 50 => null, + 51 => null, + 52 => null, + 53 => null, + 54 => null, + 55 => null, + 56 => null, + 57 => null, + 58 => null, + 59 => null, + 60 => null, + 61 => null, + 62 => null, + 63 => null, + 64 => null, + 65 => null, + 66 => null, + 67 => null, + 68 => null, + 69 => null, + 70 => null, + 71 => null, + 72 => null, + 73 => null, + 74 => null, + 75 => null, + 76 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; if ($self->semValue === "emitError(new Error('Cannot use "getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); + }, + 77 => null, + 78 => null, + 79 => null, + 80 => null, + 81 => null, + 82 => null, + 83 => null, + 84 => null, + 85 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 86 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 87 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 88 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 89 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 90 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 91 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 92 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 93 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 94 => null, + 95 => static function ($self, $stackPos) { + $self->semValue = new Name(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 96 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 97 => static function ($self, $stackPos) { + /* nothing */ + }, + 98 => static function ($self, $stackPos) { + /* nothing */ + }, + 99 => static function ($self, $stackPos) { + /* nothing */ + }, + 100 => static function ($self, $stackPos) { + $self->emitError(new Error('A trailing comma is not allowed here', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); + }, + 101 => null, + 102 => null, + 103 => static function ($self, $stackPos) { + $self->semValue = new Node\Attribute($self->semStack[$stackPos-(1-1)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 104 => static function ($self, $stackPos) { + $self->semValue = new Node\Attribute($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 105 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 106 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 107 => static function ($self, $stackPos) { + $self->semValue = new Node\AttributeGroup($self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 108 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 109 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 110 => static function ($self, $stackPos) { + $self->semValue = []; + }, + 111 => null, + 112 => null, + 113 => null, + 114 => null, + 115 => static function ($self, $stackPos) { + $self->semValue = new Stmt\HaltCompiler($self->handleHaltCompiler(), $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 116 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(3-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); + $self->checkNamespace($self->semValue); + }, + 117 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $self->checkNamespace($self->semValue); + }, + 118 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_(null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $self->checkNamespace($self->semValue); + }, + 119 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 120 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 121 => null, + 122 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), []); + }, + 123 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(4-1)]); + $self->checkConstantAttributes($self->semValue); + }, + 124 => static function ($self, $stackPos) { + $self->semValue = Stmt\Use_::TYPE_FUNCTION; + }, + 125 => static function ($self, $stackPos) { + $self->semValue = Stmt\Use_::TYPE_CONSTANT; + }, + 126 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + }, + 127 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + }, + 128 => null, + 129 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 130 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 131 => null, + 132 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 133 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 134 => null, + 135 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 136 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 137 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); + }, + 138 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); + }, + 139 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); + }, + 140 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); + }, + 141 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->semValue->type = Stmt\Use_::TYPE_NORMAL; + }, + 142 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; $self->semValue->type = $self->semStack[$stackPos-(2-1)]; + }, + 143 => null, + 144 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 145 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 146 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 147 => null, + 148 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 149 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 150 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 151 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 152 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; + }, + 153 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 154 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; + if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 155 => null, + 156 => null, + 157 => null, + 158 => static function ($self, $stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 159 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Block($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 160 => static function ($self, $stackPos) { + $self->semValue = new Stmt\If_($self->semStack[$stackPos-(7-3)], ['stmts' => $self->semStack[$stackPos-(7-5)], 'elseifs' => $self->semStack[$stackPos-(7-6)], 'else' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + }, + 161 => static function ($self, $stackPos) { + $self->semValue = new Stmt\If_($self->semStack[$stackPos-(10-3)], ['stmts' => $self->semStack[$stackPos-(10-6)], 'elseifs' => $self->semStack[$stackPos-(10-7)], 'else' => $self->semStack[$stackPos-(10-8)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); + }, + 162 => static function ($self, $stackPos) { + $self->semValue = new Stmt\While_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 163 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Do_($self->semStack[$stackPos-(7-5)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + }, + 164 => static function ($self, $stackPos) { + $self->semValue = new Stmt\For_(['init' => $self->semStack[$stackPos-(9-3)], 'cond' => $self->semStack[$stackPos-(9-5)], 'loop' => $self->semStack[$stackPos-(9-7)], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 165 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Switch_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 166 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Break_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 167 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Continue_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 168 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Return_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 169 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Global_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 170 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Static_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 171 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Echo_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 172 => static function ($self, $stackPos) { + + $self->semValue = new Stmt\InlineHTML($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('hasLeadingNewline', $self->inlineHtmlHasLeadingNewline($stackPos-(1-1))); + + }, + 173 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Expression($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 174 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Unset_($self->semStack[$stackPos-(5-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 175 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $self->semStack[$stackPos-(7-5)][1], 'stmts' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + }, + 176 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-7)][0], ['keyVar' => $self->semStack[$stackPos-(9-5)], 'byRef' => $self->semStack[$stackPos-(9-7)][1], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 177 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(6-3)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-4)], $self->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $self->semStack[$stackPos-(6-6)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + }, + 178 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Declare_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 179 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TryCatch($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->checkTryCatch($self->semValue); + }, + 180 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Goto_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 181 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Label($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 182 => static function ($self, $stackPos) { + $self->semValue = null; /* means: no statement */ + }, + 183 => null, + 184 => static function ($self, $stackPos) { + $self->semValue = $self->maybeCreateNop($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); + }, + 185 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; + }, + 186 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 187 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 188 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 189 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 190 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Catch_($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-7)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + }, + 191 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 192 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Finally_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 193 => null, + 194 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 195 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 196 => static function ($self, $stackPos) { + $self->semValue = false; + }, + 197 => static function ($self, $stackPos) { + $self->semValue = true; + }, + 198 => static function ($self, $stackPos) { + $self->semValue = false; + }, + 199 => static function ($self, $stackPos) { + $self->semValue = true; + }, + 200 => static function ($self, $stackPos) { + $self->semValue = false; + }, + 201 => static function ($self, $stackPos) { + $self->semValue = true; + }, + 202 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 203 => static function ($self, $stackPos) { + $self->semValue = []; + }, + 204 => null, + 205 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 206 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 207 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 208 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + }, + 209 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 210 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(7-2)], ['type' => $self->semStack[$stackPos-(7-1)], 'extends' => $self->semStack[$stackPos-(7-3)], 'implements' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + $self->checkClass($self->semValue, $stackPos-(7-2)); + }, + 211 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(8-3)], ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->checkClass($self->semValue, $stackPos-(8-3)); + }, + 212 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Interface_($self->semStack[$stackPos-(7-3)], ['extends' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => $self->semStack[$stackPos-(7-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + $self->checkInterface($self->semValue, $stackPos-(7-3)); + }, + 213 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Trait_($self->semStack[$stackPos-(6-3)], ['stmts' => $self->semStack[$stackPos-(6-5)], 'attrGroups' => $self->semStack[$stackPos-(6-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + }, + 214 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Enum_($self->semStack[$stackPos-(8-3)], ['scalarType' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->checkEnum($self->semValue, $stackPos-(8-3)); + }, + 215 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 216 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 217 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 218 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 219 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 220 => null, + 221 => null, + 222 => static function ($self, $stackPos) { + $self->checkClassModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; + }, + 223 => static function ($self, $stackPos) { + $self->semValue = Modifiers::ABSTRACT; + }, + 224 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, + 225 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, + 226 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 227 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 228 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 229 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 230 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 231 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 232 => null, + 233 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 234 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 235 => null, + 236 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 237 => null, + 238 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 239 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; + }, + 240 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 241 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 242 => null, + 243 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 244 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 245 => static function ($self, $stackPos) { + $self->semValue = new Node\DeclareItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 246 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 247 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-3)]; + }, + 248 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 249 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(5-3)]; + }, + 250 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 251 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 252 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Case_($self->semStack[$stackPos-(4-2)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 253 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 254 => null, + 255 => null, + 256 => static function ($self, $stackPos) { + $self->semValue = new Expr\Match_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + }, + 257 => static function ($self, $stackPos) { + $self->semValue = []; + }, + 258 => null, + 259 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 260 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 261 => static function ($self, $stackPos) { + $self->semValue = new Node\MatchArm($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 262 => static function ($self, $stackPos) { + $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 263 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 264 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 265 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 266 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 267 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 268 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 269 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 270 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); + }, + 271 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 272 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 273 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 274 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); + }, + 275 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)], false); + }, + 276 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(2-2)], true); + }, + 277 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)], false); + }, + 278 => static function ($self, $stackPos) { + $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos-(1-1)]), false); + }, + 279 => null, + 280 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 281 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 282 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 283 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 284 => static function ($self, $stackPos) { + $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; + }, + 285 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC; + }, + 286 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED; + }, + 287 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE; + }, + 288 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC_SET; + }, + 289 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED_SET; + }, + 290 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE_SET; + }, + 291 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, + 292 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, + 293 => static function ($self, $stackPos) { + $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); + $self->checkParam($self->semValue); + $self->addPropertyNameToHooks($self->semValue); + }, + 294 => static function ($self, $stackPos) { + $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); + $self->checkParam($self->semValue); + $self->addPropertyNameToHooks($self->semValue); + }, + 295 => static function ($self, $stackPos) { + $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); + }, + 296 => null, + 297 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 298 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 299 => null, + 300 => null, + 301 => static function ($self, $stackPos) { + $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 302 => static function ($self, $stackPos) { + $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); + }, + 303 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 304 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 305 => null, + 306 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 307 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, + 308 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 309 => null, + 310 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 311 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, + 312 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 313 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, + 314 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 315 => static function ($self, $stackPos) { + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 316 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, + 317 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 318 => static function ($self, $stackPos) { + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 319 => null, + 320 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 321 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 322 => null, + 323 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 324 => null, + 325 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 326 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 327 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 328 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 329 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 330 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-2)]); + }, + 331 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 332 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 333 => static function ($self, $stackPos) { + $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(4-2)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); + }, + 334 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-2)]); + }, + 335 => static function ($self, $stackPos) { + $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(3-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)]); + }, + 336 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 337 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 338 => static function ($self, $stackPos) { + $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 339 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 340 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 341 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 342 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 343 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); + }, + 344 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 345 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 346 => null, + 347 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 348 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 349 => null, + 350 => null, + 351 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 352 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 353 => static function ($self, $stackPos) { + $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 354 => static function ($self, $stackPos) { + $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 355 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } + }, + 356 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 357 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; + if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 358 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); + }, + 359 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Property($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-6)]); + $self->checkPropertyHooksForMultiProperty($self->semValue, $stackPos-(7-5)); + $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(7-6)], $stackPos-(7-5)); + $self->addPropertyNameToHooks($self->semValue); + }, + 360 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); + $self->checkClassConst($self->semValue, $stackPos-(5-2)); + }, + 361 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); + $self->checkClassConst($self->semValue, $stackPos-(6-2)); + }, + 362 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); + $self->checkClassMethod($self->semValue, $stackPos-(10-2)); + }, + 363 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 364 => static function ($self, $stackPos) { + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 365 => static function ($self, $stackPos) { + $self->semValue = null; /* will be skipped */ + }, + 366 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 367 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 368 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 369 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 370 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 371 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 372 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 373 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 374 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 375 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, + 376 => null, + 377 => static function ($self, $stackPos) { + $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); + }, + 378 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 379 => null, + 380 => null, + 381 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 382 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 383 => null, + 384 => null, + 385 => static function ($self, $stackPos) { + $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; + }, + 386 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC; + }, + 387 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED; + }, + 388 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE; + }, + 389 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC_SET; + }, + 390 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED_SET; + }, + 391 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE_SET; + }, + 392 => static function ($self, $stackPos) { + $self->semValue = Modifiers::STATIC; + }, + 393 => static function ($self, $stackPos) { + $self->semValue = Modifiers::ABSTRACT; + }, + 394 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, + 395 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, + 396 => null, + 397 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 398 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 399 => static function ($self, $stackPos) { + $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 400 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 401 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 402 => static function ($self, $stackPos) { + $self->semValue = []; + }, + 403 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 404 => static function ($self, $stackPos) { + $self->semValue = []; + }, + 405 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(3-2)], $stackPos-(3-1)); + }, + 406 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->checkPropertyHook($self->semValue, null); + }, + 407 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); + }, + 408 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 409 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 410 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 411 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 412 => static function ($self, $stackPos) { + $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; + }, + 413 => null, + 414 => null, + 415 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 416 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 417 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 418 => null, + 419 => null, + 420 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 421 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 422 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 423 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 424 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + if (!$self->phpVersion->allowsAssignNewByReference()) { + $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); + } + + }, + 425 => null, + 426 => null, + 427 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall(new Node\Name($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos-(2-1)])), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 428 => static function ($self, $stackPos) { + $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 429 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 430 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 431 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 432 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 433 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 434 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 435 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 436 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 437 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 438 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 439 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 440 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 441 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 442 => static function ($self, $stackPos) { + $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 443 => static function ($self, $stackPos) { + $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 444 => static function ($self, $stackPos) { + $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 445 => static function ($self, $stackPos) { + $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 446 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 447 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 448 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 449 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 450 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 451 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 452 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 453 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 454 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 455 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 456 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 457 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 458 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 459 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 460 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 461 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 462 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 463 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 464 => static function ($self, $stackPos) { + $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 465 => static function ($self, $stackPos) { + $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 466 => static function ($self, $stackPos) { + $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 467 => static function ($self, $stackPos) { + $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 468 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 469 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 470 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 471 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 472 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 473 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 474 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 475 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 476 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 477 => static function ($self, $stackPos) { + + $self->semValue = new Expr\BinaryOp\Pipe($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->checkPipeOperatorParentheses($self->semStack[$stackPos-(3-3)]); + + }, + 478 => static function ($self, $stackPos) { + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 479 => static function ($self, $stackPos) { + + $self->semValue = $self->semStack[$stackPos-(3-2)]; + if ($self->semValue instanceof Expr\ArrowFunction) { + $self->parenthesizedArrowFunctions->offsetSet($self->semValue); + } + + }, + 480 => static function ($self, $stackPos) { + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 481 => static function ($self, $stackPos) { + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 482 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 483 => static function ($self, $stackPos) { + $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 484 => static function ($self, $stackPos) { + $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 485 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 486 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 487 => static function ($self, $stackPos) { + $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 488 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 489 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 490 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getIntCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $attrs); + }, + 491 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); + }, + 492 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getStringCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $attrs); + }, + 493 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 494 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 495 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getBoolCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $attrs); + }, + 496 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 497 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Void_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 498 => static function ($self, $stackPos) { + $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 499 => static function ($self, $stackPos) { + $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 500 => null, + 501 => static function ($self, $stackPos) { + $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 502 => static function ($self, $stackPos) { + $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 503 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 504 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 505 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 506 => static function ($self, $stackPos) { + $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 507 => static function ($self, $stackPos) { + $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 508 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + }, + 509 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 510 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + }, + 511 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 512 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 513 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); + }, + 514 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 515 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); + }, + 516 => static function ($self, $stackPos) { + $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); + $self->checkClass($self->semValue[0], -1); + }, + 517 => static function ($self, $stackPos) { + $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 518 => static function ($self, $stackPos) { + list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 519 => static function ($self, $stackPos) { + $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 520 => null, + 521 => null, + 522 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 523 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-3)]; + }, + 524 => null, + 525 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 526 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 527 => static function ($self, $stackPos) { + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 528 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 529 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 530 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 531 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 532 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 533 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 534 => null, + 535 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 536 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 537 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 538 => static function ($self, $stackPos) { + $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 539 => null, + 540 => null, + 541 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 542 => static function ($self, $stackPos) { + $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; + }, + 543 => null, + 544 => null, + 545 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 546 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; + }, + 547 => static function ($self, $stackPos) { + foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 548 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 549 => null, + 550 => static function ($self, $stackPos) { + $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 551 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 552 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 553 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 554 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 555 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 556 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 557 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 558 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 559 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 560 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 561 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 562 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; + }, + 563 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; + $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); + }, + 564 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; + $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); + $self->createdArrays->offsetSet($self->semValue); + }, + 565 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->offsetSet($self->semValue); + }, + 566 => static function ($self, $stackPos) { + $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); + }, + 567 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); + }, + 568 => static function ($self, $stackPos) { + $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); + }, + 569 => static function ($self, $stackPos) { + $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 570 => null, + 571 => null, + 572 => null, + 573 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); + }, + 574 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); + }, + 575 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); + }, + 576 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 577 => null, + 578 => null, + 579 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 580 => null, + 581 => null, + 582 => null, + 583 => null, + 584 => null, + 585 => null, + 586 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 587 => null, + 588 => null, + 589 => null, + 590 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 591 => null, + 592 => static function ($self, $stackPos) { + $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 593 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 594 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 595 => null, + 596 => null, + 597 => null, + 598 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 599 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 600 => null, + 601 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 602 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 603 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; + }, + 604 => static function ($self, $stackPos) { + $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; + }, + 605 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 606 => null, + 607 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 608 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 609 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 610 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 611 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 612 => null, + 613 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 614 => null, + 615 => null, + 616 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 617 => null, + 618 => static function ($self, $stackPos) { + $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; + }, + 619 => static function ($self, $stackPos) { + $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); + $self->postprocessList($self->semValue); + }, + 620 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); + }, + 621 => null, + 622 => static function ($self, $stackPos) { + /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ + }, + 623 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 624 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 625 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 626 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 627 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 628 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 629 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 630 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 631 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); + }, + 632 => static function ($self, $stackPos) { + /* Create an Error node now to remember the position. We'll later either report an error, + or convert this into a null element, depending on whether this is a creation or destructuring context. */ + $attrs = $self->createEmptyElemAttributes($self->tokenPos); + $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); + }, + 633 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 634 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 635 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 636 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); + }, + 637 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); + }, + 638 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 639 => null, + 640 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 641 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 642 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 643 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 644 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 645 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + }, + 646 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 647 => static function ($self, $stackPos) { + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 648 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 649 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 650 => null, + ]; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php new file mode 100644 index 0000000..aaa6637 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php @@ -0,0 +1,1335 @@ + Map of PHP token IDs to drop */ + protected array $dropTokens; + /** @var int[] Map of external symbols (static::T_*) to internal symbols */ + protected array $tokenToSymbol; + /** @var string[] Map of symbols to their names */ + protected array $symbolToName; + /** @var array Names of the production rules (only necessary for debugging) */ + protected array $productions; + + /** @var int[] Map of states to a displacement into the $action table. The corresponding action for this + * state/symbol pair is $action[$actionBase[$state] + $symbol]. If $actionBase[$state] is 0, the + * action is defaulted, i.e. $actionDefault[$state] should be used instead. */ + protected array $actionBase; + /** @var int[] Table of actions. Indexed according to $actionBase comment. */ + protected array $action; + /** @var int[] Table indexed analogously to $action. If $actionCheck[$actionBase[$state] + $symbol] != $symbol + * then the action is defaulted, i.e. $actionDefault[$state] should be used instead. */ + protected array $actionCheck; + /** @var int[] Map of states to their default action */ + protected array $actionDefault; + /** @var callable[] Semantic action callbacks */ + protected array $reduceCallbacks; + + /** @var int[] Map of non-terminals to a displacement into the $goto table. The corresponding goto state for this + * non-terminal/state pair is $goto[$gotoBase[$nonTerminal] + $state] (unless defaulted) */ + protected array $gotoBase; + /** @var int[] Table of states to goto after reduction. Indexed according to $gotoBase comment. */ + protected array $goto; + /** @var int[] Table indexed analogously to $goto. If $gotoCheck[$gotoBase[$nonTerminal] + $state] != $nonTerminal + * then the goto state is defaulted, i.e. $gotoDefault[$nonTerminal] should be used. */ + protected array $gotoCheck; + /** @var int[] Map of non-terminals to the default state to goto after their reduction */ + protected array $gotoDefault; + + /** @var int[] Map of rules to the non-terminal on their left-hand side, i.e. the non-terminal to use for + * determining the state to goto after reduction. */ + protected array $ruleToNonTerminal; + /** @var int[] Map of rules to the length of their right-hand side, which is the number of elements that have to + * be popped from the stack(s) on reduction. */ + protected array $ruleToLength; + + /* + * The following members are part of the parser state: + */ + + /** @var mixed Temporary value containing the result of last semantic action (reduction) */ + protected $semValue; + /** @var mixed[] Semantic value stack (contains values of tokens and semantic action results) */ + protected array $semStack; + /** @var int[] Token start position stack */ + protected array $tokenStartStack; + /** @var int[] Token end position stack */ + protected array $tokenEndStack; + + /** @var ErrorHandler Error handler */ + protected ErrorHandler $errorHandler; + /** @var int Error state, used to avoid error floods */ + protected int $errorState; + + /** @var \SplObjectStorage|null Array nodes created during parsing, for postprocessing of empty elements. */ + protected ?\SplObjectStorage $createdArrays; + + /** @var \SplObjectStorage|null + * Arrow functions that are wrapped in parentheses, to enforce the pipe operator parentheses requirements. + */ + protected ?\SplObjectStorage $parenthesizedArrowFunctions; + + /** @var Token[] Tokens for the current parse */ + protected array $tokens; + /** @var int Current position in token array */ + protected int $tokenPos; + + /** + * Initialize $reduceCallbacks map. + */ + abstract protected function initReduceCallbacks(): void; + + /** + * Creates a parser instance. + * + * Options: + * * phpVersion: ?PhpVersion, + * + * @param Lexer $lexer A lexer + * @param PhpVersion $phpVersion PHP version to target, defaults to latest supported. This + * option is best-effort: Even if specified, parsing will generally assume the latest + * supported version and only adjust behavior in minor ways, for example by omitting + * errors in older versions and interpreting type hints as a name or identifier depending + * on version. + */ + public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) { + $this->lexer = $lexer; + $this->phpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); + + $this->initReduceCallbacks(); + $this->phpTokenToSymbol = $this->createTokenMap(); + $this->dropTokens = array_fill_keys( + [\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], true + ); + } + + /** + * Parses PHP code into a node tree. + * + * If a non-throwing error handler is used, the parser will continue parsing after an error + * occurred and attempt to build a partial AST. + * + * @param string $code The source code to parse + * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults + * to ErrorHandler\Throwing. + * + * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and + * the parser was unable to recover from an error). + */ + public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array { + $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing(); + $this->createdArrays = new \SplObjectStorage(); + $this->parenthesizedArrowFunctions = new \SplObjectStorage(); + + $this->tokens = $this->lexer->tokenize($code, $this->errorHandler); + $result = $this->doParse(); + + // Report errors for any empty elements used inside arrays. This is delayed until after the main parse, + // because we don't know a priori whether a given array expression will be used in a destructuring context + // or not. + foreach ($this->createdArrays as $node) { + foreach ($node->items as $item) { + if ($item->value instanceof Expr\Error) { + $this->errorHandler->handleError( + new Error('Cannot use empty array elements in arrays', $item->getAttributes())); + } + } + } + + // Clear out some of the interior state, so we don't hold onto unnecessary + // memory between uses of the parser + $this->tokenStartStack = []; + $this->tokenEndStack = []; + $this->semStack = []; + $this->semValue = null; + $this->createdArrays = null; + $this->parenthesizedArrowFunctions = null; + + if ($result !== null) { + $traverser = new NodeTraverser(new CommentAnnotatingVisitor($this->tokens)); + $traverser->traverse($result); + } + + return $result; + } + + public function getTokens(): array { + return $this->tokens; + } + + /** @return Stmt[]|null */ + protected function doParse(): ?array { + // We start off with no lookahead-token + $symbol = self::SYMBOL_NONE; + $tokenValue = null; + $this->tokenPos = -1; + + // Keep stack of start and end attributes + $this->tokenStartStack = []; + $this->tokenEndStack = [0]; + + // Start off in the initial state and keep a stack of previous states + $state = 0; + $stateStack = [$state]; + + // Semantic value stack (contains values of tokens and semantic action results) + $this->semStack = []; + + // Current position in the stack(s) + $stackPos = 0; + + $this->errorState = 0; + + for (;;) { + //$this->traceNewState($state, $symbol); + + if ($this->actionBase[$state] === 0) { + $rule = $this->actionDefault[$state]; + } else { + if ($symbol === self::SYMBOL_NONE) { + do { + $token = $this->tokens[++$this->tokenPos]; + $tokenId = $token->id; + } while (isset($this->dropTokens[$tokenId])); + + // Map the lexer token id to the internally used symbols. + $tokenValue = $token->text; + if (!isset($this->phpTokenToSymbol[$tokenId])) { + throw new \RangeException(sprintf( + 'The lexer returned an invalid token (id=%d, value=%s)', + $tokenId, $tokenValue + )); + } + $symbol = $this->phpTokenToSymbol[$tokenId]; + + //$this->traceRead($symbol); + } + + $idx = $this->actionBase[$state] + $symbol; + if ((($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol) + || ($state < $this->YY2TBLSTATE + && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 + && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol)) + && ($action = $this->action[$idx]) !== $this->defaultAction) { + /* + * >= numNonLeafStates: shift and reduce + * > 0: shift + * = 0: accept + * < 0: reduce + * = -YYUNEXPECTED: error + */ + if ($action > 0) { + /* shift */ + //$this->traceShift($symbol); + + ++$stackPos; + $stateStack[$stackPos] = $state = $action; + $this->semStack[$stackPos] = $tokenValue; + $this->tokenStartStack[$stackPos] = $this->tokenPos; + $this->tokenEndStack[$stackPos] = $this->tokenPos; + $symbol = self::SYMBOL_NONE; + + if ($this->errorState) { + --$this->errorState; + } + + if ($action < $this->numNonLeafStates) { + continue; + } + + /* $yyn >= numNonLeafStates means shift-and-reduce */ + $rule = $action - $this->numNonLeafStates; + } else { + $rule = -$action; + } + } else { + $rule = $this->actionDefault[$state]; + } + } + + for (;;) { + if ($rule === 0) { + /* accept */ + //$this->traceAccept(); + return $this->semValue; + } + if ($rule !== $this->unexpectedTokenRule) { + /* reduce */ + //$this->traceReduce($rule); + + $ruleLength = $this->ruleToLength[$rule]; + try { + $callback = $this->reduceCallbacks[$rule]; + if ($callback !== null) { + $callback($this, $stackPos); + } elseif ($ruleLength > 0) { + $this->semValue = $this->semStack[$stackPos - $ruleLength + 1]; + } + } catch (Error $e) { + if (-1 === $e->getStartLine()) { + $e->setStartLine($this->tokens[$this->tokenPos]->line); + } + + $this->emitError($e); + // Can't recover from this type of error + return null; + } + + /* Goto - shift nonterminal */ + $lastTokenEnd = $this->tokenEndStack[$stackPos]; + $stackPos -= $ruleLength; + $nonTerminal = $this->ruleToNonTerminal[$rule]; + $idx = $this->gotoBase[$nonTerminal] + $stateStack[$stackPos]; + if ($idx >= 0 && $idx < $this->gotoTableSize && $this->gotoCheck[$idx] === $nonTerminal) { + $state = $this->goto[$idx]; + } else { + $state = $this->gotoDefault[$nonTerminal]; + } + + ++$stackPos; + $stateStack[$stackPos] = $state; + $this->semStack[$stackPos] = $this->semValue; + $this->tokenEndStack[$stackPos] = $lastTokenEnd; + if ($ruleLength === 0) { + // Empty productions use the start attributes of the lookahead token. + $this->tokenStartStack[$stackPos] = $this->tokenPos; + } + } else { + /* error */ + switch ($this->errorState) { + case 0: + $msg = $this->getErrorMessage($symbol, $state); + $this->emitError(new Error($msg, $this->getAttributesForToken($this->tokenPos))); + // Break missing intentionally + // no break + case 1: + case 2: + $this->errorState = 3; + + // Pop until error-expecting state uncovered + while (!( + (($idx = $this->actionBase[$state] + $this->errorSymbol) >= 0 + && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) + || ($state < $this->YY2TBLSTATE + && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $this->errorSymbol) >= 0 + && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $this->errorSymbol) + ) || ($action = $this->action[$idx]) === $this->defaultAction) { // Not totally sure about this + if ($stackPos <= 0) { + // Could not recover from error + return null; + } + $state = $stateStack[--$stackPos]; + //$this->tracePop($state); + } + + //$this->traceShift($this->errorSymbol); + ++$stackPos; + $stateStack[$stackPos] = $state = $action; + + // We treat the error symbol as being empty, so we reset the end attributes + // to the end attributes of the last non-error symbol + $this->tokenStartStack[$stackPos] = $this->tokenPos; + $this->tokenEndStack[$stackPos] = $this->tokenEndStack[$stackPos - 1]; + break; + + case 3: + if ($symbol === 0) { + // Reached EOF without recovering from error + return null; + } + + //$this->traceDiscard($symbol); + $symbol = self::SYMBOL_NONE; + break 2; + } + } + + if ($state < $this->numNonLeafStates) { + break; + } + + /* >= numNonLeafStates means shift-and-reduce */ + $rule = $state - $this->numNonLeafStates; + } + } + } + + protected function emitError(Error $error): void { + $this->errorHandler->handleError($error); + } + + /** + * Format error message including expected tokens. + * + * @param int $symbol Unexpected symbol + * @param int $state State at time of error + * + * @return string Formatted error message + */ + protected function getErrorMessage(int $symbol, int $state): string { + $expectedString = ''; + if ($expected = $this->getExpectedTokens($state)) { + $expectedString = ', expecting ' . implode(' or ', $expected); + } + + return 'Syntax error, unexpected ' . $this->symbolToName[$symbol] . $expectedString; + } + + /** + * Get limited number of expected tokens in given state. + * + * @param int $state State + * + * @return string[] Expected tokens. If too many, an empty array is returned. + */ + protected function getExpectedTokens(int $state): array { + $expected = []; + + $base = $this->actionBase[$state]; + foreach ($this->symbolToName as $symbol => $name) { + $idx = $base + $symbol; + if ($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol + || $state < $this->YY2TBLSTATE + && ($idx = $this->actionBase[$state + $this->numNonLeafStates] + $symbol) >= 0 + && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol + ) { + if ($this->action[$idx] !== $this->unexpectedTokenRule + && $this->action[$idx] !== $this->defaultAction + && $symbol !== $this->errorSymbol + ) { + if (count($expected) === 4) { + /* Too many expected tokens */ + return []; + } + + $expected[] = $name; + } + } + } + + return $expected; + } + + /** + * Get attributes for a node with the given start and end token positions. + * + * @param int $tokenStartPos Token position the node starts at + * @param int $tokenEndPos Token position the node ends at + * @return array Attributes + */ + protected function getAttributes(int $tokenStartPos, int $tokenEndPos): array { + $startToken = $this->tokens[$tokenStartPos]; + $afterEndToken = $this->tokens[$tokenEndPos + 1]; + return [ + 'startLine' => $startToken->line, + 'startTokenPos' => $tokenStartPos, + 'startFilePos' => $startToken->pos, + 'endLine' => $afterEndToken->line, + 'endTokenPos' => $tokenEndPos, + 'endFilePos' => $afterEndToken->pos - 1, + ]; + } + + /** + * Get attributes for a single token at the given token position. + * + * @return array Attributes + */ + protected function getAttributesForToken(int $tokenPos): array { + if ($tokenPos < \count($this->tokens) - 1) { + return $this->getAttributes($tokenPos, $tokenPos); + } + + // Get attributes for the sentinel token. + $token = $this->tokens[$tokenPos]; + return [ + 'startLine' => $token->line, + 'startTokenPos' => $tokenPos, + 'startFilePos' => $token->pos, + 'endLine' => $token->line, + 'endTokenPos' => $tokenPos, + 'endFilePos' => $token->pos, + ]; + } + + /* + * Tracing functions used for debugging the parser. + */ + + /* + protected function traceNewState($state, $symbol): void { + echo '% State ' . $state + . ', Lookahead ' . ($symbol == self::SYMBOL_NONE ? '--none--' : $this->symbolToName[$symbol]) . "\n"; + } + + protected function traceRead($symbol): void { + echo '% Reading ' . $this->symbolToName[$symbol] . "\n"; + } + + protected function traceShift($symbol): void { + echo '% Shift ' . $this->symbolToName[$symbol] . "\n"; + } + + protected function traceAccept(): void { + echo "% Accepted.\n"; + } + + protected function traceReduce($n): void { + echo '% Reduce by (' . $n . ') ' . $this->productions[$n] . "\n"; + } + + protected function tracePop($state): void { + echo '% Recovering, uncovered state ' . $state . "\n"; + } + + protected function traceDiscard($symbol): void { + echo '% Discard ' . $this->symbolToName[$symbol] . "\n"; + } + */ + + /* + * Helper functions invoked by semantic actions + */ + + /** + * Moves statements of semicolon-style namespaces into $ns->stmts and checks various error conditions. + * + * @param Node\Stmt[] $stmts + * @return Node\Stmt[] + */ + protected function handleNamespaces(array $stmts): array { + $hasErrored = false; + $style = $this->getNamespacingStyle($stmts); + if (null === $style) { + // not namespaced, nothing to do + return $stmts; + } + if ('brace' === $style) { + // For braced namespaces we only have to check that there are no invalid statements between the namespaces + $afterFirstNamespace = false; + foreach ($stmts as $stmt) { + if ($stmt instanceof Node\Stmt\Namespace_) { + $afterFirstNamespace = true; + } elseif (!$stmt instanceof Node\Stmt\HaltCompiler + && !$stmt instanceof Node\Stmt\Nop + && $afterFirstNamespace && !$hasErrored) { + $this->emitError(new Error( + 'No code may exist outside of namespace {}', $stmt->getAttributes())); + $hasErrored = true; // Avoid one error for every statement + } + } + return $stmts; + } else { + // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts + $resultStmts = []; + $targetStmts = &$resultStmts; + $lastNs = null; + foreach ($stmts as $stmt) { + if ($stmt instanceof Node\Stmt\Namespace_) { + if ($lastNs !== null) { + $this->fixupNamespaceAttributes($lastNs); + } + if ($stmt->stmts === null) { + $stmt->stmts = []; + $targetStmts = &$stmt->stmts; + $resultStmts[] = $stmt; + } else { + // This handles the invalid case of mixed style namespaces + $resultStmts[] = $stmt; + $targetStmts = &$resultStmts; + } + $lastNs = $stmt; + } elseif ($stmt instanceof Node\Stmt\HaltCompiler) { + // __halt_compiler() is not moved into the namespace + $resultStmts[] = $stmt; + } else { + $targetStmts[] = $stmt; + } + } + if ($lastNs !== null) { + $this->fixupNamespaceAttributes($lastNs); + } + return $resultStmts; + } + } + + private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt): void { + // We moved the statements into the namespace node, as such the end of the namespace node + // needs to be extended to the end of the statements. + if (empty($stmt->stmts)) { + return; + } + + // We only move the builtin end attributes here. This is the best we can do with the + // knowledge we have. + $endAttributes = ['endLine', 'endFilePos', 'endTokenPos']; + $lastStmt = $stmt->stmts[count($stmt->stmts) - 1]; + foreach ($endAttributes as $endAttribute) { + if ($lastStmt->hasAttribute($endAttribute)) { + $stmt->setAttribute($endAttribute, $lastStmt->getAttribute($endAttribute)); + } + } + } + + /** @return array */ + private function getNamespaceErrorAttributes(Namespace_ $node): array { + $attrs = $node->getAttributes(); + // Adjust end attributes to only cover the "namespace" keyword, not the whole namespace. + if (isset($attrs['startLine'])) { + $attrs['endLine'] = $attrs['startLine']; + } + if (isset($attrs['startTokenPos'])) { + $attrs['endTokenPos'] = $attrs['startTokenPos']; + } + if (isset($attrs['startFilePos'])) { + $attrs['endFilePos'] = $attrs['startFilePos'] + \strlen('namespace') - 1; + } + return $attrs; + } + + /** + * Determine namespacing style (semicolon or brace) + * + * @param Node[] $stmts Top-level statements. + * + * @return null|string One of "semicolon", "brace" or null (no namespaces) + */ + private function getNamespacingStyle(array $stmts): ?string { + $style = null; + $hasNotAllowedStmts = false; + foreach ($stmts as $i => $stmt) { + if ($stmt instanceof Node\Stmt\Namespace_) { + $currentStyle = null === $stmt->stmts ? 'semicolon' : 'brace'; + if (null === $style) { + $style = $currentStyle; + if ($hasNotAllowedStmts) { + $this->emitError(new Error( + 'Namespace declaration statement has to be the very first statement in the script', + $this->getNamespaceErrorAttributes($stmt) + )); + } + } elseif ($style !== $currentStyle) { + $this->emitError(new Error( + 'Cannot mix bracketed namespace declarations with unbracketed namespace declarations', + $this->getNamespaceErrorAttributes($stmt) + )); + // Treat like semicolon style for namespace normalization + return 'semicolon'; + } + continue; + } + + /* declare(), __halt_compiler() and nops can be used before a namespace declaration */ + if ($stmt instanceof Node\Stmt\Declare_ + || $stmt instanceof Node\Stmt\HaltCompiler + || $stmt instanceof Node\Stmt\Nop) { + continue; + } + + /* There may be a hashbang line at the very start of the file */ + if ($i === 0 && $stmt instanceof Node\Stmt\InlineHTML && preg_match('/\A#!.*\r?\n\z/', $stmt->value)) { + continue; + } + + /* Everything else if forbidden before namespace declarations */ + $hasNotAllowedStmts = true; + } + return $style; + } + + /** @return Name|Identifier */ + protected function handleBuiltinTypes(Name $name) { + if (!$name->isUnqualified()) { + return $name; + } + + $lowerName = $name->toLowerString(); + if (!$this->phpVersion->supportsBuiltinType($lowerName)) { + return $name; + } + + return new Node\Identifier($lowerName, $name->getAttributes()); + } + + /** + * Get combined start and end attributes at a stack location + * + * @param int $stackPos Stack location + * + * @return array Combined start and end attributes + */ + protected function getAttributesAt(int $stackPos): array { + return $this->getAttributes($this->tokenStartStack[$stackPos], $this->tokenEndStack[$stackPos]); + } + + 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 getIntCastKind(string $cast): int { + $cast = strtolower($cast); + if (strpos($cast, 'integer') !== false) { + return Expr\Cast\Int_::KIND_INTEGER; + } + + return Expr\Cast\Int_::KIND_INT; + } + + protected function getBoolCastKind(string $cast): int { + $cast = strtolower($cast); + if (strpos($cast, 'boolean') !== false) { + return Expr\Cast\Bool_::KIND_BOOLEAN; + } + + return Expr\Cast\Bool_::KIND_BOOL; + } + + protected function getStringCastKind(string $cast): int { + $cast = strtolower($cast); + if (strpos($cast, 'binary') !== false) { + return Expr\Cast\String_::KIND_BINARY; + } + + return Expr\Cast\String_::KIND_STRING; + } + + /** @param array $attributes */ + protected function parseLNumber(string $str, array $attributes, bool $allowInvalidOctal = false): Int_ { + try { + return Int_::fromString($str, $attributes, $allowInvalidOctal); + } catch (Error $error) { + $this->emitError($error); + // Use dummy value + return new Int_(0, $attributes); + } + } + + /** + * Parse a T_NUM_STRING token into either an integer or string node. + * + * @param string $str Number string + * @param array $attributes Attributes + * + * @return Int_|String_ Integer or string node. + */ + protected function parseNumString(string $str, array $attributes) { + if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) { + return new String_($str, $attributes); + } + + $num = +$str; + if (!is_int($num)) { + return new String_($str, $attributes); + } + + return new Int_($num, $attributes); + } + + /** @param array $attributes */ + protected function stripIndentation( + string $string, int $indentLen, string $indentChar, + bool $newlineAtStart, bool $newlineAtEnd, array $attributes + ): string { + if ($indentLen === 0) { + return $string; + } + + $start = $newlineAtStart ? '(?:(?<=\n)|\A)' : '(?<=\n)'; + $end = $newlineAtEnd ? '(?:(?=[\r\n])|\z)' : '(?=[\r\n])'; + $regex = '/' . $start . '([ \t]*)(' . $end . ')?/'; + return preg_replace_callback( + $regex, + function ($matches) use ($indentLen, $indentChar, $attributes) { + $prefix = substr($matches[1], 0, $indentLen); + if (false !== strpos($prefix, $indentChar === " " ? "\t" : " ")) { + $this->emitError(new Error( + 'Invalid indentation - tabs and spaces cannot be mixed', $attributes + )); + } elseif (strlen($prefix) < $indentLen && !isset($matches[2])) { + $this->emitError(new Error( + 'Invalid body indentation level ' . + '(expecting an indentation level of at least ' . $indentLen . ')', + $attributes + )); + } + return substr($matches[0], strlen($prefix)); + }, + $string + ); + } + + /** + * @param string|(Expr|InterpolatedStringPart)[] $contents + * @param array $attributes + * @param array $endTokenAttributes + */ + protected function parseDocString( + string $startToken, $contents, string $endToken, + array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape + ): Expr { + $kind = strpos($startToken, "'") === false + ? String_::KIND_HEREDOC : String_::KIND_NOWDOC; + + $regex = '/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/'; + $result = preg_match($regex, $startToken, $matches); + assert($result === 1); + $label = $matches[1]; + + $result = preg_match('/\A[ \t]*/', $endToken, $matches); + assert($result === 1); + $indentation = $matches[0]; + + $attributes['kind'] = $kind; + $attributes['docLabel'] = $label; + $attributes['docIndentation'] = $indentation; + + $indentHasSpaces = false !== strpos($indentation, " "); + $indentHasTabs = false !== strpos($indentation, "\t"); + if ($indentHasSpaces && $indentHasTabs) { + $this->emitError(new Error( + 'Invalid indentation - tabs and spaces cannot be mixed', + $endTokenAttributes + )); + + // Proceed processing as if this doc string is not indented + $indentation = ''; + } + + $indentLen = \strlen($indentation); + $indentChar = $indentHasSpaces ? " " : "\t"; + + if (\is_string($contents)) { + if ($contents === '') { + $attributes['rawValue'] = $contents; + return new String_('', $attributes); + } + + $contents = $this->stripIndentation( + $contents, $indentLen, $indentChar, true, true, $attributes + ); + $contents = preg_replace('~(\r\n|\n|\r)\z~', '', $contents); + $attributes['rawValue'] = $contents; + + if ($kind === String_::KIND_HEREDOC) { + $contents = String_::parseEscapeSequences($contents, null, $parseUnicodeEscape); + } + + return new String_($contents, $attributes); + } else { + assert(count($contents) > 0); + if (!$contents[0] instanceof Node\InterpolatedStringPart) { + // If there is no leading encapsed string part, pretend there is an empty one + $this->stripIndentation( + '', $indentLen, $indentChar, true, false, $contents[0]->getAttributes() + ); + } + + $newContents = []; + foreach ($contents as $i => $part) { + if ($part instanceof Node\InterpolatedStringPart) { + $isLast = $i === \count($contents) - 1; + $part->value = $this->stripIndentation( + $part->value, $indentLen, $indentChar, + $i === 0, $isLast, $part->getAttributes() + ); + if ($isLast) { + $part->value = preg_replace('~(\r\n|\n|\r)\z~', '', $part->value); + } + $part->setAttribute('rawValue', $part->value); + $part->value = String_::parseEscapeSequences($part->value, null, $parseUnicodeEscape); + if ('' === $part->value) { + continue; + } + } + $newContents[] = $part; + } + return new InterpolatedString($newContents, $attributes); + } + } + + protected function createCommentFromToken(Token $token, int $tokenPos): Comment { + assert($token->id === \T_COMMENT || $token->id == \T_DOC_COMMENT); + return \T_DOC_COMMENT === $token->id + ? new Comment\Doc($token->text, $token->line, $token->pos, $tokenPos, + $token->getEndLine(), $token->getEndPos() - 1, $tokenPos) + : new Comment($token->text, $token->line, $token->pos, $tokenPos, + $token->getEndLine(), $token->getEndPos() - 1, $tokenPos); + } + + /** + * Get last comment before the given token position, if any + */ + protected function getCommentBeforeToken(int $tokenPos): ?Comment { + while (--$tokenPos >= 0) { + $token = $this->tokens[$tokenPos]; + if (!isset($this->dropTokens[$token->id])) { + break; + } + + if ($token->id === \T_COMMENT || $token->id === \T_DOC_COMMENT) { + return $this->createCommentFromToken($token, $tokenPos); + } + } + return null; + } + + /** + * Create a zero-length nop to capture preceding comments, if any. + */ + protected function maybeCreateZeroLengthNop(int $tokenPos): ?Nop { + $comment = $this->getCommentBeforeToken($tokenPos); + if ($comment === null) { + return null; + } + + $commentEndLine = $comment->getEndLine(); + $commentEndFilePos = $comment->getEndFilePos(); + $commentEndTokenPos = $comment->getEndTokenPos(); + $attributes = [ + 'startLine' => $commentEndLine, + 'endLine' => $commentEndLine, + 'startFilePos' => $commentEndFilePos + 1, + 'endFilePos' => $commentEndFilePos, + 'startTokenPos' => $commentEndTokenPos + 1, + 'endTokenPos' => $commentEndTokenPos, + ]; + return new Nop($attributes); + } + + protected function maybeCreateNop(int $tokenStartPos, int $tokenEndPos): ?Nop { + if ($this->getCommentBeforeToken($tokenStartPos) === null) { + return null; + } + return new Nop($this->getAttributes($tokenStartPos, $tokenEndPos)); + } + + protected function handleHaltCompiler(): string { + // Prevent the lexer from returning any further tokens. + $nextToken = $this->tokens[$this->tokenPos + 1]; + $this->tokenPos = \count($this->tokens) - 2; + + // Return text after __halt_compiler. + return $nextToken->id === \T_INLINE_HTML ? $nextToken->text : ''; + } + + protected function inlineHtmlHasLeadingNewline(int $stackPos): bool { + $tokenPos = $this->tokenStartStack[$stackPos]; + $token = $this->tokens[$tokenPos]; + assert($token->id == \T_INLINE_HTML); + if ($tokenPos > 0) { + $prevToken = $this->tokens[$tokenPos - 1]; + assert($prevToken->id == \T_CLOSE_TAG); + return false !== strpos($prevToken->text, "\n") + || false !== strpos($prevToken->text, "\r"); + } + return true; + } + + /** + * @return array + */ + protected function createEmptyElemAttributes(int $tokenPos): array { + return $this->getAttributesForToken($tokenPos); + } + + protected function fixupArrayDestructuring(Array_ $node): Expr\List_ { + $this->createdArrays->offsetUnset($node); + return new Expr\List_(array_map(function (Node\ArrayItem $item) { + if ($item->value instanceof Expr\Error) { + // We used Error as a placeholder for empty elements, which are legal for destructuring. + return null; + } + if ($item->value instanceof Array_) { + return new Node\ArrayItem( + $this->fixupArrayDestructuring($item->value), + $item->key, $item->byRef, $item->getAttributes()); + } + return $item; + }, $node->items), ['kind' => Expr\List_::KIND_ARRAY] + $node->getAttributes()); + } + + protected function postprocessList(Expr\List_ $node): void { + foreach ($node->items as $i => $item) { + if ($item->value instanceof Expr\Error) { + // We used Error as a placeholder for empty elements, which are legal for destructuring. + $node->items[$i] = null; + } + } + } + + /** @param ElseIf_|Else_ $node */ + protected function fixupAlternativeElse($node): void { + // Make sure a trailing nop statement carrying comments is part of the node. + $numStmts = \count($node->stmts); + if ($numStmts !== 0 && $node->stmts[$numStmts - 1] instanceof Nop) { + $nopAttrs = $node->stmts[$numStmts - 1]->getAttributes(); + if (isset($nopAttrs['endLine'])) { + $node->setAttribute('endLine', $nopAttrs['endLine']); + } + if (isset($nopAttrs['endFilePos'])) { + $node->setAttribute('endFilePos', $nopAttrs['endFilePos']); + } + if (isset($nopAttrs['endTokenPos'])) { + $node->setAttribute('endTokenPos', $nopAttrs['endTokenPos']); + } + } + } + + protected function checkClassModifier(int $a, int $b, int $modifierPos): void { + try { + Modifiers::verifyClassModifier($a, $b); + } catch (Error $error) { + $error->setAttributes($this->getAttributesAt($modifierPos)); + $this->emitError($error); + } + } + + protected function checkModifier(int $a, int $b, int $modifierPos): void { + // Jumping through some hoops here because verifyModifier() is also used elsewhere + try { + Modifiers::verifyModifier($a, $b); + } catch (Error $error) { + $error->setAttributes($this->getAttributesAt($modifierPos)); + $this->emitError($error); + } + } + + protected function checkParam(Param $node): void { + if ($node->variadic && null !== $node->default) { + $this->emitError(new Error( + 'Variadic parameter cannot have a default value', + $node->default->getAttributes() + )); + } + } + + protected function checkTryCatch(TryCatch $node): void { + if (empty($node->catches) && null === $node->finally) { + $this->emitError(new Error( + 'Cannot use try without catch or finally', $node->getAttributes() + )); + } + } + + protected function checkNamespace(Namespace_ $node): void { + if (null !== $node->stmts) { + foreach ($node->stmts as $stmt) { + if ($stmt instanceof Namespace_) { + $this->emitError(new Error( + 'Namespace declarations cannot be nested', $stmt->getAttributes() + )); + } + } + } + } + + private function checkClassName(?Identifier $name, int $namePos): void { + if (null !== $name && $name->isSpecialClassName()) { + $this->emitError(new Error( + sprintf('Cannot use \'%s\' as class name as it is reserved', $name), + $this->getAttributesAt($namePos) + )); + } + } + + /** @param Name[] $interfaces */ + private function checkImplementedInterfaces(array $interfaces): void { + foreach ($interfaces as $interface) { + if ($interface->isSpecialClassName()) { + $this->emitError(new Error( + sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface), + $interface->getAttributes() + )); + } + } + } + + protected function checkClass(Class_ $node, int $namePos): void { + $this->checkClassName($node->name, $namePos); + + if ($node->extends && $node->extends->isSpecialClassName()) { + $this->emitError(new Error( + sprintf('Cannot use \'%s\' as class name as it is reserved', $node->extends), + $node->extends->getAttributes() + )); + } + + $this->checkImplementedInterfaces($node->implements); + } + + protected function checkInterface(Interface_ $node, int $namePos): void { + $this->checkClassName($node->name, $namePos); + $this->checkImplementedInterfaces($node->extends); + } + + protected function checkEnum(Enum_ $node, int $namePos): void { + $this->checkClassName($node->name, $namePos); + $this->checkImplementedInterfaces($node->implements); + } + + protected function checkClassMethod(ClassMethod $node, int $modifierPos): void { + if ($node->flags & Modifiers::STATIC) { + switch ($node->name->toLowerString()) { + case '__construct': + $this->emitError(new Error( + sprintf('Constructor %s() cannot be static', $node->name), + $this->getAttributesAt($modifierPos))); + break; + case '__destruct': + $this->emitError(new Error( + sprintf('Destructor %s() cannot be static', $node->name), + $this->getAttributesAt($modifierPos))); + break; + case '__clone': + $this->emitError(new Error( + sprintf('Clone method %s() cannot be static', $node->name), + $this->getAttributesAt($modifierPos))); + break; + } + } + + if ($node->flags & Modifiers::READONLY) { + $this->emitError(new Error( + sprintf('Method %s() cannot be readonly', $node->name), + $this->getAttributesAt($modifierPos))); + } + } + + protected function checkClassConst(ClassConst $node, int $modifierPos): void { + foreach ([Modifiers::STATIC, Modifiers::ABSTRACT, Modifiers::READONLY] as $modifier) { + if ($node->flags & $modifier) { + $this->emitError(new Error( + "Cannot use '" . Modifiers::toString($modifier) . "' as constant modifier", + $this->getAttributesAt($modifierPos))); + } + } + } + + protected function checkUseUse(UseItem $node, int $namePos): void { + if ($node->alias && $node->alias->isSpecialClassName()) { + $this->emitError(new Error( + sprintf( + 'Cannot use %s as %s because \'%2$s\' is a special class name', + $node->name, $node->alias + ), + $this->getAttributesAt($namePos) + )); + } + } + + protected function checkPropertyHooksForMultiProperty(Property $property, int $hookPos): void { + if (count($property->props) > 1) { + $this->emitError(new Error( + 'Cannot use hooks when declaring multiple properties', $this->getAttributesAt($hookPos))); + } + } + + /** @param PropertyHook[] $hooks */ + protected function checkEmptyPropertyHookList(array $hooks, int $hookPos): void { + if (empty($hooks)) { + $this->emitError(new Error( + 'Property hook list cannot be empty', $this->getAttributesAt($hookPos))); + } + } + + protected function checkPropertyHook(PropertyHook $hook, ?int $paramListPos): void { + $name = $hook->name->toLowerString(); + if ($name !== 'get' && $name !== 'set') { + $this->emitError(new Error( + 'Unknown hook "' . $hook->name . '", expected "get" or "set"', + $hook->name->getAttributes())); + } + if ($name === 'get' && $paramListPos !== null) { + $this->emitError(new Error( + 'get hook must not have a parameter list', $this->getAttributesAt($paramListPos))); + } + } + + protected function checkPropertyHookModifiers(int $a, int $b, int $modifierPos): void { + try { + Modifiers::verifyModifier($a, $b); + } catch (Error $error) { + $error->setAttributes($this->getAttributesAt($modifierPos)); + $this->emitError($error); + } + + if ($b != Modifiers::FINAL) { + $this->emitError(new Error( + 'Cannot use the ' . Modifiers::toString($b) . ' modifier on a property hook', + $this->getAttributesAt($modifierPos))); + } + } + + protected function checkConstantAttributes(Const_ $node): void { + if ($node->attrGroups !== [] && count($node->consts) > 1) { + $this->emitError(new Error( + 'Cannot use attributes on multiple constants at once', $node->getAttributes())); + } + } + + protected function checkPipeOperatorParentheses(Expr $node): void { + if ($node instanceof Expr\ArrowFunction && !$this->parenthesizedArrowFunctions->offsetExists($node)) { + $this->emitError(new Error( + 'Arrow functions on the right hand side of |> must be parenthesized', $node->getAttributes())); + } + } + + /** + * @param Property|Param $node + */ + protected function addPropertyNameToHooks(Node $node): void { + if ($node instanceof Property) { + $name = $node->props[0]->name->toString(); + } else { + $name = $node->var->name; + } + foreach ($node->hooks as $hook) { + $hook->setAttribute('propertyName', $name); + } + } + + /** @param array $args */ + private function isSimpleExit(array $args): bool { + if (\count($args) === 0) { + return true; + } + if (\count($args) === 1) { + $arg = $args[0]; + return $arg instanceof Arg && $arg->name === null && + $arg->byRef === false && $arg->unpack === false; + } + return false; + } + + /** + * @param array $args + * @param array $attrs + */ + protected function createExitExpr(string $name, int $namePos, array $args, array $attrs): Expr { + if ($this->isSimpleExit($args)) { + // Create Exit node for backwards compatibility. + $attrs['kind'] = strtolower($name) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; + return new Expr\Exit_(\count($args) === 1 ? $args[0]->value : null, $attrs); + } + return new Expr\FuncCall(new Name($name, $this->getAttributesAt($namePos)), $args, $attrs); + } + + /** + * Creates the token map. + * + * The token map maps the PHP internal token identifiers + * to the identifiers used by the Parser. Additionally it + * maps T_OPEN_TAG_WITH_ECHO to T_ECHO and T_CLOSE_TAG to ';'. + * + * @return array The token map + */ + protected function createTokenMap(): array { + $tokenMap = []; + + // Single-char tokens use an identity mapping. + for ($i = 0; $i < 256; ++$i) { + $tokenMap[$i] = $i; + } + + foreach ($this->symbolToName as $name) { + if ($name[0] === 'T') { + $tokenMap[\constant($name)] = constant(static::class . '::' . $name); + } + } + + // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO + $tokenMap[\T_OPEN_TAG_WITH_ECHO] = static::T_ECHO; + // T_CLOSE_TAG is equivalent to ';' + $tokenMap[\T_CLOSE_TAG] = ord(';'); + + // We have created a map from PHP token IDs to external symbol IDs. + // Now map them to the internal symbol ID. + $fullTokenMap = []; + foreach ($tokenMap as $phpToken => $extSymbol) { + $intSymbol = $this->tokenToSymbol[$extSymbol]; + if ($intSymbol === $this->invalidSymbol) { + continue; + } + $fullTokenMap[$phpToken] = $intSymbol; + } + + return $fullTokenMap; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php b/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php new file mode 100644 index 0000000..3a7586e --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php @@ -0,0 +1,42 @@ +isHostVersion()) { + $lexer = new Lexer(); + } else { + $lexer = new Lexer\Emulative($version); + } + if ($version->id >= 80000) { + return new Php8($lexer, $version); + } + return new Php7($lexer, $version); + } + + /** + * Create a parser targeting the newest version supported by this library. Code for older + * versions will be accepted if there have been no relevant backwards-compatibility breaks in + * PHP. + */ + public function createForNewestSupportedVersion(): Parser { + return $this->createForVersion(PhpVersion::getNewestSupported()); + } + + /** + * Create a parser targeting the host PHP version, that is the PHP version we're currently + * running on. This parser will not use any token emulation. + */ + public function createForHostVersion(): Parser { + return $this->createForVersion(PhpVersion::getHostVersion()); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php b/vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php new file mode 100644 index 0000000..9517d72 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php @@ -0,0 +1,175 @@ + 50100, + 'callable' => 50400, + 'bool' => 70000, + 'int' => 70000, + 'float' => 70000, + 'string' => 70000, + 'iterable' => 70100, + 'void' => 70100, + 'object' => 70200, + 'null' => 80000, + 'false' => 80000, + 'mixed' => 80000, + 'never' => 80100, + 'true' => 80200, + ]; + + private function __construct(int $id) { + $this->id = $id; + } + + /** + * Create a PhpVersion object from major and minor version components. + */ + public static function fromComponents(int $major, int $minor): self { + return new self($major * 10000 + $minor * 100); + } + + /** + * Get the newest PHP version supported by this library. Support for this version may be partial, + * if it is still under development. + */ + public static function getNewestSupported(): self { + return self::fromComponents(8, 5); + } + + /** + * Get the host PHP version, that is the PHP version we're currently running on. + */ + public static function getHostVersion(): self { + return self::fromComponents(\PHP_MAJOR_VERSION, \PHP_MINOR_VERSION); + } + + /** + * Parse the version from a string like "8.1". + */ + public static function fromString(string $version): self { + if (!preg_match('/^(\d+)\.(\d+)/', $version, $matches)) { + throw new \LogicException("Invalid PHP version \"$version\""); + } + return self::fromComponents((int) $matches[1], (int) $matches[2]); + } + + /** + * Check whether two versions are the same. + */ + public function equals(PhpVersion $other): bool { + return $this->id === $other->id; + } + + /** + * Check whether this version is greater than or equal to the argument. + */ + public function newerOrEqual(PhpVersion $other): bool { + return $this->id >= $other->id; + } + + /** + * Check whether this version is older than the argument. + */ + public function older(PhpVersion $other): bool { + return $this->id < $other->id; + } + + /** + * Check whether this is the host PHP version. + */ + public function isHostVersion(): bool { + return $this->equals(self::getHostVersion()); + } + + /** + * Check whether this PHP version supports the given builtin type. Type name must be lowercase. + */ + public function supportsBuiltinType(string $type): bool { + $minVersion = self::BUILTIN_TYPE_VERSIONS[$type] ?? null; + return $minVersion !== null && $this->id >= $minVersion; + } + + /** + * Whether this version supports [] array literals. + */ + public function supportsShortArraySyntax(): bool { + return $this->id >= 50400; + } + + /** + * Whether this version supports [] for destructuring. + */ + public function supportsShortArrayDestructuring(): bool { + return $this->id >= 70100; + } + + /** + * Whether this version supports flexible heredoc/nowdoc. + */ + public function supportsFlexibleHeredoc(): bool { + return $this->id >= 70300; + } + + /** + * Whether this version supports trailing commas in parameter lists. + */ + public function supportsTrailingCommaInParamList(): bool { + return $this->id >= 80000; + } + + /** + * Whether this version allows "$var =& new Obj". + */ + public function allowsAssignNewByReference(): bool { + return $this->id < 70000; + } + + /** + * Whether this version allows invalid octals like "08". + */ + public function allowsInvalidOctals(): bool { + return $this->id < 70000; + } + + /** + * Whether this version allows DEL (\x7f) to occur in identifiers. + */ + public function allowsDelInIdentifiers(): bool { + return $this->id < 70100; + } + + /** + * Whether this version supports yield in expression context without parentheses. + */ + public function supportsYieldWithoutParentheses(): bool { + return $this->id >= 70000; + } + + /** + * Whether this version supports unicode escape sequences in strings. + */ + public function supportsUnicodeEscapes(): bool { + return $this->id >= 70000; + } + + /* + * Whether this version supports attributes. + */ + public function supportsAttributes(): bool { + return $this->id >= 80000; + } + + public function supportsNewDereferenceWithoutParentheses(): bool { + return $this->id >= 80400; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php new file mode 100644 index 0000000..892c686 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php @@ -0,0 +1,51 @@ +pAttrGroups($node->attrGroups, $this->phpVersion->supportsAttributes()) + . $this->pModifiers($node->flags) + . ($node->type ? $this->p($node->type) . ' ' : '') + . ($node->byRef ? '&' : '') + . ($node->variadic ? '...' : '') + . $this->p($node->var) + . ($node->default ? ' = ' . $this->p($node->default) : '') + . ($node->hooks ? ' {' . $this->pStmts($node->hooks) . $this->nl . '}' : ''); + } + + protected function pArg(Node\Arg $node): string { + return ($node->name ? $node->name->toString() . ': ' : '') + . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') + . $this->p($node->value); + } + + protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node): string { + return '...'; + } + + protected function pConst(Node\Const_ $node): string { + return $node->name . ' = ' . $this->p($node->value); + } + + protected function pNullableType(Node\NullableType $node): string { + return '?' . $this->p($node->type); + } + + protected function pUnionType(Node\UnionType $node): string { + $types = []; + foreach ($node->types as $typeNode) { + if ($typeNode instanceof Node\IntersectionType) { + $types[] = '('. $this->p($typeNode) . ')'; + continue; + } + $types[] = $this->p($typeNode); + } + return implode('|', $types); + } + + protected function pIntersectionType(Node\IntersectionType $node): string { + return $this->pImplode($node->types, '&'); + } + + protected function pIdentifier(Node\Identifier $node): string { + return $node->name; + } + + protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node): string { + return '$' . $node->name; + } + + protected function pAttribute(Node\Attribute $node): string { + return $this->p($node->name) + . ($node->args ? '(' . $this->pCommaSeparated($node->args) . ')' : ''); + } + + protected function pAttributeGroup(Node\AttributeGroup $node): string { + return '#[' . $this->pCommaSeparated($node->attrs) . ']'; + } + + // Names + + protected function pName(Name $node): string { + return $node->name; + } + + protected function pName_FullyQualified(Name\FullyQualified $node): string { + return '\\' . $node->name; + } + + protected function pName_Relative(Name\Relative $node): string { + return 'namespace\\' . $node->name; + } + + // Magic Constants + + protected function pScalar_MagicConst_Class(MagicConst\Class_ $node): string { + return '__CLASS__'; + } + + protected function pScalar_MagicConst_Dir(MagicConst\Dir $node): string { + return '__DIR__'; + } + + protected function pScalar_MagicConst_File(MagicConst\File $node): string { + return '__FILE__'; + } + + protected function pScalar_MagicConst_Function(MagicConst\Function_ $node): string { + return '__FUNCTION__'; + } + + protected function pScalar_MagicConst_Line(MagicConst\Line $node): string { + return '__LINE__'; + } + + protected function pScalar_MagicConst_Method(MagicConst\Method $node): string { + return '__METHOD__'; + } + + protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node): string { + return '__NAMESPACE__'; + } + + protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node): string { + return '__TRAIT__'; + } + + protected function pScalar_MagicConst_Property(MagicConst\Property $node): string { + return '__PROPERTY__'; + } + + // Scalars + + private function indentString(string $str): string { + return str_replace("\n", $this->nl, $str); + } + + protected function pScalar_String(Scalar\String_ $node): string { + $kind = $node->getAttribute('kind', Scalar\String_::KIND_SINGLE_QUOTED); + switch ($kind) { + case Scalar\String_::KIND_NOWDOC: + $label = $node->getAttribute('docLabel'); + if ($label && !$this->containsEndLabel($node->value, $label)) { + $shouldIdent = $this->phpVersion->supportsFlexibleHeredoc(); + $nl = $shouldIdent ? $this->nl : $this->newline; + if ($node->value === '') { + return "<<<'$label'$nl$label{$this->docStringEndToken}"; + } + + // Make sure trailing \r is not combined with following \n into CRLF. + if ($node->value[strlen($node->value) - 1] !== "\r") { + $value = $shouldIdent ? $this->indentString($node->value) : $node->value; + return "<<<'$label'$nl$value$nl$label{$this->docStringEndToken}"; + } + } + /* break missing intentionally */ + // no break + case Scalar\String_::KIND_SINGLE_QUOTED: + return $this->pSingleQuotedString($node->value); + case Scalar\String_::KIND_HEREDOC: + $label = $node->getAttribute('docLabel'); + $escaped = $this->escapeString($node->value, null); + if ($label && !$this->containsEndLabel($escaped, $label)) { + $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; + if ($escaped === '') { + return "<<<$label$nl$label{$this->docStringEndToken}"; + } + + return "<<<$label$nl$escaped$nl$label{$this->docStringEndToken}"; + } + /* break missing intentionally */ + // no break + case Scalar\String_::KIND_DOUBLE_QUOTED: + return '"' . $this->escapeString($node->value, '"') . '"'; + } + throw new \Exception('Invalid string kind'); + } + + protected function pScalar_InterpolatedString(Scalar\InterpolatedString $node): string { + if ($node->getAttribute('kind') === Scalar\String_::KIND_HEREDOC) { + $label = $node->getAttribute('docLabel'); + if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) { + $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; + if (count($node->parts) === 1 + && $node->parts[0] instanceof Node\InterpolatedStringPart + && $node->parts[0]->value === '' + ) { + return "<<<$label$nl$label{$this->docStringEndToken}"; + } + + return "<<<$label$nl" . $this->pEncapsList($node->parts, null) + . "$nl$label{$this->docStringEndToken}"; + } + } + return '"' . $this->pEncapsList($node->parts, '"') . '"'; + } + + protected function pScalar_Int(Scalar\Int_ $node): string { + if ($node->getAttribute('shouldPrintRawValue') === true) { + return $node->getAttribute('rawValue'); + } + + if ($node->value === -\PHP_INT_MAX - 1) { + // PHP_INT_MIN cannot be represented as a literal, + // because the sign is not part of the literal + return '(-' . \PHP_INT_MAX . '-1)'; + } + + $kind = $node->getAttribute('kind', Scalar\Int_::KIND_DEC); + + if (Scalar\Int_::KIND_DEC === $kind) { + return (string) $node->value; + } + + if ($node->value < 0) { + $sign = '-'; + $str = (string) -$node->value; + } else { + $sign = ''; + $str = (string) $node->value; + } + switch ($kind) { + case Scalar\Int_::KIND_BIN: + return $sign . '0b' . base_convert($str, 10, 2); + case Scalar\Int_::KIND_OCT: + return $sign . '0' . base_convert($str, 10, 8); + case Scalar\Int_::KIND_HEX: + return $sign . '0x' . base_convert($str, 10, 16); + } + throw new \Exception('Invalid number kind'); + } + + protected function pScalar_Float(Scalar\Float_ $node): string { + if (!is_finite($node->value)) { + if ($node->value === \INF) { + return '1.0E+1000'; + } + if ($node->value === -\INF) { + return '-1.0E+1000'; + } else { + return '\NAN'; + } + } + + // Try to find a short full-precision representation + $stringValue = sprintf('%.16G', $node->value); + if ($node->value !== (float) $stringValue) { + $stringValue = sprintf('%.17G', $node->value); + } + + // %G is locale dependent and there exists no locale-independent alternative. We don't want + // mess with switching locales here, so let's assume that a comma is the only non-standard + // decimal separator we may encounter... + $stringValue = str_replace(',', '.', $stringValue); + + // ensure that number is really printed as float + return preg_match('/^-?[0-9]+$/', $stringValue) ? $stringValue . '.0' : $stringValue; + } + + // Assignments + + protected function pExpr_Assign(Expr\Assign $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Assign::class, $this->p($node->var) . ' = ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_AssignRef(Expr\AssignRef $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\AssignRef::class, $this->p($node->var) . ' =& ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_AssignOp_Plus(AssignOp\Plus $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Plus::class, $this->p($node->var) . ' += ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_AssignOp_Minus(AssignOp\Minus $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Minus::class, $this->p($node->var) . ' -= ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_AssignOp_Mul(AssignOp\Mul $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Mul::class, $this->p($node->var) . ' *= ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_AssignOp_Div(AssignOp\Div $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Div::class, $this->p($node->var) . ' /= ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_AssignOp_Concat(AssignOp\Concat $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Concat::class, $this->p($node->var) . ' .= ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_AssignOp_Mod(AssignOp\Mod $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Mod::class, $this->p($node->var) . ' %= ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\BitwiseAnd::class, $this->p($node->var) . ' &= ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\BitwiseOr::class, $this->p($node->var) . ' |= ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\BitwiseXor::class, $this->p($node->var) . ' ^= ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\ShiftLeft::class, $this->p($node->var) . ' <<= ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\ShiftRight::class, $this->p($node->var) . ' >>= ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_AssignOp_Pow(AssignOp\Pow $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Pow::class, $this->p($node->var) . ' **= ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Coalesce::class, $this->p($node->var) . ' ??= ', $node->expr, $precedence, $lhsPrecedence); + } + + // Binary expressions + + protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_Div(BinaryOp\Div $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_BinaryOp_Pipe(BinaryOp\Pipe $node, int $precedence, int $lhsPrecedence): string { + if ($node->right instanceof Expr\ArrowFunction) { + // Force parentheses around arrow functions. + $lhsPrecedence = $this->precedenceMap[Expr\ArrowFunction::class][0]; + } + return $this->pInfixOp(BinaryOp\Pipe::class, $node->left, ' |> ', $node->right, $precedence, $lhsPrecedence); + } + + protected function pExpr_Instanceof(Expr\Instanceof_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPostfixOp( + Expr\Instanceof_::class, $node->expr, + ' instanceof ' . $this->pNewOperand($node->class), + $precedence, $lhsPrecedence); + } + + // Unary expressions + + protected function pExpr_BooleanNot(Expr\BooleanNot $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_BitwiseNot(Expr\BitwiseNot $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_UnaryMinus(Expr\UnaryMinus $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_UnaryPlus(Expr\UnaryPlus $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_PreInc(Expr\PreInc $node): string { + return '++' . $this->p($node->var); + } + + protected function pExpr_PreDec(Expr\PreDec $node): string { + return '--' . $this->p($node->var); + } + + protected function pExpr_PostInc(Expr\PostInc $node): string { + return $this->p($node->var) . '++'; + } + + protected function pExpr_PostDec(Expr\PostDec $node): string { + return $this->p($node->var) . '--'; + } + + protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_YieldFrom(Expr\YieldFrom $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_Print(Expr\Print_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr, $precedence, $lhsPrecedence); + } + + // Casts + + protected function pExpr_Cast_Int(Cast\Int_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_Cast_Double(Cast\Double $node, int $precedence, int $lhsPrecedence): string { + $kind = $node->getAttribute('kind', Cast\Double::KIND_DOUBLE); + if ($kind === Cast\Double::KIND_DOUBLE) { + $cast = '(double)'; + } elseif ($kind === Cast\Double::KIND_FLOAT) { + $cast = '(float)'; + } else { + assert($kind === Cast\Double::KIND_REAL); + $cast = '(real)'; + } + return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_Cast_String(Cast\String_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_Cast_Array(Cast\Array_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_Cast_Object(Cast\Object_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_Cast_Bool(Cast\Bool_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_Cast_Unset(Cast\Unset_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_Cast_Void(Cast\Void_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Void_::class, '(void) ', $node->expr, $precedence, $lhsPrecedence); + } + + // Function calls and similar constructs + + protected function pExpr_FuncCall(Expr\FuncCall $node): string { + return $this->pCallLhs($node->name) + . '(' . $this->pMaybeMultiline($node->args) . ')'; + } + + protected function pExpr_MethodCall(Expr\MethodCall $node): string { + return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name) + . '(' . $this->pMaybeMultiline($node->args) . ')'; + } + + protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node): string { + return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name) + . '(' . $this->pMaybeMultiline($node->args) . ')'; + } + + protected function pExpr_StaticCall(Expr\StaticCall $node): string { + return $this->pStaticDereferenceLhs($node->class) . '::' + . ($node->name instanceof Expr + ? ($node->name instanceof Expr\Variable + ? $this->p($node->name) + : '{' . $this->p($node->name) . '}') + : $node->name) + . '(' . $this->pMaybeMultiline($node->args) . ')'; + } + + protected function pExpr_Empty(Expr\Empty_ $node): string { + return 'empty(' . $this->p($node->expr) . ')'; + } + + protected function pExpr_Isset(Expr\Isset_ $node): string { + return 'isset(' . $this->pCommaSeparated($node->vars) . ')'; + } + + protected function pExpr_Eval(Expr\Eval_ $node): string { + return 'eval(' . $this->p($node->expr) . ')'; + } + + protected function pExpr_Include(Expr\Include_ $node, int $precedence, int $lhsPrecedence): string { + static $map = [ + Expr\Include_::TYPE_INCLUDE => 'include', + Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once', + Expr\Include_::TYPE_REQUIRE => 'require', + Expr\Include_::TYPE_REQUIRE_ONCE => 'require_once', + ]; + + return $this->pPrefixOp(Expr\Include_::class, $map[$node->type] . ' ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_List(Expr\List_ $node): string { + $syntax = $node->getAttribute('kind', + $this->phpVersion->supportsShortArrayDestructuring() ? Expr\List_::KIND_ARRAY : Expr\List_::KIND_LIST); + if ($syntax === Expr\List_::KIND_ARRAY) { + return '[' . $this->pMaybeMultiline($node->items, true) . ']'; + } else { + return 'list(' . $this->pMaybeMultiline($node->items, true) . ')'; + } + } + + // Other + + protected function pExpr_Error(Expr\Error $node): string { + throw new \LogicException('Cannot pretty-print AST with Error nodes'); + } + + protected function pExpr_Variable(Expr\Variable $node): string { + if ($node->name instanceof Expr) { + return '${' . $this->p($node->name) . '}'; + } else { + return '$' . $node->name; + } + } + + protected function pExpr_Array(Expr\Array_ $node): string { + $syntax = $node->getAttribute('kind', + $this->shortArraySyntax ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG); + if ($syntax === Expr\Array_::KIND_SHORT) { + return '[' . $this->pMaybeMultiline($node->items, true) . ']'; + } else { + return 'array(' . $this->pMaybeMultiline($node->items, true) . ')'; + } + } + + protected function pKey(?Node $node): string { + if ($node === null) { + return ''; + } + + // => is not really an operator and does not typically participate in precedence resolution. + // However, there is an exception if yield expressions with keys are involved: + // [yield $a => $b] is interpreted as [(yield $a => $b)], so we need to ensure that + // [(yield $a) => $b] is printed with parentheses. We approximate this by lowering the LHS + // precedence to that of yield (which will also print unnecessary parentheses for rare low + // precedence unary operators like include). + $yieldPrecedence = $this->precedenceMap[Expr\Yield_::class][0]; + return $this->p($node, self::MAX_PRECEDENCE, $yieldPrecedence) . ' => '; + } + + protected function pArrayItem(Node\ArrayItem $node): string { + return $this->pKey($node->key) + . ($node->byRef ? '&' : '') + . ($node->unpack ? '...' : '') + . $this->p($node->value); + } + + protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node): string { + return $this->pDereferenceLhs($node->var) + . '[' . (null !== $node->dim ? $this->p($node->dim) : '') . ']'; + } + + protected function pExpr_ConstFetch(Expr\ConstFetch $node): string { + return $this->p($node->name); + } + + protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node): string { + return $this->pStaticDereferenceLhs($node->class) . '::' . $this->pObjectProperty($node->name); + } + + protected function pExpr_PropertyFetch(Expr\PropertyFetch $node): string { + return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name); + } + + protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node): string { + return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name); + } + + protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node): string { + return $this->pStaticDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name); + } + + protected function pExpr_ShellExec(Expr\ShellExec $node): string { + return '`' . $this->pEncapsList($node->parts, '`') . '`'; + } + + protected function pExpr_Closure(Expr\Closure $node): string { + return $this->pAttrGroups($node->attrGroups, true) + . $this->pStatic($node->static) + . 'function ' . ($node->byRef ? '&' : '') + . '(' . $this->pParams($node->params) . ')' + . (!empty($node->uses) ? ' use (' . $this->pCommaSeparated($node->uses) . ')' : '') + . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') + . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + + protected function pExpr_Match(Expr\Match_ $node): string { + return 'match (' . $this->p($node->cond) . ') {' + . $this->pCommaSeparatedMultiline($node->arms, true) + . $this->nl + . '}'; + } + + protected function pMatchArm(Node\MatchArm $node): string { + $result = ''; + if ($node->conds) { + for ($i = 0, $c = \count($node->conds); $i + 1 < $c; $i++) { + $result .= $this->p($node->conds[$i]) . ', '; + } + $result .= $this->pKey($node->conds[$i]); + } else { + $result = 'default => '; + } + return $result . $this->p($node->body); + } + + protected function pExpr_ArrowFunction(Expr\ArrowFunction $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp( + Expr\ArrowFunction::class, + $this->pAttrGroups($node->attrGroups, true) + . $this->pStatic($node->static) + . 'fn' . ($node->byRef ? '&' : '') + . '(' . $this->pParams($node->params) . ')' + . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') + . ' => ', + $node->expr, $precedence, $lhsPrecedence); + } + + protected function pClosureUse(Node\ClosureUse $node): string { + return ($node->byRef ? '&' : '') . $this->p($node->var); + } + + protected function pExpr_New(Expr\New_ $node): string { + if ($node->class instanceof Stmt\Class_) { + $args = $node->args ? '(' . $this->pMaybeMultiline($node->args) . ')' : ''; + return 'new ' . $this->pClassCommon($node->class, $args); + } + return 'new ' . $this->pNewOperand($node->class) + . '(' . $this->pMaybeMultiline($node->args) . ')'; + } + + protected function pExpr_Clone(Expr\Clone_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Clone_::class, 'clone ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_Ternary(Expr\Ternary $node, int $precedence, int $lhsPrecedence): string { + // a bit of cheating: we treat the ternary as a binary op where the ?...: part is the operator. + // this is okay because the part between ? and : never needs parentheses. + return $this->pInfixOp(Expr\Ternary::class, + $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else, + $precedence, $lhsPrecedence + ); + } + + protected function pExpr_Exit(Expr\Exit_ $node): string { + $kind = $node->getAttribute('kind', Expr\Exit_::KIND_DIE); + return ($kind === Expr\Exit_::KIND_EXIT ? 'exit' : 'die') + . (null !== $node->expr ? '(' . $this->p($node->expr) . ')' : ''); + } + + protected function pExpr_Throw(Expr\Throw_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Throw_::class, 'throw ', $node->expr, $precedence, $lhsPrecedence); + } + + protected function pExpr_Yield(Expr\Yield_ $node, int $precedence, int $lhsPrecedence): string { + if ($node->value === null) { + $opPrecedence = $this->precedenceMap[Expr\Yield_::class][0]; + return $opPrecedence >= $lhsPrecedence ? '(yield)' : 'yield'; + } else { + if (!$this->phpVersion->supportsYieldWithoutParentheses()) { + return '(yield ' . $this->pKey($node->key) . $this->p($node->value) . ')'; + } + return $this->pPrefixOp( + Expr\Yield_::class, 'yield ' . $this->pKey($node->key), + $node->value, $precedence, $lhsPrecedence); + } + } + + // Declarations + + protected function pStmt_Namespace(Stmt\Namespace_ $node): string { + if ($this->canUseSemicolonNamespaces) { + return 'namespace ' . $this->p($node->name) . ';' + . $this->nl . $this->pStmts($node->stmts, false); + } else { + return 'namespace' . (null !== $node->name ? ' ' . $this->p($node->name) : '') + . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + } + + protected function pStmt_Use(Stmt\Use_ $node): string { + return 'use ' . $this->pUseType($node->type) + . $this->pCommaSeparated($node->uses) . ';'; + } + + protected function pStmt_GroupUse(Stmt\GroupUse $node): string { + return 'use ' . $this->pUseType($node->type) . $this->pName($node->prefix) + . '\{' . $this->pCommaSeparated($node->uses) . '};'; + } + + protected function pUseItem(Node\UseItem $node): string { + return $this->pUseType($node->type) . $this->p($node->name) + . (null !== $node->alias ? ' as ' . $node->alias : ''); + } + + protected function pUseType(int $type): string { + return $type === Stmt\Use_::TYPE_FUNCTION ? 'function ' + : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : ''); + } + + protected function pStmt_Interface(Stmt\Interface_ $node): string { + return $this->pAttrGroups($node->attrGroups) + . 'interface ' . $node->name + . (!empty($node->extends) ? ' extends ' . $this->pCommaSeparated($node->extends) : '') + . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + + protected function pStmt_Enum(Stmt\Enum_ $node): string { + return $this->pAttrGroups($node->attrGroups) + . 'enum ' . $node->name + . ($node->scalarType ? ' : ' . $this->p($node->scalarType) : '') + . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') + . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + + protected function pStmt_Class(Stmt\Class_ $node): string { + return $this->pClassCommon($node, ' ' . $node->name); + } + + protected function pStmt_Trait(Stmt\Trait_ $node): string { + return $this->pAttrGroups($node->attrGroups) + . 'trait ' . $node->name + . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + + protected function pStmt_EnumCase(Stmt\EnumCase $node): string { + return $this->pAttrGroups($node->attrGroups) + . 'case ' . $node->name + . ($node->expr ? ' = ' . $this->p($node->expr) : '') + . ';'; + } + + protected function pStmt_TraitUse(Stmt\TraitUse $node): string { + return 'use ' . $this->pCommaSeparated($node->traits) + . (empty($node->adaptations) + ? ';' + : ' {' . $this->pStmts($node->adaptations) . $this->nl . '}'); + } + + protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node): string { + return $this->p($node->trait) . '::' . $node->method + . ' insteadof ' . $this->pCommaSeparated($node->insteadof) . ';'; + } + + protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node): string { + return (null !== $node->trait ? $this->p($node->trait) . '::' : '') + . $node->method . ' as' + . (null !== $node->newModifier ? ' ' . rtrim($this->pModifiers($node->newModifier), ' ') : '') + . (null !== $node->newName ? ' ' . $node->newName : '') + . ';'; + } + + protected function pStmt_Property(Stmt\Property $node): string { + return $this->pAttrGroups($node->attrGroups) + . (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) + . ($node->type ? $this->p($node->type) . ' ' : '') + . $this->pCommaSeparated($node->props) + . ($node->hooks ? ' {' . $this->pStmts($node->hooks) . $this->nl . '}' : ';'); + } + + protected function pPropertyItem(Node\PropertyItem $node): string { + return '$' . $node->name + . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); + } + + protected function pPropertyHook(Node\PropertyHook $node): string { + return $this->pAttrGroups($node->attrGroups) + . $this->pModifiers($node->flags) + . ($node->byRef ? '&' : '') . $node->name + . ($node->params ? '(' . $this->pParams($node->params) . ')' : '') + . (\is_array($node->body) ? ' {' . $this->pStmts($node->body) . $this->nl . '}' + : ($node->body !== null ? ' => ' . $this->p($node->body) : '') . ';'); + } + + protected function pStmt_ClassMethod(Stmt\ClassMethod $node): string { + return $this->pAttrGroups($node->attrGroups) + . $this->pModifiers($node->flags) + . 'function ' . ($node->byRef ? '&' : '') . $node->name + . '(' . $this->pParams($node->params) . ')' + . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') + . (null !== $node->stmts + ? $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}' + : ';'); + } + + protected function pStmt_ClassConst(Stmt\ClassConst $node): string { + return $this->pAttrGroups($node->attrGroups) + . $this->pModifiers($node->flags) + . 'const ' + . (null !== $node->type ? $this->p($node->type) . ' ' : '') + . $this->pCommaSeparated($node->consts) . ';'; + } + + protected function pStmt_Function(Stmt\Function_ $node): string { + return $this->pAttrGroups($node->attrGroups) + . 'function ' . ($node->byRef ? '&' : '') . $node->name + . '(' . $this->pParams($node->params) . ')' + . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') + . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + + protected function pStmt_Const(Stmt\Const_ $node): string { + return $this->pAttrGroups($node->attrGroups) + . 'const ' + . $this->pCommaSeparated($node->consts) . ';'; + } + + protected function pStmt_Declare(Stmt\Declare_ $node): string { + return 'declare (' . $this->pCommaSeparated($node->declares) . ')' + . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); + } + + protected function pDeclareItem(Node\DeclareItem $node): string { + return $node->key . '=' . $this->p($node->value); + } + + // Control flow + + protected function pStmt_If(Stmt\If_ $node): string { + return 'if (' . $this->p($node->cond) . ') {' + . $this->pStmts($node->stmts) . $this->nl . '}' + . ($node->elseifs ? ' ' . $this->pImplode($node->elseifs, ' ') : '') + . (null !== $node->else ? ' ' . $this->p($node->else) : ''); + } + + protected function pStmt_ElseIf(Stmt\ElseIf_ $node): string { + return 'elseif (' . $this->p($node->cond) . ') {' + . $this->pStmts($node->stmts) . $this->nl . '}'; + } + + protected function pStmt_Else(Stmt\Else_ $node): string { + if (\count($node->stmts) === 1 && $node->stmts[0] instanceof Stmt\If_) { + // Print as "else if" rather than "else { if }" + return 'else ' . $this->p($node->stmts[0]); + } + return 'else {' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + + protected function pStmt_For(Stmt\For_ $node): string { + return 'for (' + . $this->pCommaSeparated($node->init) . ';' . (!empty($node->cond) ? ' ' : '') + . $this->pCommaSeparated($node->cond) . ';' . (!empty($node->loop) ? ' ' : '') + . $this->pCommaSeparated($node->loop) + . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + + protected function pStmt_Foreach(Stmt\Foreach_ $node): string { + return 'foreach (' . $this->p($node->expr) . ' as ' + . (null !== $node->keyVar ? $this->p($node->keyVar) . ' => ' : '') + . ($node->byRef ? '&' : '') . $this->p($node->valueVar) . ') {' + . $this->pStmts($node->stmts) . $this->nl . '}'; + } + + protected function pStmt_While(Stmt\While_ $node): string { + return 'while (' . $this->p($node->cond) . ') {' + . $this->pStmts($node->stmts) . $this->nl . '}'; + } + + protected function pStmt_Do(Stmt\Do_ $node): string { + return 'do {' . $this->pStmts($node->stmts) . $this->nl + . '} while (' . $this->p($node->cond) . ');'; + } + + protected function pStmt_Switch(Stmt\Switch_ $node): string { + return 'switch (' . $this->p($node->cond) . ') {' + . $this->pStmts($node->cases) . $this->nl . '}'; + } + + protected function pStmt_Case(Stmt\Case_ $node): string { + return (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default') . ':' + . $this->pStmts($node->stmts); + } + + protected function pStmt_TryCatch(Stmt\TryCatch $node): string { + return 'try {' . $this->pStmts($node->stmts) . $this->nl . '}' + . ($node->catches ? ' ' . $this->pImplode($node->catches, ' ') : '') + . ($node->finally !== null ? ' ' . $this->p($node->finally) : ''); + } + + protected function pStmt_Catch(Stmt\Catch_ $node): string { + return 'catch (' . $this->pImplode($node->types, '|') + . ($node->var !== null ? ' ' . $this->p($node->var) : '') + . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + + protected function pStmt_Finally(Stmt\Finally_ $node): string { + return 'finally {' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + + protected function pStmt_Break(Stmt\Break_ $node): string { + return 'break' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; + } + + protected function pStmt_Continue(Stmt\Continue_ $node): string { + return 'continue' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; + } + + protected function pStmt_Return(Stmt\Return_ $node): string { + return 'return' . (null !== $node->expr ? ' ' . $this->p($node->expr) : '') . ';'; + } + + protected function pStmt_Label(Stmt\Label $node): string { + return $node->name . ':'; + } + + protected function pStmt_Goto(Stmt\Goto_ $node): string { + return 'goto ' . $node->name . ';'; + } + + // Other + + protected function pStmt_Expression(Stmt\Expression $node): string { + return $this->p($node->expr) . ';'; + } + + protected function pStmt_Echo(Stmt\Echo_ $node): string { + return 'echo ' . $this->pCommaSeparated($node->exprs) . ';'; + } + + protected function pStmt_Static(Stmt\Static_ $node): string { + return 'static ' . $this->pCommaSeparated($node->vars) . ';'; + } + + protected function pStmt_Global(Stmt\Global_ $node): string { + return 'global ' . $this->pCommaSeparated($node->vars) . ';'; + } + + protected function pStaticVar(Node\StaticVar $node): string { + return $this->p($node->var) + . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); + } + + protected function pStmt_Unset(Stmt\Unset_ $node): string { + return 'unset(' . $this->pCommaSeparated($node->vars) . ');'; + } + + protected function pStmt_InlineHTML(Stmt\InlineHTML $node): string { + $newline = $node->getAttribute('hasLeadingNewline', true) ? $this->newline : ''; + return '?>' . $newline . $node->value . 'remaining; + } + + protected function pStmt_Nop(Stmt\Nop $node): string { + return ''; + } + + protected function pStmt_Block(Stmt\Block $node): string { + return '{' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + + // Helpers + + protected function pClassCommon(Stmt\Class_ $node, string $afterClassToken): string { + return $this->pAttrGroups($node->attrGroups, $node->name === null) + . $this->pModifiers($node->flags) + . 'class' . $afterClassToken + . (null !== $node->extends ? ' extends ' . $this->p($node->extends) : '') + . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') + . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + + protected function pObjectProperty(Node $node): string { + if ($node instanceof Expr) { + return '{' . $this->p($node) . '}'; + } else { + assert($node instanceof Node\Identifier); + return $node->name; + } + } + + /** @param (Expr|Node\InterpolatedStringPart)[] $encapsList */ + protected function pEncapsList(array $encapsList, ?string $quote): string { + $return = ''; + foreach ($encapsList as $element) { + if ($element instanceof Node\InterpolatedStringPart) { + $return .= $this->escapeString($element->value, $quote); + } else { + $return .= '{' . $this->p($element) . '}'; + } + } + + return $return; + } + + protected function pSingleQuotedString(string $string): string { + // It is idiomatic to only escape backslashes when necessary, i.e. when followed by ', \ or + // the end of the string ('Foo\Bar' instead of 'Foo\\Bar'). However, we also don't want to + // produce an odd number of backslashes, so '\\\\a' should not get rendered as '\\\a', even + // though that would be legal. + $regex = '/\'|\\\\(?=[\'\\\\]|$)|(?<=\\\\)\\\\/'; + return '\'' . preg_replace($regex, '\\\\$0', $string) . '\''; + } + + protected function escapeString(string $string, ?string $quote): string { + if (null === $quote) { + // For doc strings, don't escape newlines + $escaped = addcslashes($string, "\t\f\v$\\"); + // But do escape isolated \r. Combined with the terminating newline, it might get + // interpreted as \r\n and dropped from the string contents. + $escaped = preg_replace('/\r(?!\n)/', '\\r', $escaped); + if ($this->phpVersion->supportsFlexibleHeredoc()) { + $escaped = $this->indentString($escaped); + } + } else { + $escaped = addcslashes($string, "\n\r\t\f\v$" . $quote . "\\"); + } + + // Escape control characters and non-UTF-8 characters. + // Regex based on https://stackoverflow.com/a/11709412/385378. + $regex = '/( + [\x00-\x08\x0E-\x1F] # Control characters + | [\xC0-\xC1] # Invalid UTF-8 Bytes + | [\xF5-\xFF] # Invalid UTF-8 Bytes + | \xE0(?=[\x80-\x9F]) # Overlong encoding of prior code point + | \xF0(?=[\x80-\x8F]) # Overlong encoding of prior code point + | [\xC2-\xDF](?![\x80-\xBF]) # Invalid UTF-8 Sequence Start + | [\xE0-\xEF](?![\x80-\xBF]{2}) # Invalid UTF-8 Sequence Start + | [\xF0-\xF4](?![\x80-\xBF]{3}) # Invalid UTF-8 Sequence Start + | (?<=[\x00-\x7F\xF5-\xFF])[\x80-\xBF] # Invalid UTF-8 Sequence Middle + | (? $part) { + if ($part instanceof Node\InterpolatedStringPart + && $this->containsEndLabel($this->escapeString($part->value, null), $label, $i === 0) + ) { + return true; + } + } + return false; + } + + protected function pDereferenceLhs(Node $node): string { + if (!$this->dereferenceLhsRequiresParens($node)) { + return $this->p($node); + } else { + return '(' . $this->p($node) . ')'; + } + } + + protected function pStaticDereferenceLhs(Node $node): string { + if (!$this->staticDereferenceLhsRequiresParens($node)) { + return $this->p($node); + } else { + return '(' . $this->p($node) . ')'; + } + } + + protected function pCallLhs(Node $node): string { + if (!$this->callLhsRequiresParens($node)) { + return $this->p($node); + } else { + return '(' . $this->p($node) . ')'; + } + } + + protected function pNewOperand(Node $node): string { + if (!$this->newOperandRequiresParens($node)) { + return $this->p($node); + } else { + return '(' . $this->p($node) . ')'; + } + } + + /** + * @param Node[] $nodes + */ + protected function hasNodeWithComments(array $nodes): bool { + foreach ($nodes as $node) { + if ($node && $node->getComments()) { + return true; + } + } + return false; + } + + /** @param Node[] $nodes */ + protected function pMaybeMultiline(array $nodes, bool $trailingComma = false): string { + if (!$this->hasNodeWithComments($nodes)) { + return $this->pCommaSeparated($nodes); + } else { + return $this->pCommaSeparatedMultiline($nodes, $trailingComma) . $this->nl; + } + } + + /** @param Node\Param[] $params + */ + private function hasParamWithAttributes(array $params): bool { + foreach ($params as $param) { + if ($param->attrGroups) { + return true; + } + } + return false; + } + + /** @param Node\Param[] $params */ + protected function pParams(array $params): string { + if ($this->hasNodeWithComments($params) || + ($this->hasParamWithAttributes($params) && !$this->phpVersion->supportsAttributes()) + ) { + return $this->pCommaSeparatedMultiline($params, $this->phpVersion->supportsTrailingCommaInParamList()) . $this->nl; + } + return $this->pCommaSeparated($params); + } + + /** @param Node\AttributeGroup[] $nodes */ + protected function pAttrGroups(array $nodes, bool $inline = false): string { + $result = ''; + $sep = $inline ? ' ' : $this->nl; + foreach ($nodes as $node) { + $result .= $this->p($node) . $sep; + } + + return $result; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php new file mode 100644 index 0000000..448bc84 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php @@ -0,0 +1,1706 @@ + */ + protected array $precedenceMap = [ + // [precedence, precedenceLHS, precedenceRHS] + // Where the latter two are the precedences to use for the LHS and RHS of a binary operator, + // where 1 is added to one of the sides depending on associativity. This information is not + // used for unary operators and set to -1. + Expr\Clone_::class => [-10, 0, 1], + BinaryOp\Pow::class => [ 0, 0, 1], + Expr\BitwiseNot::class => [ 10, -1, -1], + Expr\UnaryPlus::class => [ 10, -1, -1], + Expr\UnaryMinus::class => [ 10, -1, -1], + Cast\Int_::class => [ 10, -1, -1], + Cast\Double::class => [ 10, -1, -1], + Cast\String_::class => [ 10, -1, -1], + Cast\Array_::class => [ 10, -1, -1], + Cast\Object_::class => [ 10, -1, -1], + Cast\Bool_::class => [ 10, -1, -1], + Cast\Unset_::class => [ 10, -1, -1], + Expr\ErrorSuppress::class => [ 10, -1, -1], + Expr\Instanceof_::class => [ 20, -1, -1], + Expr\BooleanNot::class => [ 30, -1, -1], + BinaryOp\Mul::class => [ 40, 41, 40], + BinaryOp\Div::class => [ 40, 41, 40], + BinaryOp\Mod::class => [ 40, 41, 40], + BinaryOp\Plus::class => [ 50, 51, 50], + BinaryOp\Minus::class => [ 50, 51, 50], + // FIXME: This precedence is incorrect for PHP 8. + BinaryOp\Concat::class => [ 50, 51, 50], + BinaryOp\ShiftLeft::class => [ 60, 61, 60], + BinaryOp\ShiftRight::class => [ 60, 61, 60], + BinaryOp\Pipe::class => [ 65, 66, 65], + BinaryOp\Smaller::class => [ 70, 70, 70], + BinaryOp\SmallerOrEqual::class => [ 70, 70, 70], + BinaryOp\Greater::class => [ 70, 70, 70], + BinaryOp\GreaterOrEqual::class => [ 70, 70, 70], + BinaryOp\Equal::class => [ 80, 80, 80], + BinaryOp\NotEqual::class => [ 80, 80, 80], + BinaryOp\Identical::class => [ 80, 80, 80], + BinaryOp\NotIdentical::class => [ 80, 80, 80], + BinaryOp\Spaceship::class => [ 80, 80, 80], + BinaryOp\BitwiseAnd::class => [ 90, 91, 90], + BinaryOp\BitwiseXor::class => [100, 101, 100], + BinaryOp\BitwiseOr::class => [110, 111, 110], + BinaryOp\BooleanAnd::class => [120, 121, 120], + BinaryOp\BooleanOr::class => [130, 131, 130], + BinaryOp\Coalesce::class => [140, 140, 141], + Expr\Ternary::class => [150, 150, 150], + Expr\Assign::class => [160, -1, -1], + Expr\AssignRef::class => [160, -1, -1], + AssignOp\Plus::class => [160, -1, -1], + AssignOp\Minus::class => [160, -1, -1], + AssignOp\Mul::class => [160, -1, -1], + AssignOp\Div::class => [160, -1, -1], + AssignOp\Concat::class => [160, -1, -1], + AssignOp\Mod::class => [160, -1, -1], + AssignOp\BitwiseAnd::class => [160, -1, -1], + AssignOp\BitwiseOr::class => [160, -1, -1], + AssignOp\BitwiseXor::class => [160, -1, -1], + AssignOp\ShiftLeft::class => [160, -1, -1], + AssignOp\ShiftRight::class => [160, -1, -1], + AssignOp\Pow::class => [160, -1, -1], + AssignOp\Coalesce::class => [160, -1, -1], + Expr\YieldFrom::class => [170, -1, -1], + Expr\Yield_::class => [175, -1, -1], + Expr\Print_::class => [180, -1, -1], + BinaryOp\LogicalAnd::class => [190, 191, 190], + BinaryOp\LogicalXor::class => [200, 201, 200], + BinaryOp\LogicalOr::class => [210, 211, 210], + Expr\Include_::class => [220, -1, -1], + Expr\ArrowFunction::class => [230, -1, -1], + Expr\Throw_::class => [240, -1, -1], + Expr\Cast\Void_::class => [250, -1, -1], + ]; + + /** @var int Current indentation level. */ + protected int $indentLevel; + /** @var string String for single level of indentation */ + private string $indent; + /** @var int Width in spaces to indent by. */ + private int $indentWidth; + /** @var bool Whether to use tab indentation. */ + private bool $useTabs; + /** @var int Width in spaces of one tab. */ + private int $tabWidth = 4; + + /** @var string Newline style. Does not include current indentation. */ + protected string $newline; + /** @var string Newline including current indentation. */ + protected string $nl; + /** @var string|null Token placed at end of doc string to ensure it is followed by a newline. + * Null if flexible doc strings are used. */ + protected ?string $docStringEndToken; + /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */ + protected bool $canUseSemicolonNamespaces; + /** @var bool Whether to use short array syntax if the node specifies no preference */ + protected bool $shortArraySyntax; + /** @var PhpVersion PHP version to target */ + protected PhpVersion $phpVersion; + + /** @var TokenStream|null Original tokens for use in format-preserving pretty print */ + protected ?TokenStream $origTokens; + /** @var Internal\Differ Differ for node lists */ + protected Differ $nodeListDiffer; + /** @var array Map determining whether a certain character is a label character */ + protected array $labelCharMap; + /** + * @var array> Map from token classes and subnode names to FIXUP_* constants. + * This is used during format-preserving prints to place additional parens/braces if necessary. + */ + protected array $fixupMap; + /** + * @var array Map from "{$node->getType()}->{$subNode}" + * to ['left' => $l, 'right' => $r], where $l and $r specify the token type that needs to be stripped + * when removing this node. + */ + protected array $removalMap; + /** + * @var array Map from + * "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. + * $find is an optional token after which the insertion occurs. $extraLeft/Right + * are optionally added before/after the main insertions. + */ + protected array $insertionMap; + /** + * @var array Map From "{$class}->{$subNode}" to string that should be inserted + * between elements of this list subnode. + */ + protected array $listInsertionMap; + + /** + * @var array + */ + protected array $emptyListInsertionMap; + /** @var array + * Map from "{$class}->{$subNode}" to [$printFn, $skipToken, $findToken] where $printFn is the function to + * print the modifiers, $skipToken is the token to skip at the start and $findToken is the token before which + * the modifiers should be reprinted. */ + protected array $modifierChangeMap; + + /** + * Creates a pretty printer instance using the given options. + * + * Supported options: + * * PhpVersion $phpVersion: The PHP version to target (default to PHP 7.4). This option + * controls compatibility of the generated code with older PHP + * versions in cases where a simple stylistic choice exists (e.g. + * array() vs []). It is safe to pretty-print an AST for a newer + * PHP version while specifying an older target (but the result will + * of course not be compatible with the older version in that case). + * * string $newline: The newline style to use. Should be "\n" (default) or "\r\n". + * * string $indent: The indentation to use. Should either be all spaces or a single + * tab. Defaults to four spaces (" "). + * * bool $shortArraySyntax: Whether to use [] instead of array() as the default array + * syntax, if the node does not specify a format. Defaults to whether + * the phpVersion support short array syntax. + * + * @param array{ + * phpVersion?: PhpVersion, newline?: string, indent?: string, shortArraySyntax?: bool + * } $options Dictionary of formatting options + */ + public function __construct(array $options = []) { + $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 4); + + $this->newline = $options['newline'] ?? "\n"; + if ($this->newline !== "\n" && $this->newline != "\r\n") { + throw new \LogicException('Option "newline" must be one of "\n" or "\r\n"'); + } + + $this->shortArraySyntax = + $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); + $this->docStringEndToken = + $this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand(); + + $this->indent = $indent = $options['indent'] ?? ' '; + if ($indent === "\t") { + $this->useTabs = true; + $this->indentWidth = $this->tabWidth; + } elseif ($indent === \str_repeat(' ', \strlen($indent))) { + $this->useTabs = false; + $this->indentWidth = \strlen($indent); + } else { + throw new \LogicException('Option "indent" must either be all spaces or a single tab'); + } + } + + /** + * Reset pretty printing state. + */ + protected function resetState(): void { + $this->indentLevel = 0; + $this->nl = $this->newline; + $this->origTokens = null; + } + + /** + * Set indentation level + * + * @param int $level Level in number of spaces + */ + protected function setIndentLevel(int $level): void { + $this->indentLevel = $level; + if ($this->useTabs) { + $tabs = \intdiv($level, $this->tabWidth); + $spaces = $level % $this->tabWidth; + $this->nl = $this->newline . \str_repeat("\t", $tabs) . \str_repeat(' ', $spaces); + } else { + $this->nl = $this->newline . \str_repeat(' ', $level); + } + } + + /** + * Increase indentation level. + */ + protected function indent(): void { + $this->indentLevel += $this->indentWidth; + $this->nl .= $this->indent; + } + + /** + * Decrease indentation level. + */ + protected function outdent(): void { + assert($this->indentLevel >= $this->indentWidth); + $this->setIndentLevel($this->indentLevel - $this->indentWidth); + } + + /** + * Pretty prints an array of statements. + * + * @param Node[] $stmts Array of statements + * + * @return string Pretty printed statements + */ + public function prettyPrint(array $stmts): string { + $this->resetState(); + $this->preprocessNodes($stmts); + + return ltrim($this->handleMagicTokens($this->pStmts($stmts, false))); + } + + /** + * Pretty prints an expression. + * + * @param Expr $node Expression node + * + * @return string Pretty printed node + */ + public function prettyPrintExpr(Expr $node): string { + $this->resetState(); + return $this->handleMagicTokens($this->p($node)); + } + + /** + * Pretty prints a file of statements (includes the opening newline . $this->newline; + } + + $p = "newline . $this->newline . $this->prettyPrint($stmts); + + if ($stmts[0] instanceof Stmt\InlineHTML) { + $p = preg_replace('/^<\?php\s+\?>\r?\n?/', '', $p); + } + if ($stmts[count($stmts) - 1] instanceof Stmt\InlineHTML) { + $p = preg_replace('/<\?php$/', '', rtrim($p)); + } + + return $p; + } + + /** + * Preprocesses the top-level nodes to initialize pretty printer state. + * + * @param Node[] $nodes Array of nodes + */ + protected function preprocessNodes(array $nodes): void { + /* We can use semicolon-namespaces unless there is a global namespace declaration */ + $this->canUseSemicolonNamespaces = true; + foreach ($nodes as $node) { + if ($node instanceof Stmt\Namespace_ && null === $node->name) { + $this->canUseSemicolonNamespaces = false; + break; + } + } + } + + /** + * Handles (and removes) doc-string-end tokens. + */ + protected function handleMagicTokens(string $str): string { + if ($this->docStringEndToken !== null) { + // Replace doc-string-end tokens with nothing or a newline + $str = str_replace( + $this->docStringEndToken . ';' . $this->newline, + ';' . $this->newline, + $str); + $str = str_replace($this->docStringEndToken, $this->newline, $str); + } + + return $str; + } + + /** + * Pretty prints an array of nodes (statements) and indents them optionally. + * + * @param Node[] $nodes Array of nodes + * @param bool $indent Whether to indent the printed nodes + * + * @return string Pretty printed statements + */ + protected function pStmts(array $nodes, bool $indent = true): string { + if ($indent) { + $this->indent(); + } + + $result = ''; + foreach ($nodes as $node) { + $comments = $node->getComments(); + if ($comments) { + $result .= $this->nl . $this->pComments($comments); + if ($node instanceof Stmt\Nop) { + continue; + } + } + + $result .= $this->nl . $this->p($node); + } + + if ($indent) { + $this->outdent(); + } + + return $result; + } + + /** + * Pretty-print an infix operation while taking precedence into account. + * + * @param string $class Node class of operator + * @param Node $leftNode Left-hand side node + * @param string $operatorString String representation of the operator + * @param Node $rightNode Right-hand side node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator + * + * @return string Pretty printed infix operation + */ + protected function pInfixOp( + string $class, Node $leftNode, string $operatorString, Node $rightNode, + int $precedence, int $lhsPrecedence + ): string { + list($opPrecedence, $newPrecedenceLHS, $newPrecedenceRHS) = $this->precedenceMap[$class]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $precedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; + } + return $prefix . $this->p($leftNode, $newPrecedenceLHS, $newPrecedenceLHS) + . $operatorString . $this->p($rightNode, $newPrecedenceRHS, $lhsPrecedence) . $suffix; + } + + /** + * Pretty-print a prefix operation while taking precedence into account. + * + * @param string $class Node class of operator + * @param string $operatorString String representation of the operator + * @param Node $node Node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator + * + * @return string Pretty printed prefix operation + */ + protected function pPrefixOp(string $class, string $operatorString, Node $node, int $precedence, int $lhsPrecedence): string { + $opPrecedence = $this->precedenceMap[$class][0]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $lhsPrecedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; + } + $printedArg = $this->p($node, $opPrecedence, $lhsPrecedence); + if (($operatorString === '+' && $printedArg[0] === '+') || + ($operatorString === '-' && $printedArg[0] === '-') + ) { + // Avoid printing +(+$a) as ++$a and similar. + $printedArg = '(' . $printedArg . ')'; + } + return $prefix . $operatorString . $printedArg . $suffix; + } + + /** + * Pretty-print a postfix operation while taking precedence into account. + * + * @param string $class Node class of operator + * @param string $operatorString String representation of the operator + * @param Node $node Node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator + * + * @return string Pretty printed postfix operation + */ + protected function pPostfixOp(string $class, Node $node, string $operatorString, int $precedence, int $lhsPrecedence): string { + $opPrecedence = $this->precedenceMap[$class][0]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $precedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; + } + if ($opPrecedence < $lhsPrecedence) { + $lhsPrecedence = $opPrecedence; + } + return $prefix . $this->p($node, $opPrecedence, $lhsPrecedence) . $operatorString . $suffix; + } + + /** + * Pretty prints an array of nodes and implodes the printed values. + * + * @param Node[] $nodes Array of Nodes to be printed + * @param string $glue Character to implode with + * + * @return string Imploded pretty printed nodes> $pre + */ + protected function pImplode(array $nodes, string $glue = ''): string { + $pNodes = []; + foreach ($nodes as $node) { + if (null === $node) { + $pNodes[] = ''; + } else { + $pNodes[] = $this->p($node); + } + } + + return implode($glue, $pNodes); + } + + /** + * Pretty prints an array of nodes and implodes the printed values with commas. + * + * @param Node[] $nodes Array of Nodes to be printed + * + * @return string Comma separated pretty printed nodes + */ + protected function pCommaSeparated(array $nodes): string { + return $this->pImplode($nodes, ', '); + } + + /** + * Pretty prints a comma-separated list of nodes in multiline style, including comments. + * + * The result includes a leading newline and one level of indentation (same as pStmts). + * + * @param Node[] $nodes Array of Nodes to be printed + * @param bool $trailingComma Whether to use a trailing comma + * + * @return string Comma separated pretty printed nodes in multiline style + */ + protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma): string { + $this->indent(); + + $result = ''; + $lastIdx = count($nodes) - 1; + foreach ($nodes as $idx => $node) { + if ($node !== null) { + $comments = $node->getComments(); + if ($comments) { + $result .= $this->nl . $this->pComments($comments); + } + + $result .= $this->nl . $this->p($node); + } else { + $result .= $this->nl; + } + if ($trailingComma || $idx !== $lastIdx) { + $result .= ','; + } + } + + $this->outdent(); + return $result; + } + + /** + * Prints reformatted text of the passed comments. + * + * @param Comment[] $comments List of comments + * + * @return string Reformatted text of comments + */ + protected function pComments(array $comments): string { + $formattedComments = []; + + foreach ($comments as $comment) { + $formattedComments[] = str_replace("\n", $this->nl, $comment->getReformattedText()); + } + + return implode($this->nl, $formattedComments); + } + + /** + * Perform a format-preserving pretty print of an AST. + * + * The format preservation is best effort. For some changes to the AST the formatting will not + * be preserved (at least not locally). + * + * In order to use this method a number of prerequisites must be satisfied: + * * The startTokenPos and endTokenPos attributes in the lexer must be enabled. + * * The CloningVisitor must be run on the AST prior to modification. + * * The original tokens must be provided, using the getTokens() method on the lexer. + * + * @param Node[] $stmts Modified AST with links to original AST + * @param Node[] $origStmts Original AST with token offset information + * @param Token[] $origTokens Tokens of the original code + */ + public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens): string { + $this->initializeNodeListDiffer(); + $this->initializeLabelCharMap(); + $this->initializeFixupMap(); + $this->initializeRemovalMap(); + $this->initializeInsertionMap(); + $this->initializeListInsertionMap(); + $this->initializeEmptyListInsertionMap(); + $this->initializeModifierChangeMap(); + + $this->resetState(); + $this->origTokens = new TokenStream($origTokens, $this->tabWidth); + + $this->preprocessNodes($stmts); + + $pos = 0; + $result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null); + if (null !== $result) { + $result .= $this->origTokens->getTokenCode($pos, count($origTokens) - 1, 0); + } else { + // Fallback + // TODO Add newline . $this->pStmts($stmts, false); + } + + return $this->handleMagicTokens($result); + } + + protected function pFallback(Node $node, int $precedence, int $lhsPrecedence): string { + return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); + } + + /** + * Pretty prints a node. + * + * This method also handles formatting preservation for nodes. + * + * @param Node $node Node to be pretty printed + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator + * @param bool $parentFormatPreserved Whether parent node has preserved formatting + * + * @return string Pretty printed node + */ + protected function p( + Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE, + bool $parentFormatPreserved = false + ): string { + // No orig tokens means this is a normal pretty print without preservation of formatting + if (!$this->origTokens) { + return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); + } + + /** @var Node|null $origNode */ + $origNode = $node->getAttribute('origNode'); + if (null === $origNode) { + return $this->pFallback($node, $precedence, $lhsPrecedence); + } + + $class = \get_class($node); + \assert($class === \get_class($origNode)); + + $startPos = $origNode->getStartTokenPos(); + $endPos = $origNode->getEndTokenPos(); + \assert($startPos >= 0 && $endPos >= 0); + + $fallbackNode = $node; + if ($node instanceof Expr\New_ && $node->class instanceof Stmt\Class_) { + // Normalize node structure of anonymous classes + assert($origNode instanceof Expr\New_); + $node = PrintableNewAnonClassNode::fromNewNode($node); + $origNode = PrintableNewAnonClassNode::fromNewNode($origNode); + $class = PrintableNewAnonClassNode::class; + } + + // InlineHTML node does not contain closing and opening PHP tags. If the parent formatting + // is not preserved, then we need to use the fallback code to make sure the tags are + // printed. + if ($node instanceof Stmt\InlineHTML && !$parentFormatPreserved) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); + } + + $indentAdjustment = $this->indentLevel - $this->origTokens->getIndentationBefore($startPos); + + $type = $node->getType(); + $fixupInfo = $this->fixupMap[$class] ?? null; + + $result = ''; + $pos = $startPos; + foreach ($node->getSubNodeNames() as $subNodeName) { + $subNode = $node->$subNodeName; + $origSubNode = $origNode->$subNodeName; + + if ((!$subNode instanceof Node && $subNode !== null) + || (!$origSubNode instanceof Node && $origSubNode !== null) + ) { + if ($subNode === $origSubNode) { + // Unchanged, can reuse old code + continue; + } + + if (is_array($subNode) && is_array($origSubNode)) { + // Array subnode changed, we might be able to reconstruct it + $listResult = $this->pArray( + $subNode, $origSubNode, $pos, $indentAdjustment, $class, $subNodeName, + $fixupInfo[$subNodeName] ?? null + ); + if (null === $listResult) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); + } + + $result .= $listResult; + continue; + } + + // Check if this is a modifier change + $key = $class . '->' . $subNodeName; + if (!isset($this->modifierChangeMap[$key])) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); + } + + [$printFn, $skipToken, $findToken] = $this->modifierChangeMap[$key]; + $skipWSPos = $this->origTokens->skipRight($pos, $skipToken); + $result .= $this->origTokens->getTokenCode($pos, $skipWSPos, $indentAdjustment); + $result .= $this->$printFn($subNode); + $pos = $this->origTokens->findRight($skipWSPos, $findToken); + continue; + } + + $extraLeft = ''; + $extraRight = ''; + if ($origSubNode !== null) { + $subStartPos = $origSubNode->getStartTokenPos(); + $subEndPos = $origSubNode->getEndTokenPos(); + \assert($subStartPos >= 0 && $subEndPos >= 0); + } else { + if ($subNode === null) { + // Both null, nothing to do + continue; + } + + // A node has been inserted, check if we have insertion information for it + $key = $type . '->' . $subNodeName; + if (!isset($this->insertionMap[$key])) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); + } + + list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; + if (null !== $findToken) { + $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); + } + $subEndPos = $subStartPos - 1; + } + + if (null === $subNode) { + // A node has been removed, check if we have removal information for it + $key = $type . '->' . $subNodeName; + if (!isset($this->removalMap[$key])) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); + } + + // Adjust positions to account for additional tokens that must be skipped + $removalInfo = $this->removalMap[$key]; + if (isset($removalInfo['left'])) { + $subStartPos = $this->origTokens->skipLeft($subStartPos - 1, $removalInfo['left']) + 1; + } + if (isset($removalInfo['right'])) { + $subEndPos = $this->origTokens->skipRight($subEndPos + 1, $removalInfo['right']) - 1; + } + } + + $result .= $this->origTokens->getTokenCode($pos, $subStartPos, $indentAdjustment); + + if (null !== $subNode) { + $result .= $extraLeft; + + $origIndentLevel = $this->indentLevel; + $this->setIndentLevel(max($this->origTokens->getIndentationBefore($subStartPos) + $indentAdjustment, 0)); + + // If it's the same node that was previously in this position, it certainly doesn't + // need fixup. It's important to check this here, because our fixup checks are more + // conservative than strictly necessary. + if (isset($fixupInfo[$subNodeName]) + && $subNode->getAttribute('origNode') !== $origSubNode + ) { + $fixup = $fixupInfo[$subNodeName]; + $res = $this->pFixup($fixup, $subNode, $class, $subStartPos, $subEndPos); + } else { + $res = $this->p($subNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); + } + + $this->safeAppend($result, $res); + $this->setIndentLevel($origIndentLevel); + + $result .= $extraRight; + } + + $pos = $subEndPos + 1; + } + + $result .= $this->origTokens->getTokenCode($pos, $endPos + 1, $indentAdjustment); + return $result; + } + + /** + * Perform a format-preserving pretty print of an array. + * + * @param Node[] $nodes New nodes + * @param Node[] $origNodes Original nodes + * @param int $pos Current token position (updated by reference) + * @param int $indentAdjustment Adjustment for indentation + * @param string $parentNodeClass Class of the containing node. + * @param string $subNodeName Name of array subnode. + * @param null|int $fixup Fixup information for array item nodes + * + * @return null|string Result of pretty print or null if cannot preserve formatting + */ + protected function pArray( + array $nodes, array $origNodes, int &$pos, int $indentAdjustment, + string $parentNodeClass, string $subNodeName, ?int $fixup + ): ?string { + $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes); + + $mapKey = $parentNodeClass . '->' . $subNodeName; + $insertStr = $this->listInsertionMap[$mapKey] ?? null; + $isStmtList = $subNodeName === 'stmts'; + + $beforeFirstKeepOrReplace = true; + $skipRemovedNode = false; + $delayedAdd = []; + $lastElemIndentLevel = $this->indentLevel; + + $insertNewline = false; + if ($insertStr === "\n") { + $insertStr = ''; + $insertNewline = true; + } + + if ($isStmtList && \count($origNodes) === 1 && \count($nodes) !== 1) { + $startPos = $origNodes[0]->getStartTokenPos(); + $endPos = $origNodes[0]->getEndTokenPos(); + \assert($startPos >= 0 && $endPos >= 0); + if (!$this->origTokens->haveBraces($startPos, $endPos)) { + // This was a single statement without braces, but either additional statements + // have been added, or the single statement has been removed. This requires the + // addition of braces. For now fall back. + // TODO: Try to preserve formatting + return null; + } + } + + $result = ''; + foreach ($diff as $i => $diffElem) { + $diffType = $diffElem->type; + /** @var Node|string|null $arrItem */ + $arrItem = $diffElem->new; + /** @var Node|string|null $origArrItem */ + $origArrItem = $diffElem->old; + + if ($diffType === DiffElem::TYPE_KEEP || $diffType === DiffElem::TYPE_REPLACE) { + $beforeFirstKeepOrReplace = false; + + if ($origArrItem === null || $arrItem === null) { + // We can only handle the case where both are null + if ($origArrItem === $arrItem) { + continue; + } + return null; + } + + if (!$arrItem instanceof Node || !$origArrItem instanceof Node) { + // We can only deal with nodes. This can occur for Names, which use string arrays. + return null; + } + + $itemStartPos = $origArrItem->getStartTokenPos(); + $itemEndPos = $origArrItem->getEndTokenPos(); + \assert($itemStartPos >= 0 && $itemEndPos >= 0 && $itemStartPos >= $pos); + + $origIndentLevel = $this->indentLevel; + $lastElemIndentLevel = max($this->origTokens->getIndentationBefore($itemStartPos) + $indentAdjustment, 0); + $this->setIndentLevel($lastElemIndentLevel); + + $comments = $arrItem->getComments(); + $origComments = $origArrItem->getComments(); + $commentStartPos = $origComments ? $origComments[0]->getStartTokenPos() : $itemStartPos; + \assert($commentStartPos >= 0); + + if ($commentStartPos < $pos) { + // Comments may be assigned to multiple nodes if they start at the same position. + // Make sure we don't try to print them multiple times. + $commentStartPos = $itemStartPos; + } + + if ($skipRemovedNode) { + if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) { + // We'd remove an opening/closing PHP tag. + // TODO: Preserve formatting. + $this->setIndentLevel($origIndentLevel); + return null; + } + } else { + $result .= $this->origTokens->getTokenCode( + $pos, $commentStartPos, $indentAdjustment); + } + + if (!empty($delayedAdd)) { + /** @var Node $delayedAddNode */ + foreach ($delayedAdd as $delayedAddNode) { + if ($insertNewline) { + $delayedAddComments = $delayedAddNode->getComments(); + if ($delayedAddComments) { + $result .= $this->pComments($delayedAddComments) . $this->nl; + } + } + + $this->safeAppend($result, $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true)); + + if ($insertNewline) { + $result .= $insertStr . $this->nl; + } else { + $result .= $insertStr; + } + } + + $delayedAdd = []; + } + + if ($comments !== $origComments) { + if ($comments) { + $result .= $this->pComments($comments) . $this->nl; + } + } else { + $result .= $this->origTokens->getTokenCode( + $commentStartPos, $itemStartPos, $indentAdjustment); + } + + // If we had to remove anything, we have done so now. + $skipRemovedNode = false; + } elseif ($diffType === DiffElem::TYPE_ADD) { + if (null === $insertStr) { + // We don't have insertion information for this list type + return null; + } + + if (!$arrItem instanceof Node) { + // We only support list insertion of nodes. + return null; + } + + // We go multiline if the original code was multiline, + // or if it's an array item with a comment above it. + // Match always uses multiline formatting. + if ($insertStr === ', ' && + ($this->isMultiline($origNodes) || $arrItem->getComments() || + $parentNodeClass === Expr\Match_::class) + ) { + $insertStr = ','; + $insertNewline = true; + } + + if ($beforeFirstKeepOrReplace) { + // Will be inserted at the next "replace" or "keep" element + $delayedAdd[] = $arrItem; + continue; + } + + $itemStartPos = $pos; + $itemEndPos = $pos - 1; + + $origIndentLevel = $this->indentLevel; + $this->setIndentLevel($lastElemIndentLevel); + + if ($insertNewline) { + $result .= $insertStr . $this->nl; + $comments = $arrItem->getComments(); + if ($comments) { + $result .= $this->pComments($comments) . $this->nl; + } + } else { + $result .= $insertStr; + } + } elseif ($diffType === DiffElem::TYPE_REMOVE) { + if (!$origArrItem instanceof Node) { + // We only support removal for nodes + return null; + } + + $itemStartPos = $origArrItem->getStartTokenPos(); + $itemEndPos = $origArrItem->getEndTokenPos(); + \assert($itemStartPos >= 0 && $itemEndPos >= 0); + + // Consider comments part of the node. + $origComments = $origArrItem->getComments(); + if ($origComments) { + $itemStartPos = $origComments[0]->getStartTokenPos(); + } + + if ($i === 0) { + // If we're removing from the start, keep the tokens before the node and drop those after it, + // instead of the other way around. + $result .= $this->origTokens->getTokenCode( + $pos, $itemStartPos, $indentAdjustment); + $skipRemovedNode = true; + } else { + if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) { + // We'd remove an opening/closing PHP tag. + // TODO: Preserve formatting. + return null; + } + } + + $pos = $itemEndPos + 1; + continue; + } else { + throw new \Exception("Shouldn't happen"); + } + + if (null !== $fixup && $arrItem->getAttribute('origNode') !== $origArrItem) { + $res = $this->pFixup($fixup, $arrItem, null, $itemStartPos, $itemEndPos); + } else { + $res = $this->p($arrItem, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); + } + $this->safeAppend($result, $res); + + $this->setIndentLevel($origIndentLevel); + $pos = $itemEndPos + 1; + } + + if ($skipRemovedNode) { + // TODO: Support removing single node. + return null; + } + + if (!empty($delayedAdd)) { + if (!isset($this->emptyListInsertionMap[$mapKey])) { + return null; + } + + list($findToken, $extraLeft, $extraRight) = $this->emptyListInsertionMap[$mapKey]; + if (null !== $findToken) { + $insertPos = $this->origTokens->findRight($pos, $findToken) + 1; + $result .= $this->origTokens->getTokenCode($pos, $insertPos, $indentAdjustment); + $pos = $insertPos; + } + + $first = true; + $result .= $extraLeft; + foreach ($delayedAdd as $delayedAddNode) { + if (!$first) { + $result .= $insertStr; + if ($insertNewline) { + $result .= $this->nl; + } + } + $result .= $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); + $first = false; + } + $result .= $extraRight === "\n" ? $this->nl : $extraRight; + } + + return $result; + } + + /** + * Print node with fixups. + * + * Fixups here refer to the addition of extra parentheses, braces or other characters, that + * are required to preserve program semantics in a certain context (e.g. to maintain precedence + * or because only certain expressions are allowed in certain places). + * + * @param int $fixup Fixup type + * @param Node $subNode Subnode to print + * @param string|null $parentClass Class of parent node + * @param int $subStartPos Original start pos of subnode + * @param int $subEndPos Original end pos of subnode + * + * @return string Result of fixed-up print of subnode + */ + protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos): string { + switch ($fixup) { + case self::FIXUP_PREC_LEFT: + // We use a conservative approximation where lhsPrecedence == precedence. + if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { + $precedence = $this->precedenceMap[$parentClass][1]; + return $this->p($subNode, $precedence, $precedence); + } + break; + case self::FIXUP_PREC_RIGHT: + if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { + $precedence = $this->precedenceMap[$parentClass][2]; + return $this->p($subNode, $precedence, $precedence); + } + break; + case self::FIXUP_PREC_UNARY: + if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { + $precedence = $this->precedenceMap[$parentClass][0]; + return $this->p($subNode, $precedence, $precedence); + } + break; + case self::FIXUP_CALL_LHS: + if ($this->callLhsRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos) + ) { + return '(' . $this->p($subNode) . ')'; + } + break; + case self::FIXUP_DEREF_LHS: + if ($this->dereferenceLhsRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos) + ) { + return '(' . $this->p($subNode) . ')'; + } + break; + case self::FIXUP_STATIC_DEREF_LHS: + if ($this->staticDereferenceLhsRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos) + ) { + return '(' . $this->p($subNode) . ')'; + } + break; + case self::FIXUP_NEW: + if ($this->newOperandRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos)) { + return '(' . $this->p($subNode) . ')'; + } + break; + case self::FIXUP_BRACED_NAME: + case self::FIXUP_VAR_BRACED_NAME: + if ($subNode instanceof Expr + && !$this->origTokens->haveBraces($subStartPos, $subEndPos) + ) { + return ($fixup === self::FIXUP_VAR_BRACED_NAME ? '$' : '') + . '{' . $this->p($subNode) . '}'; + } + break; + case self::FIXUP_ENCAPSED: + if (!$subNode instanceof Node\InterpolatedStringPart + && !$this->origTokens->haveBraces($subStartPos, $subEndPos) + ) { + return '{' . $this->p($subNode) . '}'; + } + break; + default: + throw new \Exception('Cannot happen'); + } + + // Nothing special to do + return $this->p($subNode); + } + + /** + * Appends to a string, ensuring whitespace between label characters. + * + * Example: "echo" and "$x" result in "echo$x", but "echo" and "x" result in "echo x". + * Without safeAppend the result would be "echox", which does not preserve semantics. + */ + protected function safeAppend(string &$str, string $append): void { + if ($str === "") { + $str = $append; + return; + } + + if ($append === "") { + return; + } + + if (!$this->labelCharMap[$append[0]] + || !$this->labelCharMap[$str[\strlen($str) - 1]]) { + $str .= $append; + } else { + $str .= " " . $append; + } + } + + /** + * Determines whether the LHS of a call must be wrapped in parenthesis. + * + * @param Node $node LHS of a call + * + * @return bool Whether parentheses are required + */ + protected function callLhsRequiresParens(Node $node): bool { + if ($node instanceof Expr\New_) { + return !$this->phpVersion->supportsNewDereferenceWithoutParentheses(); + } + return !($node instanceof Node\Name + || $node instanceof Expr\Variable + || $node instanceof Expr\ArrayDimFetch + || $node instanceof Expr\FuncCall + || $node instanceof Expr\MethodCall + || $node instanceof Expr\NullsafeMethodCall + || $node instanceof Expr\StaticCall + || $node instanceof Expr\Array_); + } + + /** + * Determines whether the LHS of an array/object operation must be wrapped in parentheses. + * + * @param Node $node LHS of dereferencing operation + * + * @return bool Whether parentheses are required + */ + protected function dereferenceLhsRequiresParens(Node $node): bool { + // A constant can occur on the LHS of an array/object deref, but not a static deref. + return $this->staticDereferenceLhsRequiresParens($node) + && !$node instanceof Expr\ConstFetch; + } + + /** + * Determines whether the LHS of a static operation must be wrapped in parentheses. + * + * @param Node $node LHS of dereferencing operation + * + * @return bool Whether parentheses are required + */ + protected function staticDereferenceLhsRequiresParens(Node $node): bool { + if ($node instanceof Expr\New_) { + return !$this->phpVersion->supportsNewDereferenceWithoutParentheses(); + } + return !($node instanceof Expr\Variable + || $node instanceof Node\Name + || $node instanceof Expr\ArrayDimFetch + || $node instanceof Expr\PropertyFetch + || $node instanceof Expr\NullsafePropertyFetch + || $node instanceof Expr\StaticPropertyFetch + || $node instanceof Expr\FuncCall + || $node instanceof Expr\MethodCall + || $node instanceof Expr\NullsafeMethodCall + || $node instanceof Expr\StaticCall + || $node instanceof Expr\Array_ + || $node instanceof Scalar\String_ + || $node instanceof Expr\ClassConstFetch); + } + + /** + * Determines whether an expression used in "new" or "instanceof" requires parentheses. + * + * @param Node $node New or instanceof operand + * + * @return bool Whether parentheses are required + */ + protected function newOperandRequiresParens(Node $node): bool { + if ($node instanceof Node\Name || $node instanceof Expr\Variable) { + return false; + } + if ($node instanceof Expr\ArrayDimFetch || $node instanceof Expr\PropertyFetch || + $node instanceof Expr\NullsafePropertyFetch + ) { + return $this->newOperandRequiresParens($node->var); + } + if ($node instanceof Expr\StaticPropertyFetch) { + return $this->newOperandRequiresParens($node->class); + } + return true; + } + + /** + * Print modifiers, including trailing whitespace. + * + * @param int $modifiers Modifier mask to print + * + * @return string Printed modifiers + */ + protected function pModifiers(int $modifiers): string { + return ($modifiers & Modifiers::FINAL ? 'final ' : '') + . ($modifiers & Modifiers::ABSTRACT ? 'abstract ' : '') + . ($modifiers & Modifiers::PUBLIC ? 'public ' : '') + . ($modifiers & Modifiers::PROTECTED ? 'protected ' : '') + . ($modifiers & Modifiers::PRIVATE ? 'private ' : '') + . ($modifiers & Modifiers::PUBLIC_SET ? 'public(set) ' : '') + . ($modifiers & Modifiers::PROTECTED_SET ? 'protected(set) ' : '') + . ($modifiers & Modifiers::PRIVATE_SET ? 'private(set) ' : '') + . ($modifiers & Modifiers::STATIC ? 'static ' : '') + . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); + } + + protected function pStatic(bool $static): string { + return $static ? 'static ' : ''; + } + + /** + * Determine whether a list of nodes uses multiline formatting. + * + * @param (Node|null)[] $nodes Node list + * + * @return bool Whether multiline formatting is used + */ + protected function isMultiline(array $nodes): bool { + if (\count($nodes) < 2) { + return false; + } + + $pos = -1; + foreach ($nodes as $node) { + if (null === $node) { + continue; + } + + $endPos = $node->getEndTokenPos() + 1; + if ($pos >= 0) { + $text = $this->origTokens->getTokenCode($pos, $endPos, 0); + if (false === strpos($text, "\n")) { + // We require that a newline is present between *every* item. If the formatting + // is inconsistent, with only some items having newlines, we don't consider it + // as multiline + return false; + } + } + $pos = $endPos; + } + + return true; + } + + /** + * Lazily initializes label char map. + * + * The label char map determines whether a certain character may occur in a label. + */ + protected function initializeLabelCharMap(): void { + if (isset($this->labelCharMap)) { + return; + } + + $this->labelCharMap = []; + for ($i = 0; $i < 256; $i++) { + $chr = chr($i); + $this->labelCharMap[$chr] = $i >= 0x80 || ctype_alnum($chr); + } + + if ($this->phpVersion->allowsDelInIdentifiers()) { + $this->labelCharMap["\x7f"] = true; + } + } + + /** + * Lazily initializes node list differ. + * + * The node list differ is used to determine differences between two array subnodes. + */ + protected function initializeNodeListDiffer(): void { + if (isset($this->nodeListDiffer)) { + return; + } + + $this->nodeListDiffer = new Internal\Differ(function ($a, $b) { + if ($a instanceof Node && $b instanceof Node) { + return $a === $b->getAttribute('origNode'); + } + // Can happen for array destructuring + return $a === null && $b === null; + }); + } + + /** + * Lazily initializes fixup map. + * + * The fixup map is used to determine whether a certain subnode of a certain node may require + * some kind of "fixup" operation, e.g. the addition of parenthesis or braces. + */ + protected function initializeFixupMap(): void { + if (isset($this->fixupMap)) { + return; + } + + $this->fixupMap = [ + Expr\Instanceof_::class => [ + 'expr' => self::FIXUP_PREC_UNARY, + 'class' => self::FIXUP_NEW, + ], + Expr\Ternary::class => [ + 'cond' => self::FIXUP_PREC_LEFT, + 'else' => self::FIXUP_PREC_RIGHT, + ], + Expr\Yield_::class => ['value' => self::FIXUP_PREC_UNARY], + + Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS], + Expr\StaticCall::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], + Expr\ArrayDimFetch::class => ['var' => self::FIXUP_DEREF_LHS], + Expr\ClassConstFetch::class => [ + 'class' => self::FIXUP_STATIC_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Expr\New_::class => ['class' => self::FIXUP_NEW], + Expr\MethodCall::class => [ + 'var' => self::FIXUP_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Expr\NullsafeMethodCall::class => [ + 'var' => self::FIXUP_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Expr\StaticPropertyFetch::class => [ + 'class' => self::FIXUP_STATIC_DEREF_LHS, + 'name' => self::FIXUP_VAR_BRACED_NAME, + ], + Expr\PropertyFetch::class => [ + 'var' => self::FIXUP_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Expr\NullsafePropertyFetch::class => [ + 'var' => self::FIXUP_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Scalar\InterpolatedString::class => [ + 'parts' => self::FIXUP_ENCAPSED, + ], + ]; + + $binaryOps = [ + BinaryOp\Pow::class, BinaryOp\Mul::class, BinaryOp\Div::class, BinaryOp\Mod::class, + BinaryOp\Plus::class, BinaryOp\Minus::class, BinaryOp\Concat::class, + BinaryOp\ShiftLeft::class, BinaryOp\ShiftRight::class, BinaryOp\Smaller::class, + BinaryOp\SmallerOrEqual::class, BinaryOp\Greater::class, BinaryOp\GreaterOrEqual::class, + BinaryOp\Equal::class, BinaryOp\NotEqual::class, BinaryOp\Identical::class, + BinaryOp\NotIdentical::class, BinaryOp\Spaceship::class, BinaryOp\BitwiseAnd::class, + BinaryOp\BitwiseXor::class, BinaryOp\BitwiseOr::class, BinaryOp\BooleanAnd::class, + BinaryOp\BooleanOr::class, BinaryOp\Coalesce::class, BinaryOp\LogicalAnd::class, + BinaryOp\LogicalXor::class, BinaryOp\LogicalOr::class, BinaryOp\Pipe::class, + ]; + foreach ($binaryOps as $binaryOp) { + $this->fixupMap[$binaryOp] = [ + 'left' => self::FIXUP_PREC_LEFT, + 'right' => self::FIXUP_PREC_RIGHT + ]; + } + + $prefixOps = [ + Expr\Clone_::class, Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, + Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class, + Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class, + Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class, + 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\Coalesce::class, + Expr\ArrowFunction::class, Expr\Throw_::class, + ]; + foreach ($prefixOps as $prefixOp) { + $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_UNARY]; + } + } + + /** + * Lazily initializes the removal map. + * + * The removal map is used to determine which additional tokens should be removed when a + * certain node is replaced by null. + */ + protected function initializeRemovalMap(): void { + if (isset($this->removalMap)) { + return; + } + + $stripBoth = ['left' => \T_WHITESPACE, 'right' => \T_WHITESPACE]; + $stripLeft = ['left' => \T_WHITESPACE]; + $stripRight = ['right' => \T_WHITESPACE]; + $stripDoubleArrow = ['right' => \T_DOUBLE_ARROW]; + $stripColon = ['left' => ':']; + $stripEquals = ['left' => '=']; + $this->removalMap = [ + 'Expr_ArrayDimFetch->dim' => $stripBoth, + 'ArrayItem->key' => $stripDoubleArrow, + 'Expr_ArrowFunction->returnType' => $stripColon, + 'Expr_Closure->returnType' => $stripColon, + 'Expr_Exit->expr' => $stripBoth, + 'Expr_Ternary->if' => $stripBoth, + 'Expr_Yield->key' => $stripDoubleArrow, + 'Expr_Yield->value' => $stripBoth, + 'Param->type' => $stripRight, + 'Param->default' => $stripEquals, + 'Stmt_Break->num' => $stripBoth, + 'Stmt_Catch->var' => $stripLeft, + 'Stmt_ClassConst->type' => $stripRight, + 'Stmt_ClassMethod->returnType' => $stripColon, + 'Stmt_Class->extends' => ['left' => \T_EXTENDS], + 'Stmt_Enum->scalarType' => $stripColon, + 'Stmt_EnumCase->expr' => $stripEquals, + 'Expr_PrintableNewAnonClass->extends' => ['left' => \T_EXTENDS], + 'Stmt_Continue->num' => $stripBoth, + 'Stmt_Foreach->keyVar' => $stripDoubleArrow, + 'Stmt_Function->returnType' => $stripColon, + 'Stmt_If->else' => $stripLeft, + 'Stmt_Namespace->name' => $stripLeft, + 'Stmt_Property->type' => $stripRight, + 'PropertyItem->default' => $stripEquals, + 'Stmt_Return->expr' => $stripBoth, + 'Stmt_StaticVar->default' => $stripEquals, + 'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft, + 'Stmt_TryCatch->finally' => $stripLeft, + // 'Stmt_Case->cond': Replace with "default" + // 'Stmt_Class->name': Unclear what to do + // 'Stmt_Declare->stmts': Not a plain node + // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a plain node + ]; + } + + protected function initializeInsertionMap(): void { + if (isset($this->insertionMap)) { + return; + } + + // TODO: "yield" where both key and value are inserted doesn't work + // [$find, $beforeToken, $extraLeft, $extraRight] + $this->insertionMap = [ + 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], + 'ArrayItem->key' => [null, false, null, ' => '], + 'Expr_ArrowFunction->returnType' => [')', 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_Catch->var' => [null, false, ' ', null], + 'Stmt_ClassMethod->returnType' => [')', false, ': ', null], + 'Stmt_ClassConst->type' => [\T_CONST, false, ' ', null], + 'Stmt_Class->extends' => [null, false, ' extends ', null], + 'Stmt_Enum->scalarType' => [null, false, ' : ', null], + 'Stmt_EnumCase->expr' => [null, false, ' = ', null], + 'Expr_PrintableNewAnonClass->extends' => [null, false, ' extends ', 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, ' '], + 'PropertyItem->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 + // 'Stmt_Class->name': Unclear + // 'Stmt_Declare->stmts': Not a proper node + // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a proper node + ]; + } + + protected function initializeListInsertionMap(): void { + if (isset($this->listInsertionMap)) { + return; + } + + $this->listInsertionMap = [ + // special + //'Expr_ShellExec->parts' => '', // TODO These need to be treated more carefully + //'Scalar_InterpolatedString->parts' => '', + Stmt\Catch_::class . '->types' => '|', + UnionType::class . '->types' => '|', + IntersectionType::class . '->types' => '&', + Stmt\If_::class . '->elseifs' => ' ', + Stmt\TryCatch::class . '->catches' => ' ', + + // comma-separated lists + Expr\Array_::class . '->items' => ', ', + Expr\ArrowFunction::class . '->params' => ', ', + Expr\Closure::class . '->params' => ', ', + Expr\Closure::class . '->uses' => ', ', + Expr\FuncCall::class . '->args' => ', ', + Expr\Isset_::class . '->vars' => ', ', + Expr\List_::class . '->items' => ', ', + Expr\MethodCall::class . '->args' => ', ', + Expr\NullsafeMethodCall::class . '->args' => ', ', + Expr\New_::class . '->args' => ', ', + PrintableNewAnonClassNode::class . '->args' => ', ', + Expr\StaticCall::class . '->args' => ', ', + Stmt\ClassConst::class . '->consts' => ', ', + Stmt\ClassMethod::class . '->params' => ', ', + Stmt\Class_::class . '->implements' => ', ', + Stmt\Enum_::class . '->implements' => ', ', + PrintableNewAnonClassNode::class . '->implements' => ', ', + Stmt\Const_::class . '->consts' => ', ', + Stmt\Declare_::class . '->declares' => ', ', + Stmt\Echo_::class . '->exprs' => ', ', + Stmt\For_::class . '->init' => ', ', + Stmt\For_::class . '->cond' => ', ', + Stmt\For_::class . '->loop' => ', ', + Stmt\Function_::class . '->params' => ', ', + Stmt\Global_::class . '->vars' => ', ', + Stmt\GroupUse::class . '->uses' => ', ', + Stmt\Interface_::class . '->extends' => ', ', + Expr\Match_::class . '->arms' => ', ', + Stmt\Property::class . '->props' => ', ', + Stmt\StaticVar::class . '->vars' => ', ', + Stmt\TraitUse::class . '->traits' => ', ', + Stmt\TraitUseAdaptation\Precedence::class . '->insteadof' => ', ', + Stmt\Unset_::class . '->vars' => ', ', + Stmt\UseUse::class . '->uses' => ', ', + MatchArm::class . '->conds' => ', ', + AttributeGroup::class . '->attrs' => ', ', + PropertyHook::class . '->params' => ', ', + + // statement lists + Expr\Closure::class . '->stmts' => "\n", + Stmt\Case_::class . '->stmts' => "\n", + Stmt\Catch_::class . '->stmts' => "\n", + Stmt\Class_::class . '->stmts' => "\n", + Stmt\Enum_::class . '->stmts' => "\n", + PrintableNewAnonClassNode::class . '->stmts' => "\n", + Stmt\Interface_::class . '->stmts' => "\n", + Stmt\Trait_::class . '->stmts' => "\n", + Stmt\ClassMethod::class . '->stmts' => "\n", + Stmt\Declare_::class . '->stmts' => "\n", + Stmt\Do_::class . '->stmts' => "\n", + Stmt\ElseIf_::class . '->stmts' => "\n", + Stmt\Else_::class . '->stmts' => "\n", + Stmt\Finally_::class . '->stmts' => "\n", + Stmt\Foreach_::class . '->stmts' => "\n", + Stmt\For_::class . '->stmts' => "\n", + Stmt\Function_::class . '->stmts' => "\n", + Stmt\If_::class . '->stmts' => "\n", + Stmt\Namespace_::class . '->stmts' => "\n", + Stmt\Block::class . '->stmts' => "\n", + + // Attribute groups + Stmt\Class_::class . '->attrGroups' => "\n", + Stmt\Enum_::class . '->attrGroups' => "\n", + Stmt\EnumCase::class . '->attrGroups' => "\n", + Stmt\Interface_::class . '->attrGroups' => "\n", + Stmt\Trait_::class . '->attrGroups' => "\n", + Stmt\Function_::class . '->attrGroups' => "\n", + Stmt\ClassMethod::class . '->attrGroups' => "\n", + Stmt\ClassConst::class . '->attrGroups' => "\n", + Stmt\Property::class . '->attrGroups' => "\n", + PrintableNewAnonClassNode::class . '->attrGroups' => ' ', + Expr\Closure::class . '->attrGroups' => ' ', + Expr\ArrowFunction::class . '->attrGroups' => ' ', + Param::class . '->attrGroups' => ' ', + PropertyHook::class . '->attrGroups' => ' ', + + Stmt\Switch_::class . '->cases' => "\n", + Stmt\TraitUse::class . '->adaptations' => "\n", + Stmt\TryCatch::class . '->stmts' => "\n", + Stmt\While_::class . '->stmts' => "\n", + PropertyHook::class . '->body' => "\n", + Stmt\Property::class . '->hooks' => "\n", + Param::class . '->hooks' => "\n", + + // dummy for top-level context + 'File->stmts' => "\n", + ]; + } + + protected function initializeEmptyListInsertionMap(): void { + if (isset($this->emptyListInsertionMap)) { + return; + } + + // TODO Insertion into empty statement lists. + + // [$find, $extraLeft, $extraRight] + $this->emptyListInsertionMap = [ + Expr\ArrowFunction::class . '->params' => ['(', '', ''], + Expr\Closure::class . '->uses' => [')', ' use (', ')'], + Expr\Closure::class . '->params' => ['(', '', ''], + Expr\FuncCall::class . '->args' => ['(', '', ''], + Expr\MethodCall::class . '->args' => ['(', '', ''], + Expr\NullsafeMethodCall::class . '->args' => ['(', '', ''], + Expr\New_::class . '->args' => ['(', '', ''], + PrintableNewAnonClassNode::class . '->args' => ['(', '', ''], + PrintableNewAnonClassNode::class . '->implements' => [null, ' implements ', ''], + Expr\StaticCall::class . '->args' => ['(', '', ''], + Stmt\Class_::class . '->implements' => [null, ' implements ', ''], + Stmt\Enum_::class . '->implements' => [null, ' implements ', ''], + Stmt\ClassMethod::class . '->params' => ['(', '', ''], + Stmt\Interface_::class . '->extends' => [null, ' extends ', ''], + Stmt\Function_::class . '->params' => ['(', '', ''], + Stmt\Interface_::class . '->attrGroups' => [null, '', "\n"], + Stmt\Class_::class . '->attrGroups' => [null, '', "\n"], + Stmt\ClassConst::class . '->attrGroups' => [null, '', "\n"], + Stmt\ClassMethod::class . '->attrGroups' => [null, '', "\n"], + Stmt\Function_::class . '->attrGroups' => [null, '', "\n"], + Stmt\Property::class . '->attrGroups' => [null, '', "\n"], + Stmt\Trait_::class . '->attrGroups' => [null, '', "\n"], + Expr\ArrowFunction::class . '->attrGroups' => [null, '', ' '], + Expr\Closure::class . '->attrGroups' => [null, '', ' '], + Stmt\Const_::class . '->attrGroups' => [null, '', "\n"], + PrintableNewAnonClassNode::class . '->attrGroups' => [\T_NEW, ' ', ''], + + /* These cannot be empty to start with: + * Expr_Isset->vars + * Stmt_Catch->types + * Stmt_Const->consts + * Stmt_ClassConst->consts + * Stmt_Declare->declares + * Stmt_Echo->exprs + * Stmt_Global->vars + * Stmt_GroupUse->uses + * Stmt_Property->props + * Stmt_StaticVar->vars + * Stmt_TraitUse->traits + * Stmt_TraitUseAdaptation_Precedence->insteadof + * Stmt_Unset->vars + * Stmt_Use->uses + * UnionType->types + */ + + /* TODO + * Stmt_If->elseifs + * Stmt_TryCatch->catches + * Expr_Array->items + * Expr_List->items + * Stmt_For->init + * Stmt_For->cond + * Stmt_For->loop + */ + ]; + } + + protected function initializeModifierChangeMap(): void { + if (isset($this->modifierChangeMap)) { + return; + } + + $this->modifierChangeMap = [ + Stmt\ClassConst::class . '->flags' => ['pModifiers', \T_WHITESPACE, \T_CONST], + Stmt\ClassMethod::class . '->flags' => ['pModifiers', \T_WHITESPACE, \T_FUNCTION], + Stmt\Class_::class . '->flags' => ['pModifiers', \T_WHITESPACE, \T_CLASS], + Stmt\Property::class . '->flags' => ['pModifiers', \T_WHITESPACE, \T_VARIABLE], + PrintableNewAnonClassNode::class . '->flags' => ['pModifiers', \T_NEW, \T_CLASS], + Param::class . '->flags' => ['pModifiers', \T_WHITESPACE, \T_VARIABLE], + PropertyHook::class . '->flags' => ['pModifiers', \T_WHITESPACE, \T_STRING], + Expr\Closure::class . '->static' => ['pStatic', \T_WHITESPACE, \T_FUNCTION], + Expr\ArrowFunction::class . '->static' => ['pStatic', \T_WHITESPACE, \T_FN], + //Stmt\TraitUseAdaptation\Alias::class . '->newModifier' => 0, // TODO + ]; + + // List of integer subnodes that are not modifiers: + // Expr_Include->type + // Stmt_GroupUse->type + // Stmt_Use->type + // UseItem->type + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Token.php b/vendor/nikic/php-parser/lib/PhpParser/Token.php new file mode 100644 index 0000000..6683310 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Token.php @@ -0,0 +1,18 @@ +pos + \strlen($this->text); + } + + /** Get 1-based end line number of the token. */ + public function getEndLine(): int { + return $this->line + \substr_count($this->text, "\n"); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php b/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php new file mode 100644 index 0000000..ced038d --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php @@ -0,0 +1,71 @@ +registerCustomFixers([ + new \PharIo\CSFixer\PhpdocSingleLineVarFixer() + ]) + ->setRiskyAllowed(true) + ->setRules( + [ + 'PharIo/phpdoc_single_line_var_fixer' => true, + + 'align_multiline_comment' => true, + 'array_indentation' => true, + 'array_syntax' => ['syntax' => 'short'], + 'binary_operator_spaces' => [ + 'operators' => [ + '=' => 'align', + '=>' => 'align', + ], + ], + 'blank_line_after_namespace' => true, + 'blank_line_after_opening_tag' => false, + 'blank_line_before_statement' => [ + 'statements' => [ + 'break', + 'continue', + 'declare', + 'do', + 'for', + 'foreach', + 'if', + 'include', + 'include_once', + 'require', + 'require_once', + 'return', + 'switch', + 'throw', + 'try', + 'while', + 'yield', + ], + ], + 'braces' => [ + 'allow_single_line_closure' => false, + 'position_after_anonymous_constructs' => 'same', + 'position_after_control_structures' => 'same', + 'position_after_functions_and_oop_constructs' => 'same' + ], + 'cast_spaces' => ['space' => 'none'], + + // This fixer removes the blank line at class start, no way to disable that, so we disable the fixer :( + //'class_attributes_separation' => ['elements' => ['const', 'method', 'property']], + + 'combine_consecutive_issets' => true, + 'combine_consecutive_unsets' => true, + 'compact_nullable_typehint' => true, + 'concat_space' => ['spacing' => 'one'], + 'date_time_immutable' => true, + 'declare_equal_normalize' => ['space' => 'single'], + 'declare_strict_types' => true, + 'dir_constant' => true, + 'elseif' => true, + 'encoding' => true, + 'full_opening_tag' => true, + 'fully_qualified_strict_types' => true, + 'function_declaration' => [ + 'closure_function_spacing' => 'one' + ], + 'global_namespace_import' => [ + 'import_classes' => true, + 'import_constants' => true, + 'import_functions' => true, + ], + 'header_comment' => ['header' => $header, 'separate' => 'none'], + 'indentation_type' => true, + 'is_null' => true, + 'line_ending' => true, + 'list_syntax' => ['syntax' => 'short'], + 'logical_operators' => true, + 'lowercase_cast' => true, + 'constant_case' => ['case' => 'lower'], + 'lowercase_keywords' => true, + 'lowercase_static_reference' => true, + 'magic_constant_casing' => true, + 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], + 'modernize_types_casting' => true, + 'multiline_comment_opening_closing' => true, + 'multiline_whitespace_before_semicolons' => true, + 'new_with_braces' => false, + 'no_alias_functions' => true, + 'no_alternative_syntax' => true, + 'no_blank_lines_after_class_opening' => false, + 'no_blank_lines_after_phpdoc' => true, + 'no_blank_lines_before_namespace' => true, + 'no_closing_tag' => true, + 'no_empty_comment' => true, + 'no_empty_phpdoc' => true, + 'no_empty_statement' => true, + 'no_extra_blank_lines' => true, + 'no_homoglyph_names' => true, + 'no_leading_import_slash' => true, + 'no_leading_namespace_whitespace' => true, + 'no_mixed_echo_print' => ['use' => 'print'], + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_null_property_initialization' => true, + 'no_php4_constructor' => true, + 'no_short_bool_cast' => true, + 'echo_tag_syntax' => ['format' => 'long'], + 'no_singleline_whitespace_before_semicolons' => true, + 'no_spaces_after_function_name' => true, + 'no_spaces_inside_parenthesis' => true, + 'no_superfluous_elseif' => true, + 'no_superfluous_phpdoc_tags' => true, + 'no_trailing_comma_in_list_call' => true, + 'no_trailing_comma_in_singleline_array' => true, + 'no_trailing_whitespace' => true, + 'no_trailing_whitespace_in_comment' => true, + 'no_unneeded_control_parentheses' => false, + 'no_unneeded_curly_braces' => false, + 'no_unneeded_final_method' => true, + 'no_unreachable_default_argument_value' => true, + 'no_unset_on_property' => true, + 'no_unused_imports' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'non_printable_character' => true, + 'normalize_index_brace' => true, + 'object_operator_without_whitespace' => true, + 'ordered_class_elements' => [ + 'order' => [ + 'use_trait', + 'constant_public', + 'constant_protected', + 'constant_private', + 'property_public_static', + 'property_protected_static', + 'property_private_static', + 'property_public', + 'property_protected', + 'property_private', + 'method_public_static', + 'construct', + 'destruct', + 'magic', + 'phpunit', + 'method_public', + 'method_protected', + 'method_private', + 'method_protected_static', + 'method_private_static', + ], + ], + 'ordered_imports' => [ + 'imports_order' => [ + PhpCsFixer\Fixer\Import\OrderedImportsFixer::IMPORT_TYPE_CLASS, + PhpCsFixer\Fixer\Import\OrderedImportsFixer::IMPORT_TYPE_CONST, + PhpCsFixer\Fixer\Import\OrderedImportsFixer::IMPORT_TYPE_FUNCTION, + ] + ], + 'phpdoc_add_missing_param_annotation' => true, + 'phpdoc_align' => true, + 'phpdoc_annotation_without_dot' => true, + 'phpdoc_indent' => true, + 'phpdoc_no_access' => true, + 'phpdoc_no_empty_return' => true, + 'phpdoc_no_package' => true, + 'phpdoc_order' => true, + 'phpdoc_return_self_reference' => true, + 'phpdoc_scalar' => true, + 'phpdoc_separation' => true, + 'phpdoc_single_line_var_spacing' => true, + 'phpdoc_to_comment' => true, + 'phpdoc_trim' => true, + 'phpdoc_trim_consecutive_blank_line_separation' => true, + 'phpdoc_types' => ['groups' => ['simple', 'meta']], + 'phpdoc_types_order' => true, + 'phpdoc_to_return_type' => true, + 'phpdoc_var_without_name' => true, + 'pow_to_exponentiation' => true, + 'protected_to_private' => true, + 'return_assignment' => true, + 'return_type_declaration' => ['space_before' => 'none'], + 'self_accessor' => false, + 'semicolon_after_instruction' => true, + 'set_type_to_cast' => true, + 'short_scalar_cast' => true, + 'simplified_null_return' => true, + 'single_blank_line_at_eof' => true, + 'single_import_per_statement' => true, + 'single_line_after_imports' => true, + 'single_quote' => true, + 'standardize_not_equals' => true, + 'ternary_to_null_coalescing' => true, + 'trailing_comma_in_multiline' => false, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'visibility_required' => [ + 'elements' => [ + 'const', + 'method', + 'property', + ], + ], + 'void_return' => true, + 'whitespace_after_comma_in_array' => true, + 'yoda_style' => false + ] + ) + ->setFinder( + PhpCsFixer\Finder::create() + ->files() + ->in(__DIR__ . '/build') + ->in(__DIR__ . '/src') + ->in(__DIR__ . '/tests') + ->notName('autoload.php') + ); diff --git a/vendor/phar-io/manifest/CHANGELOG.md b/vendor/phar-io/manifest/CHANGELOG.md new file mode 100644 index 0000000..f363b16 --- /dev/null +++ b/vendor/phar-io/manifest/CHANGELOG.md @@ -0,0 +1,45 @@ +# Changelog + +All notable changes to phar-io/manifest are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. + +## [2.0.4] - 03-03-2024 + +### Changed + +- Make `EMail` an optional attribute for author +- Stick with PHP 7.2 compatibilty +- Do not use implict nullable type (thanks @sebastianbergmann), this should make things work on PHP 8.4 + +## [2.0.3] - 20.07.2021 + +- Fixed PHP 7.2 / PHP 7.3 incompatibility introduced in previous release + +## [2.0.2] - 20.07.2021 + +- Fixed PHP 8.1 deprecation notice + +## [2.0.1] - 27.06.2020 + +This release now supports the use of PHP 7.2+ and ^8.0 + +## [2.0.0] - 10.05.2020 + +This release now requires PHP 7.2+ + +### Changed + +- Upgraded to phar-io/version 3.0 + - Version strings `v1.2.3` will now be converted to valid semantic version strings `1.2.3` + - Abreviated strings like `1.0` will get expaneded to `1.0.0` + +### Unreleased + +[Unreleased]: https://github.com/phar-io/manifest/compare/2.1.0...HEAD +[2.1.0]: https://github.com/phar-io/manifest/compare/2.0.3...2.1.0 +[2.0.3]: https://github.com/phar-io/manifest/compare/2.0.2...2.0.3 +[2.0.2]: https://github.com/phar-io/manifest/compare/2.0.1...2.0.2 +[2.0.1]: https://github.com/phar-io/manifest/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/phar-io/manifest/compare/1.0.1...2.0.0 +[1.0.3]: https://github.com/phar-io/manifest/compare/1.0.2...1.0.3 +[1.0.2]: https://github.com/phar-io/manifest/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/phar-io/manifest/compare/1.0.0...1.0.1 diff --git a/vendor/phar-io/manifest/LICENSE b/vendor/phar-io/manifest/LICENSE new file mode 100644 index 0000000..64690cf --- /dev/null +++ b/vendor/phar-io/manifest/LICENSE @@ -0,0 +1,31 @@ +Phar.io - Manifest + +Copyright (c) 2016-2019 Arne Blankerts , Sebastian Heuer , Sebastian Bergmann , and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of Arne Blankerts nor the names of contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + diff --git a/vendor/phar-io/manifest/README.md b/vendor/phar-io/manifest/README.md new file mode 100644 index 0000000..fae2c9a --- /dev/null +++ b/vendor/phar-io/manifest/README.md @@ -0,0 +1,178 @@ +# Manifest + +Component for reading [phar.io](https://phar.io/) manifest information from a [PHP Archive (PHAR)](http://php.net/phar). + +## Installation + +You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): + + composer require phar-io/manifest + +If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: + + composer require --dev phar-io/manifest + +## Usage Examples + +### Read from `manifest.xml` +```php +use PharIo\Manifest\ManifestLoader; +use PharIo\Manifest\ManifestSerializer; + +$manifest = ManifestLoader::fromFile('manifest.xml'); + +var_dump($manifest); + +echo (new ManifestSerializer)->serializeToString($manifest); +``` + +
+ Output + +```shell +object(PharIo\Manifest\Manifest)#14 (6) { + ["name":"PharIo\Manifest\Manifest":private]=> + object(PharIo\Manifest\ApplicationName)#10 (1) { + ["name":"PharIo\Manifest\ApplicationName":private]=> + string(12) "some/library" + } + ["version":"PharIo\Manifest\Manifest":private]=> + object(PharIo\Version\Version)#12 (5) { + ["originalVersionString":"PharIo\Version\Version":private]=> + string(5) "1.0.0" + ["major":"PharIo\Version\Version":private]=> + object(PharIo\Version\VersionNumber)#13 (1) { + ["value":"PharIo\Version\VersionNumber":private]=> + int(1) + } + ["minor":"PharIo\Version\Version":private]=> + object(PharIo\Version\VersionNumber)#23 (1) { + ["value":"PharIo\Version\VersionNumber":private]=> + int(0) + } + ["patch":"PharIo\Version\Version":private]=> + object(PharIo\Version\VersionNumber)#22 (1) { + ["value":"PharIo\Version\VersionNumber":private]=> + int(0) + } + ["preReleaseSuffix":"PharIo\Version\Version":private]=> + NULL + } + ["type":"PharIo\Manifest\Manifest":private]=> + object(PharIo\Manifest\Library)#6 (0) { + } + ["copyrightInformation":"PharIo\Manifest\Manifest":private]=> + object(PharIo\Manifest\CopyrightInformation)#19 (2) { + ["authors":"PharIo\Manifest\CopyrightInformation":private]=> + object(PharIo\Manifest\AuthorCollection)#9 (1) { + ["authors":"PharIo\Manifest\AuthorCollection":private]=> + array(1) { + [0]=> + object(PharIo\Manifest\Author)#15 (2) { + ["name":"PharIo\Manifest\Author":private]=> + string(13) "Reiner Zufall" + ["email":"PharIo\Manifest\Author":private]=> + object(PharIo\Manifest\Email)#16 (1) { + ["email":"PharIo\Manifest\Email":private]=> + string(16) "reiner@zufall.de" + } + } + } + } + ["license":"PharIo\Manifest\CopyrightInformation":private]=> + object(PharIo\Manifest\License)#11 (2) { + ["name":"PharIo\Manifest\License":private]=> + string(12) "BSD-3-Clause" + ["url":"PharIo\Manifest\License":private]=> + object(PharIo\Manifest\Url)#18 (1) { + ["url":"PharIo\Manifest\Url":private]=> + string(26) "https://domain.tld/LICENSE" + } + } + } + ["requirements":"PharIo\Manifest\Manifest":private]=> + object(PharIo\Manifest\RequirementCollection)#17 (1) { + ["requirements":"PharIo\Manifest\RequirementCollection":private]=> + array(1) { + [0]=> + object(PharIo\Manifest\PhpVersionRequirement)#20 (1) { + ["versionConstraint":"PharIo\Manifest\PhpVersionRequirement":private]=> + object(PharIo\Version\SpecificMajorAndMinorVersionConstraint)#24 (3) { + ["originalValue":"PharIo\Version\AbstractVersionConstraint":private]=> + string(3) "7.0" + ["major":"PharIo\Version\SpecificMajorAndMinorVersionConstraint":private]=> + int(7) + ["minor":"PharIo\Version\SpecificMajorAndMinorVersionConstraint":private]=> + int(0) + } + } + } + } + ["bundledComponents":"PharIo\Manifest\Manifest":private]=> + object(PharIo\Manifest\BundledComponentCollection)#8 (1) { + ["bundledComponents":"PharIo\Manifest\BundledComponentCollection":private]=> + array(0) { + } + } +} + + + + + + + + + + + +``` +
+ +### Create via API +```php +$bundled = new \PharIo\Manifest\BundledComponentCollection(); +$bundled->add( + new \PharIo\Manifest\BundledComponent('vendor/packageA', new \PharIo\Version\Version('1.2.3-dev') + ) +); + +$manifest = new PharIo\Manifest\Manifest( + new \PharIo\Manifest\ApplicationName('vendor/package'), + new \PharIo\Version\Version('1.0.0'), + new \PharIo\Manifest\Library(), + new \PharIo\Manifest\CopyrightInformation( + new \PharIo\Manifest\AuthorCollection(), + new \PharIo\Manifest\License( + 'BSD-3-Clause', + new \PharIo\Manifest\Url('https://spdx.org/licenses/BSD-3-Clause.html') + ) + ), + new \PharIo\Manifest\RequirementCollection(), + $bundled +); + +echo (new ManifestSerializer)->serializeToString($manifest); +``` + +
+ Output + +```xml + + + + + + + + + + + + + +``` + +
+ diff --git a/vendor/phar-io/manifest/composer.json b/vendor/phar-io/manifest/composer.json new file mode 100644 index 0000000..dc5fa45 --- /dev/null +++ b/vendor/phar-io/manifest/composer.json @@ -0,0 +1,43 @@ +{ + "name": "phar-io/manifest", + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "support": { + "issues": "https://github.com/phar-io/manifest/issues" + }, + "require": { + "php": "^7.2 || ^8.0", + "ext-dom": "*", + "ext-phar": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1" + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + } +} diff --git a/vendor/phar-io/manifest/composer.lock b/vendor/phar-io/manifest/composer.lock new file mode 100644 index 0000000..fe18e08 --- /dev/null +++ b/vendor/phar-io/manifest/composer.lock @@ -0,0 +1,76 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "279b3c4fe44357abd924fdcc0cfa5664", + "packages": [ + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": "^7.2 || ^8.0", + "ext-dom": "*", + "ext-phar": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*" + }, + "platform-dev": [], + "plugin-api-version": "2.3.0" +} diff --git a/vendor/phar-io/manifest/manifest.xsd b/vendor/phar-io/manifest/manifest.xsd new file mode 100644 index 0000000..63e3f1c --- /dev/null +++ b/vendor/phar-io/manifest/manifest.xsd @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/phar-io/manifest/src/ManifestDocumentMapper.php b/vendor/phar-io/manifest/src/ManifestDocumentMapper.php new file mode 100644 index 0000000..3da6403 --- /dev/null +++ b/vendor/phar-io/manifest/src/ManifestDocumentMapper.php @@ -0,0 +1,151 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use PharIo\Version\Exception as VersionException; +use PharIo\Version\Version; +use PharIo\Version\VersionConstraintParser; +use Throwable; +use function sprintf; + +class ManifestDocumentMapper { + public function map(ManifestDocument $document): Manifest { + try { + $contains = $document->getContainsElement(); + $type = $this->mapType($contains); + $copyright = $this->mapCopyright($document->getCopyrightElement()); + $requirements = $this->mapRequirements($document->getRequiresElement()); + $bundledComponents = $this->mapBundledComponents($document); + + return new Manifest( + new ApplicationName($contains->getName()), + new Version($contains->getVersion()), + $type, + $copyright, + $requirements, + $bundledComponents + ); + } catch (Throwable $e) { + throw new ManifestDocumentMapperException($e->getMessage(), (int)$e->getCode(), $e); + } + } + + private function mapType(ContainsElement $contains): Type { + switch ($contains->getType()) { + case 'application': + return Type::application(); + case 'library': + return Type::library(); + case 'extension': + return $this->mapExtension($contains->getExtensionElement()); + } + + throw new ManifestDocumentMapperException( + sprintf('Unsupported type %s', $contains->getType()) + ); + } + + private function mapCopyright(CopyrightElement $copyright): CopyrightInformation { + $authors = new AuthorCollection(); + + foreach ($copyright->getAuthorElements() as $authorElement) { + $authors->add( + new Author( + $authorElement->getName(), + $authorElement->hasEMail() ? new Email($authorElement->getEmail()) : null + ) + ); + } + + $licenseElement = $copyright->getLicenseElement(); + $license = new License( + $licenseElement->getType(), + new Url($licenseElement->getUrl()) + ); + + return new CopyrightInformation( + $authors, + $license + ); + } + + private function mapRequirements(RequiresElement $requires): RequirementCollection { + $collection = new RequirementCollection(); + $phpElement = $requires->getPHPElement(); + $parser = new VersionConstraintParser; + + try { + $versionConstraint = $parser->parse($phpElement->getVersion()); + } catch (VersionException $e) { + throw new ManifestDocumentMapperException( + sprintf('Unsupported version constraint - %s', $e->getMessage()), + (int)$e->getCode(), + $e + ); + } + + $collection->add( + new PhpVersionRequirement( + $versionConstraint + ) + ); + + if (!$phpElement->hasExtElements()) { + return $collection; + } + + foreach ($phpElement->getExtElements() as $extElement) { + $collection->add( + new PhpExtensionRequirement($extElement->getName()) + ); + } + + return $collection; + } + + private function mapBundledComponents(ManifestDocument $document): BundledComponentCollection { + $collection = new BundledComponentCollection(); + + if (!$document->hasBundlesElement()) { + return $collection; + } + + foreach ($document->getBundlesElement()->getComponentElements() as $componentElement) { + $collection->add( + new BundledComponent( + $componentElement->getName(), + new Version( + $componentElement->getVersion() + ) + ) + ); + } + + return $collection; + } + + private function mapExtension(ExtensionElement $extension): Extension { + try { + $versionConstraint = (new VersionConstraintParser)->parse($extension->getCompatible()); + + return Type::extension( + new ApplicationName($extension->getFor()), + $versionConstraint + ); + } catch (VersionException $e) { + throw new ManifestDocumentMapperException( + sprintf('Unsupported version constraint - %s', $e->getMessage()), + (int)$e->getCode(), + $e + ); + } + } +} diff --git a/vendor/phar-io/manifest/src/ManifestLoader.php b/vendor/phar-io/manifest/src/ManifestLoader.php new file mode 100644 index 0000000..f467d2d --- /dev/null +++ b/vendor/phar-io/manifest/src/ManifestLoader.php @@ -0,0 +1,47 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use function sprintf; + +class ManifestLoader { + public static function fromFile(string $filename): Manifest { + try { + return (new ManifestDocumentMapper())->map( + ManifestDocument::fromFile($filename) + ); + } catch (Exception $e) { + throw new ManifestLoaderException( + sprintf('Loading %s failed.', $filename), + (int)$e->getCode(), + $e + ); + } + } + + public static function fromPhar(string $filename): Manifest { + return self::fromFile('phar://' . $filename . '/manifest.xml'); + } + + public static function fromString(string $manifest): Manifest { + try { + return (new ManifestDocumentMapper())->map( + ManifestDocument::fromString($manifest) + ); + } catch (Exception $e) { + throw new ManifestLoaderException( + 'Processing string failed', + (int)$e->getCode(), + $e + ); + } + } +} diff --git a/vendor/phar-io/manifest/src/ManifestSerializer.php b/vendor/phar-io/manifest/src/ManifestSerializer.php new file mode 100644 index 0000000..48b8efd --- /dev/null +++ b/vendor/phar-io/manifest/src/ManifestSerializer.php @@ -0,0 +1,172 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use PharIo\Version\AnyVersionConstraint; +use PharIo\Version\Version; +use PharIo\Version\VersionConstraint; +use XMLWriter; +use function count; +use function file_put_contents; +use function str_repeat; + +/** @psalm-suppress MissingConstructor */ +class ManifestSerializer { + /** @var XMLWriter */ + private $xmlWriter; + + public function serializeToFile(Manifest $manifest, string $filename): void { + file_put_contents( + $filename, + $this->serializeToString($manifest) + ); + } + + public function serializeToString(Manifest $manifest): string { + $this->startDocument(); + + $this->addContains($manifest->getName(), $manifest->getVersion(), $manifest->getType()); + $this->addCopyright($manifest->getCopyrightInformation()); + $this->addRequirements($manifest->getRequirements()); + $this->addBundles($manifest->getBundledComponents()); + + return $this->finishDocument(); + } + + private function startDocument(): void { + $xmlWriter = new XMLWriter(); + $xmlWriter->openMemory(); + $xmlWriter->setIndent(true); + $xmlWriter->setIndentString(str_repeat(' ', 4)); + $xmlWriter->startDocument('1.0', 'UTF-8'); + $xmlWriter->startElement('phar'); + $xmlWriter->writeAttribute('xmlns', 'https://phar.io/xml/manifest/1.0'); + + $this->xmlWriter = $xmlWriter; + } + + private function finishDocument(): string { + $this->xmlWriter->endElement(); + $this->xmlWriter->endDocument(); + + return $this->xmlWriter->outputMemory(); + } + + private function addContains(ApplicationName $name, Version $version, Type $type): void { + $this->xmlWriter->startElement('contains'); + $this->xmlWriter->writeAttribute('name', $name->asString()); + $this->xmlWriter->writeAttribute('version', $version->getVersionString()); + + switch (true) { + case $type->isApplication(): { + $this->xmlWriter->writeAttribute('type', 'application'); + + break; + } + + case $type->isLibrary(): { + $this->xmlWriter->writeAttribute('type', 'library'); + + break; + } + + case $type->isExtension(): { + $this->xmlWriter->writeAttribute('type', 'extension'); + /* @var $type Extension */ + $this->addExtension( + $type->getApplicationName(), + $type->getVersionConstraint() + ); + + break; + } + + default: { + $this->xmlWriter->writeAttribute('type', 'custom'); + } + } + + $this->xmlWriter->endElement(); + } + + private function addCopyright(CopyrightInformation $copyrightInformation): void { + $this->xmlWriter->startElement('copyright'); + + foreach ($copyrightInformation->getAuthors() as $author) { + $this->xmlWriter->startElement('author'); + $this->xmlWriter->writeAttribute('name', $author->getName()); + $this->xmlWriter->writeAttribute('email', $author->getEmail()->asString()); + $this->xmlWriter->endElement(); + } + + $license = $copyrightInformation->getLicense(); + + $this->xmlWriter->startElement('license'); + $this->xmlWriter->writeAttribute('type', $license->getName()); + $this->xmlWriter->writeAttribute('url', $license->getUrl()->asString()); + $this->xmlWriter->endElement(); + + $this->xmlWriter->endElement(); + } + + private function addRequirements(RequirementCollection $requirementCollection): void { + $phpRequirement = new AnyVersionConstraint(); + $extensions = []; + + foreach ($requirementCollection as $requirement) { + if ($requirement instanceof PhpVersionRequirement) { + $phpRequirement = $requirement->getVersionConstraint(); + + continue; + } + + if ($requirement instanceof PhpExtensionRequirement) { + $extensions[] = $requirement->asString(); + } + } + + $this->xmlWriter->startElement('requires'); + $this->xmlWriter->startElement('php'); + $this->xmlWriter->writeAttribute('version', $phpRequirement->asString()); + + foreach ($extensions as $extension) { + $this->xmlWriter->startElement('ext'); + $this->xmlWriter->writeAttribute('name', $extension); + $this->xmlWriter->endElement(); + } + + $this->xmlWriter->endElement(); + $this->xmlWriter->endElement(); + } + + private function addBundles(BundledComponentCollection $bundledComponentCollection): void { + if (count($bundledComponentCollection) === 0) { + return; + } + $this->xmlWriter->startElement('bundles'); + + foreach ($bundledComponentCollection as $bundledComponent) { + $this->xmlWriter->startElement('component'); + $this->xmlWriter->writeAttribute('name', $bundledComponent->getName()); + $this->xmlWriter->writeAttribute('version', $bundledComponent->getVersion()->getVersionString()); + $this->xmlWriter->endElement(); + } + + $this->xmlWriter->endElement(); + } + + private function addExtension(ApplicationName $applicationName, VersionConstraint $versionConstraint): void { + $this->xmlWriter->startElement('extension'); + $this->xmlWriter->writeAttribute('for', $applicationName->asString()); + $this->xmlWriter->writeAttribute('compatible', $versionConstraint->asString()); + $this->xmlWriter->endElement(); + } +} diff --git a/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php b/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php new file mode 100644 index 0000000..7528afc --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php @@ -0,0 +1,16 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use InvalidArgumentException; + +class ElementCollectionException extends InvalidArgumentException implements Exception { +} diff --git a/vendor/phar-io/manifest/src/exceptions/Exception.php b/vendor/phar-io/manifest/src/exceptions/Exception.php new file mode 100644 index 0000000..0c135d3 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/Exception.php @@ -0,0 +1,16 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use Throwable; + +interface Exception extends Throwable { +} diff --git a/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php b/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php new file mode 100644 index 0000000..ecfe514 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php @@ -0,0 +1,17 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use InvalidArgumentException; + +class InvalidApplicationNameException extends InvalidArgumentException implements Exception { + public const InvalidFormat = 2; +} diff --git a/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php b/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php new file mode 100644 index 0000000..2424055 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php @@ -0,0 +1,16 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use InvalidArgumentException; + +class InvalidEmailException extends InvalidArgumentException implements Exception { +} diff --git a/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php b/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php new file mode 100644 index 0000000..c8b192b --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php @@ -0,0 +1,16 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use InvalidArgumentException; + +class InvalidUrlException extends InvalidArgumentException implements Exception { +} diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php new file mode 100644 index 0000000..0a158e6 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php @@ -0,0 +1,16 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use RuntimeException; + +class ManifestDocumentException extends RuntimeException implements Exception { +} diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php new file mode 100644 index 0000000..816af12 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php @@ -0,0 +1,47 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use LibXMLError; +use function sprintf; + +class ManifestDocumentLoadingException extends \Exception implements Exception { + /** @var LibXMLError[] */ + private $libxmlErrors; + + /** + * ManifestDocumentLoadingException constructor. + * + * @param LibXMLError[] $libxmlErrors + */ + public function __construct(array $libxmlErrors) { + $this->libxmlErrors = $libxmlErrors; + $first = $this->libxmlErrors[0]; + + parent::__construct( + sprintf( + '%s (Line: %d / Column: %d / File: %s)', + $first->message, + $first->line, + $first->column, + $first->file + ), + $first->code + ); + } + + /** + * @return LibXMLError[] + */ + public function getLibxmlErrors(): array { + return $this->libxmlErrors; + } +} diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php new file mode 100644 index 0000000..0d1a5f5 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php @@ -0,0 +1,16 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use RuntimeException; + +class ManifestDocumentMapperException extends RuntimeException implements Exception { +} diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestElementException.php b/vendor/phar-io/manifest/src/exceptions/ManifestElementException.php new file mode 100644 index 0000000..46f82e3 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/ManifestElementException.php @@ -0,0 +1,16 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use RuntimeException; + +class ManifestElementException extends RuntimeException implements Exception { +} diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php b/vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php new file mode 100644 index 0000000..d00ed19 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php @@ -0,0 +1,14 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class ManifestLoaderException extends \Exception implements Exception { +} diff --git a/vendor/phar-io/manifest/src/exceptions/NoEmailAddressException.php b/vendor/phar-io/manifest/src/exceptions/NoEmailAddressException.php new file mode 100644 index 0000000..2791312 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/NoEmailAddressException.php @@ -0,0 +1,16 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use InvalidArgumentException; + +class NoEmailAddressException extends InvalidArgumentException implements Exception { +} diff --git a/vendor/phar-io/manifest/src/values/Application.php b/vendor/phar-io/manifest/src/values/Application.php new file mode 100644 index 0000000..11a44d9 --- /dev/null +++ b/vendor/phar-io/manifest/src/values/Application.php @@ -0,0 +1,17 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class Application extends Type { + public function isApplication(): bool { + return true; + } +} diff --git a/vendor/phar-io/manifest/src/values/ApplicationName.php b/vendor/phar-io/manifest/src/values/ApplicationName.php new file mode 100644 index 0000000..1a0ad1e --- /dev/null +++ b/vendor/phar-io/manifest/src/values/ApplicationName.php @@ -0,0 +1,41 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use function preg_match; +use function sprintf; + +class ApplicationName { + /** @var string */ + private $name; + + public function __construct(string $name) { + $this->ensureValidFormat($name); + $this->name = $name; + } + + public function asString(): string { + return $this->name; + } + + public function isEqual(ApplicationName $name): bool { + return $this->name === $name->name; + } + + private function ensureValidFormat(string $name): void { + if (!preg_match('#\w/\w#', $name)) { + throw new InvalidApplicationNameException( + sprintf('Format of name "%s" is not valid - expected: vendor/packagename', $name), + InvalidApplicationNameException::InvalidFormat + ); + } + } +} diff --git a/vendor/phar-io/manifest/src/values/Author.php b/vendor/phar-io/manifest/src/values/Author.php new file mode 100644 index 0000000..7b243aa --- /dev/null +++ b/vendor/phar-io/manifest/src/values/Author.php @@ -0,0 +1,57 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use function sprintf; + +class Author { + /** @var string */ + private $name; + + /** @var null|Email */ + private $email; + + public function __construct(string $name, ?Email $email = null) { + $this->name = $name; + $this->email = $email; + } + + public function asString(): string { + if (!$this->hasEmail()) { + return $this->name; + } + + return sprintf( + '%s <%s>', + $this->name, + $this->email->asString() + ); + } + + public function getName(): string { + return $this->name; + } + + /** + * @psalm-assert-if-true Email $this->email + */ + public function hasEmail(): bool { + return $this->email !== null; + } + + public function getEmail(): Email { + if (!$this->hasEmail()) { + throw new NoEmailAddressException(); + } + + return $this->email; + } +} diff --git a/vendor/phar-io/manifest/src/values/AuthorCollection.php b/vendor/phar-io/manifest/src/values/AuthorCollection.php new file mode 100644 index 0000000..549876d --- /dev/null +++ b/vendor/phar-io/manifest/src/values/AuthorCollection.php @@ -0,0 +1,40 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use Countable; +use IteratorAggregate; +use function count; + +/** @template-implements IteratorAggregate */ +class AuthorCollection implements Countable, IteratorAggregate { + /** @var Author[] */ + private $authors = []; + + public function add(Author $author): void { + $this->authors[] = $author; + } + + /** + * @return Author[] + */ + public function getAuthors(): array { + return $this->authors; + } + + public function count(): int { + return count($this->authors); + } + + public function getIterator(): AuthorCollectionIterator { + return new AuthorCollectionIterator($this); + } +} diff --git a/vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php b/vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php new file mode 100644 index 0000000..36fee9f --- /dev/null +++ b/vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php @@ -0,0 +1,47 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use Iterator; +use function count; + +/** @template-implements Iterator */ +class AuthorCollectionIterator implements Iterator { + /** @var Author[] */ + private $authors; + + /** @var int */ + private $position = 0; + + public function __construct(AuthorCollection $authors) { + $this->authors = $authors->getAuthors(); + } + + public function rewind(): void { + $this->position = 0; + } + + public function valid(): bool { + return $this->position < count($this->authors); + } + + public function key(): int { + return $this->position; + } + + public function current(): Author { + return $this->authors[$this->position]; + } + + public function next(): void { + $this->position++; + } +} diff --git a/vendor/phar-io/manifest/src/values/BundledComponent.php b/vendor/phar-io/manifest/src/values/BundledComponent.php new file mode 100644 index 0000000..5817036 --- /dev/null +++ b/vendor/phar-io/manifest/src/values/BundledComponent.php @@ -0,0 +1,34 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use PharIo\Version\Version; + +class BundledComponent { + /** @var string */ + private $name; + + /** @var Version */ + private $version; + + public function __construct(string $name, Version $version) { + $this->name = $name; + $this->version = $version; + } + + public function getName(): string { + return $this->name; + } + + public function getVersion(): Version { + return $this->version; + } +} diff --git a/vendor/phar-io/manifest/src/values/BundledComponentCollection.php b/vendor/phar-io/manifest/src/values/BundledComponentCollection.php new file mode 100644 index 0000000..28aaa06 --- /dev/null +++ b/vendor/phar-io/manifest/src/values/BundledComponentCollection.php @@ -0,0 +1,40 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use Countable; +use IteratorAggregate; +use function count; + +/** @template-implements IteratorAggregate */ +class BundledComponentCollection implements Countable, IteratorAggregate { + /** @var BundledComponent[] */ + private $bundledComponents = []; + + public function add(BundledComponent $bundledComponent): void { + $this->bundledComponents[] = $bundledComponent; + } + + /** + * @return BundledComponent[] + */ + public function getBundledComponents(): array { + return $this->bundledComponents; + } + + public function count(): int { + return count($this->bundledComponents); + } + + public function getIterator(): BundledComponentCollectionIterator { + return new BundledComponentCollectionIterator($this); + } +} diff --git a/vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php b/vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php new file mode 100644 index 0000000..5c72817 --- /dev/null +++ b/vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php @@ -0,0 +1,47 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use Iterator; +use function count; + +/** @template-implements Iterator */ +class BundledComponentCollectionIterator implements Iterator { + /** @var BundledComponent[] */ + private $bundledComponents; + + /** @var int */ + private $position = 0; + + public function __construct(BundledComponentCollection $bundledComponents) { + $this->bundledComponents = $bundledComponents->getBundledComponents(); + } + + public function rewind(): void { + $this->position = 0; + } + + public function valid(): bool { + return $this->position < count($this->bundledComponents); + } + + public function key(): int { + return $this->position; + } + + public function current(): BundledComponent { + return $this->bundledComponents[$this->position]; + } + + public function next(): void { + $this->position++; + } +} diff --git a/vendor/phar-io/manifest/src/values/CopyrightInformation.php b/vendor/phar-io/manifest/src/values/CopyrightInformation.php new file mode 100644 index 0000000..b4468ed --- /dev/null +++ b/vendor/phar-io/manifest/src/values/CopyrightInformation.php @@ -0,0 +1,32 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class CopyrightInformation { + /** @var AuthorCollection */ + private $authors; + + /** @var License */ + private $license; + + public function __construct(AuthorCollection $authors, License $license) { + $this->authors = $authors; + $this->license = $license; + } + + public function getAuthors(): AuthorCollection { + return $this->authors; + } + + public function getLicense(): License { + return $this->license; + } +} diff --git a/vendor/phar-io/manifest/src/values/Email.php b/vendor/phar-io/manifest/src/values/Email.php new file mode 100644 index 0000000..dbaff84 --- /dev/null +++ b/vendor/phar-io/manifest/src/values/Email.php @@ -0,0 +1,35 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use const FILTER_VALIDATE_EMAIL; +use function filter_var; + +class Email { + /** @var string */ + private $email; + + public function __construct(string $email) { + $this->ensureEmailIsValid($email); + + $this->email = $email; + } + + public function asString(): string { + return $this->email; + } + + private function ensureEmailIsValid(string $url): void { + if (filter_var($url, FILTER_VALIDATE_EMAIL) === false) { + throw new InvalidEmailException; + } + } +} diff --git a/vendor/phar-io/manifest/src/values/Extension.php b/vendor/phar-io/manifest/src/values/Extension.php new file mode 100644 index 0000000..abcd2f8 --- /dev/null +++ b/vendor/phar-io/manifest/src/values/Extension.php @@ -0,0 +1,47 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use PharIo\Version\Version; +use PharIo\Version\VersionConstraint; + +class Extension extends Type { + /** @var ApplicationName */ + private $application; + + /** @var VersionConstraint */ + private $versionConstraint; + + public function __construct(ApplicationName $application, VersionConstraint $versionConstraint) { + $this->application = $application; + $this->versionConstraint = $versionConstraint; + } + + public function getApplicationName(): ApplicationName { + return $this->application; + } + + public function getVersionConstraint(): VersionConstraint { + return $this->versionConstraint; + } + + public function isExtension(): bool { + return true; + } + + public function isExtensionFor(ApplicationName $name): bool { + return $this->application->isEqual($name); + } + + public function isCompatibleWith(ApplicationName $name, Version $version): bool { + return $this->isExtensionFor($name) && $this->versionConstraint->complies($version); + } +} diff --git a/vendor/phar-io/manifest/src/values/Library.php b/vendor/phar-io/manifest/src/values/Library.php new file mode 100644 index 0000000..97c292d --- /dev/null +++ b/vendor/phar-io/manifest/src/values/Library.php @@ -0,0 +1,17 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class Library extends Type { + public function isLibrary(): bool { + return true; + } +} diff --git a/vendor/phar-io/manifest/src/values/License.php b/vendor/phar-io/manifest/src/values/License.php new file mode 100644 index 0000000..c2d9429 --- /dev/null +++ b/vendor/phar-io/manifest/src/values/License.php @@ -0,0 +1,32 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class License { + /** @var string */ + private $name; + + /** @var Url */ + private $url; + + public function __construct(string $name, Url $url) { + $this->name = $name; + $this->url = $url; + } + + public function getName(): string { + return $this->name; + } + + public function getUrl(): Url { + return $this->url; + } +} diff --git a/vendor/phar-io/manifest/src/values/Manifest.php b/vendor/phar-io/manifest/src/values/Manifest.php new file mode 100644 index 0000000..3646682 --- /dev/null +++ b/vendor/phar-io/manifest/src/values/Manifest.php @@ -0,0 +1,93 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use PharIo\Version\Version; + +class Manifest { + /** @var ApplicationName */ + private $name; + + /** @var Version */ + private $version; + + /** @var Type */ + private $type; + + /** @var CopyrightInformation */ + private $copyrightInformation; + + /** @var RequirementCollection */ + private $requirements; + + /** @var BundledComponentCollection */ + private $bundledComponents; + + public function __construct(ApplicationName $name, Version $version, Type $type, CopyrightInformation $copyrightInformation, RequirementCollection $requirements, BundledComponentCollection $bundledComponents) { + $this->name = $name; + $this->version = $version; + $this->type = $type; + $this->copyrightInformation = $copyrightInformation; + $this->requirements = $requirements; + $this->bundledComponents = $bundledComponents; + } + + public function getName(): ApplicationName { + return $this->name; + } + + public function getVersion(): Version { + return $this->version; + } + + public function getType(): Type { + return $this->type; + } + + public function getCopyrightInformation(): CopyrightInformation { + return $this->copyrightInformation; + } + + public function getRequirements(): RequirementCollection { + return $this->requirements; + } + + public function getBundledComponents(): BundledComponentCollection { + return $this->bundledComponents; + } + + public function isApplication(): bool { + return $this->type->isApplication(); + } + + public function isLibrary(): bool { + return $this->type->isLibrary(); + } + + public function isExtension(): bool { + return $this->type->isExtension(); + } + + public function isExtensionFor(ApplicationName $application, ?Version $version = null): bool { + if (!$this->isExtension()) { + return false; + } + + /** @var Extension $type */ + $type = $this->type; + + if ($version !== null) { + return $type->isCompatibleWith($application, $version); + } + + return $type->isExtensionFor($application); + } +} diff --git a/vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php b/vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php new file mode 100644 index 0000000..f81bd25 --- /dev/null +++ b/vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php @@ -0,0 +1,24 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class PhpExtensionRequirement implements Requirement { + /** @var string */ + private $extension; + + public function __construct(string $extension) { + $this->extension = $extension; + } + + public function asString(): string { + return $this->extension; + } +} diff --git a/vendor/phar-io/manifest/src/values/PhpVersionRequirement.php b/vendor/phar-io/manifest/src/values/PhpVersionRequirement.php new file mode 100644 index 0000000..fb30c3b --- /dev/null +++ b/vendor/phar-io/manifest/src/values/PhpVersionRequirement.php @@ -0,0 +1,26 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use PharIo\Version\VersionConstraint; + +class PhpVersionRequirement implements Requirement { + /** @var VersionConstraint */ + private $versionConstraint; + + public function __construct(VersionConstraint $versionConstraint) { + $this->versionConstraint = $versionConstraint; + } + + public function getVersionConstraint(): VersionConstraint { + return $this->versionConstraint; + } +} diff --git a/vendor/phar-io/manifest/src/values/Requirement.php b/vendor/phar-io/manifest/src/values/Requirement.php new file mode 100644 index 0000000..d4b4640 --- /dev/null +++ b/vendor/phar-io/manifest/src/values/Requirement.php @@ -0,0 +1,14 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +interface Requirement { +} diff --git a/vendor/phar-io/manifest/src/values/RequirementCollection.php b/vendor/phar-io/manifest/src/values/RequirementCollection.php new file mode 100644 index 0000000..e4fe2a1 --- /dev/null +++ b/vendor/phar-io/manifest/src/values/RequirementCollection.php @@ -0,0 +1,40 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use Countable; +use IteratorAggregate; +use function count; + +/** @template-implements IteratorAggregate */ +class RequirementCollection implements Countable, IteratorAggregate { + /** @var Requirement[] */ + private $requirements = []; + + public function add(Requirement $requirement): void { + $this->requirements[] = $requirement; + } + + /** + * @return Requirement[] + */ + public function getRequirements(): array { + return $this->requirements; + } + + public function count(): int { + return count($this->requirements); + } + + public function getIterator(): RequirementCollectionIterator { + return new RequirementCollectionIterator($this); + } +} diff --git a/vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php b/vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php new file mode 100644 index 0000000..a587468 --- /dev/null +++ b/vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php @@ -0,0 +1,47 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use Iterator; +use function count; + +/** @template-implements Iterator */ +class RequirementCollectionIterator implements Iterator { + /** @var Requirement[] */ + private $requirements; + + /** @var int */ + private $position = 0; + + public function __construct(RequirementCollection $requirements) { + $this->requirements = $requirements->getRequirements(); + } + + public function rewind(): void { + $this->position = 0; + } + + public function valid(): bool { + return $this->position < count($this->requirements); + } + + public function key(): int { + return $this->position; + } + + public function current(): Requirement { + return $this->requirements[$this->position]; + } + + public function next(): void { + $this->position++; + } +} diff --git a/vendor/phar-io/manifest/src/values/Type.php b/vendor/phar-io/manifest/src/values/Type.php new file mode 100644 index 0000000..231e7fd --- /dev/null +++ b/vendor/phar-io/manifest/src/values/Type.php @@ -0,0 +1,42 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use PharIo\Version\VersionConstraint; + +abstract class Type { + public static function application(): Application { + return new Application; + } + + public static function library(): Library { + return new Library; + } + + public static function extension(ApplicationName $application, VersionConstraint $versionConstraint): Extension { + return new Extension($application, $versionConstraint); + } + + /** @psalm-assert-if-true Application $this */ + public function isApplication(): bool { + return false; + } + + /** @psalm-assert-if-true Library $this */ + public function isLibrary(): bool { + return false; + } + + /** @psalm-assert-if-true Extension $this */ + public function isExtension(): bool { + return false; + } +} diff --git a/vendor/phar-io/manifest/src/values/Url.php b/vendor/phar-io/manifest/src/values/Url.php new file mode 100644 index 0000000..9806155 --- /dev/null +++ b/vendor/phar-io/manifest/src/values/Url.php @@ -0,0 +1,38 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use const FILTER_VALIDATE_URL; +use function filter_var; + +class Url { + /** @var string */ + private $url; + + public function __construct(string $url) { + $this->ensureUrlIsValid($url); + + $this->url = $url; + } + + public function asString(): string { + return $this->url; + } + + /** + * @throws InvalidUrlException + */ + private function ensureUrlIsValid(string $url): void { + if (filter_var($url, FILTER_VALIDATE_URL) === false) { + throw new InvalidUrlException; + } + } +} diff --git a/vendor/phar-io/manifest/src/xml/AuthorElement.php b/vendor/phar-io/manifest/src/xml/AuthorElement.php new file mode 100644 index 0000000..b33eb3c --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/AuthorElement.php @@ -0,0 +1,25 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class AuthorElement extends ManifestElement { + public function getName(): string { + return $this->getAttributeValue('name'); + } + + public function getEmail(): string { + return $this->getAttributeValue('email'); + } + + public function hasEMail(): bool { + return $this->hasAttribute('email'); + } +} diff --git a/vendor/phar-io/manifest/src/xml/AuthorElementCollection.php b/vendor/phar-io/manifest/src/xml/AuthorElementCollection.php new file mode 100644 index 0000000..0a2a2a3 --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/AuthorElementCollection.php @@ -0,0 +1,19 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class AuthorElementCollection extends ElementCollection { + public function current(): AuthorElement { + return new AuthorElement( + $this->getCurrentElement() + ); + } +} diff --git a/vendor/phar-io/manifest/src/xml/BundlesElement.php b/vendor/phar-io/manifest/src/xml/BundlesElement.php new file mode 100644 index 0000000..ef721a6 --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/BundlesElement.php @@ -0,0 +1,19 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class BundlesElement extends ManifestElement { + public function getComponentElements(): ComponentElementCollection { + return new ComponentElementCollection( + $this->getChildrenByName('component') + ); + } +} diff --git a/vendor/phar-io/manifest/src/xml/ComponentElement.php b/vendor/phar-io/manifest/src/xml/ComponentElement.php new file mode 100644 index 0000000..84373c4 --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/ComponentElement.php @@ -0,0 +1,21 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class ComponentElement extends ManifestElement { + public function getName(): string { + return $this->getAttributeValue('name'); + } + + public function getVersion(): string { + return $this->getAttributeValue('version'); + } +} diff --git a/vendor/phar-io/manifest/src/xml/ComponentElementCollection.php b/vendor/phar-io/manifest/src/xml/ComponentElementCollection.php new file mode 100644 index 0000000..cd9ad5d --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/ComponentElementCollection.php @@ -0,0 +1,19 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class ComponentElementCollection extends ElementCollection { + public function current(): ComponentElement { + return new ComponentElement( + $this->getCurrentElement() + ); + } +} diff --git a/vendor/phar-io/manifest/src/xml/ContainsElement.php b/vendor/phar-io/manifest/src/xml/ContainsElement.php new file mode 100644 index 0000000..55a9c60 --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/ContainsElement.php @@ -0,0 +1,31 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class ContainsElement extends ManifestElement { + public function getName(): string { + return $this->getAttributeValue('name'); + } + + public function getVersion(): string { + return $this->getAttributeValue('version'); + } + + public function getType(): string { + return $this->getAttributeValue('type'); + } + + public function getExtensionElement(): ExtensionElement { + return new ExtensionElement( + $this->getChildByName('extension') + ); + } +} diff --git a/vendor/phar-io/manifest/src/xml/CopyrightElement.php b/vendor/phar-io/manifest/src/xml/CopyrightElement.php new file mode 100644 index 0000000..c11415a --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/CopyrightElement.php @@ -0,0 +1,25 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class CopyrightElement extends ManifestElement { + public function getAuthorElements(): AuthorElementCollection { + return new AuthorElementCollection( + $this->getChildrenByName('author') + ); + } + + public function getLicenseElement(): LicenseElement { + return new LicenseElement( + $this->getChildByName('license') + ); + } +} diff --git a/vendor/phar-io/manifest/src/xml/ElementCollection.php b/vendor/phar-io/manifest/src/xml/ElementCollection.php new file mode 100644 index 0000000..9e1de56 --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/ElementCollection.php @@ -0,0 +1,68 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use DOMElement; +use DOMNodeList; +use Iterator; +use ReturnTypeWillChange; +use function count; +use function get_class; +use function sprintf; + +/** @template-implements Iterator */ +abstract class ElementCollection implements Iterator { + /** @var DOMElement[] */ + private $nodes = []; + + /** @var int */ + private $position; + + public function __construct(DOMNodeList $nodeList) { + $this->position = 0; + $this->importNodes($nodeList); + } + + #[ReturnTypeWillChange] + abstract public function current(); + + public function next(): void { + $this->position++; + } + + public function key(): int { + return $this->position; + } + + public function valid(): bool { + return $this->position < count($this->nodes); + } + + public function rewind(): void { + $this->position = 0; + } + + protected function getCurrentElement(): DOMElement { + return $this->nodes[$this->position]; + } + + private function importNodes(DOMNodeList $nodeList): void { + foreach ($nodeList as $node) { + if (!$node instanceof DOMElement) { + throw new ElementCollectionException( + sprintf('\DOMElement expected, got \%s', get_class($node)) + ); + } + + $this->nodes[] = $node; + } + } +} diff --git a/vendor/phar-io/manifest/src/xml/ExtElement.php b/vendor/phar-io/manifest/src/xml/ExtElement.php new file mode 100644 index 0000000..6a88a05 --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/ExtElement.php @@ -0,0 +1,17 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class ExtElement extends ManifestElement { + public function getName(): string { + return $this->getAttributeValue('name'); + } +} diff --git a/vendor/phar-io/manifest/src/xml/ExtElementCollection.php b/vendor/phar-io/manifest/src/xml/ExtElementCollection.php new file mode 100644 index 0000000..3eec946 --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/ExtElementCollection.php @@ -0,0 +1,19 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class ExtElementCollection extends ElementCollection { + public function current(): ExtElement { + return new ExtElement( + $this->getCurrentElement() + ); + } +} diff --git a/vendor/phar-io/manifest/src/xml/ExtensionElement.php b/vendor/phar-io/manifest/src/xml/ExtensionElement.php new file mode 100644 index 0000000..22016a0 --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/ExtensionElement.php @@ -0,0 +1,21 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class ExtensionElement extends ManifestElement { + public function getFor(): string { + return $this->getAttributeValue('for'); + } + + public function getCompatible(): string { + return $this->getAttributeValue('compatible'); + } +} diff --git a/vendor/phar-io/manifest/src/xml/LicenseElement.php b/vendor/phar-io/manifest/src/xml/LicenseElement.php new file mode 100644 index 0000000..d9f4cb2 --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/LicenseElement.php @@ -0,0 +1,21 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class LicenseElement extends ManifestElement { + public function getType(): string { + return $this->getAttributeValue('type'); + } + + public function getUrl(): string { + return $this->getAttributeValue('url'); + } +} diff --git a/vendor/phar-io/manifest/src/xml/ManifestDocument.php b/vendor/phar-io/manifest/src/xml/ManifestDocument.php new file mode 100644 index 0000000..8745868 --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/ManifestDocument.php @@ -0,0 +1,115 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use DOMDocument; +use DOMElement; +use Throwable; +use function count; +use function file_get_contents; +use function is_file; +use function libxml_clear_errors; +use function libxml_get_errors; +use function libxml_use_internal_errors; +use function sprintf; + +class ManifestDocument { + public const XMLNS = 'https://phar.io/xml/manifest/1.0'; + + /** @var DOMDocument */ + private $dom; + + public static function fromFile(string $filename): ManifestDocument { + if (!is_file($filename)) { + throw new ManifestDocumentException( + sprintf('File "%s" not found', $filename) + ); + } + + return self::fromString( + file_get_contents($filename) + ); + } + + public static function fromString(string $xmlString): ManifestDocument { + $prev = libxml_use_internal_errors(true); + libxml_clear_errors(); + + try { + $dom = new DOMDocument(); + $dom->loadXML($xmlString); + $errors = libxml_get_errors(); + libxml_use_internal_errors($prev); + } catch (Throwable $t) { + throw new ManifestDocumentException($t->getMessage(), 0, $t); + } + + if (count($errors) !== 0) { + throw new ManifestDocumentLoadingException($errors); + } + + return new self($dom); + } + + private function __construct(DOMDocument $dom) { + $this->ensureCorrectDocumentType($dom); + + $this->dom = $dom; + } + + public function getContainsElement(): ContainsElement { + return new ContainsElement( + $this->fetchElementByName('contains') + ); + } + + public function getCopyrightElement(): CopyrightElement { + return new CopyrightElement( + $this->fetchElementByName('copyright') + ); + } + + public function getRequiresElement(): RequiresElement { + return new RequiresElement( + $this->fetchElementByName('requires') + ); + } + + public function hasBundlesElement(): bool { + return $this->dom->getElementsByTagNameNS(self::XMLNS, 'bundles')->length === 1; + } + + public function getBundlesElement(): BundlesElement { + return new BundlesElement( + $this->fetchElementByName('bundles') + ); + } + + private function ensureCorrectDocumentType(DOMDocument $dom): void { + $root = $dom->documentElement; + + if ($root->localName !== 'phar' || $root->namespaceURI !== self::XMLNS) { + throw new ManifestDocumentException('Not a phar.io manifest document'); + } + } + + private function fetchElementByName(string $elementName): DOMElement { + $element = $this->dom->getElementsByTagNameNS(self::XMLNS, $elementName)->item(0); + + if (!$element instanceof DOMElement) { + throw new ManifestDocumentException( + sprintf('Element %s missing', $elementName) + ); + } + + return $element; + } +} diff --git a/vendor/phar-io/manifest/src/xml/ManifestElement.php b/vendor/phar-io/manifest/src/xml/ManifestElement.php new file mode 100644 index 0000000..461ba0c --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/ManifestElement.php @@ -0,0 +1,72 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +use DOMElement; +use DOMNodeList; +use function sprintf; + +class ManifestElement { + public const XMLNS = 'https://phar.io/xml/manifest/1.0'; + + /** @var DOMElement */ + private $element; + + public function __construct(DOMElement $element) { + $this->element = $element; + } + + protected function getAttributeValue(string $name): string { + if (!$this->element->hasAttribute($name)) { + throw new ManifestElementException( + sprintf( + 'Attribute %s not set on element %s', + $name, + $this->element->localName + ) + ); + } + + return $this->element->getAttribute($name); + } + + protected function hasAttribute(string $name): bool { + return $this->element->hasAttribute($name); + } + + protected function getChildByName(string $elementName): DOMElement { + $element = $this->element->getElementsByTagNameNS(self::XMLNS, $elementName)->item(0); + + if (!$element instanceof DOMElement) { + throw new ManifestElementException( + sprintf('Element %s missing', $elementName) + ); + } + + return $element; + } + + protected function getChildrenByName(string $elementName): DOMNodeList { + $elementList = $this->element->getElementsByTagNameNS(self::XMLNS, $elementName); + + if ($elementList->length === 0) { + throw new ManifestElementException( + sprintf('Element(s) %s missing', $elementName) + ); + } + + return $elementList; + } + + protected function hasChild(string $elementName): bool { + return $this->element->getElementsByTagNameNS(self::XMLNS, $elementName)->length !== 0; + } +} diff --git a/vendor/phar-io/manifest/src/xml/PhpElement.php b/vendor/phar-io/manifest/src/xml/PhpElement.php new file mode 100644 index 0000000..9340c2e --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/PhpElement.php @@ -0,0 +1,27 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class PhpElement extends ManifestElement { + public function getVersion(): string { + return $this->getAttributeValue('version'); + } + + public function hasExtElements(): bool { + return $this->hasChild('ext'); + } + + public function getExtElements(): ExtElementCollection { + return new ExtElementCollection( + $this->getChildrenByName('ext') + ); + } +} diff --git a/vendor/phar-io/manifest/src/xml/RequiresElement.php b/vendor/phar-io/manifest/src/xml/RequiresElement.php new file mode 100644 index 0000000..73ba54c --- /dev/null +++ b/vendor/phar-io/manifest/src/xml/RequiresElement.php @@ -0,0 +1,19 @@ +, Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ +namespace PharIo\Manifest; + +class RequiresElement extends ManifestElement { + public function getPHPElement(): PhpElement { + return new PhpElement( + $this->getChildByName('php') + ); + } +} diff --git a/vendor/phar-io/manifest/tools/php-cs-fixer.d/PhpdocSingleLineVarFixer.php b/vendor/phar-io/manifest/tools/php-cs-fixer.d/PhpdocSingleLineVarFixer.php new file mode 100644 index 0000000..ea5414e --- /dev/null +++ b/vendor/phar-io/manifest/tools/php-cs-fixer.d/PhpdocSingleLineVarFixer.php @@ -0,0 +1,72 @@ +isTokenKindFound(T_DOC_COMMENT); + } + + public function isRisky(): bool { + return false; + } + + public function fix(\SplFileInfo $file, Tokens $tokens): void { + foreach($tokens as $index => $token) { + if (!$token->isGivenKind(T_DOC_COMMENT)) { + continue; + } + if (\stripos($token->getContent(), '@var') === false) { + continue; + } + + if (preg_match('#^/\*\*[\s\*]+(@var[^\r\n]+)[\s\*]*\*\/$#u', $token->getContent(), $matches) !== 1) { + continue; + } + $newContent = '/** ' . \rtrim($matches[1]) . ' */'; + if ($newContent === $token->getContent()) { + continue; + } + $tokens[$index] = new Token([T_DOC_COMMENT, $newContent]); + } + } + + public function getPriority(): int { + return 0; + } + + public function getName(): string { + return 'PharIo/phpdoc_single_line_var_fixer'; + } + + public function supports(\SplFileInfo $file): bool { + return true; + } + +} diff --git a/vendor/phar-io/manifest/tools/php-cs-fixer.d/header.txt b/vendor/phar-io/manifest/tools/php-cs-fixer.d/header.txt new file mode 100644 index 0000000..dc8c4ff --- /dev/null +++ b/vendor/phar-io/manifest/tools/php-cs-fixer.d/header.txt @@ -0,0 +1,6 @@ +This file is part of PharIo\Manifest. + +Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors + +For the full copyright and license information, please view the LICENSE +file that was distributed with this source code. diff --git a/vendor/phar-io/version/CHANGELOG.md b/vendor/phar-io/version/CHANGELOG.md new file mode 100644 index 0000000..4c0edfa --- /dev/null +++ b/vendor/phar-io/version/CHANGELOG.md @@ -0,0 +1,142 @@ +# Changelog + +All notable changes to phar-io/version are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. + +## [3.2.1] - 2022-02-21 + +### Fixed + +- Have ExactVersionConstraint honor build metadata (added in 3.2.0) + + +## [3.2.0] - 2022-02-21 + +### Added + +- Build metadata is now supported and considered for equality checks only + + +## [3.1.1] - 2022-02-07 + +### Fixed + +- [#28](https://github.com/phar-io/version/issues/28): `VersionConstraintParser` does not support logical OR represented by single pipe (|) (Thanks @llaville) + + +## [3.1.0] - 2021-02-23 + +### Changed + +- Internal Refactoring +- More scalar types + +### Added + +- [#24](https://github.com/phar-io/version/issues/24): `Version::getOriginalString()` added (Thanks @addshore) +- Version constraints using the caret operator (`^`) now honor pre-1.0 releases, e.g. `^0.3` translates to `0.3.*`) +- Various integration tests for version constraint processing + +### Fixed + +- [#23](https://github.com/phar-io/version/pull/23): Tilde operator without patch level + + + +## [3.0.4] - 14.12.2020 + +### Fixed + +- [#22](https://github.com/phar-io/version/pull/22): make dev suffix rank works for uppercase too + +## [3.0.3] - 30.11.2020 + +### Added + +- Comparator method `Version::equals()` added + + +## [3.0.2] - 27.06.2020 + +This release now supports PHP 7.2+ and PHP ^8.0. No other changes included. + + +## [3.0.1] - 09.05.2020 + +__Potential BC Break Notice:__ +`Version::getVersionString()` no longer returns `v` prefixes in case the "input" +string contained one. These are not part of the semver specs +(see https://semver.org/#is-v123-a-semantic-version) and get stripped out. +As of Version 3.1.0 `Version::getOriginalString()` can be used to still +retrieve it as given. + +### Changed + +- Internal Refactoring +- More scalar types + +### Fixed + +- Fixed Constraint processing Regression for ^1.2 and ~1.2 + + +## [3.0.0] - 05.05.2020 + +### Changed + +- Require PHP 7.2+ +- All code now uses strict mode +- Scalar types have been added as needed + +### Added + +- The technically invalid format using 'v' prefix ("v1.2.3") is now properly supported + + +## [2.0.1] - 08.07.2018 + +### Fixed + +- Versions without a pre-release suffix are now always considered greater +than versions with a pre-release suffix. Example: `3.0.0 > 3.0.0-alpha.1` + + +## [2.0.0] - 23.06.2018 + +Changes to public API: + +- `PreReleaseSuffix::construct()`: optional parameter `$number` removed +- `PreReleaseSuffix::isGreaterThan()`: introduced +- `Version::hasPreReleaseSuffix()`: introduced + +### Added + +- [#11](https://github.com/phar-io/version/issues/11): Added support for pre-release version suffixes. Supported values are: + - `dev` + - `beta` (also abbreviated form `b`) + - `rc` + - `alpha` (also abbreviated form `a`) + - `patch` (also abbreviated form `p`) + + All values can be followed by a number, e.g. `beta3`. + + When comparing versions, the pre-release suffix is taken into account. Example: +`1.5.0 > 1.5.0-beta1 > 1.5.0-alpha3 > 1.5.0-alpha2 > 1.5.0-dev11` + +### Changed + +- reorganized the source directories + +### Fixed + +- [#10](https://github.com/phar-io/version/issues/10): Version numbers containing +a numeric suffix as seen in Debian packages are now supported. + + +[3.1.0]: https://github.com/phar-io/version/compare/3.0.4...3.1.0 +[3.0.4]: https://github.com/phar-io/version/compare/3.0.3...3.0.4 +[3.0.3]: https://github.com/phar-io/version/compare/3.0.2...3.0.3 +[3.0.2]: https://github.com/phar-io/version/compare/3.0.1...3.0.2 +[3.0.1]: https://github.com/phar-io/version/compare/3.0.0...3.0.1 +[3.0.0]: https://github.com/phar-io/version/compare/2.0.1...3.0.0 +[2.0.1]: https://github.com/phar-io/version/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/phar-io/version/compare/1.0.1...2.0.0 diff --git a/vendor/phar-io/version/LICENSE b/vendor/phar-io/version/LICENSE new file mode 100644 index 0000000..ce32758 --- /dev/null +++ b/vendor/phar-io/version/LICENSE @@ -0,0 +1,29 @@ +Copyright (c) 2016-2017 Arne Blankerts , Sebastian Heuer and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + diff --git a/vendor/phar-io/version/README.md b/vendor/phar-io/version/README.md new file mode 100644 index 0000000..76e6e98 --- /dev/null +++ b/vendor/phar-io/version/README.md @@ -0,0 +1,61 @@ +# Version + +Library for handling version information and constraints + +[![Build Status](https://travis-ci.org/phar-io/version.svg?branch=master)](https://travis-ci.org/phar-io/version) + +## Installation + +You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): + + composer require phar-io/version + +If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: + + composer require --dev phar-io/version + +## Version constraints + +A Version constraint describes a range of versions or a discrete version number. The format of version numbers follows the schema of [semantic versioning](http://semver.org): `..`. A constraint might contain an operator that describes the range. + +Beside the typical mathematical operators like `<=`, `>=`, there are two special operators: + +*Caret operator*: `^1.0` +can be written as `>=1.0.0 <2.0.0` and read as »every Version within major version `1`«. + +*Tilde operator*: `~1.0.0` +can be written as `>=1.0.0 <1.1.0` and read as »every version within minor version `1.1`. The behavior of tilde operator depends on whether a patch level version is provided or not. If no patch level is provided, tilde operator behaves like the caret operator: `~1.0` is identical to `^1.0`. + +## Usage examples + +Parsing version constraints and check discrete versions for compliance: + +```php + +use PharIo\Version\Version; +use PharIo\Version\VersionConstraintParser; + +$parser = new VersionConstraintParser(); +$caret_constraint = $parser->parse( '^7.0' ); + +$caret_constraint->complies( new Version( '7.0.17' ) ); // true +$caret_constraint->complies( new Version( '7.1.0' ) ); // true +$caret_constraint->complies( new Version( '6.4.34' ) ); // false + +$tilde_constraint = $parser->parse( '~1.1.0' ); + +$tilde_constraint->complies( new Version( '1.1.4' ) ); // true +$tilde_constraint->complies( new Version( '1.2.0' ) ); // false +``` + +As of version 2.0.0, pre-release labels are supported and taken into account when comparing versions: + +```php + +$leftVersion = new PharIo\Version\Version('3.0.0-alpha.1'); +$rightVersion = new PharIo\Version\Version('3.0.0-alpha.2'); + +$leftVersion->isGreaterThan($rightVersion); // false +$rightVersion->isGreaterThan($leftVersion); // true + +``` diff --git a/vendor/phar-io/version/composer.json b/vendor/phar-io/version/composer.json new file mode 100644 index 0000000..22687dc --- /dev/null +++ b/vendor/phar-io/version/composer.json @@ -0,0 +1,34 @@ +{ + "name": "phar-io/version", + "description": "Library for handling version information and constraints", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "support": { + "issues": "https://github.com/phar-io/version/issues" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "autoload": { + "classmap": [ + "src/" + ] + } +} + diff --git a/vendor/phar-io/version/src/BuildMetaData.php b/vendor/phar-io/version/src/BuildMetaData.php new file mode 100644 index 0000000..d42f036 --- /dev/null +++ b/vendor/phar-io/version/src/BuildMetaData.php @@ -0,0 +1,28 @@ +, Sebastian Heuer , Sebastian Bergmann + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Version; + +class BuildMetaData { + + /** @var string */ + private $value; + + public function __construct(string $value) { + $this->value = $value; + } + + public function asString(): string { + return $this->value; + } + + public function equals(BuildMetaData $other): bool { + return $this->asString() === $other->asString(); + } +} diff --git a/vendor/phar-io/version/src/PreReleaseSuffix.php b/vendor/phar-io/version/src/PreReleaseSuffix.php new file mode 100644 index 0000000..0056300 --- /dev/null +++ b/vendor/phar-io/version/src/PreReleaseSuffix.php @@ -0,0 +1,82 @@ + 0, + 'a' => 1, + 'alpha' => 1, + 'b' => 2, + 'beta' => 2, + 'rc' => 3, + 'p' => 4, + 'pl' => 4, + 'patch' => 4, + ]; + + /** @var string */ + private $value; + + /** @var int */ + private $valueScore; + + /** @var int */ + private $number = 0; + + /** @var string */ + private $full; + + /** + * @throws InvalidPreReleaseSuffixException + */ + public function __construct(string $value) { + $this->parseValue($value); + } + + public function asString(): string { + return $this->full; + } + + public function getValue(): string { + return $this->value; + } + + public function getNumber(): ?int { + return $this->number; + } + + public function isGreaterThan(PreReleaseSuffix $suffix): bool { + if ($this->valueScore > $suffix->valueScore) { + return true; + } + + if ($this->valueScore < $suffix->valueScore) { + return false; + } + + return $this->getNumber() > $suffix->getNumber(); + } + + private function mapValueToScore(string $value): int { + $value = \strtolower($value); + + return self::valueScoreMap[$value]; + } + + private function parseValue(string $value): void { + $regex = '/-?((dev|beta|b|rc|alpha|a|patch|p|pl)\.?(\d*)).*$/i'; + + if (\preg_match($regex, $value, $matches) !== 1) { + throw new InvalidPreReleaseSuffixException(\sprintf('Invalid label %s', $value)); + } + + $this->full = $matches[1]; + $this->value = $matches[2]; + + if ($matches[3] !== '') { + $this->number = (int)$matches[3]; + } + + $this->valueScore = $this->mapValueToScore($matches[2]); + } +} diff --git a/vendor/phar-io/version/src/Version.php b/vendor/phar-io/version/src/Version.php new file mode 100644 index 0000000..644af5c --- /dev/null +++ b/vendor/phar-io/version/src/Version.php @@ -0,0 +1,208 @@ +, Sebastian Heuer , Sebastian Bergmann + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Version; + +class Version { + /** @var string */ + private $originalVersionString; + + /** @var VersionNumber */ + private $major; + + /** @var VersionNumber */ + private $minor; + + /** @var VersionNumber */ + private $patch; + + /** @var null|PreReleaseSuffix */ + private $preReleaseSuffix; + + /** @var null|BuildMetaData */ + private $buildMetadata; + + public function __construct(string $versionString) { + $this->ensureVersionStringIsValid($versionString); + $this->originalVersionString = $versionString; + } + + /** + * @throws NoPreReleaseSuffixException + */ + public function getPreReleaseSuffix(): PreReleaseSuffix { + if ($this->preReleaseSuffix === null) { + throw new NoPreReleaseSuffixException('No pre-release suffix set'); + } + + return $this->preReleaseSuffix; + } + + public function getOriginalString(): string { + return $this->originalVersionString; + } + + public function getVersionString(): string { + $str = \sprintf( + '%d.%d.%d', + $this->getMajor()->getValue() ?? 0, + $this->getMinor()->getValue() ?? 0, + $this->getPatch()->getValue() ?? 0 + ); + + if (!$this->hasPreReleaseSuffix()) { + return $str; + } + + return $str . '-' . $this->getPreReleaseSuffix()->asString(); + } + + public function hasPreReleaseSuffix(): bool { + return $this->preReleaseSuffix !== null; + } + + public function equals(Version $other): bool { + if ($this->getVersionString() !== $other->getVersionString()) { + return false; + } + + if ($this->hasBuildMetaData() !== $other->hasBuildMetaData()) { + return false; + } + + if ($this->hasBuildMetaData() && $other->hasBuildMetaData() && + !$this->getBuildMetaData()->equals($other->getBuildMetaData())) { + return false; + } + + return true; + } + + public function isGreaterThan(Version $version): bool { + if ($version->getMajor()->getValue() > $this->getMajor()->getValue()) { + return false; + } + + if ($version->getMajor()->getValue() < $this->getMajor()->getValue()) { + return true; + } + + if ($version->getMinor()->getValue() > $this->getMinor()->getValue()) { + return false; + } + + if ($version->getMinor()->getValue() < $this->getMinor()->getValue()) { + return true; + } + + if ($version->getPatch()->getValue() > $this->getPatch()->getValue()) { + return false; + } + + if ($version->getPatch()->getValue() < $this->getPatch()->getValue()) { + return true; + } + + if (!$version->hasPreReleaseSuffix() && !$this->hasPreReleaseSuffix()) { + return false; + } + + if ($version->hasPreReleaseSuffix() && !$this->hasPreReleaseSuffix()) { + return true; + } + + if (!$version->hasPreReleaseSuffix() && $this->hasPreReleaseSuffix()) { + return false; + } + + return $this->getPreReleaseSuffix()->isGreaterThan($version->getPreReleaseSuffix()); + } + + public function getMajor(): VersionNumber { + return $this->major; + } + + public function getMinor(): VersionNumber { + return $this->minor; + } + + public function getPatch(): VersionNumber { + return $this->patch; + } + + /** + * @psalm-assert-if-true BuildMetaData $this->buildMetadata + * @psalm-assert-if-true BuildMetaData $this->getBuildMetaData() + */ + public function hasBuildMetaData(): bool { + return $this->buildMetadata !== null; + } + + /** + * @throws NoBuildMetaDataException + */ + public function getBuildMetaData(): BuildMetaData { + if (!$this->hasBuildMetaData()) { + throw new NoBuildMetaDataException('No build metadata set'); + } + + return $this->buildMetadata; + } + + /** + * @param string[] $matches + * + * @throws InvalidPreReleaseSuffixException + */ + private function parseVersion(array $matches): void { + $this->major = new VersionNumber((int)$matches['Major']); + $this->minor = new VersionNumber((int)$matches['Minor']); + $this->patch = isset($matches['Patch']) ? new VersionNumber((int)$matches['Patch']) : new VersionNumber(0); + + if (isset($matches['PreReleaseSuffix']) && $matches['PreReleaseSuffix'] !== '') { + $this->preReleaseSuffix = new PreReleaseSuffix($matches['PreReleaseSuffix']); + } + + if (isset($matches['BuildMetadata'])) { + $this->buildMetadata = new BuildMetaData($matches['BuildMetadata']); + } + } + + /** + * @param string $version + * + * @throws InvalidVersionException + */ + private function ensureVersionStringIsValid($version): void { + $regex = '/^v? + (?P0|[1-9]\d*) + \\. + (?P0|[1-9]\d*) + (\\. + (?P0|[1-9]\d*) + )? + (?: + - + (?(?:(dev|beta|b|rc|alpha|a|patch|p|pl)\.?\d*)) + )? + (?: + \\+ + (?P[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-@]+)*) + )? + $/xi'; + + if (\preg_match($regex, $version, $matches) !== 1) { + throw new InvalidVersionException( + \sprintf("Version string '%s' does not follow SemVer semantics", $version) + ); + } + + $this->parseVersion($matches); + } +} diff --git a/vendor/phar-io/version/src/VersionConstraintParser.php b/vendor/phar-io/version/src/VersionConstraintParser.php new file mode 100644 index 0000000..03d6a09 --- /dev/null +++ b/vendor/phar-io/version/src/VersionConstraintParser.php @@ -0,0 +1,115 @@ +, Sebastian Heuer , Sebastian Bergmann + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Version; + +class VersionConstraintParser { + /** + * @throws UnsupportedVersionConstraintException + */ + public function parse(string $value): VersionConstraint { + if (\strpos($value, '|') !== false) { + return $this->handleOrGroup($value); + } + + if (!\preg_match('/^[\^~*]?v?[\d.*]+(?:-.*)?$/i', $value)) { + throw new UnsupportedVersionConstraintException( + \sprintf('Version constraint %s is not supported.', $value) + ); + } + + switch ($value[0]) { + case '~': + return $this->handleTildeOperator($value); + case '^': + return $this->handleCaretOperator($value); + } + + $constraint = new VersionConstraintValue($value); + + if ($constraint->getMajor()->isAny()) { + return new AnyVersionConstraint(); + } + + if ($constraint->getMinor()->isAny()) { + return new SpecificMajorVersionConstraint( + $constraint->getVersionString(), + $constraint->getMajor()->getValue() ?? 0 + ); + } + + if ($constraint->getPatch()->isAny()) { + return new SpecificMajorAndMinorVersionConstraint( + $constraint->getVersionString(), + $constraint->getMajor()->getValue() ?? 0, + $constraint->getMinor()->getValue() ?? 0 + ); + } + + return new ExactVersionConstraint($constraint->getVersionString()); + } + + private function handleOrGroup(string $value): OrVersionConstraintGroup { + $constraints = []; + + foreach (\preg_split('{\s*\|\|?\s*}', \trim($value)) as $groupSegment) { + $constraints[] = $this->parse(\trim($groupSegment)); + } + + return new OrVersionConstraintGroup($value, $constraints); + } + + private function handleTildeOperator(string $value): AndVersionConstraintGroup { + $constraintValue = new VersionConstraintValue(\substr($value, 1)); + + if ($constraintValue->getPatch()->isAny()) { + return $this->handleCaretOperator($value); + } + + $constraints = [ + new GreaterThanOrEqualToVersionConstraint( + $value, + new Version(\substr($value, 1)) + ), + new SpecificMajorAndMinorVersionConstraint( + $value, + $constraintValue->getMajor()->getValue() ?? 0, + $constraintValue->getMinor()->getValue() ?? 0 + ) + ]; + + return new AndVersionConstraintGroup($value, $constraints); + } + + private function handleCaretOperator(string $value): AndVersionConstraintGroup { + $constraintValue = new VersionConstraintValue(\substr($value, 1)); + + $constraints = [ + new GreaterThanOrEqualToVersionConstraint($value, new Version(\substr($value, 1))) + ]; + + if ($constraintValue->getMajor()->getValue() === 0) { + $constraints[] = new SpecificMajorAndMinorVersionConstraint( + $value, + $constraintValue->getMajor()->getValue() ?? 0, + $constraintValue->getMinor()->getValue() ?? 0 + ); + } else { + $constraints[] = new SpecificMajorVersionConstraint( + $value, + $constraintValue->getMajor()->getValue() ?? 0 + ); + } + + return new AndVersionConstraintGroup( + $value, + $constraints + ); + } +} diff --git a/vendor/phar-io/version/src/VersionConstraintValue.php b/vendor/phar-io/version/src/VersionConstraintValue.php new file mode 100644 index 0000000..0762e7c --- /dev/null +++ b/vendor/phar-io/version/src/VersionConstraintValue.php @@ -0,0 +1,88 @@ +versionString = $versionString; + + $this->parseVersion($versionString); + } + + public function getLabel(): string { + return $this->label; + } + + public function getBuildMetaData(): string { + return $this->buildMetaData; + } + + public function getVersionString(): string { + return $this->versionString; + } + + public function getMajor(): VersionNumber { + return $this->major; + } + + public function getMinor(): VersionNumber { + return $this->minor; + } + + public function getPatch(): VersionNumber { + return $this->patch; + } + + private function parseVersion(string $versionString): void { + $this->extractBuildMetaData($versionString); + $this->extractLabel($versionString); + $this->stripPotentialVPrefix($versionString); + + $versionSegments = \explode('.', $versionString); + $this->major = new VersionNumber(\is_numeric($versionSegments[0]) ? (int)$versionSegments[0] : null); + + $minorValue = isset($versionSegments[1]) && \is_numeric($versionSegments[1]) ? (int)$versionSegments[1] : null; + $patchValue = isset($versionSegments[2]) && \is_numeric($versionSegments[2]) ? (int)$versionSegments[2] : null; + + $this->minor = new VersionNumber($minorValue); + $this->patch = new VersionNumber($patchValue); + } + + private function extractBuildMetaData(string &$versionString): void { + if (\preg_match('/\+(.*)/', $versionString, $matches) === 1) { + $this->buildMetaData = $matches[1]; + $versionString = \str_replace($matches[0], '', $versionString); + } + } + + private function extractLabel(string &$versionString): void { + if (\preg_match('/-(.*)/', $versionString, $matches) === 1) { + $this->label = $matches[1]; + $versionString = \str_replace($matches[0], '', $versionString); + } + } + + private function stripPotentialVPrefix(string &$versionString): void { + if ($versionString[0] !== 'v') { + return; + } + $versionString = \substr($versionString, 1); + } +} diff --git a/vendor/phar-io/version/src/VersionNumber.php b/vendor/phar-io/version/src/VersionNumber.php new file mode 100644 index 0000000..4833a9b --- /dev/null +++ b/vendor/phar-io/version/src/VersionNumber.php @@ -0,0 +1,28 @@ +, Sebastian Heuer , Sebastian Bergmann + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Version; + +class VersionNumber { + + /** @var ?int */ + private $value; + + public function __construct(?int $value) { + $this->value = $value; + } + + public function isAny(): bool { + return $this->value === null; + } + + public function getValue(): ?int { + return $this->value; + } +} diff --git a/vendor/phar-io/version/src/constraints/AbstractVersionConstraint.php b/vendor/phar-io/version/src/constraints/AbstractVersionConstraint.php new file mode 100644 index 0000000..66201a1 --- /dev/null +++ b/vendor/phar-io/version/src/constraints/AbstractVersionConstraint.php @@ -0,0 +1,23 @@ +, Sebastian Heuer , Sebastian Bergmann + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Version; + +abstract class AbstractVersionConstraint implements VersionConstraint { + /** @var string */ + private $originalValue; + + public function __construct(string $originalValue) { + $this->originalValue = $originalValue; + } + + public function asString(): string { + return $this->originalValue; + } +} diff --git a/vendor/phar-io/version/src/constraints/AndVersionConstraintGroup.php b/vendor/phar-io/version/src/constraints/AndVersionConstraintGroup.php new file mode 100644 index 0000000..5096f2f --- /dev/null +++ b/vendor/phar-io/version/src/constraints/AndVersionConstraintGroup.php @@ -0,0 +1,34 @@ +, Sebastian Heuer , Sebastian Bergmann + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Version; + +class AndVersionConstraintGroup extends AbstractVersionConstraint { + /** @var VersionConstraint[] */ + private $constraints = []; + + /** + * @param VersionConstraint[] $constraints + */ + public function __construct(string $originalValue, array $constraints) { + parent::__construct($originalValue); + + $this->constraints = $constraints; + } + + public function complies(Version $version): bool { + foreach ($this->constraints as $constraint) { + if (!$constraint->complies($version)) { + return false; + } + } + + return true; + } +} diff --git a/vendor/phar-io/version/src/constraints/AnyVersionConstraint.php b/vendor/phar-io/version/src/constraints/AnyVersionConstraint.php new file mode 100644 index 0000000..1499f07 --- /dev/null +++ b/vendor/phar-io/version/src/constraints/AnyVersionConstraint.php @@ -0,0 +1,20 @@ +, Sebastian Heuer , Sebastian Bergmann + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Version; + +class AnyVersionConstraint implements VersionConstraint { + public function complies(Version $version): bool { + return true; + } + + public function asString(): string { + return '*'; + } +} diff --git a/vendor/phar-io/version/src/constraints/ExactVersionConstraint.php b/vendor/phar-io/version/src/constraints/ExactVersionConstraint.php new file mode 100644 index 0000000..1d675c9 --- /dev/null +++ b/vendor/phar-io/version/src/constraints/ExactVersionConstraint.php @@ -0,0 +1,22 @@ +, Sebastian Heuer , Sebastian Bergmann + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Version; + +class ExactVersionConstraint extends AbstractVersionConstraint { + public function complies(Version $version): bool { + $other = $version->getVersionString(); + + if ($version->hasBuildMetaData()) { + $other .= '+' . $version->getBuildMetaData()->asString(); + } + + return $this->asString() === $other; + } +} diff --git a/vendor/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php b/vendor/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php new file mode 100644 index 0000000..ec37172 --- /dev/null +++ b/vendor/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php @@ -0,0 +1,26 @@ +, Sebastian Heuer , Sebastian Bergmann + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Version; + +class GreaterThanOrEqualToVersionConstraint extends AbstractVersionConstraint { + /** @var Version */ + private $minimalVersion; + + public function __construct(string $originalValue, Version $minimalVersion) { + parent::__construct($originalValue); + + $this->minimalVersion = $minimalVersion; + } + + public function complies(Version $version): bool { + return $version->getVersionString() === $this->minimalVersion->getVersionString() + || $version->isGreaterThan($this->minimalVersion); + } +} diff --git a/vendor/phar-io/version/src/constraints/OrVersionConstraintGroup.php b/vendor/phar-io/version/src/constraints/OrVersionConstraintGroup.php new file mode 100644 index 0000000..59fd382 --- /dev/null +++ b/vendor/phar-io/version/src/constraints/OrVersionConstraintGroup.php @@ -0,0 +1,35 @@ +, Sebastian Heuer , Sebastian Bergmann + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Version; + +class OrVersionConstraintGroup extends AbstractVersionConstraint { + /** @var VersionConstraint[] */ + private $constraints = []; + + /** + * @param string $originalValue + * @param VersionConstraint[] $constraints + */ + public function __construct($originalValue, array $constraints) { + parent::__construct($originalValue); + + $this->constraints = $constraints; + } + + public function complies(Version $version): bool { + foreach ($this->constraints as $constraint) { + if ($constraint->complies($version)) { + return true; + } + } + + return false; + } +} diff --git a/vendor/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php b/vendor/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php new file mode 100644 index 0000000..302aa31 --- /dev/null +++ b/vendor/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php @@ -0,0 +1,33 @@ +, Sebastian Heuer , Sebastian Bergmann + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Version; + +class SpecificMajorAndMinorVersionConstraint extends AbstractVersionConstraint { + /** @var int */ + private $major; + + /** @var int */ + private $minor; + + public function __construct(string $originalValue, int $major, int $minor) { + parent::__construct($originalValue); + + $this->major = $major; + $this->minor = $minor; + } + + public function complies(Version $version): bool { + if ($version->getMajor()->getValue() !== $this->major) { + return false; + } + + return $version->getMinor()->getValue() === $this->minor; + } +} diff --git a/vendor/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php b/vendor/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php new file mode 100644 index 0000000..968b809 --- /dev/null +++ b/vendor/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php @@ -0,0 +1,25 @@ +, Sebastian Heuer , Sebastian Bergmann + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Version; + +class SpecificMajorVersionConstraint extends AbstractVersionConstraint { + /** @var int */ + private $major; + + public function __construct(string $originalValue, int $major) { + parent::__construct($originalValue); + + $this->major = $major; + } + + public function complies(Version $version): bool { + return $version->getMajor()->getValue() === $this->major; + } +} diff --git a/vendor/phar-io/version/src/constraints/VersionConstraint.php b/vendor/phar-io/version/src/constraints/VersionConstraint.php new file mode 100644 index 0000000..e94f9e0 --- /dev/null +++ b/vendor/phar-io/version/src/constraints/VersionConstraint.php @@ -0,0 +1,16 @@ +, Sebastian Heuer , Sebastian Bergmann + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Version; + +interface VersionConstraint { + public function complies(Version $version): bool; + + public function asString(): string; +} diff --git a/vendor/phar-io/version/src/exceptions/Exception.php b/vendor/phar-io/version/src/exceptions/Exception.php new file mode 100644 index 0000000..3ea458f --- /dev/null +++ b/vendor/phar-io/version/src/exceptions/Exception.php @@ -0,0 +1,15 @@ +, Sebastian Heuer , Sebastian Bergmann + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Version; + +use Throwable; + +interface Exception extends Throwable { +} diff --git a/vendor/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php b/vendor/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php new file mode 100644 index 0000000..bc0b0c3 --- /dev/null +++ b/vendor/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php @@ -0,0 +1,5 @@ +, Sebastian Heuer , Sebastian Bergmann + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Version; + +final class UnsupportedVersionConstraintException extends \RuntimeException implements Exception { +} diff --git a/vendor/php-stubs/wordpress-stubs/.github/workflows/generate.yml b/vendor/php-stubs/wordpress-stubs/.github/workflows/generate.yml new file mode 100644 index 0000000..296f6de --- /dev/null +++ b/vendor/php-stubs/wordpress-stubs/.github/workflows/generate.yml @@ -0,0 +1,37 @@ +name: Generate stubs + +on: workflow_dispatch + +env: + php-version: '7.4' + +jobs: + generate-stubs: + name: Generate stubs + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + coverage: none + ini-file: development + php-version: ${{ env.php-version }} + + - name: Install dependencies + run: composer install --no-interaction --no-progress --prefer-dist + + - name: Generate stubs + run: | + ./generate.sh + + - name: Commit file + run: | + git config --local user.name "${{ github.actor }}" + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add -- wordpress-stubs.php + git commit -m "Update WordPress stubs" || exit 0 + git push origin "${{ github.ref_name }}" diff --git a/vendor/php-stubs/wordpress-stubs/.github/workflows/integrate.yml b/vendor/php-stubs/wordpress-stubs/.github/workflows/integrate.yml new file mode 100644 index 0000000..c661802 --- /dev/null +++ b/vendor/php-stubs/wordpress-stubs/.github/workflows/integrate.yml @@ -0,0 +1,46 @@ +name: "Integrate" + +on: + push: + branches: + - "master" + pull_request: + branches: + - "master" + +permissions: + contents: "read" + +jobs: + test: + runs-on: "ubuntu-latest" + + strategy: + matrix: + php-version: + - "7.4" + - "8.0" + - "8.1" + - "8.2" + - "8.3" + - "8.4" + - "8.5" + + steps: + - name: "Checkout repository" + uses: "actions/checkout@v4" + + - name: "Set up PHP" + uses: "shivammathur/setup-php@v2" + with: + coverage: "none" + php-version: "${{ matrix.php-version }}" + + - name: "Install dependencies" + run: "composer install --no-interaction --no-progress --prefer-dist" + + - run: "./generate.sh" + - run: "php -l wordpress-stubs.php" + - run: "git diff --exit-code" + - run: "php -f wordpress-stubs.php" + - run: "composer run test" diff --git a/vendor/php-stubs/wordpress-stubs/.github/workflows/spelling.yml b/vendor/php-stubs/wordpress-stubs/.github/workflows/spelling.yml new file mode 100644 index 0000000..e2fcefc --- /dev/null +++ b/vendor/php-stubs/wordpress-stubs/.github/workflows/spelling.yml @@ -0,0 +1,23 @@ +name: Spelling + +on: + push: + branches: + - master + pull_request: null + workflow_dispatch: null + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + typos_check: + name: Typos + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Check spelling + uses: crate-ci/typos@master diff --git a/vendor/php-stubs/wordpress-stubs/.typos.toml b/vendor/php-stubs/wordpress-stubs/.typos.toml new file mode 100644 index 0000000..bc7c399 --- /dev/null +++ b/vendor/php-stubs/wordpress-stubs/.typos.toml @@ -0,0 +1,19 @@ +[files] +extend-exclude = [ + ".git/", + "source/", + "wordpress-stubs.php", +] +ignore-hidden = false + +[default] +extend-ignore-re = [ + "get-post-stati", +] + +[default.extend-identifiers] +Automattic = "Automattic" +get_post_stati = "get_post_stati" +Github = "GitHub" +Woocommerce = "WooCommerce" +Wordpress = "WordPress" diff --git a/vendor/php-stubs/wordpress-stubs/LICENSE b/vendor/php-stubs/wordpress-stubs/LICENSE new file mode 100644 index 0000000..84b563a --- /dev/null +++ b/vendor/php-stubs/wordpress-stubs/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Viktor Szépe + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/php-stubs/wordpress-stubs/composer.json b/vendor/php-stubs/wordpress-stubs/composer.json new file mode 100644 index 0000000..eb6a0dd --- /dev/null +++ b/vendor/php-stubs/wordpress-stubs/composer.json @@ -0,0 +1,67 @@ +{ + "name": "php-stubs/wordpress-stubs", + "description": "WordPress function and class declaration stubs for static analysis.", + "license": "MIT", + "keywords": [ + "wordpress", + "static analysis", + "phpstan" + ], + "homepage": "https://github.com/php-stubs/wordpress-stubs", + "require-dev": { + "php": "^7.4 || ^8.0", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "nikic/php-parser": "^5.5", + "php-stubs/generator": "^0.8.3", + "phpdocumentor/reflection-docblock": "^6.0", + "phpstan/phpstan": "^2.1", + "phpunit/phpunit": "^9.5", + "symfony/polyfill-php80": "*", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.1.1", + "wp-coding-standards/wpcs": "3.1.0 as 2.3.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "5.6.1" + }, + "suggest": { + "paragonie/sodium_compat": "Pure PHP implementation of libsodium", + "symfony/polyfill-php80": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" + }, + "minimum-stability": "stable", + "autoload-dev": { + "psr-4": { + "PhpStubs\\WordPress\\Core\\": "src/" + }, + "classmap": [ + "tests/" + ] + }, + "config": { + "allow-plugins": { + "php-stubs/generator": true, + "dealerdirect/phpcodesniffer-composer-installer": true + }, + "platform": { + "php": "7.4.30" + }, + "sort-packages": true + }, + "scripts": { + "post-install-cmd": "@composer --working-dir=source/ update --no-interaction", + "post-update-cmd": "@composer --working-dir=source/ update --no-interaction", + "cleanup": "git status --short --ignored | sed -n -e 's#^!! ##p' | xargs -r rm -vrf", + "test": [ + "@test:phpunit", + "@test:phpstan", + "@test:cs" + ], + "test:cs": "phpcs", + "test:cs:fix": "phpcbf", + "test:phpstan": "phpstan analyze", + "test:phpunit": "phpunit" + }, + "scripts-descriptions": { + "cleanup": "Remove all ignored files." + } +} diff --git a/vendor/php-stubs/wordpress-stubs/phpcs.xml.dist b/vendor/php-stubs/wordpress-stubs/phpcs.xml.dist new file mode 100644 index 0000000..5d7c26f --- /dev/null +++ b/vendor/php-stubs/wordpress-stubs/phpcs.xml.dist @@ -0,0 +1,61 @@ + + + finder.php + functionMap.php + src/ + visitor.php + tests/ + + + + + + + + + + tests/TypeInferenceTest.php + + + tests/data/param/wpdb.php + tests/data/param/wp-robots.php + tests/data/param/absint.php + + + tests/data/**/__demo.php + + + tests/ + + + tests/ + + + + + + + + + + tests/ + + + tests/ + + + tests/ + + + tests/ + + + tests/ + + + tests/ + + + tests/ + + diff --git a/vendor/php-stubs/wordpress-stubs/wordpress-stubs.php b/vendor/php-stubs/wordpress-stubs/wordpress-stubs.php new file mode 100644 index 0000000..37cb1da --- /dev/null +++ b/vendor/php-stubs/wordpress-stubs/wordpress-stubs.php @@ -0,0 +1,150130 @@ + $temp_backups + */ + public function restore_temp_backup(array $temp_backups = array()) + { + } + /** + * Deletes a temporary backup. + * + * @since 6.3.0 + * @since 6.6.0 Added the `$temp_backups` parameter. + * + * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. + * + * @param array[] $temp_backups { + * Optional. An array of temporary backups. + * + * @type array ...$0 { + * Information about the backup. + * + * @type string $dir The temporary backup location in the upgrade-temp-backup directory. + * @type string $slug The item's slug. + * @type string $src The directory where the original is stored. For example, `WP_PLUGIN_DIR`. + * } + * } + * @return bool|WP_Error True on success, false on early exit, otherwise WP_Error. + * @phpstan-param array $temp_backups + */ + public function delete_temp_backup(array $temp_backups = array()) + { + } + } + /** + * Core class used for updating core. + * + * It allows for WordPress to upgrade itself in combination with + * the wp-admin/includes/update-core.php file. + * + * Note: Newly introduced functions and methods cannot be used here. + * All functions must be present in the previous version being upgraded from + * as this file is used there too. + * + * @since 2.8.0 + * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php. + * + * @see WP_Upgrader + */ + class Core_Upgrader extends \WP_Upgrader + { + /** + * Initializes the upgrade strings. + * + * @since 2.8.0 + */ + public function upgrade_strings() + { + } + /** + * Upgrades WordPress core. + * + * @since 2.8.0 + * + * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. + * @global callable $_wp_filesystem_direct_method + * + * @param object $current Response object for whether WordPress is current. + * @param array $args { + * Optional. Arguments for upgrading WordPress core. Default empty array. + * + * @type bool $pre_check_md5 Whether to check the file checksums before + * attempting the upgrade. Default true. + * @type bool $attempt_rollback Whether to attempt to rollback the chances if + * there is a problem. Default false. + * @type bool $do_rollback Whether to perform this "upgrade" as a rollback. + * Default false. + * } + * @return string|false|WP_Error New WordPress version on success, false or WP_Error on failure. + * @phpstan-param array{ + * pre_check_md5?: bool, + * attempt_rollback?: bool, + * do_rollback?: bool, + * } $args + */ + public function upgrade($current, $args = array()) + { + } + /** + * Determines if this WordPress Core version should update to an offered version or not. + * + * @since 3.7.0 + * + * @param string $offered_ver The offered version, of the format x.y.z. + * @return bool True if we should update to the offered version, otherwise false. + */ + public static function should_update_to_version($offered_ver) + { + } + /** + * Compares the disk file checksums against the expected checksums. + * + * @since 3.7.0 + * + * @global string $wp_version The WordPress version string. + * @global string $wp_local_package Locale code of the package. + * + * @return bool True if the checksums match, otherwise false. + */ + public function check_files() + { + } + } + /** + * The custom background class. + * + * @since 3.0.0 + */ + #[\AllowDynamicProperties] + class Custom_Background + { + /** + * Callback for administration header. + * + * @since 3.0.0 + * @var callable + * @phpstan-var ''|callable(): void + */ + public $admin_header_callback; + /** + * Callback for header div. + * + * @since 3.0.0 + * @var callable + * @phpstan-var ''|callable(): void + */ + public $admin_image_div_callback; + /** + * Constructor - Registers administration header callback. + * + * @since 3.0.0 + * + * @param callable $admin_header_callback Optional. Administration header callback. + * Default empty string. + * @param callable $admin_image_div_callback Optional. Custom image div output callback. + * Default empty string. + * @phpstan-param ''|callable(): void $admin_header_callback + * @phpstan-param ''|callable(): void $admin_image_div_callback + */ + public function __construct($admin_header_callback = '', $admin_image_div_callback = '') + { + } + /** + * Sets up the hooks for the Custom Background admin page. + * + * @since 3.0.0 + * @phpstan-return void + */ + public function init() + { + } + /** + * Sets up the enqueue for the CSS & JavaScript files. + * + * @since 3.0.0 + */ + public function admin_load() + { + } + /** + * Executes custom background modification. + * + * @since 3.0.0 + * @phpstan-return void + */ + public function take_action() + { + } + /** + * Displays the custom background page. + * + * @since 3.0.0 + */ + public function admin_page() + { + } + /** + * Handles an Image upload for the background image. + * + * @since 3.0.0 + * @phpstan-return void + */ + public function handle_upload() + { + } + /** + * Handles Ajax request for adding custom background context to an attachment. + * + * Triggers when the user adds a new background image from the + * Media Manager. + * + * @since 4.1.0 + * @phpstan-return never + */ + public function ajax_background_add() + { + } + /** + * @since 3.4.0 + * @deprecated 3.5.0 + * + * @param array $form_fields + * @return array $form_fields + */ + public function attachment_fields_to_edit($form_fields) + { + } + /** + * @since 3.4.0 + * @deprecated 3.5.0 + * + * @param array $tabs + * @return array $tabs + */ + public function filter_upload_tabs($tabs) + { + } + /** + * @since 3.4.0 + * @deprecated 3.5.0 + * @phpstan-return never + */ + public function wp_set_background_image() + { + } + } + /** + * The custom header image class. + * + * @since 2.1.0 + */ + #[\AllowDynamicProperties] + class Custom_Image_Header + { + /** + * Callback for administration header. + * + * @since 2.1.0 + * @var callable + * @phpstan-var ''|callable(): void + */ + public $admin_header_callback; + /** + * Callback for header div. + * + * @since 3.0.0 + * @var callable + * @phpstan-var ''|callable(): void + */ + public $admin_image_div_callback; + /** + * Holds default headers. + * + * @since 3.0.0 + * @var array + */ + public $default_headers = array(); + /** + * Constructor - Registers administration header callback. + * + * @since 2.1.0 + * + * @param callable $admin_header_callback Administration header callback. + * @param callable $admin_image_div_callback Optional. Custom image div output callback. + * Default empty string. + * @phpstan-param ''|callable(): void $admin_image_div_callback + */ + public function __construct($admin_header_callback, $admin_image_div_callback = '') + { + } + /** + * Sets up the hooks for the Custom Header admin page. + * + * @since 2.1.0 + * @phpstan-return void + */ + public function init() + { + } + /** + * Adds contextual help. + * + * @since 3.0.0 + */ + public function help() + { + } + /** + * Gets the current step. + * + * @since 2.6.0 + * + * @return int Current step. + */ + public function step() + { + } + /** + * Sets up the enqueue for the JavaScript files. + * + * @since 2.1.0 + */ + public function js_includes() + { + } + /** + * Sets up the enqueue for the CSS files. + * + * @since 2.7.0 + */ + public function css_includes() + { + } + /** + * Executes custom header modification. + * + * @since 2.6.0 + * @phpstan-return void + */ + public function take_action() + { + } + /** + * Processes the default headers. + * + * @since 3.0.0 + * + * @global array $_wp_default_headers + * @phpstan-return void + */ + public function process_default_headers() + { + } + /** + * Displays UI for selecting one of several default headers. + * + * Shows the random image option if this theme has multiple header images. + * Random image option is on by default if no header has been set. + * + * @since 3.0.0 + * + * @param string $type The header type. One of 'default' (for the Uploaded Images control) + * or 'uploaded' (for the Uploaded Images control). + * @phpstan-param 'default'|'uploaded' $type + */ + public function show_header_selector($type = 'default') + { + } + /** + * Executes JavaScript depending on step. + * + * @since 2.1.0 + */ + public function js() + { + } + /** + * Displays JavaScript based on Step 1 and 3. + * + * @since 2.6.0 + */ + public function js_1() + { + } + /** + * Displays JavaScript based on Step 2. + * + * @since 2.6.0 + */ + public function js_2() + { + } + /** + * Displays first step of custom header image page. + * + * @since 2.1.0 + */ + public function step_1() + { + } + /** + * Displays second step of custom header image page. + * + * @since 2.1.0 + */ + public function step_2() + { + } + /** + * Uploads the file to be cropped in the second step. + * + * @since 3.4.0 + */ + public function step_2_manage_upload() + { + } + /** + * Displays third step of custom header image page. + * + * @since 2.1.0 + * @since 4.4.0 Switched to using wp_get_attachment_url() instead of the guid + * for retrieving the header image URL. + */ + public function step_3() + { + } + /** + * Displays last step of custom header image page. + * + * @since 2.1.0 + */ + public function finished() + { + } + /** + * Displays the page based on the current step. + * + * @since 2.1.0 + */ + public function admin_page() + { + } + /** + * Unused since 3.5.0. + * + * @since 3.4.0 + * + * @param array $form_fields + * @return array $form_fields + */ + public function attachment_fields_to_edit($form_fields) + { + } + /** + * Unused since 3.5.0. + * + * @since 3.4.0 + * + * @param array $tabs + * @return array $tabs + */ + public function filter_upload_tabs($tabs) + { + } + /** + * Chooses a header image, selected from existing uploaded and default headers, + * or provides an array of uploaded header data (either new, or from media library). + * + * @since 3.4.0 + * + * @param mixed $choice Which header image to select. Allows for values of 'random-default-image', + * for randomly cycling among the default images; 'random-uploaded-image', + * for randomly cycling among the uploaded images; the key of a default image + * registered for that theme; and the key of an image uploaded for that theme + * (the attachment ID of the image). Or an array of arguments: attachment_id, + * url, width, height. All are required. + * @phpstan-param string|array{attachment_id: int<1, max>, url: string, width: int<0, max>, height: int<0, max>} $choice + * @phpstan-return void + */ + final public function set_header_image($choice) + { + } + /** + * Removes a header image. + * + * @since 3.4.0 + */ + final public function remove_header_image() + { + } + /** + * Resets a header image to the default image for the theme. + * + * This method does not do anything if the theme does not have a default header image. + * + * @since 3.4.0 + * @phpstan-return void + */ + final public function reset_header_image() + { + } + /** + * Calculates width and height based on what the currently selected theme supports. + * + * @since 3.9.0 + * + * @param array $dimensions + * @return array dst_height and dst_width of header image. + */ + final public function get_header_dimensions($dimensions) + { + } + /** + * Creates an attachment 'object'. + * + * @since 3.9.0 + * @deprecated 6.5.0 + * + * @param string $cropped Cropped image URL. + * @param int $parent_attachment_id Attachment ID of parent image. + * @return array An array with attachment object data. + */ + final public function create_attachment_object($cropped, $parent_attachment_id) + { + } + /** + * Inserts an attachment and its metadata. + * + * @since 3.9.0 + * + * @param array $attachment An array with attachment object data. + * @param string $cropped File path to cropped image. + * @return int Attachment ID. + */ + final public function insert_attachment($attachment, $cropped) + { + } + /** + * Gets attachment uploaded by Media Manager, crops it, then saves it as a + * new object. Returns JSON-encoded object details. + * + * @since 3.9.0 + * @phpstan-return never + */ + public function ajax_header_crop() + { + } + /** + * Given an attachment ID for a header image, updates its "last used" + * timestamp to now. + * + * Triggered when the user tries adds a new header image from the + * Media Manager, even if s/he doesn't save that change. + * + * @since 3.9.0 + * @phpstan-return never + */ + public function ajax_header_add() + { + } + /** + * Given an attachment ID for a header image, unsets it as a user-uploaded + * header image for the active theme. + * + * Triggered when the user clicks the overlay "X" button next to each image + * choice in the Customizer's Header tool. + * + * @since 3.9.0 + * @phpstan-return never + */ + public function ajax_header_remove() + { + } + /** + * Updates the last-used postmeta on a header image attachment after saving a new header image via the Customizer. + * + * @since 3.9.0 + * + * @param WP_Customize_Manager $wp_customize Customize manager. + * @phpstan-return void + */ + public function customize_set_last_used($wp_customize) + { + } + /** + * Gets the details of default header images if defined. + * + * @since 3.9.0 + * + * @return array Default header images. + */ + public function get_default_header_images() + { + } + /** + * Gets the previously uploaded header images. + * + * @since 3.9.0 + * + * @return array Uploaded header images. + */ + public function get_uploaded_header_images() + { + } + /** + * Gets the ID of a previous crop from the same base image. + * + * @since 4.9.0 + * + * @param array $attachment An array with a cropped attachment object data. + * @return int|false An attachment ID if one exists. False if none. + */ + public function get_previous_crop($attachment) + { + } + } + /** + * Core class used for handling file uploads. + * + * This class handles the upload process and passes it as if it's a local file + * to the Upgrade/Installer functions. + * + * @since 2.8.0 + * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php. + */ + #[\AllowDynamicProperties] + class File_Upload_Upgrader + { + /** + * The full path to the file package. + * + * @since 2.8.0 + * @var string $package + */ + public $package; + /** + * The name of the file. + * + * @since 2.8.0 + * @var string $filename + */ + public $filename; + /** + * The ID of the attachment post for this file. + * + * @since 3.3.0 + * @var int $id + */ + public $id = 0; + /** + * Construct the upgrader for a form. + * + * @since 2.8.0 + * + * @param string $form The name of the form the file was uploaded from. + * @param string $urlholder The name of the `GET` parameter that holds the filename. + */ + public function __construct($form, $urlholder) + { + } + /** + * Deletes the attachment/uploaded file. + * + * @since 3.2.2 + * + * @return bool Whether the cleanup was successful. + */ + public function cleanup() + { + } + } + /** + * PemFTP base class + * + */ + class ftp_base + { + var $LocalEcho; + var $Verbose; + var $OS_local; + var $OS_remote; + var $_lastaction; + var $_errors; + var $_type; + var $_umask; + var $_timeout; + var $_passive; + var $_host; + var $_fullhost; + var $_port; + var $_datahost; + var $_dataport; + var $_ftp_control_sock; + var $_ftp_data_sock; + var $_ftp_temp_sock; + var $_ftp_buff_size; + var $_login; + var $_password; + var $_connected; + var $_ready; + var $_code; + var $_message; + var $_can_restore; + var $_port_available; + var $_curtype; + var $_features; + var $_error_array; + var $AuthorizedTransferMode; + var $OS_FullName; + var $_eol_code; + var $AutoAsciiExt; + function __construct($port_mode = \FALSE, $verb = \FALSE, $le = \FALSE) + { + } + function ftp_base($port_mode = \FALSE) + { + } + function parselisting($line) + { + } + function SendMSG($message = "", $crlf = \true) + { + } + function SetType($mode = \FTP_AUTOASCII) + { + } + function _settype($mode = \FTP_ASCII) + { + } + function Passive($pasv = \NULL) + { + } + function SetServer($host, $port = 21, $reconnect = \true) + { + } + function SetUmask($umask = 022) + { + } + function SetTimeout($timeout = 30) + { + } + function connect($server = \NULL) + { + } + function quit($force = \false) + { + } + function login($user = \NULL, $pass = \NULL) + { + } + function pwd() + { + } + function cdup() + { + } + function chdir($pathname) + { + } + function rmdir($pathname) + { + } + function mkdir($pathname) + { + } + function rename($from, $to) + { + } + function filesize($pathname) + { + } + function abort() + { + } + function mdtm($pathname) + { + } + function systype() + { + } + function delete($pathname) + { + } + function site($command, $fnction = "site") + { + } + function chmod($pathname, $mode) + { + } + function restore($from) + { + } + function features() + { + } + function rawlist($pathname = "", $arg = "") + { + } + function nlist($pathname = "", $arg = "") + { + } + function is_exists($pathname) + { + } + function file_exists($pathname) + { + } + function fget($fp, $remotefile, $rest = 0) + { + } + function get($remotefile, $localfile = \NULL, $rest = 0) + { + } + function fput($remotefile, $fp, $rest = 0) + { + } + function put($localfile, $remotefile = \NULL, $rest = 0) + { + } + function mput($local = ".", $remote = \NULL, $continious = \false) + { + } + function mget($remote, $local = ".", $continious = \false) + { + } + function mdel($remote, $continious = \false) + { + } + function mmkdir($dir, $mode = 0777) + { + } + function glob($pattern, $handle = \NULL) + { + } + function glob_pattern_match($pattern, $subject) + { + } + function glob_regexp($pattern, $subject) + { + } + function dirlist($remote) + { + } + function _checkCode() + { + } + function _list($arg = "", $cmd = "LIST", $fnction = "_list") + { + } + function PushError($fctname, $msg, $desc = \false) + { + } + function PopError() + { + } + } + /** + * FTP implementation using fsockopen to connect. + * + * @package PemFTP + * @subpackage Pure + * @since 2.5.0 + * + * @version 1.0 + * @copyright Alexey Dotsenko + * @author Alexey Dotsenko + * @link https://www.phpclasses.org/package/1743-PHP-FTP-client-in-pure-PHP.html + * @license LGPL https://opensource.org/licenses/lgpl-license.html + */ + class ftp_pure extends \ftp_base + { + function __construct($verb = \FALSE, $le = \FALSE) + { + } + function _settimeout($sock) + { + } + function _connect($host, $port) + { + } + function _readmsg($fnction = "_readmsg") + { + } + function _exec($cmd, $fnction = "_exec") + { + } + function _data_prepare($mode = \FTP_ASCII) + { + } + function _data_read($mode = \FTP_ASCII, $fp = \NULL) + { + } + function _data_write($mode = \FTP_ASCII, $fp = \NULL) + { + } + function _data_write_block($mode, $block) + { + } + function _data_close() + { + } + function _quit($force = \FALSE) + { + } + } + /** + * Socket Based FTP implementation + * + * @package PemFTP + * @subpackage Socket + * @since 2.5.0 + * + * @version 1.0 + * @copyright Alexey Dotsenko + * @author Alexey Dotsenko + * @link https://www.phpclasses.org/package/1743-PHP-FTP-client-in-pure-PHP.html + * @license LGPL https://opensource.org/licenses/lgpl-license.html + */ + class ftp_sockets extends \ftp_base + { + function __construct($verb = \FALSE, $le = \FALSE) + { + } + function _settimeout($sock) + { + } + function _connect($host, $port) + { + } + function _readmsg($fnction = "_readmsg") + { + } + function _exec($cmd, $fnction = "_exec") + { + } + function _data_prepare($mode = \FTP_ASCII) + { + } + function _data_read($mode = \FTP_ASCII, $fp = \NULL) + { + } + function _data_write($mode = \FTP_ASCII, $fp = \NULL) + { + } + function _data_write_block($mode, $block) + { + } + function _data_close() + { + } + function _quit() + { + } + } + class ftp extends \ftp_sockets + { + } + /** + * Translation Upgrader Skin for WordPress Translation Upgrades. + * + * @since 3.7.0 + * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. + * + * @see WP_Upgrader_Skin + */ + class Language_Pack_Upgrader_Skin extends \WP_Upgrader_Skin + { + public $language_update = \null; + public $done_header = \false; + public $done_footer = \false; + public $display_footer_actions = \true; + /** + * Constructor. + * + * Sets up the language pack upgrader skin. + * + * @since 3.7.0 + * + * @param array $args + */ + public function __construct($args = array()) + { + } + /** + * Performs an action before a language pack update. + * + * @since 3.7.0 + */ + public function before() + { + } + /** + * Displays an error message about the update. + * + * @since 3.7.0 + * @since 5.9.0 Renamed `$error` to `$errors` for PHP 8 named parameter support. + * + * @param string|WP_Error $errors Errors. + */ + public function error($errors) + { + } + /** + * Performs an action following a language pack update. + * + * @since 3.7.0 + */ + public function after() + { + } + /** + * Displays the footer following the bulk update process. + * + * @since 3.7.0 + */ + public function bulk_footer() + { + } + } + /** + * Core class used for updating/installing language packs (translations) + * for plugins, themes, and core. + * + * @since 3.7.0 + * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php. + * + * @see WP_Upgrader + */ + class Language_Pack_Upgrader extends \WP_Upgrader + { + /** + * Result of the language pack upgrade. + * + * @since 3.7.0 + * @var array|WP_Error $result + * @see WP_Upgrader::$result + */ + public $result; + /** + * Whether a bulk upgrade/installation is being performed. + * + * @since 3.7.0 + * @var bool $bulk + */ + public $bulk = \true; + /** + * Asynchronously upgrades language packs after other upgrades have been made. + * + * Hooked to the {@see 'upgrader_process_complete'} action by default. + * + * @since 3.7.0 + * + * @param false|WP_Upgrader $upgrader Optional. WP_Upgrader instance or false. If `$upgrader` is + * a Language_Pack_Upgrader instance, the method will bail to + * avoid recursion. Otherwise unused. Default false. + * @phpstan-return void + */ + public static function async_upgrade($upgrader = \false) + { + } + /** + * Initializes the upgrade strings. + * + * @since 3.7.0 + */ + public function upgrade_strings() + { + } + /** + * Upgrades a language pack. + * + * @since 3.7.0 + * + * @param string|false $update Optional. Whether an update offer is available. Default false. + * @param array $args Optional. Other optional arguments, see + * Language_Pack_Upgrader::bulk_upgrade(). Default empty array. + * @return array|bool|WP_Error The result of the upgrade, or a WP_Error object instead. + * @phpstan-param array{ + * clear_update_cache?: bool, + * } $args See Language_Pack_Upgrader::bulk_upgrade() + */ + public function upgrade($update = \false, $args = array()) + { + } + /** + * Upgrades several language packs at once. + * + * @since 3.7.0 + * + * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. + * + * @param object[] $language_updates Optional. Array of language packs to update. See {@see wp_get_translation_updates()}. + * Default empty array. + * @param array $args { + * Other arguments for upgrading multiple language packs. Default empty array. + * + * @type bool $clear_update_cache Whether to clear the update cache when done. + * Default true. + * } + * @return array|bool|WP_Error Will return an array of results, or true if there are no updates, + * false or WP_Error for initial errors. + * @phpstan-param array{ + * clear_update_cache?: bool, + * } $args + */ + public function bulk_upgrade($language_updates = array(), $args = array()) + { + } + /** + * Checks that the package source contains .mo and .po files. + * + * Hooked to the {@see 'upgrader_source_selection'} filter by + * Language_Pack_Upgrader::bulk_upgrade(). + * + * @since 3.7.0 + * + * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. + * + * @param string|WP_Error $source The path to the downloaded package source. + * @param string $remote_source Remote file source location. + * @return string|WP_Error The source as passed, or a WP_Error object on failure. + */ + public function check_package($source, $remote_source) + { + } + /** + * Gets the name of an item being updated. + * + * @since 3.7.0 + * + * @param object $update The data for an update. + * @return string The name of the item being updated. + */ + public function get_name_for_update($update) + { + } + /** + * Clears existing translations where this item is going to be installed into. + * + * @since 5.1.0 + * + * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. + * + * @param string $remote_destination The location on the remote filesystem to be cleared. + * @return bool|WP_Error True upon success, WP_Error on failure. + */ + public function clear_destination($remote_destination) + { + } + } + class PclZip + { + var $zipname = ''; + var $zip_fd = 0; + var $error_code = 1; + var $error_string = ''; + var $magic_quotes_status; + function __construct($p_zipname) + { + } + public function PclZip($p_zipname) + { + } + function create($p_filelist) + { + } + function add($p_filelist) + { + } + function listContent() + { + } + function extract() + { + } + function extractByIndex($p_index) + { + } + function delete() + { + } + function deleteByIndex($p_index) + { + } + function properties() + { + } + function duplicate($p_archive) + { + } + function merge($p_archive_to_add) + { + } + function errorCode() + { + } + function errorName($p_with_code = \false) + { + } + function errorInfo($p_full = \false) + { + } + function privCheckFormat($p_level = 0) + { + } + function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options = \false) + { + } + function privOptionDefaultThreshold(&$p_options) + { + } + function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options = \false) + { + } + function privFileDescrExpand(&$p_filedescr_list, &$p_options) + { + } + function privCreate($p_filedescr_list, &$p_result_list, &$p_options) + { + } + function privAdd($p_filedescr_list, &$p_result_list, &$p_options) + { + } + function privOpenFd($p_mode) + { + } + function privCloseFd() + { + } + function privAddList($p_filedescr_list, &$p_result_list, &$p_options) + { + } + function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options) + { + } + function privAddFile($p_filedescr, &$p_header, &$p_options) + { + } + function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options) + { + } + function privCalculateStoredFilename(&$p_filedescr, &$p_options) + { + } + function privWriteFileHeader(&$p_header) + { + } + function privWriteCentralFileHeader(&$p_header) + { + } + function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment) + { + } + function privList(&$p_list) + { + } + function privConvertHeader2FileInfo($p_header, &$p_info) + { + } + function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) + { + } + function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) + { + } + function privExtractFileUsingTempFile(&$p_entry, &$p_options) + { + } + function privExtractFileInOutput(&$p_entry, &$p_options) + { + } + function privExtractFileAsString(&$p_entry, &$p_string, &$p_options) + { + } + function privReadFileHeader(&$p_header) + { + } + function privReadCentralFileHeader(&$p_header) + { + } + function privCheckFileHeaders(&$p_local_header, &$p_central_header) + { + } + function privReadEndCentralDir(&$p_central_dir) + { + } + function privDeleteByRule(&$p_result_list, &$p_options) + { + } + function privDirCheck($p_dir, $p_is_dir = \false) + { + } + function privMerge(&$p_archive_to_add) + { + } + function privDuplicate($p_archive_filename) + { + } + function privErrorLog($p_error_code = 0, $p_error_string = '') + { + } + function privErrorReset() + { + } + function privDisableMagicQuotes() + { + } + function privSwapBackMagicQuotes() + { + } + // -------------------------------------------------------------------------------- + } + /** + * Plugin Installer Skin for WordPress Plugin Installer. + * + * @since 2.8.0 + * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. + * + * @see WP_Upgrader_Skin + */ + class Plugin_Installer_Skin extends \WP_Upgrader_Skin + { + public $api; + public $type; + public $url; + public $overwrite; + /** + * Constructor. + * + * Sets up the plugin installer skin. + * + * @since 2.8.0 + * + * @param array $args + */ + public function __construct($args = array()) + { + } + /** + * Performs an action before installing a plugin. + * + * @since 2.8.0 + */ + public function before() + { + } + /** + * Hides the `process_failed` error when updating a plugin by uploading a zip file. + * + * @since 5.5.0 + * + * @param WP_Error $wp_error WP_Error object. + * @return bool True if the error should be hidden, false otherwise. + */ + public function hide_process_failed($wp_error) + { + } + /** + * Performs an action following a plugin install. + * + * @since 2.8.0 + * @phpstan-return void + */ + public function after() + { + } + } + /** + * Plugin Upgrader Skin for WordPress Plugin Upgrades. + * + * @since 2.8.0 + * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. + * + * @see WP_Upgrader_Skin + */ + class Plugin_Upgrader_Skin extends \WP_Upgrader_Skin + { + /** + * Holds the plugin slug in the Plugin Directory. + * + * @since 2.8.0 + * + * @var string + */ + public $plugin = ''; + /** + * Whether the plugin is active. + * + * @since 2.8.0 + * + * @var bool + */ + public $plugin_active = \false; + /** + * Whether the plugin is active for the entire network. + * + * @since 2.8.0 + * + * @var bool + */ + public $plugin_network_active = \false; + /** + * Constructor. + * + * Sets up the plugin upgrader skin. + * + * @since 2.8.0 + * + * @param array $args Optional. The plugin upgrader skin arguments to + * override default options. Default empty array. + */ + public function __construct($args = array()) + { + } + /** + * Performs an action following a single plugin update. + * + * @since 2.8.0 + */ + public function after() + { + } + } + /** + * Core class used for upgrading/installing plugins. + * + * It is designed to upgrade/install plugins from a local zip, remote zip URL, + * or uploaded zip file. + * + * @since 2.8.0 + * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php. + * + * @see WP_Upgrader + */ + class Plugin_Upgrader extends \WP_Upgrader + { + /** + * Plugin upgrade result. + * + * @since 2.8.0 + * @var array|WP_Error $result + * + * @see WP_Upgrader::$result + */ + public $result; + /** + * Whether a bulk upgrade/installation is being performed. + * + * @since 2.9.0 + * @var bool $bulk + */ + public $bulk = \false; + /** + * New plugin info. + * + * @since 5.5.0 + * @var array $new_plugin_data + * + * @see check_package() + */ + public $new_plugin_data = array(); + /** + * Initializes the upgrade strings. + * + * @since 2.8.0 + */ + public function upgrade_strings() + { + } + /** + * Initializes the installation strings. + * + * @since 2.8.0 + */ + public function install_strings() + { + } + /** + * Install a plugin package. + * + * @since 2.8.0 + * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional. + * + * @param string $package The full local path or URI of the package. + * @param array $args { + * Optional. Other arguments for installing a plugin package. Default empty array. + * + * @type bool $clear_update_cache Whether to clear the plugin updates cache if successful. + * Default true. + * } + * @return bool|WP_Error True if the installation was successful, false or a WP_Error otherwise. + * @phpstan-param array{ + * clear_update_cache?: bool, + * } $args + */ + public function install($package, $args = array()) + { + } + /** + * Upgrades a plugin. + * + * @since 2.8.0 + * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional. + * + * @param string $plugin Path to the plugin file relative to the plugins directory. + * @param array $args { + * Optional. Other arguments for upgrading a plugin package. Default empty array. + * + * @type bool $clear_update_cache Whether to clear the plugin updates cache if successful. + * Default true. + * } + * @return bool|WP_Error True if the upgrade was successful, false or a WP_Error object otherwise. + * @phpstan-param array{ + * clear_update_cache?: bool, + * } $args + */ + public function upgrade($plugin, $args = array()) + { + } + /** + * Upgrades several plugins at once. + * + * @since 2.8.0 + * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional. + * + * @param string[] $plugins Array of paths to plugin files relative to the plugins directory. + * @param array $args { + * Optional. Other arguments for upgrading several plugins at once. + * + * @type bool $clear_update_cache Whether to clear the plugin updates cache if successful. Default true. + * } + * @return array|false An array of results indexed by plugin file, or false if unable to connect to the filesystem. + * @phpstan-param array{ + * clear_update_cache?: bool, + * } $args + */ + public function bulk_upgrade($plugins, $args = array()) + { + } + /** + * Checks that the source package contains a valid plugin. + * + * Hooked to the {@see 'upgrader_source_selection'} filter by Plugin_Upgrader::install(). + * + * @since 3.3.0 + * + * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. + * + * @param string $source The path to the downloaded package source. + * @return string|WP_Error The source as passed, or a WP_Error object on failure. + */ + public function check_package($source) + { + } + /** + * Retrieves the path to the file that contains the plugin info. + * + * This isn't used internally in the class, but is called by the skins. + * + * @since 2.8.0 + * + * @return string|false The full path to the main plugin file, or false. + */ + public function plugin_info() + { + } + /** + * Deactivates a plugin before it is upgraded. + * + * Hooked to the {@see 'upgrader_pre_install'} filter by Plugin_Upgrader::upgrade(). + * + * @since 2.8.0 + * @since 4.1.0 Added a return value. + * + * @param bool|WP_Error $response The installation response before the installation has started. + * @param array $plugin Plugin package arguments. + * @return bool|WP_Error The original `$response` parameter or WP_Error. + */ + public function deactivate_plugin_before_upgrade($response, $plugin) + { + } + /** + * Turns on maintenance mode before attempting to background update an active plugin. + * + * Hooked to the {@see 'upgrader_pre_install'} filter by Plugin_Upgrader::upgrade(). + * + * @since 5.4.0 + * + * @param bool|WP_Error $response The installation response before the installation has started. + * @param array $plugin Plugin package arguments. + * @return bool|WP_Error The original `$response` parameter or WP_Error. + */ + public function active_before($response, $plugin) + { + } + /** + * Turns off maintenance mode after upgrading an active plugin. + * + * Hooked to the {@see 'upgrader_post_install'} filter by Plugin_Upgrader::upgrade(). + * + * @since 5.4.0 + * + * @param bool|WP_Error $response The installation response after the installation has finished. + * @param array $plugin Plugin package arguments. + * @return bool|WP_Error The original `$response` parameter or WP_Error. + */ + public function active_after($response, $plugin) + { + } + /** + * Deletes the old plugin during an upgrade. + * + * Hooked to the {@see 'upgrader_clear_destination'} filter by + * Plugin_Upgrader::upgrade() and Plugin_Upgrader::bulk_upgrade(). + * + * @since 2.8.0 + * + * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. + * + * @param bool|WP_Error $removed Whether the destination was cleared. + * True on success, WP_Error on failure. + * @param string $local_destination The local package destination. + * @param string $remote_destination The remote package destination. + * @param array $plugin Extra arguments passed to hooked filters. + * @return bool|WP_Error + */ + public function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin) + { + } + } + /** + * Theme Installer Skin for the WordPress Theme Installer. + * + * @since 2.8.0 + * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. + * + * @see WP_Upgrader_Skin + */ + class Theme_Installer_Skin extends \WP_Upgrader_Skin + { + public $api; + public $type; + public $url; + public $overwrite; + /** + * Constructor. + * + * Sets up the theme installer skin. + * + * @since 2.8.0 + * + * @param array $args + */ + public function __construct($args = array()) + { + } + /** + * Performs an action before installing a theme. + * + * @since 2.8.0 + */ + public function before() + { + } + /** + * Hides the `process_failed` error when updating a theme by uploading a zip file. + * + * @since 5.5.0 + * + * @param WP_Error $wp_error WP_Error object. + * @return bool True if the error should be hidden, false otherwise. + */ + public function hide_process_failed($wp_error) + { + } + /** + * Performs an action following a single theme install. + * + * @since 2.8.0 + * @phpstan-return void + */ + public function after() + { + } + } + /** + * Theme Upgrader Skin for WordPress Theme Upgrades. + * + * @since 2.8.0 + * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader-skins.php. + * + * @see WP_Upgrader_Skin + */ + class Theme_Upgrader_Skin extends \WP_Upgrader_Skin + { + /** + * Holds the theme slug in the Theme Directory. + * + * @since 2.8.0 + * + * @var string + */ + public $theme = ''; + /** + * Constructor. + * + * Sets up the theme upgrader skin. + * + * @since 2.8.0 + * + * @param array $args Optional. The theme upgrader skin arguments to + * override default options. Default empty array. + */ + public function __construct($args = array()) + { + } + /** + * Performs an action following a single theme update. + * + * @since 2.8.0 + */ + public function after() + { + } + } + /** + * Core class used for upgrading/installing themes. + * + * It is designed to upgrade/install themes from a local zip, remote zip URL, + * or uploaded zip file. + * + * @since 2.8.0 + * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php. + * + * @see WP_Upgrader + */ + class Theme_Upgrader extends \WP_Upgrader + { + /** + * Result of the theme upgrade offer. + * + * @since 2.8.0 + * @var array|WP_Error $result + * @see WP_Upgrader::$result + */ + public $result; + /** + * Whether multiple themes are being upgraded/installed in bulk. + * + * @since 2.9.0 + * @var bool $bulk + */ + public $bulk = \false; + /** + * New theme info. + * + * @since 5.5.0 + * @var array $new_theme_data + * + * @see check_package() + */ + public $new_theme_data = array(); + /** + * Initializes the upgrade strings. + * + * @since 2.8.0 + */ + public function upgrade_strings() + { + } + /** + * Initializes the installation strings. + * + * @since 2.8.0 + */ + public function install_strings() + { + } + /** + * Checks if a child theme is being installed and its parent also needs to be installed. + * + * Hooked to the {@see 'upgrader_post_install'} filter by Theme_Upgrader::install(). + * + * @since 3.4.0 + * + * @param bool $install_result + * @param array $hook_extra + * @param array $child_result + * @return bool + */ + public function check_parent_theme_filter($install_result, $hook_extra, $child_result) + { + } + /** + * Don't display the activate and preview actions to the user. + * + * Hooked to the {@see 'install_theme_complete_actions'} filter by + * Theme_Upgrader::check_parent_theme_filter() when installing + * a child theme and installing the parent theme fails. + * + * @since 3.4.0 + * + * @param array $actions Preview actions. + * @return array + */ + public function hide_activate_preview_actions($actions) + { + } + /** + * Install a theme package. + * + * @since 2.8.0 + * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional. + * + * @param string $package The full local path or URI of the package. + * @param array $args { + * Optional. Other arguments for installing a theme package. Default empty array. + * + * @type bool $clear_update_cache Whether to clear the updates cache if successful. + * Default true. + * } + * + * @return bool|WP_Error True if the installation was successful, false or a WP_Error object otherwise. + * @phpstan-param array{ + * clear_update_cache?: bool, + * } $args + */ + public function install($package, $args = array()) + { + } + /** + * Upgrades a theme. + * + * @since 2.8.0 + * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional. + * + * @param string $theme The theme slug. + * @param array $args { + * Optional. Other arguments for upgrading a theme. Default empty array. + * + * @type bool $clear_update_cache Whether to clear the update cache if successful. + * Default true. + * } + * @return bool|WP_Error True if the upgrade was successful, false or a WP_Error object otherwise. + * @phpstan-param array{ + * clear_update_cache?: bool, + * } $args + */ + public function upgrade($theme, $args = array()) + { + } + /** + * Upgrades several themes at once. + * + * @since 3.0.0 + * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional. + * + * @param string[] $themes Array of the theme slugs. + * @param array $args { + * Optional. Other arguments for upgrading several themes at once. Default empty array. + * + * @type bool $clear_update_cache Whether to clear the update cache if successful. + * Default true. + * } + * @return array[]|false An array of results, or false if unable to connect to the filesystem. + * @phpstan-param array{ + * clear_update_cache?: bool, + * } $args + */ + public function bulk_upgrade($themes, $args = array()) + { + } + /** + * Checks that the package source contains a valid theme. + * + * Hooked to the {@see 'upgrader_source_selection'} filter by Theme_Upgrader::install(). + * + * @since 3.3.0 + * + * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. + * + * @param string $source The path to the downloaded package source. + * @return string|WP_Error The source as passed, or a WP_Error object on failure. + */ + public function check_package($source) + { + } + /** + * Turns on maintenance mode before attempting to upgrade the active theme. + * + * Hooked to the {@see 'upgrader_pre_install'} filter by Theme_Upgrader::upgrade() and + * Theme_Upgrader::bulk_upgrade(). + * + * @since 2.8.0 + * + * @param bool|WP_Error $response The installation response before the installation has started. + * @param array $theme Theme arguments. + * @return bool|WP_Error The original `$response` parameter or WP_Error. + */ + public function current_before($response, $theme) + { + } + /** + * Turns off maintenance mode after upgrading the active theme. + * + * Hooked to the {@see 'upgrader_post_install'} filter by Theme_Upgrader::upgrade() + * and Theme_Upgrader::bulk_upgrade(). + * + * @since 2.8.0 + * + * @param bool|WP_Error $response The installation response after the installation has finished. + * @param array $theme Theme arguments. + * @return bool|WP_Error The original `$response` parameter or WP_Error. + */ + public function current_after($response, $theme) + { + } + /** + * Deletes the old theme during an upgrade. + * + * Hooked to the {@see 'upgrader_clear_destination'} filter by Theme_Upgrader::upgrade() + * and Theme_Upgrader::bulk_upgrade(). + * + * @since 2.8.0 + * + * @global WP_Filesystem_Base $wp_filesystem Subclass + * + * @param bool $removed + * @param string $local_destination + * @param string $remote_destination + * @param array $theme + * @return bool + */ + public function delete_old_theme($removed, $local_destination, $remote_destination, $theme) + { + } + /** + * Gets the WP_Theme object for a theme. + * + * @since 2.8.0 + * @since 3.0.0 The `$theme` argument was added. + * + * @param string $theme The directory name of the theme. This is optional, and if not supplied, + * the directory name from the last result will be used. + * @return WP_Theme|false The theme's info object, or false `$theme` is not supplied + * and the last result isn't set. + */ + public function theme_info($theme = \null) + { + } + } + /** + * A class for displaying various tree-like structures. + * + * Extend the Walker class to use it, see examples below. Child classes + * do not need to implement all of the abstract methods in the class. The child + * only needs to implement the methods that are needed. + * + * @since 2.1.0 + * + * @package WordPress + * @abstract + */ + #[\AllowDynamicProperties] + class Walker + { + /** + * What the class handles. + * + * @since 2.1.0 + * @var string + */ + public $tree_type; + /** + * DB fields to use. + * + * @since 2.1.0 + * @var string[] + */ + public $db_fields; + /** + * Max number of pages walked by the paged walker. + * + * @since 2.7.0 + * @var int + */ + public $max_pages = 1; + /** + * Whether the current element has children or not. + * + * To be used in start_el(). + * + * @since 4.0.0 + * @var bool + */ + public $has_children; + /** + * Starts the list before the elements are added. + * + * The $args parameter holds additional values that may be used with the child + * class methods. This method is called at the start of the output list. + * + * @since 2.1.0 + * @abstract + * + * @param string $output Used to append additional content (passed by reference). + * @param int $depth Depth of the item. + * @param array $args An array of additional arguments. + */ + public function start_lvl(&$output, $depth = 0, $args = array()) + { + } + /** + * Ends the list of after the elements are added. + * + * The $args parameter holds additional values that may be used with the child + * class methods. This method finishes the list at the end of output of the elements. + * + * @since 2.1.0 + * @abstract + * + * @param string $output Used to append additional content (passed by reference). + * @param int $depth Depth of the item. + * @param array $args An array of additional arguments. + */ + public function end_lvl(&$output, $depth = 0, $args = array()) + { + } + /** + * Starts the element output. + * + * The $args parameter holds additional values that may be used with the child + * class methods. Also includes the element output. + * + * @since 2.1.0 + * @since 5.9.0 Renamed `$object` (a PHP reserved keyword) to `$data_object` for PHP 8 named parameter support. + * @abstract + * + * @param string $output Used to append additional content (passed by reference). + * @param object $data_object The data object. + * @param int $depth Depth of the item. + * @param array $args An array of additional arguments. + * @param int $current_object_id Optional. ID of the current item. Default 0. + */ + public function start_el(&$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0) + { + } + /** + * Ends the element output, if needed. + * + * The $args parameter holds additional values that may be used with the child class methods. + * + * @since 2.1.0 + * @since 5.9.0 Renamed `$object` (a PHP reserved keyword) to `$data_object` for PHP 8 named parameter support. + * @abstract + * + * @param string $output Used to append additional content (passed by reference). + * @param object $data_object The data object. + * @param int $depth Depth of the item. + * @param array $args An array of additional arguments. + */ + public function end_el(&$output, $data_object, $depth = 0, $args = array()) + { + } + /** + * Traverses elements to create list from elements. + * + * Display one element if the element doesn't have any children otherwise, + * display the element and its children. Will only traverse up to the max + * depth and no ignore elements under that depth. It is possible to set the + * max depth to include all depths, see walk() method. + * + * This method should not be called directly, use the walk() method instead. + * + * @since 2.5.0 + * + * @param object $element Data object. + * @param array $children_elements List of elements to continue traversing (passed by reference). + * @param int $max_depth Max depth to traverse. + * @param int $depth Depth of current element. + * @param array $args An array of arguments. + * @param string $output Used to append additional content (passed by reference). + * @phpstan-return void + */ + public function display_element($element, &$children_elements, $max_depth, $depth, $args, &$output) + { + } + /** + * Displays array of elements hierarchically. + * + * Does not assume any existing order of elements. + * + * $max_depth = -1 means flatly display every element. + * $max_depth = 0 means display all levels. + * $max_depth > 0 specifies the number of display levels. + * + * @since 2.1.0 + * @since 5.3.0 Formalized the existing `...$args` parameter by adding it + * to the function signature. + * + * @param array $elements An array of elements. + * @param int $max_depth The maximum hierarchical depth. + * @param mixed ...$args Optional additional arguments. + * @return string The hierarchical item output. + */ + public function walk($elements, $max_depth, ...$args) + { + } + /** + * Produces a page of nested elements. + * + * Given an array of hierarchical elements, the maximum depth, a specific page number, + * and number of elements per page, this function first determines all top level root elements + * belonging to that page, then lists them and all of their children in hierarchical order. + * + * $max_depth = 0 means display all levels. + * $max_depth > 0 specifies the number of display levels. + * + * @since 2.7.0 + * @since 5.3.0 Formalized the existing `...$args` parameter by adding it + * to the function signature. + * + * @param array $elements An array of elements. + * @param int $max_depth The maximum hierarchical depth. + * @param int $page_num The specific page number, beginning with 1. + * @param int $per_page Number of elements per page. + * @param mixed ...$args Optional additional arguments. + * @return string XHTML of the specified page of elements. + */ + public function paged_walk($elements, $max_depth, $page_num, $per_page, ...$args) + { + } + /** + * Calculates the total number of root elements. + * + * @since 2.7.0 + * + * @param array $elements Elements to list. + * @return int Number of root elements. + */ + public function get_number_of_root_elements($elements) + { + } + /** + * Unsets all the children for a given top level element. + * + * @since 2.7.0 + * + * @param object $element The top level element. + * @param array $children_elements The children elements. + * @phpstan-return void + */ + public function unset_children($element, &$children_elements) + { + } + } + /** + * Core walker class to output an unordered list of category checkbox input elements. + * + * @since 2.5.1 + * + * @see Walker + * @see wp_category_checklist() + * @see wp_terms_checklist() + */ + class Walker_Category_Checklist extends \Walker + { + public $tree_type = 'category'; + public $db_fields = array('parent' => 'parent', 'id' => 'term_id'); + /** + * Starts the list before the elements are added. + * + * @see Walker:start_lvl() + * + * @since 2.5.1 + * + * @param string $output Used to append additional content (passed by reference). + * @param int $depth Depth of category. Used for tab indentation. + * @param array $args An array of arguments. See {@see wp_terms_checklist()}. + * @phpstan-param array{ + * descendants_and_self?: int, + * selected_cats?: int[], + * popular_cats?: int[], + * walker?: Walker, + * taxonomy?: string, + * checked_ontop?: bool, + * echo?: bool, + * } $args See wp_terms_checklist() + */ + public function start_lvl(&$output, $depth = 0, $args = array()) + { + } + /** + * Ends the list of after the elements are added. + * + * @see Walker::end_lvl() + * + * @since 2.5.1 + * + * @param string $output Used to append additional content (passed by reference). + * @param int $depth Depth of category. Used for tab indentation. + * @param array $args An array of arguments. See {@see wp_terms_checklist()}. + * @phpstan-param array{ + * descendants_and_self?: int, + * selected_cats?: int[], + * popular_cats?: int[], + * walker?: Walker, + * taxonomy?: string, + * checked_ontop?: bool, + * echo?: bool, + * } $args See wp_terms_checklist() + */ + public function end_lvl(&$output, $depth = 0, $args = array()) + { + } + /** + * Start the element output. + * + * @see Walker::start_el() + * + * @since 2.5.1 + * @since 5.9.0 Renamed `$category` to `$data_object` and `$id` to `$current_object_id` + * to match parent class for PHP 8 named parameter support. + * + * @param string $output Used to append additional content (passed by reference). + * @param WP_Term $data_object The current term object. + * @param int $depth Depth of the term in reference to parents. Default 0. + * @param array $args An array of arguments. See {@see wp_terms_checklist()}. + * @param int $current_object_id Optional. ID of the current term. Default 0. + * @phpstan-param array{ + * descendants_and_self?: int, + * selected_cats?: int[], + * popular_cats?: int[], + * walker?: Walker, + * taxonomy?: string, + * checked_ontop?: bool, + * echo?: bool, + * } $args See wp_terms_checklist() + */ + public function start_el(&$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0) + { + } + /** + * Ends the element output, if needed. + * + * @see Walker::end_el() + * + * @since 2.5.1 + * @since 5.9.0 Renamed `$category` to `$data_object` to match parent class for PHP 8 named parameter support. + * + * @param string $output Used to append additional content (passed by reference). + * @param WP_Term $data_object The current term object. + * @param int $depth Depth of the term in reference to parents. Default 0. + * @param array $args An array of arguments. See {@see wp_terms_checklist()}. + * @phpstan-param array{ + * descendants_and_self?: int, + * selected_cats?: int[], + * popular_cats?: int[], + * walker?: Walker, + * taxonomy?: string, + * checked_ontop?: bool, + * echo?: bool, + * } $args See wp_terms_checklist() + */ + public function end_el(&$output, $data_object, $depth = 0, $args = array()) + { + } + } + /** + * Core class used to implement an HTML list of nav menu items. + * + * @since 3.0.0 + * + * @see Walker + */ + class Walker_Nav_Menu extends \Walker + { + /** + * What the class handles. + * + * @since 3.0.0 + * @var string + * + * @see Walker::$tree_type + */ + public $tree_type = array('post_type', 'taxonomy', 'custom'); + /** + * Database fields to use. + * + * @since 3.0.0 + * @todo Decouple this. + * @var string[] + * + * @see Walker::$db_fields + */ + public $db_fields = array('parent' => 'menu_item_parent', 'id' => 'db_id'); + /** + * Constructor. + * + * @since 6.8.0 + */ + public function __construct() + { + } + /** + * Starts the list before the elements are added. + * + * @since 3.0.0 + * + * @see Walker::start_lvl() + * + * @param string $output Used to append additional content (passed by reference). + * @param int $depth Depth of menu item. Used for padding. + * @param stdClass $args An object of wp_nav_menu() arguments. + */ + public function start_lvl(&$output, $depth = 0, $args = \null) + { + } + /** + * Ends the list of after the elements are added. + * + * @since 3.0.0 + * + * @see Walker::end_lvl() + * + * @param string $output Used to append additional content (passed by reference). + * @param int $depth Depth of menu item. Used for padding. + * @param stdClass $args An object of wp_nav_menu() arguments. + */ + public function end_lvl(&$output, $depth = 0, $args = \null) + { + } + /** + * Starts the element output. + * + * @since 3.0.0 + * @since 4.4.0 The {@see 'nav_menu_item_args'} filter was added. + * @since 5.9.0 Renamed `$item` to `$data_object` and `$id` to `$current_object_id` + * to match parent class for PHP 8 named parameter support. + * @since 6.7.0 Removed redundant title attributes. + * + * @see Walker::start_el() + * + * @param string $output Used to append additional content (passed by reference). + * @param WP_Post $data_object Menu item data object. + * @param int $depth Depth of menu item. Used for padding. + * @param stdClass $args An object of wp_nav_menu() arguments. + * @param int $current_object_id Optional. ID of the current menu item. Default 0. + */ + public function start_el(&$output, $data_object, $depth = 0, $args = \null, $current_object_id = 0) + { + } + /** + * Ends the element output, if needed. + * + * @since 3.0.0 + * @since 5.9.0 Renamed `$item` to `$data_object` to match parent class for PHP 8 named parameter support. + * + * @see Walker::end_el() + * + * @param string $output Used to append additional content (passed by reference). + * @param WP_Post $data_object Menu item data object. Not used. + * @param int $depth Depth of page. Not Used. + * @param stdClass $args An object of wp_nav_menu() arguments. + */ + public function end_el(&$output, $data_object, $depth = 0, $args = \null) + { + } + /** + * Builds a string of HTML attributes from an array of key/value pairs. + * Empty values are ignored. + * + * @since 6.3.0 + * + * @param array $atts Optional. An array of HTML attribute key/value pairs. Default empty array. + * @return string A string of HTML attributes. + */ + protected function build_atts($atts = array()) + { + } + } + /** + * Create HTML list of nav menu input items. + * + * @since 3.0.0 + * @uses Walker_Nav_Menu + */ + class Walker_Nav_Menu_Checklist extends \Walker_Nav_Menu + { + /** + * @param array|false $fields Database fields to use. + */ + public function __construct($fields = \false) + { + } + /** + * Starts the list before the elements are added. + * + * @see Walker_Nav_Menu::start_lvl() + * + * @since 3.0.0 + * + * @param string $output Used to append additional content (passed by reference). + * @param int $depth Depth of page. Used for padding. + * @param stdClass $args Not used. + */ + public function start_lvl(&$output, $depth = 0, $args = \null) + { + } + /** + * Ends the list of after the elements are added. + * + * @see Walker_Nav_Menu::end_lvl() + * + * @since 3.0.0 + * + * @param string $output Used to append additional content (passed by reference). + * @param int $depth Depth of page. Used for padding. + * @param stdClass $args Not used. + */ + public function end_lvl(&$output, $depth = 0, $args = \null) + { + } + /** + * Start the element output. + * + * @see Walker_Nav_Menu::start_el() + * + * @since 3.0.0 + * @since 5.9.0 Renamed `$item` to `$data_object` and `$id` to `$current_object_id` + * to match parent class for PHP 8 named parameter support. + * + * @global int $_nav_menu_placeholder + * @global int|string $nav_menu_selected_id + * + * @param string $output Used to append additional content (passed by reference). + * @param WP_Post $data_object Menu item data object. + * @param int $depth Depth of menu item. Used for padding. + * @param stdClass $args Not used. + * @param int $current_object_id Optional. ID of the current menu item. Default 0. + */ + public function start_el(&$output, $data_object, $depth = 0, $args = \null, $current_object_id = 0) + { + } + } + /** + * Create HTML list of nav menu input items. + * + * @since 3.0.0 + * + * @see Walker_Nav_Menu + */ + class Walker_Nav_Menu_Edit extends \Walker_Nav_Menu + { + /** + * Starts the list before the elements are added. + * + * @see Walker_Nav_Menu::start_lvl() + * + * @since 3.0.0 + * + * @param string $output Passed by reference. + * @param int $depth Depth of menu item. Used for padding. + * @param stdClass $args Not used. + */ + public function start_lvl(&$output, $depth = 0, $args = \null) + { + } + /** + * Ends the list of after the elements are added. + * + * @see Walker_Nav_Menu::end_lvl() + * + * @since 3.0.0 + * + * @param string $output Passed by reference. + * @param int $depth Depth of menu item. Used for padding. + * @param stdClass $args Not used. + */ + public function end_lvl(&$output, $depth = 0, $args = \null) + { + } + /** + * Start the element output. + * + * @see Walker_Nav_Menu::start_el() + * @since 3.0.0 + * @since 5.9.0 Renamed `$item` to `$data_object` and `$id` to `$current_object_id` + * to match parent class for PHP 8 named parameter support. + * + * @global int $_wp_nav_menu_max_depth + * + * @param string $output Used to append additional content (passed by reference). + * @param WP_Post $data_object Menu item data object. + * @param int $depth Depth of menu item. Used for padding. + * @param stdClass $args Not used. + * @param int $current_object_id Optional. ID of the current menu item. Default 0. + */ + public function start_el(&$output, $data_object, $depth = 0, $args = \null, $current_object_id = 0) + { + } + } + /** + * Upgrader Skin for Ajax WordPress upgrades. + * + * This skin is designed to be used for Ajax updates. + * + * @since 4.6.0 + * + * @see Automatic_Upgrader_Skin + */ + class WP_Ajax_Upgrader_Skin extends \Automatic_Upgrader_Skin + { + /** + * Plugin info. + * + * The Plugin_Upgrader::bulk_upgrade() method will fill this in + * with info retrieved from the get_plugin_data() function. + * + * @var array Plugin data. Values will be empty if not supplied by the plugin. + */ + public $plugin_info = array(); + /** + * Theme info. + * + * The Theme_Upgrader::bulk_upgrade() method will fill this in + * with info retrieved from the Theme_Upgrader::theme_info() method, + * which in turn calls the wp_get_theme() function. + * + * @var WP_Theme|false The theme's info object, or false. + */ + public $theme_info = \false; + /** + * Holds the WP_Error object. + * + * @since 4.6.0 + * + * @var null|WP_Error + */ + protected $errors = \null; + /** + * Constructor. + * + * Sets up the WordPress Ajax upgrader skin. + * + * @since 4.6.0 + * + * @see WP_Upgrader_Skin::__construct() + * + * @param array $args Optional. The WordPress Ajax upgrader skin arguments to + * override default options. See WP_Upgrader_Skin::__construct(). + * Default empty array. + */ + public function __construct($args = array()) + { + } + /** + * Retrieves the list of errors. + * + * @since 4.6.0 + * + * @return WP_Error Errors during an upgrade. + */ + public function get_errors() + { + } + /** + * Retrieves a string for error messages. + * + * @since 4.6.0 + * + * @return string Error messages during an upgrade. + */ + public function get_error_messages() + { + } + /** + * Stores an error message about the upgrade. + * + * @since 4.6.0 + * @since 5.3.0 Formalized the existing `...$args` parameter by adding it + * to the function signature. + * + * @param string|WP_Error $errors Errors. + * @param mixed ...$args Optional text replacements. + */ + public function error($errors, ...$args) + { + } + /** + * Stores a message about the upgrade. + * + * @since 4.6.0 + * @since 5.3.0 Formalized the existing `...$args` parameter by adding it + * to the function signature. + * @since 5.9.0 Renamed `$data` to `$feedback` for PHP 8 named parameter support. + * + * @param string|array|WP_Error $feedback Message data. + * @param mixed ...$args Optional text replacements. + */ + public function feedback($feedback, ...$args) + { + } + } + /** + * Base class for displaying a list of items in an ajaxified HTML table. + * + * @since 3.1.0 + */ + #[\AllowDynamicProperties] + class WP_List_Table + { + /** + * The current list of items. + * + * @since 3.1.0 + * @var array + */ + public $items; + /** + * Various information about the current table. + * + * @since 3.1.0 + * @var array + */ + protected $_args; + /** + * Various information needed for displaying the pagination. + * + * @since 3.1.0 + * @var array + */ + protected $_pagination_args = array(); + /** + * The current screen. + * + * @since 3.1.0 + * @var WP_Screen + */ + protected $screen; + /** + * The view switcher modes. + * + * @since 4.1.0 + * @var array + */ + protected $modes = array(); + /** + * Stores the value returned by ::get_column_info(). + * + * @since 4.1.0 + * @var array|null + */ + protected $_column_headers; + /** + * {@internal Missing Summary} + * + * @var array + */ + protected $compat_fields = array('_args', '_pagination_args', 'screen', '_actions', '_pagination'); + /** + * {@internal Missing Summary} + * + * @var array + */ + protected $compat_methods = array('set_pagination_args', 'get_views', 'get_bulk_actions', 'bulk_actions', 'row_actions', 'months_dropdown', 'view_switcher', 'comments_bubble', 'get_items_per_page', 'pagination', 'get_sortable_columns', 'get_column_info', 'get_table_classes', 'display_tablenav', 'extra_tablenav', 'single_row_columns'); + /** + * Constructor. + * + * The child class should call this constructor from its own constructor to override + * the default $args. + * + * @since 3.1.0 + * + * @param array|string $args { + * Array or string of arguments. + * + * @type string $plural Plural value used for labels and the objects being listed. + * This affects things such as CSS class-names and nonces used + * in the list table, e.g. 'posts'. Default empty. + * @type string $singular Singular label for an object being listed, e.g. 'post'. + * Default empty + * @type bool $ajax Whether the list table supports Ajax. This includes loading + * and sorting data, for example. If true, the class will call + * the _js_vars() method in the footer to provide variables + * to any scripts handling Ajax events. Default false. + * @type string $screen String containing the hook name used to determine the current + * screen. If left null, the current screen will be automatically set. + * Default null. + * } + * @phpstan-param array{ + * plural?: string, + * singular?: string, + * ajax?: bool, + * screen?: string, + * } $args + */ + public function __construct($args = array()) + { + } + /** + * Makes private properties readable for backward compatibility. + * + * @since 4.0.0 + * @since 6.4.0 Getting a dynamic property is deprecated. + * + * @param string $name Property to get. + * @return mixed Property. + */ + public function __get($name) + { + } + /** + * Makes private properties settable for backward compatibility. + * + * @since 4.0.0 + * @since 6.4.0 Setting a dynamic property is deprecated. + * + * @param string $name Property to check if set. + * @param mixed $value Property value. + * @phpstan-return void + */ + public function __set($name, $value) + { + } + /** + * Makes private properties checkable for backward compatibility. + * + * @since 4.0.0 + * @since 6.4.0 Checking a dynamic property is deprecated. + * + * @param string $name Property to check if set. + * @return bool Whether the property is a back-compat property and it is set. + */ + public function __isset($name) + { + } + /** + * Makes private properties un-settable for backward compatibility. + * + * @since 4.0.0 + * @since 6.4.0 Unsetting a dynamic property is deprecated. + * + * @param string $name Property to unset. + * @phpstan-return void + */ + public function __unset($name) + { + } + /** + * Makes private/protected methods readable for backward compatibility. + * + * @since 4.0.0 + * + * @param string $name Method to call. + * @param array $arguments Arguments to pass when calling. + * @return mixed|bool Return value of the callback, false otherwise. + */ + public function __call($name, $arguments) + { + } + /** + * Checks the current user's permissions + * + * @since 3.1.0 + * @abstract + */ + public function ajax_user_can() + { + } + /** + * Prepares the list of items for displaying. + * + * @uses WP_List_Table::set_pagination_args() + * + * @since 3.1.0 + * @abstract + */ + public function prepare_items() + { + } + /** + * Sets all the necessary pagination arguments. + * + * @since 3.1.0 + * + * @param array|string $args Array or string of arguments with information about the pagination. + * @phpstan-param array{total_items?: int, total_pages?: int, per_page?: int} $args + * @phpstan-return void + */ + protected function set_pagination_args($args) + { + } + /** + * Access the pagination args. + * + * @since 3.1.0 + * + * @param string $key Pagination argument to retrieve. Common values include 'total_items', + * 'total_pages', 'per_page', or 'infinite_scroll'. + * @return int Number of items that correspond to the given pagination argument. + */ + public function get_pagination_arg($key) + { + } + /** + * Determines whether the table has items to display or not + * + * @since 3.1.0 + * + * @return bool + */ + public function has_items() + { + } + /** + * Message to be displayed when there are no items + * + * @since 3.1.0 + */ + public function no_items() + { + } + /** + * Displays the search box. + * + * @since 3.1.0 + * + * @param string $text The 'submit' button label. + * @param string $input_id ID attribute value for the search input field. + * @phpstan-return void + */ + public function search_box($text, $input_id) + { + } + /** + * Generates views links. + * + * @since 6.1.0 + * + * @param array $link_data { + * An array of link data. + * + * @type string $url The link URL. + * @type string $label The link label. + * @type bool $current Optional. Whether this is the currently selected view. + * } + * @return string[] An array of link markup. Keys match the `$link_data` input array. + * @phpstan-param array{ + * url?: string, + * label?: string, + * current?: bool, + * } $link_data + */ + protected function get_views_links($link_data = array()) + { + } + /** + * Gets the list of views available on this table. + * + * The format is an associative array: + * - `'id' => 'link'` + * + * @since 3.1.0 + * + * @return array + */ + protected function get_views() + { + } + /** + * Displays the list of views available on this table. + * + * @since 3.1.0 + * @phpstan-return void + */ + public function views() + { + } + /** + * Retrieves the list of bulk actions available for this table. + * + * The format is an associative array where each element represents either a top level option value and label, or + * an array representing an optgroup and its options. + * + * For a standard option, the array element key is the field value and the array element value is the field label. + * + * For an optgroup, the array element key is the label and the array element value is an associative array of + * options as above. + * + * Example: + * + * [ + * 'edit' => 'Edit', + * 'delete' => 'Delete', + * 'Change State' => [ + * 'feature' => 'Featured', + * 'sale' => 'On Sale', + * ] + * ] + * + * @since 3.1.0 + * @since 5.6.0 A bulk action can now contain an array of options in order to create an optgroup. + * + * @return array + */ + protected function get_bulk_actions() + { + } + /** + * Displays the bulk actions dropdown. + * + * @since 3.1.0 + * + * @param string $which The location of the bulk actions: Either 'top' or 'bottom'. + * This is designated as optional for backward compatibility. + * @phpstan-param 'top'|'bottom' $which + * @phpstan-return void + */ + protected function bulk_actions($which = '') + { + } + /** + * Gets the current action selected from the bulk actions dropdown. + * + * @since 3.1.0 + * + * @return string|false The action name. False if no action was selected. + */ + public function current_action() + { + } + /** + * Generates the required HTML for a list of row action links. + * + * @since 3.1.0 + * + * @param string[] $actions An array of action links. + * @param bool $always_visible Whether the actions should be always visible. + * @return string The HTML for the row actions. + */ + protected function row_actions($actions, $always_visible = \false) + { + } + /** + * Displays a dropdown for filtering items in the list table by month. + * + * @since 3.1.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * @global WP_Locale $wp_locale WordPress date and time locale object. + * + * @param string $post_type The post type. + * @phpstan-return void + */ + protected function months_dropdown($post_type) + { + } + /** + * Displays a view switcher. + * + * @since 3.1.0 + * + * @param string $current_mode + */ + protected function view_switcher($current_mode) + { + } + /** + * Displays a comment count bubble. + * + * @since 3.1.0 + * + * @param int $post_id The post ID. + * @param int $pending_comments Number of pending comments. + */ + protected function comments_bubble($post_id, $pending_comments) + { + } + /** + * Gets the current page number. + * + * @since 3.1.0 + * + * @return int + */ + public function get_pagenum() + { + } + /** + * Gets the number of items to display on a single page. + * + * @since 3.1.0 + * + * @param string $option User option name. + * @param int $default_value Optional. The number of items to display. Default 20. + * @return int + */ + protected function get_items_per_page($option, $default_value = 20) + { + } + /** + * Displays the pagination. + * + * @since 3.1.0 + * + * @param string $which The location of the pagination: Either 'top' or 'bottom'. + * @phpstan-param 'top'|'bottom' $which + * @phpstan-return void + */ + protected function pagination($which) + { + } + /** + * Gets a list of columns. + * + * The format is: + * - `'internal-name' => 'Title'` + * + * @since 3.1.0 + * @abstract + * + * @return array + */ + public function get_columns() + { + } + /** + * Gets a list of sortable columns. + * + * The format is: + * - `'internal-name' => 'orderby'` + * - `'internal-name' => array( 'orderby', bool, 'abbr', 'orderby-text', 'initially-sorted-column-order' )` - + * - `'internal-name' => array( 'orderby', 'asc' )` - The second element sets the initial sorting order. + * - `'internal-name' => array( 'orderby', true )` - The second element makes the initial order descending. + * + * In the second format, passing true as second parameter will make the initial + * sorting order be descending. Following parameters add a short column name to + * be used as 'abbr' attribute, a translatable string for the current sorting, + * and the initial order for the initial sorted column, 'asc' or 'desc' (default: false). + * + * @since 3.1.0 + * @since 6.3.0 Added 'abbr', 'orderby-text' and 'initially-sorted-column-order'. + * + * @return array + */ + protected function get_sortable_columns() + { + } + /** + * Gets the name of the default primary column. + * + * @since 4.3.0 + * + * @return string Name of the default primary column, in this case, an empty string. + */ + protected function get_default_primary_column_name() + { + } + /** + * Gets the name of the primary column. + * + * Public wrapper for WP_List_Table::get_default_primary_column_name(). + * + * @since 4.4.0 + * + * @return string Name of the default primary column. + */ + public function get_primary_column() + { + } + /** + * Gets the name of the primary column. + * + * @since 4.3.0 + * + * @return string The name of the primary column. + */ + protected function get_primary_column_name() + { + } + /** + * Gets a list of all, hidden, and sortable columns, with filter applied. + * + * @since 3.1.0 + * + * @return array + */ + protected function get_column_info() + { + } + /** + * Returns the number of visible columns. + * + * @since 3.1.0 + * + * @return int + */ + public function get_column_count() + { + } + /** + * Prints column headers, accounting for hidden and sortable columns. + * + * @since 3.1.0 + * + * @param bool $with_id Whether to set the ID attribute or not + */ + public function print_column_headers($with_id = \true) + { + } + /** + * Print a table description with information about current sorting and order. + * + * For the table initial view, information about initial orderby and order + * should be provided via get_sortable_columns(). + * + * @since 6.3.0 + * @phpstan-return void + */ + public function print_table_description() + { + } + /** + * Displays the table. + * + * @since 3.1.0 + */ + public function display() + { + } + /** + * Gets a list of CSS classes for the WP_List_Table table tag. + * + * @since 3.1.0 + * + * @return string[] Array of CSS classes for the table tag. + */ + protected function get_table_classes() + { + } + /** + * Generates the table navigation above or below the table + * + * @since 3.1.0 + * @param string $which The location of the navigation: Either 'top' or 'bottom'. + * @phpstan-param 'top'|'bottom' $which + * @phpstan-return void + */ + protected function display_tablenav($which) + { + } + /** + * Displays extra controls between bulk actions and pagination. + * + * @since 3.1.0 + * + * @param string $which + */ + protected function extra_tablenav($which) + { + } + /** + * Generates the tbody element for the list table. + * + * @since 3.1.0 + */ + public function display_rows_or_placeholder() + { + } + /** + * Generates the list table rows. + * + * @since 3.1.0 + */ + public function display_rows() + { + } + /** + * Generates content for a single row of the table. + * + * @since 3.1.0 + * + * @param object|array $item The current item + */ + public function single_row($item) + { + } + /** + * @param object|array $item + * @param string $column_name + */ + protected function column_default($item, $column_name) + { + } + /** + * @param object|array $item + */ + protected function column_cb($item) + { + } + /** + * Generates the columns for a single row of the table. + * + * @since 3.1.0 + * + * @param object|array $item The current item. + */ + protected function single_row_columns($item) + { + } + /** + * Generates and display row actions links for the list table. + * + * @since 4.3.0 + * + * @param object|array $item The item being acted upon. + * @param string $column_name Current column name. + * @param string $primary Primary column name. + * @return string The row actions HTML, or an empty string + * if the current column is not the primary column. + */ + protected function handle_row_actions($item, $column_name, $primary) + { + } + /** + * Handles an incoming ajax request (called from admin-ajax.php) + * + * @since 3.1.0 + * @phpstan-return never + */ + public function ajax_response() + { + } + /** + * Sends required variables to JavaScript land. + * + * @since 3.1.0 + */ + public function _js_vars() + { + } + } + /** + * Class for displaying the list of application password items. + * + * @since 5.6.0 + * + * @see WP_List_Table + */ + class WP_Application_Passwords_List_Table extends \WP_List_Table + { + /** + * Gets the list of columns. + * + * @since 5.6.0 + * + * @return string[] Array of column titles keyed by their column name. + */ + public function get_columns() + { + } + /** + * Prepares the list of items for displaying. + * + * @since 5.6.0 + * + * @global int $user_id User ID. + */ + public function prepare_items() + { + } + /** + * Handles the name column output. + * + * @since 5.6.0 + * + * @param array $item The current application password item. + */ + public function column_name($item) + { + } + /** + * Handles the created column output. + * + * @since 5.6.0 + * + * @param array $item The current application password item. + */ + public function column_created($item) + { + } + /** + * Handles the last used column output. + * + * @since 5.6.0 + * + * @param array $item The current application password item. + */ + public function column_last_used($item) + { + } + /** + * Handles the last ip column output. + * + * @since 5.6.0 + * + * @param array $item The current application password item. + */ + public function column_last_ip($item) + { + } + /** + * Handles the revoke column output. + * + * @since 5.6.0 + * + * @param array $item The current application password item. + */ + public function column_revoke($item) + { + } + /** + * Generates content for a single row of the table + * + * @since 5.6.0 + * + * @param array $item The current item. + * @param string $column_name The current column name. + */ + protected function column_default($item, $column_name) + { + } + /** + * Generates custom table navigation to prevent conflicting nonces. + * + * @since 5.6.0 + * + * @param string $which The location of the bulk actions: Either 'top' or 'bottom'. + * @phpstan-param 'top'|'bottom' $which + */ + protected function display_tablenav($which) + { + } + /** + * Generates content for a single row of the table. + * + * @since 5.6.0 + * + * @param array $item The current item. + */ + public function single_row($item) + { + } + /** + * Gets the name of the default primary column. + * + * @since 5.6.0 + * + * @return string Name of the default primary column, in this case, 'name'. + */ + protected function get_default_primary_column_name() + { + } + /** + * Prints the JavaScript template for the new row item. + * + * @since 5.6.0 + */ + public function print_js_template_row() + { + } + } + /** + * Core class used for handling automatic background updates. + * + * @since 3.7.0 + * @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php. + */ + #[\AllowDynamicProperties] + class WP_Automatic_Updater + { + /** + * Tracks update results during processing. + * + * @var array + */ + protected $update_results = array(); + /** + * Determines whether the entire automatic updater is disabled. + * + * @since 3.7.0 + * + * @return bool True if the automatic updater is disabled, false otherwise. + */ + public function is_disabled() + { + } + /** + * Checks whether access to a given directory is allowed. + * + * This is used when detecting version control checkouts. Takes into account + * the PHP `open_basedir` restrictions, so that WordPress does not try to access + * directories it is not allowed to. + * + * @since 6.2.0 + * + * @param string $dir The directory to check. + * @return bool True if access to the directory is allowed, false otherwise. + */ + public function is_allowed_dir($dir) + { + } + /** + * Checks for version control checkouts. + * + * Checks for Subversion, Git, Mercurial, and Bazaar. It recursively looks up the + * filesystem to the top of the drive, erring on the side of detecting a VCS + * checkout somewhere. + * + * ABSPATH is always checked in addition to whatever `$context` is (which may be the + * wp-content directory, for example). The underlying assumption is that if you are + * using version control *anywhere*, then you should be making decisions for + * how things get updated. + * + * @since 3.7.0 + * + * @param string $context The filesystem path to check, in addition to ABSPATH. + * @return bool True if a VCS checkout was discovered at `$context` or ABSPATH, + * or anywhere higher. False otherwise. + */ + public function is_vcs_checkout($context) + { + } + /** + * Tests to see if we can and should update a specific item. + * + * @since 3.7.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $type The type of update being checked: 'core', 'theme', + * 'plugin', 'translation'. + * @param object $item The update offer. + * @param string $context The filesystem context (a path) against which filesystem + * access and status should be checked. + * @return bool True if the item should be updated, false otherwise. + */ + public function should_update($type, $item, $context) + { + } + /** + * Notifies an administrator of a core update. + * + * @since 3.7.0 + * + * @param object $item The update offer. + * @return bool True if the site administrator is notified of a core update, + * false otherwise. + */ + protected function send_core_update_notification_email($item) + { + } + /** + * Updates an item, if appropriate. + * + * @since 3.7.0 + * + * @param string $type The type of update being checked: 'core', 'theme', 'plugin', 'translation'. + * @param object $item The update offer. + * @return null|WP_Error + */ + public function update($type, $item) + { + } + /** + * Kicks off the background update process, looping through all pending updates. + * + * @since 3.7.0 + * @phpstan-return void + */ + public function run() + { + } + /** + * Checks whether to send an email and avoid processing future updates after + * attempting a core update. + * + * @since 3.7.0 + * + * @param object $update_result The result of the core update. Includes the update offer and result. + * @phpstan-return void + */ + protected function after_core_update($update_result) + { + } + /** + * Sends an email upon the completion or failure of a background core update. + * + * @since 3.7.0 + * + * @param string $type The type of email to send. Can be one of 'success', 'fail', 'manual', 'critical'. + * @param object $core_update The update offer that was attempted. + * @param mixed $result Optional. The result for the core update. Can be WP_Error. + * @phpstan-return void + */ + protected function send_email($type, $core_update, $result = \null) + { + } + /** + * Checks whether an email should be sent after attempting plugin or theme updates. + * + * @since 5.5.0 + * + * @param array $update_results The results of update tasks. + * @phpstan-return void + */ + protected function after_plugin_theme_update($update_results) + { + } + /** + * Sends an email upon the completion or failure of a plugin or theme background update. + * + * @since 5.5.0 + * + * @param string $type The type of email to send. Can be one of 'success', 'fail', 'mixed'. + * @param array $successful_updates A list of updates that succeeded. + * @param array $failed_updates A list of updates that failed. + * @phpstan-return void + */ + protected function send_plugin_theme_email($type, $successful_updates, $failed_updates) + { + } + /** + * Prepares and sends an email of a full log of background update results, useful for debugging and geekery. + * + * @since 3.7.0 + */ + protected function send_debug_email() + { + } + /** + * Performs a loopback request to check for potential fatal errors. + * + * Fatal errors cannot be detected unless maintenance mode is enabled. + * + * @since 6.6.0 + * + * @global int $upgrading The Unix timestamp marking when upgrading WordPress began. + * + * @return bool Whether a fatal error was detected. + */ + protected function has_fatal_error() + { + } + } + /** + * Core class used to implement displaying comments in a list table. + * + * @since 3.1.0 + * + * @see WP_List_Table + */ + class WP_Comments_List_Table extends \WP_List_Table + { + public $checkbox = \true; + public $pending_count = array(); + public $extra_items; + /** + * Constructor. + * + * @since 3.1.0 + * + * @see WP_List_Table::__construct() for more information on default arguments. + * + * @global int $post_id + * + * @param array $args An associative array of arguments. + */ + public function __construct($args = array()) + { + } + /** + * Adds avatars to comment author names. + * + * @since 3.1.0 + * + * @param string $name Comment author name. + * @param int $comment_id Comment ID. + * @return string Avatar with the user name. + */ + public function floated_admin_avatar($name, $comment_id) + { + } + /** + * @return bool + */ + public function ajax_user_can() + { + } + /** + * @global string $mode List table view mode. + * @global int $post_id + * @global string $comment_status + * @global string $comment_type + * @global string $search + */ + public function prepare_items() + { + } + /** + * @param string $comment_status + * @return int + */ + public function get_per_page($comment_status = 'all') + { + } + /** + * @global string $comment_status + */ + public function no_items() + { + } + /** + * @global int $post_id + * @global string $comment_status + * @global string $comment_type + */ + protected function get_views() + { + } + /** + * @global string $comment_status + * + * @return array + */ + protected function get_bulk_actions() + { + } + /** + * @global string $comment_status + * @global string $comment_type + * + * @param string $which + */ + protected function extra_tablenav($which) + { + } + /** + * @return string|false + */ + public function current_action() + { + } + /** + * @global int $post_id + * + * @return string[] Array of column titles keyed by their column name. + */ + public function get_columns() + { + } + /** + * Displays a comment type drop-down for filtering on the Comments list table. + * + * @since 5.5.0 + * @since 5.6.0 Renamed from `comment_status_dropdown()` to `comment_type_dropdown()`. + * + * @param string $comment_type The current comment type slug. + */ + protected function comment_type_dropdown($comment_type) + { + } + /** + * @return array + */ + protected function get_sortable_columns() + { + } + /** + * Gets the name of the default primary column. + * + * @since 4.3.0 + * + * @return string Name of the default primary column, in this case, 'comment'. + */ + protected function get_default_primary_column_name() + { + } + /** + * Displays the comments table. + * + * Overrides the parent display() method to render extra comments. + * + * @since 3.1.0 + */ + public function display() + { + } + /** + * @global WP_Post $post Global post object. + * @global WP_Comment $comment Global comment object. + * + * @param WP_Comment $item + */ + public function single_row($item) + { + } + /** + * Generates and displays row actions links. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$comment` to `$item` to match parent class for PHP 8 named parameter support. + * + * @global string $comment_status Status for the current listed comments. + * + * @param WP_Comment $item The comment object. + * @param string $column_name Current column name. + * @param string $primary Primary column name. + * @return string Row actions output for comments. An empty string + * if the current column is not the primary column, + * or if the current user cannot edit the comment. + */ + protected function handle_row_actions($item, $column_name, $primary) + { + } + /** + * @since 5.9.0 Renamed `$comment` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_Comment $item The comment object. + */ + public function column_cb($item) + { + } + /** + * @param WP_Comment $comment The comment object. + */ + public function column_comment($comment) + { + } + /** + * @global string $comment_status + * + * @param WP_Comment $comment The comment object. + */ + public function column_author($comment) + { + } + /** + * @param WP_Comment $comment The comment object. + */ + public function column_date($comment) + { + } + /** + * @param WP_Comment $comment The comment object. + * @phpstan-return void + */ + public function column_response($comment) + { + } + /** + * @since 5.9.0 Renamed `$comment` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_Comment $item The comment object. + * @param string $column_name The custom column's name. + */ + public function column_default($item, $column_name) + { + } + } + /** + * Class WP_Community_Events. + * + * A client for api.wordpress.org/events. + * + * @since 4.8.0 + */ + #[\AllowDynamicProperties] + class WP_Community_Events + { + /** + * ID for a WordPress user account. + * + * @since 4.8.0 + * + * @var int + */ + protected $user_id = 0; + /** + * Stores location data for the user. + * + * @since 4.8.0 + * + * @var false|array + */ + protected $user_location = \false; + /** + * Constructor for WP_Community_Events. + * + * @since 4.8.0 + * + * @param int $user_id WP user ID. + * @param false|array $user_location { + * Stored location data for the user. false to pass no location. + * + * @type string $description The name of the location + * @type string $latitude The latitude in decimal degrees notation, without the degree + * symbol. e.g.: 47.615200. + * @type string $longitude The longitude in decimal degrees notation, without the degree + * symbol. e.g.: -122.341100. + * @type string $country The ISO 3166-1 alpha-2 country code. e.g.: BR + * } + * @phpstan-param false|array{ + * description?: string, + * latitude?: string, + * longitude?: string, + * country?: string, + * } $user_location + */ + public function __construct($user_id, $user_location = \false) + { + } + /** + * Gets data about events near a particular location. + * + * Cached events will be immediately returned if the `user_location` property + * is set for the current user, and cached events exist for that location. + * + * Otherwise, this method sends a request to the w.org Events API with location + * data. The API will send back a recognized location based on the data, along + * with nearby events. + * + * The browser's request for events is proxied with this method, rather + * than having the browser make the request directly to api.wordpress.org, + * because it allows results to be cached server-side and shared with other + * users and sites in the network. This makes the process more efficient, + * since increasing the number of visits that get cached data means users + * don't have to wait as often; if the user's browser made the request + * directly, it would also need to make a second request to WP in order to + * pass the data for caching. Having WP make the request also introduces + * the opportunity to anonymize the IP before sending it to w.org, which + * mitigates possible privacy concerns. + * + * @since 4.8.0 + * @since 5.5.2 Response no longer contains formatted date field. They're added + * in `wp.communityEvents.populateDynamicEventFields()` now. + * + * @param string $location_search Optional. City name to help determine the location. + * e.g., "Seattle". Default empty string. + * @param string $timezone Optional. Timezone to help determine the location. + * Default empty string. + * @return array|WP_Error A WP_Error on failure; an array with location and events on + * success. + */ + public function get_events($location_search = '', $timezone = '') + { + } + /** + * Builds an array of args to use in an HTTP request to the w.org Events API. + * + * @since 4.8.0 + * + * @param string $search Optional. City search string. Default empty string. + * @param string $timezone Optional. Timezone string. Default empty string. + * @return array The request args. + */ + protected function get_request_args($search = '', $timezone = '') + { + } + /** + * Determines the user's actual IP address and attempts to partially + * anonymize an IP address by converting it to a network ID. + * + * Geolocating the network ID usually returns a similar location as the + * actual IP, but provides some privacy for the user. + * + * $_SERVER['REMOTE_ADDR'] cannot be used in all cases, such as when the user + * is making their request through a proxy, or when the web server is behind + * a proxy. In those cases, $_SERVER['REMOTE_ADDR'] is set to the proxy address rather + * than the user's actual address. + * + * Modified from https://stackoverflow.com/a/2031935/450127, MIT license. + * Modified from https://github.com/geertw/php-ip-anonymizer, MIT license. + * + * SECURITY WARNING: This function is _NOT_ intended to be used in + * circumstances where the authenticity of the IP address matters. This does + * _NOT_ guarantee that the returned address is valid or accurate, and it can + * be easily spoofed. + * + * @since 4.8.0 + * + * @return string|false The anonymized address on success; the given address + * or false on failure. + */ + public static function get_unsafe_client_ip() + { + } + /** + * Test if two pairs of latitude/longitude coordinates match each other. + * + * @since 4.8.0 + * + * @param array $a The first pair, with indexes 'latitude' and 'longitude'. + * @param array $b The second pair, with indexes 'latitude' and 'longitude'. + * @return bool True if they match, false if they don't. + */ + protected function coordinates_match($a, $b) + { + } + /** + * Generates a transient key based on user location. + * + * This could be reduced to a one-liner in the calling functions, but it's + * intentionally a separate function because it's called from multiple + * functions, and having it abstracted keeps the logic consistent and DRY, + * which is less prone to errors. + * + * @since 4.8.0 + * + * @param array $location Should contain 'latitude' and 'longitude' indexes. + * @return string|false Transient key on success, false on failure. + */ + protected function get_events_transient_key($location) + { + } + /** + * Caches an array of events data from the Events API. + * + * @since 4.8.0 + * + * @param array $events Response body from the API request. + * @param int|false $expiration Optional. Amount of time to cache the events. Defaults to false. + * @return bool true if events were cached; false if not. + */ + protected function cache_events($events, $expiration = \false) + { + } + /** + * Gets cached events. + * + * @since 4.8.0 + * @since 5.5.2 Response no longer contains formatted date field. They're added + * in `wp.communityEvents.populateDynamicEventFields()` now. + * + * @return array|false An array containing `location` and `events` items + * on success, false on failure. + */ + public function get_cached_events() + { + } + /** + * Adds formatted date and time items for each event in an API response. + * + * This has to be called after the data is pulled from the cache, because + * the cached events are shared by all users. If it was called before storing + * the cache, then all users would see the events in the localized data/time + * of the user who triggered the cache refresh, rather than their own. + * + * @since 4.8.0 + * @deprecated 5.5.2 No longer used in core. + * + * @param array $response_body The response which contains the events. + * @return array The response with dates and times formatted. + */ + protected function format_event_data_time($response_body) + { + } + /** + * Prepares the event list for presentation. + * + * Discards expired events, and makes WordCamps "sticky." Attendees need more + * advanced notice about WordCamps than they do for meetups, so camps should + * appear in the list sooner. If a WordCamp is coming up, the API will "stick" + * it in the response, even if it wouldn't otherwise appear. When that happens, + * the event will be at the end of the list, and will need to be moved into a + * higher position, so that it doesn't get trimmed off. + * + * @since 4.8.0 + * @since 4.9.7 Stick a WordCamp to the final list. + * @since 5.5.2 Accepts and returns only the events, rather than an entire HTTP response. + * @since 6.0.0 Decode HTML entities from the event title. + * + * @param array $events The events that will be prepared. + * @return array The response body with events trimmed. + */ + protected function trim_events(array $events) + { + } + /** + * Logs responses to Events API requests. + * + * @since 4.8.0 + * @deprecated 4.9.0 Use a plugin instead. See #41217 for an example. + * + * @param string $message A description of what occurred. + * @param array $details Details that provide more context for the + * log entry. + * @phpstan-return void + */ + protected function maybe_log_events_response($message, $details) + { + } + } + /** + * Class for providing debug data based on a users WordPress environment. + * + * @package WordPress + * @subpackage Site_Health + * @since 5.2.0 + */ + #[\AllowDynamicProperties] + class WP_Debug_Data + { + /** + * Calls all core functions to check for updates. + * + * @since 5.2.0 + */ + public static function check_for_updates() + { + } + /** + * Static function for generating site debug data when required. + * + * @since 5.2.0 + * @since 5.3.0 Added database charset, database collation, + * and timezone information. + * @since 5.5.0 Added pretty permalinks support information. + * @since 6.7.0 Modularized into separate theme-oriented methods. + * + * @throws ImagickException + * + * @return array The debug data for the site. + */ + public static function debug_data() + { + } + /** + * Returns the value of a MySQL system variable. + * + * @since 5.9.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $mysql_var Name of the MySQL system variable. + * @return string|null The variable value on success. Null if the variable does not exist. + */ + public static function get_mysql_var($mysql_var) + { + } + /** + * Formats the information gathered for debugging, in a manner suitable for copying to a forum or support ticket. + * + * @since 5.2.0 + * + * @param array $info_array Information gathered from the `WP_Debug_Data::debug_data()` function. + * @param string $data_type The data type to return, either 'info' or 'debug'. + * @return string The formatted data. + * @phpstan-param 'info'|'debug' $data_type + */ + public static function format($info_array, $data_type) + { + } + /** + * Fetches the total size of all the database tables for the active database user. + * + * @since 5.2.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @return int The size of the database, in bytes. + */ + public static function get_database_size() + { + } + /** + * Fetches the sizes of the WordPress directories: `wordpress` (ABSPATH), `plugins`, `themes`, and `uploads`. + * Intended to supplement the array returned by `WP_Debug_Data::debug_data()`. + * + * @since 5.2.0 + * @deprecated 5.6.0 Use WP_REST_Site_Health_Controller::get_directory_sizes() + * @see WP_REST_Site_Health_Controller::get_directory_sizes() + * + * @return array The sizes of the directories, also the database size and total installation size. + */ + public static function get_sizes() + { + } + } + /** + * Base WordPress Filesystem class which Filesystem implementations extend. + * + * @since 2.5.0 + */ + #[\AllowDynamicProperties] + class WP_Filesystem_Base + { + /** + * Whether to display debug data for the connection. + * + * @since 2.5.0 + * @var bool + */ + public $verbose = \false; + /** + * Cached list of local filepaths to mapped remote filepaths. + * + * @since 2.7.0 + * @var array + */ + public $cache = array(); + /** + * The Access method of the current connection, Set automatically. + * + * @since 2.5.0 + * @var string + */ + public $method = ''; + /** + * @var WP_Error + */ + public $errors = \null; + /** + */ + public $options = array(); + /** + * Returns the path on the remote filesystem of ABSPATH. + * + * @since 2.7.0 + * + * @return string The location of the remote path. + */ + public function abspath() + { + } + /** + * Returns the path on the remote filesystem of WP_CONTENT_DIR. + * + * @since 2.7.0 + * + * @return string The location of the remote path. + */ + public function wp_content_dir() + { + } + /** + * Returns the path on the remote filesystem of WP_PLUGIN_DIR. + * + * @since 2.7.0 + * + * @return string The location of the remote path. + */ + public function wp_plugins_dir() + { + } + /** + * Returns the path on the remote filesystem of the Themes Directory. + * + * @since 2.7.0 + * + * @param string|false $theme Optional. The theme stylesheet or template for the directory. + * Default false. + * @return string The location of the remote path. + */ + public function wp_themes_dir($theme = \false) + { + } + /** + * Returns the path on the remote filesystem of WP_LANG_DIR. + * + * @since 3.2.0 + * + * @return string The location of the remote path. + */ + public function wp_lang_dir() + { + } + /** + * Locates a folder on the remote filesystem. + * + * @since 2.5.0 + * @deprecated 2.7.0 use WP_Filesystem_Base::abspath() or WP_Filesystem_Base::wp_*_dir() instead. + * @see WP_Filesystem_Base::abspath() + * @see WP_Filesystem_Base::wp_content_dir() + * @see WP_Filesystem_Base::wp_plugins_dir() + * @see WP_Filesystem_Base::wp_themes_dir() + * @see WP_Filesystem_Base::wp_lang_dir() + * + * @param string $base Optional. The folder to start searching from. Default '.'. + * @param bool $verbose Optional. True to display debug information. Default false. + * @return string The location of the remote path. + */ + public function find_base_dir($base = '.', $verbose = \false) + { + } + /** + * Locates a folder on the remote filesystem. + * + * @since 2.5.0 + * @deprecated 2.7.0 use WP_Filesystem_Base::abspath() or WP_Filesystem_Base::wp_*_dir() methods instead. + * @see WP_Filesystem_Base::abspath() + * @see WP_Filesystem_Base::wp_content_dir() + * @see WP_Filesystem_Base::wp_plugins_dir() + * @see WP_Filesystem_Base::wp_themes_dir() + * @see WP_Filesystem_Base::wp_lang_dir() + * + * @param string $base Optional. The folder to start searching from. Default '.'. + * @param bool $verbose Optional. True to display debug information. Default false. + * @return string The location of the remote path. + */ + public function get_base_dir($base = '.', $verbose = \false) + { + } + /** + * Locates a folder on the remote filesystem. + * + * Assumes that on Windows systems, Stripping off the Drive + * letter is OK Sanitizes \\ to / in Windows filepaths. + * + * @since 2.7.0 + * + * @param string $folder the folder to locate. + * @return string|false The location of the remote path, false on failure. + */ + public function find_folder($folder) + { + } + /** + * Locates a folder on the remote filesystem. + * + * Expects Windows sanitized path. + * + * @since 2.7.0 + * + * @param string $folder The folder to locate. + * @param string $base The folder to start searching from. + * @param bool $loop If the function has recursed. Internal use only. + * @return string|false The location of the remote path, false to cease looping. + */ + public function search_for_folder($folder, $base = '.', $loop = \false) + { + } + /** + * Returns the *nix-style file permissions for a file. + * + * From the PHP documentation page for fileperms(). + * + * @link https://www.php.net/manual/en/function.fileperms.php + * + * @since 2.5.0 + * + * @param string $file String filename. + * @return string The *nix-style representation of permissions. + */ + public function gethchmod($file) + { + } + /** + * Gets the permissions of the specified file or filepath in their octal format. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return string Mode of the file (the last 3 digits). + */ + public function getchmod($file) + { + } + /** + * Converts *nix-style file permissions to an octal number. + * + * Converts '-rw-r--r--' to 0644 + * From "info at rvgate dot nl"'s comment on the PHP documentation for chmod() + * + * @link https://www.php.net/manual/en/function.chmod.php#49614 + * + * @since 2.5.0 + * + * @param string $mode string The *nix-style file permissions. + * @return string Octal representation of permissions. + */ + public function getnumchmodfromh($mode) + { + } + /** + * Determines if the string provided contains binary characters. + * + * @since 2.7.0 + * + * @param string $text String to test against. + * @return bool True if string is binary, false otherwise. + */ + public function is_binary($text) + { + } + /** + * Changes the owner of a file or directory. + * + * Default behavior is to do nothing, override this in your subclass, if desired. + * + * @since 2.5.0 + * + * @param string $file Path to the file or directory. + * @param string|int $owner A user name or number. + * @param bool $recursive Optional. If set to true, changes file owner recursively. + * Default false. + * @return bool True on success, false on failure. + */ + public function chown($file, $owner, $recursive = \false) + { + } + /** + * Connects filesystem. + * + * @since 2.5.0 + * @abstract + * + * @return bool True on success, false on failure (always true for WP_Filesystem_Direct). + */ + public function connect() + { + } + /** + * Reads entire file into a string. + * + * @since 2.5.0 + * @abstract + * + * @param string $file Name of the file to read. + * @return string|false Read data on success, false on failure. + */ + public function get_contents($file) + { + } + /** + * Reads entire file into an array. + * + * @since 2.5.0 + * @abstract + * + * @param string $file Path to the file. + * @return array|false File contents in an array on success, false on failure. + */ + public function get_contents_array($file) + { + } + /** + * Writes a string to a file. + * + * @since 2.5.0 + * @abstract + * + * @param string $file Remote path to the file where to write the data. + * @param string $contents The data to write. + * @param int|false $mode Optional. The file permissions as octal number, usually 0644. + * Default false. + * @return bool True on success, false on failure. + */ + public function put_contents($file, $contents, $mode = \false) + { + } + /** + * Gets the current working directory. + * + * @since 2.5.0 + * @abstract + * + * @return string|false The current working directory on success, false on failure. + */ + public function cwd() + { + } + /** + * Changes current directory. + * + * @since 2.5.0 + * @abstract + * + * @param string $dir The new current directory. + * @return bool True on success, false on failure. + */ + public function chdir($dir) + { + } + /** + * Changes the file group. + * + * @since 2.5.0 + * @abstract + * + * @param string $file Path to the file. + * @param string|int $group A group name or number. + * @param bool $recursive Optional. If set to true, changes file group recursively. + * Default false. + * @return bool True on success, false on failure. + */ + public function chgrp($file, $group, $recursive = \false) + { + } + /** + * Changes filesystem permissions. + * + * @since 2.5.0 + * @abstract + * + * @param string $file Path to the file. + * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files, + * 0755 for directories. Default false. + * @param bool $recursive Optional. If set to true, changes file permissions recursively. + * Default false. + * @return bool True on success, false on failure. + */ + public function chmod($file, $mode = \false, $recursive = \false) + { + } + /** + * Gets the file owner. + * + * @since 2.5.0 + * @abstract + * + * @param string $file Path to the file. + * @return string|false Username of the owner on success, false on failure. + */ + public function owner($file) + { + } + /** + * Gets the file's group. + * + * @since 2.5.0 + * @abstract + * + * @param string $file Path to the file. + * @return string|false The group on success, false on failure. + */ + public function group($file) + { + } + /** + * Copies a file. + * + * @since 2.5.0 + * @abstract + * + * @param string $source Path to the source file. + * @param string $destination Path to the destination file. + * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists. + * Default false. + * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files, + * 0755 for dirs. Default false. + * @return bool True on success, false on failure. + */ + public function copy($source, $destination, $overwrite = \false, $mode = \false) + { + } + /** + * Moves a file. + * + * @since 2.5.0 + * @abstract + * + * @param string $source Path to the source file. + * @param string $destination Path to the destination file. + * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists. + * Default false. + * @return bool True on success, false on failure. + */ + public function move($source, $destination, $overwrite = \false) + { + } + /** + * Deletes a file or directory. + * + * @since 2.5.0 + * @abstract + * + * @param string $file Path to the file or directory. + * @param bool $recursive Optional. If set to true, deletes files and folders recursively. + * Default false. + * @param string|false $type Type of resource. 'f' for file, 'd' for directory. + * Default false. + * @return bool True on success, false on failure. + */ + public function delete($file, $recursive = \false, $type = \false) + { + } + /** + * Checks if a file or directory exists. + * + * @since 2.5.0 + * @abstract + * + * @param string $path Path to file or directory. + * @return bool Whether $path exists or not. + */ + public function exists($path) + { + } + /** + * Checks if resource is a file. + * + * @since 2.5.0 + * @abstract + * + * @param string $file File path. + * @return bool Whether $file is a file. + */ + public function is_file($file) + { + } + /** + * Checks if resource is a directory. + * + * @since 2.5.0 + * @abstract + * + * @param string $path Directory path. + * @return bool Whether $path is a directory. + */ + public function is_dir($path) + { + } + /** + * Checks if a file is readable. + * + * @since 2.5.0 + * @abstract + * + * @param string $file Path to file. + * @return bool Whether $file is readable. + */ + public function is_readable($file) + { + } + /** + * Checks if a file or directory is writable. + * + * @since 2.5.0 + * @abstract + * + * @param string $path Path to file or directory. + * @return bool Whether $path is writable. + */ + public function is_writable($path) + { + } + /** + * Gets the file's last access time. + * + * @since 2.5.0 + * @abstract + * + * @param string $file Path to file. + * @return int|false Unix timestamp representing last access time, false on failure. + */ + public function atime($file) + { + } + /** + * Gets the file modification time. + * + * @since 2.5.0 + * @abstract + * + * @param string $file Path to file. + * @return int|false Unix timestamp representing modification time, false on failure. + */ + public function mtime($file) + { + } + /** + * Gets the file size (in bytes). + * + * @since 2.5.0 + * @abstract + * + * @param string $file Path to file. + * @return int|false Size of the file in bytes on success, false on failure. + */ + public function size($file) + { + } + /** + * Sets the access and modification times of a file. + * + * Note: If $file doesn't exist, it will be created. + * + * @since 2.5.0 + * @abstract + * + * @param string $file Path to file. + * @param int $time Optional. Modified time to set for file. + * Default 0. + * @param int $atime Optional. Access time to set for file. + * Default 0. + * @return bool True on success, false on failure. + */ + public function touch($file, $time = 0, $atime = 0) + { + } + /** + * Creates a directory. + * + * @since 2.5.0 + * @abstract + * + * @param string $path Path for new directory. + * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). + * Default false. + * @param string|int|false $chown Optional. A user name or number (or false to skip chown). + * Default false. + * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp). + * Default false. + * @return bool True on success, false on failure. + */ + public function mkdir($path, $chmod = \false, $chown = \false, $chgrp = \false) + { + } + /** + * Deletes a directory. + * + * @since 2.5.0 + * @abstract + * + * @param string $path Path to directory. + * @param bool $recursive Optional. Whether to recursively remove files/directories. + * Default false. + * @return bool True on success, false on failure. + */ + public function rmdir($path, $recursive = \false) + { + } + /** + * Gets details for files in a directory or a specific file. + * + * @since 2.5.0 + * @abstract + * + * @param string $path Path to directory or file. + * @param bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files. + * Default true. + * @param bool $recursive Optional. Whether to recursively include file details in nested directories. + * Default false. + * @return array|false { + * Array of arrays containing file information. False if unable to list directory contents. + * + * @type array ...$0 { + * Array of file information. Note that some elements may not be available on all filesystems. + * + * @type string $name Name of the file or directory. + * @type string $perms *nix representation of permissions. + * @type string $permsn Octal representation of permissions. + * @type int|string|false $number File number. May be a numeric string. False if not available. + * @type string|false $owner Owner name or ID, or false if not available. + * @type string|false $group File permissions group, or false if not available. + * @type int|string|false $size Size of file in bytes. May be a numeric string. + * False if not available. + * @type int|string|false $lastmodunix Last modified unix timestamp. May be a numeric string. + * False if not available. + * @type string|false $lastmod Last modified month (3 letters) and day (without leading 0), or + * false if not available. + * @type string|false $time Last modified time, or false if not available. + * @type string $type Type of resource. 'f' for file, 'd' for directory, 'l' for link. + * @type array|false $files If a directory and `$recursive` is true, contains another array of + * files. False if unable to list directory contents. + * } + * } + * @phpstan-return false|array + * @phpstan-return false|array + */ + public function dirlist($path, $include_hidden = \true, $recursive = \false) + { + } + } + /** + * WordPress Filesystem Class for direct PHP file and folder manipulation. + * + * @since 2.5.0 + * + * @see WP_Filesystem_Base + */ + class WP_Filesystem_Direct extends \WP_Filesystem_Base + { + /** + * Constructor. + * + * @since 2.5.0 + * + * @param mixed $arg Not used. + */ + public function __construct($arg) + { + } + /** + * Reads entire file into a string. + * + * @since 2.5.0 + * + * @param string $file Name of the file to read. + * @return string|false Read data on success, false on failure. + */ + public function get_contents($file) + { + } + /** + * Reads entire file into an array. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return array|false File contents in an array on success, false on failure. + */ + public function get_contents_array($file) + { + } + /** + * Writes a string to a file. + * + * @since 2.5.0 + * + * @param string $file Remote path to the file where to write the data. + * @param string $contents The data to write. + * @param int|false $mode Optional. The file permissions as octal number, usually 0644. + * Default false. + * @return bool True on success, false on failure. + */ + public function put_contents($file, $contents, $mode = \false) + { + } + /** + * Gets the current working directory. + * + * @since 2.5.0 + * + * @return string|false The current working directory on success, false on failure. + */ + public function cwd() + { + } + /** + * Changes current directory. + * + * @since 2.5.0 + * + * @param string $dir The new current directory. + * @return bool True on success, false on failure. + */ + public function chdir($dir) + { + } + /** + * Changes the file group. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @param string|int $group A group name or number. + * @param bool $recursive Optional. If set to true, changes file group recursively. + * Default false. + * @return bool True on success, false on failure. + */ + public function chgrp($file, $group, $recursive = \false) + { + } + /** + * Changes filesystem permissions. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files, + * 0755 for directories. Default false. + * @param bool $recursive Optional. If set to true, changes file permissions recursively. + * Default false. + * @return bool True on success, false on failure. + */ + public function chmod($file, $mode = \false, $recursive = \false) + { + } + /** + * Changes the owner of a file or directory. + * + * @since 2.5.0 + * + * @param string $file Path to the file or directory. + * @param string|int $owner A user name or number. + * @param bool $recursive Optional. If set to true, changes file owner recursively. + * Default false. + * @return bool True on success, false on failure. + */ + public function chown($file, $owner, $recursive = \false) + { + } + /** + * Gets the file owner. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return string|false Username of the owner on success, false on failure. + */ + public function owner($file) + { + } + /** + * Gets the permissions of the specified file or filepath in their octal format. + * + * FIXME does not handle errors in fileperms() + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return string Mode of the file (the last 3 digits). + */ + public function getchmod($file) + { + } + /** + * Gets the file's group. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return string|false The group on success, false on failure. + */ + public function group($file) + { + } + /** + * Copies a file. + * + * @since 2.5.0 + * + * @param string $source Path to the source file. + * @param string $destination Path to the destination file. + * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists. + * Default false. + * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files, + * 0755 for dirs. Default false. + * @return bool True on success, false on failure. + */ + public function copy($source, $destination, $overwrite = \false, $mode = \false) + { + } + /** + * Moves a file or directory. + * + * After moving files or directories, OPcache will need to be invalidated. + * + * If moving a directory fails, `copy_dir()` can be used for a recursive copy. + * + * Use `move_dir()` for moving directories with OPcache invalidation and a + * fallback to `copy_dir()`. + * + * @since 2.5.0 + * + * @param string $source Path to the source file. + * @param string $destination Path to the destination file. + * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists. + * Default false. + * @return bool True on success, false on failure. + */ + public function move($source, $destination, $overwrite = \false) + { + } + /** + * Deletes a file or directory. + * + * @since 2.5.0 + * + * @param string $file Path to the file or directory. + * @param bool $recursive Optional. If set to true, deletes files and folders recursively. + * Default false. + * @param string|false $type Type of resource. 'f' for file, 'd' for directory. + * Default false. + * @return bool True on success, false on failure. + */ + public function delete($file, $recursive = \false, $type = \false) + { + } + /** + * Checks if a file or directory exists. + * + * @since 2.5.0 + * + * @param string $path Path to file or directory. + * @return bool Whether $path exists or not. + */ + public function exists($path) + { + } + /** + * Checks if resource is a file. + * + * @since 2.5.0 + * + * @param string $file File path. + * @return bool Whether $file is a file. + */ + public function is_file($file) + { + } + /** + * Checks if resource is a directory. + * + * @since 2.5.0 + * + * @param string $path Directory path. + * @return bool Whether $path is a directory. + */ + public function is_dir($path) + { + } + /** + * Checks if a file is readable. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return bool Whether $file is readable. + */ + public function is_readable($file) + { + } + /** + * Checks if a file or directory is writable. + * + * @since 2.5.0 + * + * @param string $path Path to file or directory. + * @return bool Whether $path is writable. + */ + public function is_writable($path) + { + } + /** + * Gets the file's last access time. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return int|false Unix timestamp representing last access time, false on failure. + */ + public function atime($file) + { + } + /** + * Gets the file modification time. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return int|false Unix timestamp representing modification time, false on failure. + */ + public function mtime($file) + { + } + /** + * Gets the file size (in bytes). + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return int|false Size of the file in bytes on success, false on failure. + */ + public function size($file) + { + } + /** + * Sets the access and modification times of a file. + * + * Note: If $file doesn't exist, it will be created. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @param int $time Optional. Modified time to set for file. + * Default 0. + * @param int $atime Optional. Access time to set for file. + * Default 0. + * @return bool True on success, false on failure. + */ + public function touch($file, $time = 0, $atime = 0) + { + } + /** + * Creates a directory. + * + * @since 2.5.0 + * + * @param string $path Path for new directory. + * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). + * Default false. + * @param string|int|false $chown Optional. A user name or number (or false to skip chown). + * Default false. + * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp). + * Default false. + * @return bool True on success, false on failure. + */ + public function mkdir($path, $chmod = \false, $chown = \false, $chgrp = \false) + { + } + /** + * Deletes a directory. + * + * @since 2.5.0 + * + * @param string $path Path to directory. + * @param bool $recursive Optional. Whether to recursively remove files/directories. + * Default false. + * @return bool True on success, false on failure. + */ + public function rmdir($path, $recursive = \false) + { + } + /** + * Gets details for files in a directory or a specific file. + * + * @since 2.5.0 + * + * @param string $path Path to directory or file. + * @param bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files. + * Default true. + * @param bool $recursive Optional. Whether to recursively include file details in nested directories. + * Default false. + * @return array|false { + * Array of arrays containing file information. False if unable to list directory contents. + * + * @type array ...$0 { + * Array of file information. Note that some elements may not be available on all filesystems. + * + * @type string $name Name of the file or directory. + * @type string $perms *nix representation of permissions. + * @type string $permsn Octal representation of permissions. + * @type false $number File number. Always false in this context. + * @type string|false $owner Owner name or ID, or false if not available. + * @type string|false $group File permissions group, or false if not available. + * @type int|string|false $size Size of file in bytes. May be a numeric string. + * False if not available. + * @type int|string|false $lastmodunix Last modified unix timestamp. May be a numeric string. + * False if not available. + * @type string|false $lastmod Last modified month (3 letters) and day (without leading 0), or + * false if not available. + * @type string|false $time Last modified time, or false if not available. + * @type string $type Type of resource. 'f' for file, 'd' for directory, 'l' for link. + * @type array|false $files If a directory and `$recursive` is true, contains another array of + * files. False if unable to list directory contents. + * } + * } + * @phpstan-return false|array + * @phpstan-return false|array + */ + public function dirlist($path, $include_hidden = \true, $recursive = \false) + { + } + } + /** + * WordPress Filesystem Class for implementing FTP. + * + * @since 2.5.0 + * + * @see WP_Filesystem_Base + */ + class WP_Filesystem_FTPext extends \WP_Filesystem_Base + { + /** + * @since 2.5.0 + * @var FTP\Connection|resource|false + */ + public $link; + /** + * Constructor. + * + * @since 2.5.0 + * + * @param array $opt + * @phpstan-return void + */ + public function __construct($opt = '') + { + } + /** + * Connects filesystem. + * + * @since 2.5.0 + * + * @return bool True on success, false on failure. + */ + public function connect() + { + } + /** + * Reads entire file into a string. + * + * @since 2.5.0 + * + * @param string $file Name of the file to read. + * @return string|false Read data on success, false if no temporary file could be opened, + * or if the file couldn't be retrieved. + */ + public function get_contents($file) + { + } + /** + * Reads entire file into an array. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return array|false File contents in an array on success, false on failure. + */ + public function get_contents_array($file) + { + } + /** + * Writes a string to a file. + * + * @since 2.5.0 + * + * @param string $file Remote path to the file where to write the data. + * @param string $contents The data to write. + * @param int|false $mode Optional. The file permissions as octal number, usually 0644. + * Default false. + * @return bool True on success, false on failure. + */ + public function put_contents($file, $contents, $mode = \false) + { + } + /** + * Gets the current working directory. + * + * @since 2.5.0 + * + * @return string|false The current working directory on success, false on failure. + */ + public function cwd() + { + } + /** + * Changes current directory. + * + * @since 2.5.0 + * + * @param string $dir The new current directory. + * @return bool True on success, false on failure. + */ + public function chdir($dir) + { + } + /** + * Changes filesystem permissions. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files, + * 0755 for directories. Default false. + * @param bool $recursive Optional. If set to true, changes file permissions recursively. + * Default false. + * @return bool True on success, false on failure. + */ + public function chmod($file, $mode = \false, $recursive = \false) + { + } + /** + * Gets the file owner. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return string|false Username of the owner on success, false on failure. + */ + public function owner($file) + { + } + /** + * Gets the permissions of the specified file or filepath in their octal format. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return string Mode of the file (the last 3 digits). + */ + public function getchmod($file) + { + } + /** + * Gets the file's group. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return string|false The group on success, false on failure. + */ + public function group($file) + { + } + /** + * Copies a file. + * + * @since 2.5.0 + * + * @param string $source Path to the source file. + * @param string $destination Path to the destination file. + * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists. + * Default false. + * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files, + * 0755 for dirs. Default false. + * @return bool True on success, false on failure. + */ + public function copy($source, $destination, $overwrite = \false, $mode = \false) + { + } + /** + * Moves a file or directory. + * + * After moving files or directories, OPcache will need to be invalidated. + * + * If moving a directory fails, `copy_dir()` can be used for a recursive copy. + * + * Use `move_dir()` for moving directories with OPcache invalidation and a + * fallback to `copy_dir()`. + * + * @since 2.5.0 + * + * @param string $source Path to the source file or directory. + * @param string $destination Path to the destination file or directory. + * @param bool $overwrite Optional. Whether to overwrite the destination if it exists. + * Default false. + * @return bool True on success, false on failure. + */ + public function move($source, $destination, $overwrite = \false) + { + } + /** + * Deletes a file or directory. + * + * @since 2.5.0 + * + * @param string $file Path to the file or directory. + * @param bool $recursive Optional. If set to true, deletes files and folders recursively. + * Default false. + * @param string|false $type Type of resource. 'f' for file, 'd' for directory. + * Default false. + * @return bool True on success, false on failure. + */ + public function delete($file, $recursive = \false, $type = \false) + { + } + /** + * Checks if a file or directory exists. + * + * @since 2.5.0 + * @since 6.3.0 Returns false for an empty path. + * + * @param string $path Path to file or directory. + * @return bool Whether $path exists or not. + */ + public function exists($path) + { + } + /** + * Checks if resource is a file. + * + * @since 2.5.0 + * + * @param string $file File path. + * @return bool Whether $file is a file. + */ + public function is_file($file) + { + } + /** + * Checks if resource is a directory. + * + * @since 2.5.0 + * + * @param string $path Directory path. + * @return bool Whether $path is a directory. + */ + public function is_dir($path) + { + } + /** + * Checks if a file is readable. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return bool Whether $file is readable. + */ + public function is_readable($file) + { + } + /** + * Checks if a file or directory is writable. + * + * @since 2.5.0 + * + * @param string $path Path to file or directory. + * @return bool Whether $path is writable. + */ + public function is_writable($path) + { + } + /** + * Gets the file's last access time. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return int|false Unix timestamp representing last access time, false on failure. + */ + public function atime($file) + { + } + /** + * Gets the file modification time. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return int|false Unix timestamp representing modification time, false on failure. + */ + public function mtime($file) + { + } + /** + * Gets the file size (in bytes). + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return int|false Size of the file in bytes on success, false on failure. + */ + public function size($file) + { + } + /** + * Sets the access and modification times of a file. + * + * Note: If $file doesn't exist, it will be created. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @param int $time Optional. Modified time to set for file. + * Default 0. + * @param int $atime Optional. Access time to set for file. + * Default 0. + * @return bool True on success, false on failure. + */ + public function touch($file, $time = 0, $atime = 0) + { + } + /** + * Creates a directory. + * + * @since 2.5.0 + * + * @param string $path Path for new directory. + * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). + * Default false. + * @param string|int|false $chown Optional. A user name or number (or false to skip chown). + * Default false. + * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp). + * Default false. + * @return bool True on success, false on failure. + */ + public function mkdir($path, $chmod = \false, $chown = \false, $chgrp = \false) + { + } + /** + * Deletes a directory. + * + * @since 2.5.0 + * + * @param string $path Path to directory. + * @param bool $recursive Optional. Whether to recursively remove files/directories. + * Default false. + * @return bool True on success, false on failure. + */ + public function rmdir($path, $recursive = \false) + { + } + /** + * Parses an individual entry from the FTP LIST command output. + * + * @param string $line A line from the directory listing. + * @return array|string { + * Array of file information. Empty string if the line could not be parsed. + * + * @type string $name Name of the file or directory. + * @type string $perms *nix representation of permissions. + * @type string $permsn Octal representation of permissions. + * @type string|false $number File number as a string, or false if not available. + * @type string|false $owner Owner name or ID, or false if not available. + * @type string|false $group File permissions group, or false if not available. + * @type string|false $size Size of file in bytes as a string, or false if not available. + * @type string|false $lastmodunix Last modified unix timestamp as a string, or false if not available. + * @type string|false $lastmod Last modified month (3 letters) and day (without leading 0), or + * false if not available. + * @type string|false $time Last modified time, or false if not available. + * @type string $type Type of resource. 'f' for file, 'd' for directory, 'l' for link. + * @type array|false $files If a directory and `$recursive` is true, contains another array of files. + * False if unable to list directory contents. + * } + * @phpstan-return string|array{ + * name: string, + * perms: string, + * permsn: string, + * number: string|false, + * owner: string|false, + * group: string|false, + * size: string|false, + * lastmodunix: string|false, + * lastmod: string|false, + * time: string|false, + * type: string, + * files: array|false, + * } + */ + public function parselisting($line) + { + } + /** + * Gets details for files in a directory or a specific file. + * + * @since 2.5.0 + * + * @param string $path Path to directory or file. + * @param bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files. + * Default true. + * @param bool $recursive Optional. Whether to recursively include file details in nested directories. + * Default false. + * @return array|false { + * Array of arrays containing file information. False if unable to list directory contents. + * + * @type array ...$0 { + * Array of file information. Note that some elements may not be available on all filesystems. + * + * @type string $name Name of the file or directory. + * @type string $perms *nix representation of permissions. + * @type string $permsn Octal representation of permissions. + * @type int|string|false $number File number. May be a numeric string. False if not available. + * @type string|false $owner Owner name or ID, or false if not available. + * @type string|false $group File permissions group, or false if not available. + * @type int|string|false $size Size of file in bytes. May be a numeric string. + * False if not available. + * @type int|string|false $lastmodunix Last modified unix timestamp. May be a numeric string. + * False if not available. + * @type string|false $lastmod Last modified month (3 letters) and day (without leading 0), or + * false if not available. + * @type string|false $time Last modified time, or false if not available. + * @type string $type Type of resource. 'f' for file, 'd' for directory, 'l' for link. + * @type array|false $files If a directory and `$recursive` is true, contains another array of + * files. False if unable to list directory contents. + * } + * } + * @phpstan-return false|array + * @phpstan-return false|array + */ + public function dirlist($path = '.', $include_hidden = \true, $recursive = \false) + { + } + /** + * Destructor. + * + * @since 2.5.0 + */ + public function __destruct() + { + } + } + /** + * WordPress Filesystem Class for implementing FTP Sockets. + * + * @since 2.5.0 + * + * @see WP_Filesystem_Base + */ + class WP_Filesystem_ftpsockets extends \WP_Filesystem_Base + { + /** + * @since 2.5.0 + * @var ftp + */ + public $ftp; + /** + * Constructor. + * + * @since 2.5.0 + * + * @param array $opt + * @phpstan-return void + */ + public function __construct($opt = '') + { + } + /** + * Connects filesystem. + * + * @since 2.5.0 + * + * @return bool True on success, false on failure. + */ + public function connect() + { + } + /** + * Reads entire file into a string. + * + * @since 2.5.0 + * + * @param string $file Name of the file to read. + * @return string|false Read data on success, false if no temporary file could be opened, + * or if the file couldn't be retrieved. + */ + public function get_contents($file) + { + } + /** + * Reads entire file into an array. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return array|false File contents in an array on success, false on failure. + */ + public function get_contents_array($file) + { + } + /** + * Writes a string to a file. + * + * @since 2.5.0 + * + * @param string $file Remote path to the file where to write the data. + * @param string $contents The data to write. + * @param int|false $mode Optional. The file permissions as octal number, usually 0644. + * Default false. + * @return bool True on success, false on failure. + */ + public function put_contents($file, $contents, $mode = \false) + { + } + /** + * Gets the current working directory. + * + * @since 2.5.0 + * + * @return string|false The current working directory on success, false on failure. + */ + public function cwd() + { + } + /** + * Changes current directory. + * + * @since 2.5.0 + * + * @param string $dir The new current directory. + * @return bool True on success, false on failure. + */ + public function chdir($dir) + { + } + /** + * Changes filesystem permissions. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files, + * 0755 for directories. Default false. + * @param bool $recursive Optional. If set to true, changes file permissions recursively. + * Default false. + * @return bool True on success, false on failure. + */ + public function chmod($file, $mode = \false, $recursive = \false) + { + } + /** + * Gets the file owner. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return string|false Username of the owner on success, false on failure. + */ + public function owner($file) + { + } + /** + * Gets the permissions of the specified file or filepath in their octal format. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return string Mode of the file (the last 3 digits). + */ + public function getchmod($file) + { + } + /** + * Gets the file's group. + * + * @since 2.5.0 + * + * @param string $file Path to the file. + * @return string|false The group on success, false on failure. + */ + public function group($file) + { + } + /** + * Copies a file. + * + * @since 2.5.0 + * + * @param string $source Path to the source file. + * @param string $destination Path to the destination file. + * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists. + * Default false. + * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files, + * 0755 for dirs. Default false. + * @return bool True on success, false on failure. + */ + public function copy($source, $destination, $overwrite = \false, $mode = \false) + { + } + /** + * Moves a file or directory. + * + * After moving files or directories, OPcache will need to be invalidated. + * + * If moving a directory fails, `copy_dir()` can be used for a recursive copy. + * + * Use `move_dir()` for moving directories with OPcache invalidation and a + * fallback to `copy_dir()`. + * + * @since 2.5.0 + * + * @param string $source Path to the source file or directory. + * @param string $destination Path to the destination file or directory. + * @param bool $overwrite Optional. Whether to overwrite the destination if it exists. + * Default false. + * @return bool True on success, false on failure. + */ + public function move($source, $destination, $overwrite = \false) + { + } + /** + * Deletes a file or directory. + * + * @since 2.5.0 + * + * @param string $file Path to the file or directory. + * @param bool $recursive Optional. If set to true, deletes files and folders recursively. + * Default false. + * @param string|false $type Type of resource. 'f' for file, 'd' for directory. + * Default false. + * @return bool True on success, false on failure. + */ + public function delete($file, $recursive = \false, $type = \false) + { + } + /** + * Checks if a file or directory exists. + * + * @since 2.5.0 + * @since 6.3.0 Returns false for an empty path. + * + * @param string $path Path to file or directory. + * @return bool Whether $path exists or not. + */ + public function exists($path) + { + } + /** + * Checks if resource is a file. + * + * @since 2.5.0 + * + * @param string $file File path. + * @return bool Whether $file is a file. + */ + public function is_file($file) + { + } + /** + * Checks if resource is a directory. + * + * @since 2.5.0 + * + * @param string $path Directory path. + * @return bool Whether $path is a directory. + */ + public function is_dir($path) + { + } + /** + * Checks if a file is readable. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return bool Whether $file is readable. + */ + public function is_readable($file) + { + } + /** + * Checks if a file or directory is writable. + * + * @since 2.5.0 + * + * @param string $path Path to file or directory. + * @return bool Whether $path is writable. + */ + public function is_writable($path) + { + } + /** + * Gets the file's last access time. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return int|false Unix timestamp representing last access time, false on failure. + */ + public function atime($file) + { + } + /** + * Gets the file modification time. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return int|false Unix timestamp representing modification time, false on failure. + */ + public function mtime($file) + { + } + /** + * Gets the file size (in bytes). + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @return int|false Size of the file in bytes on success, false on failure. + */ + public function size($file) + { + } + /** + * Sets the access and modification times of a file. + * + * Note: If $file doesn't exist, it will be created. + * + * @since 2.5.0 + * + * @param string $file Path to file. + * @param int $time Optional. Modified time to set for file. + * Default 0. + * @param int $atime Optional. Access time to set for file. + * Default 0. + * @return bool True on success, false on failure. + */ + public function touch($file, $time = 0, $atime = 0) + { + } + /** + * Creates a directory. + * + * @since 2.5.0 + * + * @param string $path Path for new directory. + * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). + * Default false. + * @param string|int|false $chown Optional. A user name or number (or false to skip chown). + * Default false. + * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp). + * Default false. + * @return bool True on success, false on failure. + */ + public function mkdir($path, $chmod = \false, $chown = \false, $chgrp = \false) + { + } + /** + * Deletes a directory. + * + * @since 2.5.0 + * + * @param string $path Path to directory. + * @param bool $recursive Optional. Whether to recursively remove files/directories. + * Default false. + * @return bool True on success, false on failure. + */ + public function rmdir($path, $recursive = \false) + { + } + /** + * Gets details for files in a directory or a specific file. + * + * @since 2.5.0 + * + * @param string $path Path to directory or file. + * @param bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files. + * Default true. + * @param bool $recursive Optional. Whether to recursively include file details in nested directories. + * Default false. + * @return array|false { + * Array of arrays containing file information. False if unable to list directory contents. + * + * @type array ...$0 { + * Array of file information. Note that some elements may not be available on all filesystems. + * + * @type string $name Name of the file or directory. + * @type string $perms *nix representation of permissions. + * @type string $permsn Octal representation of permissions. + * @type int|string|false $number File number. May be a numeric string. False if not available. + * @type string|false $owner Owner name or ID, or false if not available. + * @type string|false $group File permissions group, or false if not available. + * @type int|string|false $size Size of file in bytes. May be a numeric string. + * False if not available. + * @type int|string|false $lastmodunix Last modified unix timestamp. May be a numeric string. + * False if not available. + * @type string|false $lastmod Last modified month (3 letters) and day (without leading 0), or + * false if not available. + * @type string|false $time Last modified time, or false if not available. + * @type string $type Type of resource. 'f' for file, 'd' for directory, 'l' for link. + * @type array|false $files If a directory and `$recursive` is true, contains another array of + * files. False if unable to list directory contents. + * } + * } + * @phpstan-return false|array + * @phpstan-return false|array + */ + public function dirlist($path = '.', $include_hidden = \true, $recursive = \false) + { + } + /** + * Destructor. + * + * @since 2.5.0 + */ + public function __destruct() + { + } + } + /** + * WordPress Filesystem Class for implementing SSH2 + * + * To use this class you must follow these steps for PHP 5.2.6+ + * + * {@link http://kevin.vanzonneveld.net/techblog/article/make_ssh_connections_with_php/ - Installation Notes} + * + * Compile libssh2 (Note: Only 0.14 is officially working with PHP 5.2.6+ right now, But many users have found the latest versions work) + * + * cd /usr/src + * wget https://www.libssh2.org/download/libssh2-0.14.tar.gz + * tar -zxvf libssh2-0.14.tar.gz + * cd libssh2-0.14/ + * ./configure + * make all install + * + * Note: Do not leave the directory yet! + * + * Enter: pecl install -f ssh2 + * + * Copy the ssh.so file it creates to your PHP Module Directory. + * Open up your PHP.INI file and look for where extensions are placed. + * Add in your PHP.ini file: extension=ssh2.so + * + * Restart Apache! + * Check phpinfo() streams to confirm that: ssh2.shell, ssh2.exec, ssh2.tunnel, ssh2.scp, ssh2.sftp exist. + * + * Note: As of WordPress 2.8, this utilizes the PHP5+ function `stream_get_contents()`. + * + * @since 2.7.0 + * + * @package WordPress + * @subpackage Filesystem + */ + class WP_Filesystem_SSH2 extends \WP_Filesystem_Base + { + /** + * @since 2.7.0 + * @var resource + */ + public $link = \false; + /** + * @since 2.7.0 + * @var resource + */ + public $sftp_link; + /** + * @since 2.7.0 + * @var bool + */ + public $keys = \false; + /** + * Constructor. + * + * @since 2.7.0 + * + * @param array $opt + * @phpstan-return void + */ + public function __construct($opt = '') + { + } + /** + * Connects filesystem. + * + * @since 2.7.0 + * + * @return bool True on success, false on failure. + */ + public function connect() + { + } + /** + * Gets the ssh2.sftp PHP stream wrapper path to open for the given file. + * + * This method also works around a PHP bug where the root directory (/) cannot + * be opened by PHP functions, causing a false failure. In order to work around + * this, the path is converted to /./ which is semantically the same as / + * See https://bugs.php.net/bug.php?id=64169 for more details. + * + * @since 4.4.0 + * + * @param string $path The File/Directory path on the remote server to return + * @return string The ssh2.sftp:// wrapped path to use. + */ + public function sftp_path($path) + { + } + /** + * @since 2.7.0 + * + * @param string $command + * @param bool $returnbool + * @return bool|string True on success, false on failure. String if the command was executed, `$returnbool` + * is false (default), and data from the resulting stream was retrieved. + */ + public function run_command($command, $returnbool = \false) + { + } + /** + * Reads entire file into a string. + * + * @since 2.7.0 + * + * @param string $file Name of the file to read. + * @return string|false Read data on success, false if no temporary file could be opened, + * or if the file couldn't be retrieved. + */ + public function get_contents($file) + { + } + /** + * Reads entire file into an array. + * + * @since 2.7.0 + * + * @param string $file Path to the file. + * @return array|false File contents in an array on success, false on failure. + */ + public function get_contents_array($file) + { + } + /** + * Writes a string to a file. + * + * @since 2.7.0 + * + * @param string $file Remote path to the file where to write the data. + * @param string $contents The data to write. + * @param int|false $mode Optional. The file permissions as octal number, usually 0644. + * Default false. + * @return bool True on success, false on failure. + */ + public function put_contents($file, $contents, $mode = \false) + { + } + /** + * Gets the current working directory. + * + * @since 2.7.0 + * + * @return string|false The current working directory on success, false on failure. + */ + public function cwd() + { + } + /** + * Changes current directory. + * + * @since 2.7.0 + * + * @param string $dir The new current directory. + * @return bool True on success, false on failure. + */ + public function chdir($dir) + { + } + /** + * Changes the file group. + * + * @since 2.7.0 + * + * @param string $file Path to the file. + * @param string|int $group A group name or number. + * @param bool $recursive Optional. If set to true, changes file group recursively. + * Default false. + * @return bool True on success, false on failure. + */ + public function chgrp($file, $group, $recursive = \false) + { + } + /** + * Changes filesystem permissions. + * + * @since 2.7.0 + * + * @param string $file Path to the file. + * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files, + * 0755 for directories. Default false. + * @param bool $recursive Optional. If set to true, changes file permissions recursively. + * Default false. + * @return bool True on success, false on failure. + */ + public function chmod($file, $mode = \false, $recursive = \false) + { + } + /** + * Changes the owner of a file or directory. + * + * @since 2.7.0 + * + * @param string $file Path to the file or directory. + * @param string|int $owner A user name or number. + * @param bool $recursive Optional. If set to true, changes file owner recursively. + * Default false. + * @return bool True on success, false on failure. + */ + public function chown($file, $owner, $recursive = \false) + { + } + /** + * Gets the file owner. + * + * @since 2.7.0 + * + * @param string $file Path to the file. + * @return string|false Username of the owner on success, false on failure. + */ + public function owner($file) + { + } + /** + * Gets the permissions of the specified file or filepath in their octal format. + * + * @since 2.7.0 + * + * @param string $file Path to the file. + * @return string Mode of the file (the last 3 digits). + */ + public function getchmod($file) + { + } + /** + * Gets the file's group. + * + * @since 2.7.0 + * + * @param string $file Path to the file. + * @return string|false The group on success, false on failure. + */ + public function group($file) + { + } + /** + * Copies a file. + * + * @since 2.7.0 + * + * @param string $source Path to the source file. + * @param string $destination Path to the destination file. + * @param bool $overwrite Optional. Whether to overwrite the destination file if it exists. + * Default false. + * @param int|false $mode Optional. The permissions as octal number, usually 0644 for files, + * 0755 for dirs. Default false. + * @return bool True on success, false on failure. + */ + public function copy($source, $destination, $overwrite = \false, $mode = \false) + { + } + /** + * Moves a file or directory. + * + * After moving files or directories, OPcache will need to be invalidated. + * + * If moving a directory fails, `copy_dir()` can be used for a recursive copy. + * + * Use `move_dir()` for moving directories with OPcache invalidation and a + * fallback to `copy_dir()`. + * + * @since 2.7.0 + * + * @param string $source Path to the source file or directory. + * @param string $destination Path to the destination file or directory. + * @param bool $overwrite Optional. Whether to overwrite the destination if it exists. + * Default false. + * @return bool True on success, false on failure. + */ + public function move($source, $destination, $overwrite = \false) + { + } + /** + * Deletes a file or directory. + * + * @since 2.7.0 + * + * @param string $file Path to the file or directory. + * @param bool $recursive Optional. If set to true, deletes files and folders recursively. + * Default false. + * @param string|false $type Type of resource. 'f' for file, 'd' for directory. + * Default false. + * @return bool True on success, false on failure. + */ + public function delete($file, $recursive = \false, $type = \false) + { + } + /** + * Checks if a file or directory exists. + * + * @since 2.7.0 + * + * @param string $path Path to file or directory. + * @return bool Whether $path exists or not. + */ + public function exists($path) + { + } + /** + * Checks if resource is a file. + * + * @since 2.7.0 + * + * @param string $file File path. + * @return bool Whether $file is a file. + */ + public function is_file($file) + { + } + /** + * Checks if resource is a directory. + * + * @since 2.7.0 + * + * @param string $path Directory path. + * @return bool Whether $path is a directory. + */ + public function is_dir($path) + { + } + /** + * Checks if a file is readable. + * + * @since 2.7.0 + * + * @param string $file Path to file. + * @return bool Whether $file is readable. + */ + public function is_readable($file) + { + } + /** + * Checks if a file or directory is writable. + * + * @since 2.7.0 + * + * @param string $path Path to file or directory. + * @return bool Whether $path is writable. + */ + public function is_writable($path) + { + } + /** + * Gets the file's last access time. + * + * @since 2.7.0 + * + * @param string $file Path to file. + * @return int|false Unix timestamp representing last access time, false on failure. + */ + public function atime($file) + { + } + /** + * Gets the file modification time. + * + * @since 2.7.0 + * + * @param string $file Path to file. + * @return int|false Unix timestamp representing modification time, false on failure. + */ + public function mtime($file) + { + } + /** + * Gets the file size (in bytes). + * + * @since 2.7.0 + * + * @param string $file Path to file. + * @return int|false Size of the file in bytes on success, false on failure. + */ + public function size($file) + { + } + /** + * Sets the access and modification times of a file. + * + * Note: Not implemented. + * + * @since 2.7.0 + * + * @param string $file Path to file. + * @param int $time Optional. Modified time to set for file. + * Default 0. + * @param int $atime Optional. Access time to set for file. + * Default 0. + */ + public function touch($file, $time = 0, $atime = 0) + { + } + /** + * Creates a directory. + * + * @since 2.7.0 + * + * @param string $path Path for new directory. + * @param int|false $chmod Optional. The permissions as octal number (or false to skip chmod). + * Default false. + * @param string|int|false $chown Optional. A user name or number (or false to skip chown). + * Default false. + * @param string|int|false $chgrp Optional. A group name or number (or false to skip chgrp). + * Default false. + * @return bool True on success, false on failure. + */ + public function mkdir($path, $chmod = \false, $chown = \false, $chgrp = \false) + { + } + /** + * Deletes a directory. + * + * @since 2.7.0 + * + * @param string $path Path to directory. + * @param bool $recursive Optional. Whether to recursively remove files/directories. + * Default false. + * @return bool True on success, false on failure. + */ + public function rmdir($path, $recursive = \false) + { + } + /** + * Gets details for files in a directory or a specific file. + * + * @since 2.7.0 + * + * @param string $path Path to directory or file. + * @param bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files. + * Default true. + * @param bool $recursive Optional. Whether to recursively include file details in nested directories. + * Default false. + * @return array|false { + * Array of arrays containing file information. False if unable to list directory contents. + * + * @type array ...$0 { + * Array of file information. Note that some elements may not be available on all filesystems. + * + * @type string $name Name of the file or directory. + * @type string $perms *nix representation of permissions. + * @type string $permsn Octal representation of permissions. + * @type false $number File number. Always false in this context. + * @type string|false $owner Owner name or ID, or false if not available. + * @type string|false $group File permissions group, or false if not available. + * @type int|string|false $size Size of file in bytes. May be a numeric string. + * False if not available. + * @type int|string|false $lastmodunix Last modified unix timestamp. May be a numeric string. + * False if not available. + * @type string|false $lastmod Last modified month (3 letters) and day (without leading 0), or + * false if not available. + * @type string|false $time Last modified time, or false if not available. + * @type string $type Type of resource. 'f' for file, 'd' for directory, 'l' for link. + * @type array|false $files If a directory and `$recursive` is true, contains another array of + * files. False if unable to list directory contents. + * } + * } + * @phpstan-return false|array + * @phpstan-return false|array + */ + public function dirlist($path, $include_hidden = \true, $recursive = \false) + { + } + } + /** + * WP_Importer base class + */ + #[\AllowDynamicProperties] + class WP_Importer + { + /** + * Class Constructor + */ + public function __construct() + { + } + /** + * Returns array with imported permalinks from WordPress database. + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $importer_name + * @param string $blog_id + * @return array + */ + public function get_imported_posts($importer_name, $blog_id) + { + } + /** + * Returns count of imported permalinks from WordPress database. + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $importer_name + * @param string $blog_id + * @return int + */ + public function count_imported_posts($importer_name, $blog_id) + { + } + /** + * Sets array with imported comments from WordPress database. + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $blog_id + * @return array + */ + public function get_imported_comments($blog_id) + { + } + /** + * @param int $blog_id + * @return int|void + */ + public function set_blog($blog_id) + { + } + /** + * @param int $user_id + * @return int|void + */ + public function set_user($user_id) + { + } + /** + * Sorts by strlen, longest string first. + * + * @param string $a + * @param string $b + * @return int + */ + public function cmpr_strlen($a, $b) + { + } + /** + * Gets URL. + * + * @param string $url + * @param string $username + * @param string $password + * @param bool $head + * @return array + */ + public function get_page( + $url, + $username = '', + #[\SensitiveParameter] + $password = '', + $head = \false + ) + { + } + /** + * Bumps up the request timeout for http requests. + * + * @param int $val + * @return int + */ + public function bump_request_timeout($val) + { + } + /** + * Checks if user has exceeded disk quota. + * + * @return bool + */ + public function is_user_over_quota() + { + } + /** + * Replaces newlines, tabs, and multiple spaces with a single space. + * + * @param string $text + * @return string + */ + public function min_whitespace($text) + { + } + /** + * Resets global variables that grow out of control during imports. + * + * @since 3.0.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * @global int[] $wp_actions + */ + public function stop_the_insanity() + { + } + } + /** + * Core class used to implement an internal admin pointers API. + * + * @since 3.3.0 + */ + #[\AllowDynamicProperties] + final class WP_Internal_Pointers + { + /** + * Initializes the new feature pointers. + * + * @since 3.3.0 + * + * All pointers can be disabled using the following: + * remove_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) ); + * + * Individual pointers (e.g. wp390_widgets) can be disabled using the following: + * + * function yourprefix_remove_pointers() { + * remove_action( + * 'admin_print_footer_scripts', + * array( 'WP_Internal_Pointers', 'pointer_wp390_widgets' ) + * ); + * } + * add_action( 'admin_enqueue_scripts', 'yourprefix_remove_pointers', 11 ); + * + * @param string $hook_suffix The current admin page. + * @phpstan-return void + */ + public static function enqueue_scripts($hook_suffix) + { + } + public static function pointer_wp330_toolbar() + { + } + public static function pointer_wp330_media_uploader() + { + } + public static function pointer_wp330_saving_widgets() + { + } + public static function pointer_wp340_customize_current_theme_link() + { + } + public static function pointer_wp340_choose_image_from_library() + { + } + public static function pointer_wp350_media() + { + } + public static function pointer_wp360_revisions() + { + } + public static function pointer_wp360_locks() + { + } + public static function pointer_wp390_widgets() + { + } + public static function pointer_wp410_dfw() + { + } + public static function pointer_wp496_privacy() + { + } + /** + * Prevents new users from seeing existing 'new feature' pointers. + * + * @since 3.3.0 + * + * @param int $user_id User ID. + */ + public static function dismiss_pointers_for_new_users($user_id) + { + } + } + /** + * Core class used to implement displaying links in a list table. + * + * @since 3.1.0 + * + * @see WP_List_Table + */ + class WP_Links_List_Table extends \WP_List_Table + { + /** + * Constructor. + * + * @since 3.1.0 + * + * @see WP_List_Table::__construct() for more information on default arguments. + * + * @param array $args An associative array of arguments. + */ + public function __construct($args = array()) + { + } + /** + * @return bool + */ + public function ajax_user_can() + { + } + /** + * @global int $cat_id + * @global string $s + * @global string $orderby + * @global string $order + */ + public function prepare_items() + { + } + /** + */ + public function no_items() + { + } + /** + * @return array + */ + protected function get_bulk_actions() + { + } + /** + * @global int $cat_id + * @param string $which + * @phpstan-return void + */ + protected function extra_tablenav($which) + { + } + /** + * @return string[] Array of column titles keyed by their column name. + */ + public function get_columns() + { + } + /** + * @return array + */ + protected function get_sortable_columns() + { + } + /** + * Gets the name of the default primary column. + * + * @since 4.3.0 + * + * @return string Name of the default primary column, in this case, 'name'. + */ + protected function get_default_primary_column_name() + { + } + /** + * Handles the checkbox column output. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$link` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param object $item The current link object. + */ + public function column_cb($item) + { + } + /** + * Handles the link name column output. + * + * @since 4.3.0 + * + * @param object $link The current link object. + */ + public function column_name($link) + { + } + /** + * Handles the link URL column output. + * + * @since 4.3.0 + * + * @param object $link The current link object. + */ + public function column_url($link) + { + } + /** + * Handles the link categories column output. + * + * @since 4.3.0 + * + * @global int $cat_id + * + * @param object $link The current link object. + */ + public function column_categories($link) + { + } + /** + * Handles the link relation column output. + * + * @since 4.3.0 + * + * @param object $link The current link object. + */ + public function column_rel($link) + { + } + /** + * Handles the link visibility column output. + * + * @since 4.3.0 + * + * @param object $link The current link object. + */ + public function column_visible($link) + { + } + /** + * Handles the link rating column output. + * + * @since 4.3.0 + * + * @param object $link The current link object. + */ + public function column_rating($link) + { + } + /** + * Handles the default column output. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$link` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param object $item Link object. + * @param string $column_name Current column name. + */ + public function column_default($item, $column_name) + { + } + /** + * Generates the list table rows. + * + * @since 3.1.0 + */ + public function display_rows() + { + } + /** + * Generates and displays row action links. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$link` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param object $item Link being acted upon. + * @param string $column_name Current column name. + * @param string $primary Primary column name. + * @return string Row actions output for links, or an empty string + * if the current column is not the primary column. + */ + protected function handle_row_actions($item, $column_name, $primary) + { + } + } + /** + * Helper class to be used only by back compat functions. + * + * @since 3.1.0 + */ + class _WP_List_Table_Compat extends \WP_List_Table + { + public $_screen; + public $_columns; + /** + * Constructor. + * + * @since 3.1.0 + * + * @param string|WP_Screen $screen The screen hook name or screen object. + * @param string[] $columns An array of columns with column IDs as the keys + * and translated column names as the values. + */ + public function __construct($screen, $columns = array()) + { + } + /** + * Gets a list of all, hidden, and sortable columns. + * + * @since 3.1.0 + * + * @return array + */ + protected function get_column_info() + { + } + /** + * Gets a list of columns. + * + * @since 3.1.0 + * + * @return array + */ + public function get_columns() + { + } + } + /** + * Core class used to implement displaying media items in a list table. + * + * @since 3.1.0 + * + * @see WP_List_Table + */ + class WP_Media_List_Table extends \WP_List_Table + { + /** + * Holds the number of pending comments for each post. + * + * @since 4.4.0 + * @var array + */ + protected $comment_pending_count = array(); + /** + * Constructor. + * + * @since 3.1.0 + * + * @see WP_List_Table::__construct() for more information on default arguments. + * + * @param array $args An associative array of arguments. + */ + public function __construct($args = array()) + { + } + /** + * @return bool + */ + public function ajax_user_can() + { + } + /** + * @global string $mode List table view mode. + * @global WP_Query $wp_query WordPress Query object. + * @global array $post_mime_types + * @global array $avail_post_mime_types + */ + public function prepare_items() + { + } + /** + * @global array $post_mime_types + * @global array $avail_post_mime_types + * @return array + */ + protected function get_views() + { + } + /** + * @return array + */ + protected function get_bulk_actions() + { + } + /** + * @param string $which + * @phpstan-return void + */ + protected function extra_tablenav($which) + { + } + /** + * @return string + */ + public function current_action() + { + } + /** + * @return bool + */ + public function has_items() + { + } + /** + */ + public function no_items() + { + } + /** + * Overrides parent views to use the filter bar display. + * + * @global string $mode List table view mode. + */ + public function views() + { + } + /** + * @return string[] Array of column titles keyed by their column name. + */ + public function get_columns() + { + } + /** + * @return array + */ + protected function get_sortable_columns() + { + } + /** + * Handles the checkbox column output. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_Post $item The current WP_Post object. + */ + public function column_cb($item) + { + } + /** + * Handles the title column output. + * + * @since 4.3.0 + * + * @param WP_Post $post The current WP_Post object. + */ + public function column_title($post) + { + } + /** + * Handles the author column output. + * + * @since 4.3.0 + * @since 6.8.0 Added fallback text when author's name is unknown. + * + * @param WP_Post $post The current WP_Post object. + */ + public function column_author($post) + { + } + /** + * Handles the description column output. + * + * @since 4.3.0 + * @deprecated 6.2.0 + * + * @param WP_Post $post The current WP_Post object. + */ + public function column_desc($post) + { + } + /** + * Handles the date column output. + * + * @since 4.3.0 + * + * @param WP_Post $post The current WP_Post object. + */ + public function column_date($post) + { + } + /** + * Handles the parent column output. + * + * @since 4.3.0 + * + * @param WP_Post $post The current WP_Post object. + */ + public function column_parent($post) + { + } + /** + * Handles the comments column output. + * + * @since 4.3.0 + * + * @param WP_Post $post The current WP_Post object. + */ + public function column_comments($post) + { + } + /** + * Handles output for the default column. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_Post $item The current WP_Post object. + * @param string $column_name Current column name. + * @phpstan-return void + */ + public function column_default($item, $column_name) + { + } + /** + * Generates the list table rows. + * + * @since 3.1.0 + * + * @global WP_Post $post Global post object. + * @global WP_Query $wp_query WordPress Query object. + */ + public function display_rows() + { + } + /** + * Gets the name of the default primary column. + * + * @since 4.3.0 + * + * @return string Name of the default primary column, in this case, 'title'. + */ + protected function get_default_primary_column_name() + { + } + /** + * Generates and displays row action links. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_Post $item Attachment being acted upon. + * @param string $column_name Current column name. + * @param string $primary Primary column name. + * @return string Row actions output for media attachments, or an empty string + * if the current column is not the primary column. + */ + protected function handle_row_actions($item, $column_name, $primary) + { + } + } + /** + * Core class used to implement displaying sites in a list table for the network admin. + * + * @since 3.1.0 + * + * @see WP_List_Table + */ + class WP_MS_Sites_List_Table extends \WP_List_Table + { + /** + * Site status list. + * + * @since 4.3.0 + * @var array + */ + public $status_list; + /** + * Constructor. + * + * @since 3.1.0 + * + * @see WP_List_Table::__construct() for more information on default arguments. + * + * @param array $args An associative array of arguments. + */ + public function __construct($args = array()) + { + } + /** + * @return bool + */ + public function ajax_user_can() + { + } + /** + * Prepares the list of sites for display. + * + * @since 3.1.0 + * + * @global string $mode List table view mode. + * @global string $s + * @global wpdb $wpdb WordPress database abstraction object. + */ + public function prepare_items() + { + } + /** + */ + public function no_items() + { + } + /** + * Gets links to filter sites by status. + * + * @since 5.3.0 + * + * @return array + */ + protected function get_views() + { + } + /** + * @return array + */ + protected function get_bulk_actions() + { + } + /** + * @global string $mode List table view mode. + * + * @param string $which The location of the pagination nav markup: Either 'top' or 'bottom'. + * @phpstan-param 'top'|'bottom' $which + */ + protected function pagination($which) + { + } + /** + * Displays extra controls between bulk actions and pagination. + * + * @since 5.3.0 + * + * @param string $which The location of the extra table nav markup: Either 'top' or 'bottom'. + * @phpstan-param 'top'|'bottom' $which + */ + protected function extra_tablenav($which) + { + } + /** + * @return string[] Array of column titles keyed by their column name. + */ + public function get_columns() + { + } + /** + * @return array + */ + protected function get_sortable_columns() + { + } + /** + * Handles the checkbox column output. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$blog` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param array $item Current site. + */ + public function column_cb($item) + { + } + /** + * Handles the ID column output. + * + * @since 4.4.0 + * + * @param array $blog Current site. + */ + public function column_id($blog) + { + } + /** + * Handles the site name column output. + * + * @since 4.3.0 + * + * @global string $mode List table view mode. + * + * @param array $blog Current site. + */ + public function column_blogname($blog) + { + } + /** + * Handles the lastupdated column output. + * + * @since 4.3.0 + * + * @global string $mode List table view mode. + * + * @param array $blog Current site. + */ + public function column_lastupdated($blog) + { + } + /** + * Handles the registered column output. + * + * @since 4.3.0 + * + * @global string $mode List table view mode. + * + * @param array $blog Current site. + */ + public function column_registered($blog) + { + } + /** + * Handles the users column output. + * + * @since 4.3.0 + * + * @param array $blog Current site. + */ + public function column_users($blog) + { + } + /** + * Handles the plugins column output. + * + * @since 4.3.0 + * + * @param array $blog Current site. + */ + public function column_plugins($blog) + { + } + /** + * Handles output for the default column. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$blog` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param array $item Current site. + * @param string $column_name Current column name. + */ + public function column_default($item, $column_name) + { + } + /** + * Generates the list table rows. + * + * @since 3.1.0 + */ + public function display_rows() + { + } + /** + * Determines whether to output comma-separated site states. + * + * @since 5.3.0 + * + * @param array $site + */ + protected function site_states($site) + { + } + /** + * Gets the name of the default primary column. + * + * @since 4.3.0 + * + * @return string Name of the default primary column, in this case, 'blogname'. + */ + protected function get_default_primary_column_name() + { + } + /** + * Generates and displays row action links. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$blog` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param array $item Site being acted upon. + * @param string $column_name Current column name. + * @param string $primary Primary column name. + * @return string Row actions output for sites in Multisite, or an empty string + * if the current column is not the primary column. + */ + protected function handle_row_actions($item, $column_name, $primary) + { + } + } + /** + * Core class used to implement displaying themes in a list table for the network admin. + * + * @since 3.1.0 + * + * @see WP_List_Table + */ + class WP_MS_Themes_List_Table extends \WP_List_Table + { + public $site_id; + public $is_site_themes; + /** + * Whether to show the auto-updates UI. + * + * @since 5.5.0 + * + * @var bool True if auto-updates UI is to be shown, false otherwise. + */ + protected $show_autoupdates = \true; + /** + * Constructor. + * + * @since 3.1.0 + * + * @see WP_List_Table::__construct() for more information on default arguments. + * + * @global string $status + * @global int $page + * + * @param array $args An associative array of arguments. + */ + public function __construct($args = array()) + { + } + /** + * @return array + */ + protected function get_table_classes() + { + } + /** + * @return bool + */ + public function ajax_user_can() + { + } + /** + * @global string $status + * @global array $totals + * @global int $page + * @global string $orderby + * @global string $order + * @global string $s + */ + public function prepare_items() + { + } + /** + * @param WP_Theme $theme + * @return bool + */ + public function _search_callback($theme) + { + } + /** + * @global string $orderby + * @global string $order + * @param array $theme_a + * @param array $theme_b + * @return int + */ + public function _order_callback($theme_a, $theme_b) + { + } + /** + */ + public function no_items() + { + } + /** + * @return string[] Array of column titles keyed by their column name. + */ + public function get_columns() + { + } + /** + * @return array + */ + protected function get_sortable_columns() + { + } + /** + * Gets the name of the primary column. + * + * @since 4.3.0 + * + * @return string Unalterable name of the primary column name, in this case, 'name'. + */ + protected function get_primary_column_name() + { + } + /** + * @global array $totals + * @global string $status + * @return array + */ + protected function get_views() + { + } + /** + * @global string $status + * + * @return array + */ + protected function get_bulk_actions() + { + } + /** + * Generates the list table rows. + * + * @since 3.1.0 + */ + public function display_rows() + { + } + /** + * Handles the checkbox column output. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$theme` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_Theme $item The current WP_Theme object. + */ + public function column_cb($item) + { + } + /** + * Handles the name column output. + * + * @since 4.3.0 + * + * @global string $status + * @global int $page + * @global string $s + * + * @param WP_Theme $theme The current WP_Theme object. + */ + public function column_name($theme) + { + } + /** + * Handles the description column output. + * + * @since 4.3.0 + * + * @global string $status + * @global array $totals + * + * @param WP_Theme $theme The current WP_Theme object. + */ + public function column_description($theme) + { + } + /** + * Handles the auto-updates column output. + * + * @since 5.5.0 + * + * @global string $status + * @global int $page + * + * @param WP_Theme $theme The current WP_Theme object. + */ + public function column_autoupdates($theme) + { + } + /** + * Handles default column output. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$theme` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_Theme $item The current WP_Theme object. + * @param string $column_name The current column name. + */ + public function column_default($item, $column_name) + { + } + /** + * Handles the output for a single table row. + * + * @since 4.3.0 + * + * @param WP_Theme $item The current WP_Theme object. + */ + public function single_row_columns($item) + { + } + /** + * @global string $status + * @global array $totals + * + * @param WP_Theme $theme + */ + public function single_row($theme) + { + } + } + /** + * Core class used to implement displaying users in a list table for the network admin. + * + * @since 3.1.0 + * + * @see WP_List_Table + */ + class WP_MS_Users_List_Table extends \WP_List_Table + { + /** + * @return bool + */ + public function ajax_user_can() + { + } + /** + * @global string $mode List table view mode. + * @global string $usersearch + * @global string $role + */ + public function prepare_items() + { + } + /** + * @return array + */ + protected function get_bulk_actions() + { + } + /** + */ + public function no_items() + { + } + /** + * @global string $role + * @return array + */ + protected function get_views() + { + } + /** + * @global string $mode List table view mode. + * + * @param string $which + */ + protected function pagination($which) + { + } + /** + * @return string[] Array of column titles keyed by their column name. + */ + public function get_columns() + { + } + /** + * @return array + */ + protected function get_sortable_columns() + { + } + /** + * Handles the checkbox column output. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$user` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_User $item The current WP_User object. + * @phpstan-return void + */ + public function column_cb($item) + { + } + /** + * Handles the ID column output. + * + * @since 4.4.0 + * + * @param WP_User $user The current WP_User object. + */ + public function column_id($user) + { + } + /** + * Handles the username column output. + * + * @since 4.3.0 + * + * @param WP_User $user The current WP_User object. + */ + public function column_username($user) + { + } + /** + * Handles the name column output. + * + * @since 4.3.0 + * + * @param WP_User $user The current WP_User object. + */ + public function column_name($user) + { + } + /** + * Handles the email column output. + * + * @since 4.3.0 + * + * @param WP_User $user The current WP_User object. + */ + public function column_email($user) + { + } + /** + * Handles the registered date column output. + * + * @since 4.3.0 + * + * @global string $mode List table view mode. + * + * @param WP_User $user The current WP_User object. + */ + public function column_registered($user) + { + } + /** + * @since 4.3.0 + * + * @param WP_User $user + * @param string $classes + * @param string $data + * @param string $primary + */ + protected function _column_blogs($user, $classes, $data, $primary) + { + } + /** + * Handles the sites column output. + * + * @since 4.3.0 + * + * @param WP_User $user The current WP_User object. + * @phpstan-return void + */ + public function column_blogs($user) + { + } + /** + * Handles the default column output. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$user` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_User $item The current WP_User object. + * @param string $column_name The current column name. + */ + public function column_default($item, $column_name) + { + } + /** + * Generates the list table rows. + * + * @since 3.1.0 + */ + public function display_rows() + { + } + /** + * Gets the name of the default primary column. + * + * @since 4.3.0 + * + * @return string Name of the default primary column, in this case, 'username'. + */ + protected function get_default_primary_column_name() + { + } + /** + * Generates and displays row action links. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$user` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_User $item User being acted upon. + * @param string $column_name Current column name. + * @param string $primary Primary column name. + * @return string Row actions output for users in Multisite, or an empty string + * if the current column is not the primary column. + */ + protected function handle_row_actions($item, $column_name, $primary) + { + } + } + /** + * Core class used to implement displaying plugins to install in a list table. + * + * @since 3.1.0 + * + * @see WP_List_Table + */ + class WP_Plugin_Install_List_Table extends \WP_List_Table + { + public $order = 'ASC'; + public $orderby = \null; + public $groups = array(); + /** + * @return bool + */ + public function ajax_user_can() + { + } + /** + * Returns the list of known plugins. + * + * Uses the transient data from the updates API to determine the known + * installed plugins. + * + * @since 4.9.0 + * + * @return array + */ + protected function get_installed_plugins() + { + } + /** + * Returns a list of slugs of installed plugins, if known. + * + * Uses the transient data from the updates API to determine the slugs of + * known installed plugins. This might be better elsewhere, perhaps even + * within get_plugins(). + * + * @since 4.0.0 + * + * @return array + */ + protected function get_installed_plugin_slugs() + { + } + /** + * @global array $tabs + * @global string $tab + * @global int $paged + * @global string $type + * @global string $term + * @phpstan-return void + */ + public function prepare_items() + { + } + /** + */ + public function no_items() + { + } + /** + * @global array $tabs + * @global string $tab + * + * @return array + */ + protected function get_views() + { + } + /** + * Overrides parent views so we can use the filter bar display. + */ + public function views() + { + } + /** + * Displays the plugin install table. + * + * Overrides the parent display() method to provide a different container. + * + * @since 4.0.0 + */ + public function display() + { + } + /** + * @global string $tab + * + * @param string $which + * @phpstan-return void + */ + protected function display_tablenav($which) + { + } + /** + * @return array + */ + protected function get_table_classes() + { + } + /** + * @return string[] Array of column titles keyed by their column name. + */ + public function get_columns() + { + } + /** + * Generates the list table rows. + * + * @since 3.1.0 + */ + public function display_rows() + { + } + /** + * Returns a notice containing a list of dependencies required by the plugin. + * + * @since 6.5.0 + * + * @param array $plugin_data An array of plugin data. See {@see plugins_api()} + * for the list of possible values. + * @return string A notice containing a list of dependencies required by the plugin, + * or an empty string if none is required. + * @phpstan-param object|array{ + * slug?: string, + * per_page?: int, + * page?: int, + * number?: int, + * search?: string, + * tag?: string, + * author?: string, + * user?: string, + * browse?: string, + * locale?: string, + * installed_plugins?: string, + * is_ssl?: bool, + * fields?: array{ + * short_description?: bool, + * description?: bool, + * sections?: bool, + * tested?: bool, + * requires?: bool, + * requires_php?: bool, + * rating?: bool, + * ratings?: bool, + * downloaded?: bool, + * downloadlink?: bool, + * last_updated?: bool, + * added?: bool, + * tags?: bool, + * compatibility?: bool, + * homepage?: bool, + * versions?: bool, + * donate_link?: bool, + * reviews?: bool, + * banners?: bool, + * icons?: bool, + * active_installs?: bool, + * contributors?: bool, + * }, + * } $plugin_data See plugins_api() + */ + protected function get_dependencies_notice($plugin_data) + { + } + /** + * Creates a 'More details' link for the plugin. + * + * @since 6.5.0 + * + * @param string $name The plugin's name. + * @param string $slug The plugin's slug. + * @return string The 'More details' link for the plugin. + */ + protected function get_more_details_link($name, $slug) + { + } + } + /** + * Core class used to implement displaying installed plugins in a list table. + * + * @since 3.1.0 + * + * @see WP_List_Table + */ + class WP_Plugins_List_Table extends \WP_List_Table + { + /** + * Whether to show the auto-updates UI. + * + * @since 5.5.0 + * + * @var bool True if auto-updates UI is to be shown, false otherwise. + */ + protected $show_autoupdates = \true; + /** + * Constructor. + * + * @since 3.1.0 + * + * @see WP_List_Table::__construct() for more information on default arguments. + * + * @global string $status + * @global int $page + * + * @param array $args An associative array of arguments. + */ + public function __construct($args = array()) + { + } + /** + * @return array + */ + protected function get_table_classes() + { + } + /** + * @return bool + */ + public function ajax_user_can() + { + } + /** + * @global string $status + * @global array $plugins + * @global array $totals + * @global int $page + * @global string $orderby + * @global string $order + * @global string $s + */ + public function prepare_items() + { + } + /** + * @global string $s URL encoded search term. + * + * @param array $plugin + * @return bool + */ + public function _search_callback($plugin) + { + } + /** + * @global string $orderby + * @global string $order + * @param array $plugin_a + * @param array $plugin_b + * @return int + */ + public function _order_callback($plugin_a, $plugin_b) + { + } + /** + * @global array $plugins + */ + public function no_items() + { + } + /** + * Displays the search box. + * + * @since 4.6.0 + * + * @param string $text The 'submit' button label. + * @param string $input_id ID attribute value for the search input field. + * @phpstan-return void + */ + public function search_box($text, $input_id) + { + } + /** + * @global string $status + * + * @return string[] Array of column titles keyed by their column name. + */ + public function get_columns() + { + } + /** + * @return array + */ + protected function get_sortable_columns() + { + } + /** + * @global array $totals + * @global string $status + * @return array + */ + protected function get_views() + { + } + /** + * @global string $status + * @return array + */ + protected function get_bulk_actions() + { + } + /** + * @global string $status + * @param string $which + * @phpstan-return void + */ + public function bulk_actions($which = '') + { + } + /** + * @global string $status + * @param string $which + * @phpstan-return void + */ + protected function extra_tablenav($which) + { + } + /** + * @return string + */ + public function current_action() + { + } + /** + * Generates the list table rows. + * + * @since 3.1.0 + * + * @global string $status + * @phpstan-return void + */ + public function display_rows() + { + } + /** + * @global string $status + * @global int $page + * @global string $s + * @global array $totals + * + * @param array $item + */ + public function single_row($item) + { + } + /** + * Gets the name of the primary column for this specific list table. + * + * @since 4.3.0 + * + * @return string Unalterable name for the primary column, in this case, 'name'. + */ + protected function get_primary_column_name() + { + } + /** + * Prints a list of other plugins that depend on the plugin. + * + * @since 6.5.0 + * + * @param string $dependency The dependency's filepath, relative to the plugins directory. + * @phpstan-return void + */ + protected function add_dependents_to_dependency_plugin_row($dependency) + { + } + /** + * Prints a list of other plugins that the plugin depends on. + * + * @since 6.5.0 + * + * @param string $dependent The dependent plugin's filepath, relative to the plugins directory. + * @phpstan-return void + */ + protected function add_dependencies_to_dependent_plugin_row($dependent) + { + } + /** + * Returns a 'View details' like link for a dependency. + * + * @since 6.5.0 + * + * @param string $name The dependency's name. + * @param string $slug The dependency's slug. + * @return string A 'View details' link for the dependency. + */ + protected function get_dependency_view_details_link($name, $slug) + { + } + /** + * Returns a 'View details' link for the plugin. + * + * @since 6.5.0 + * + * @param string $name The plugin's name. + * @param string $slug The plugin's slug. + * @return string A 'View details' link for the plugin. + */ + protected function get_view_details_link($name, $slug) + { + } + } + /** + * Core class used to implement displaying post comments in a list table. + * + * @since 3.1.0 + * + * @see WP_Comments_List_Table + */ + class WP_Post_Comments_List_Table extends \WP_Comments_List_Table + { + /** + * @return array + */ + protected function get_column_info() + { + } + /** + * @return array + */ + protected function get_table_classes() + { + } + /** + * @param bool $output_empty + */ + public function display($output_empty = \false) + { + } + /** + * @param bool $comment_status + * @return int + */ + public function get_per_page($comment_status = \false) + { + } + } + /** + * Core class used to implement displaying posts in a list table. + * + * @since 3.1.0 + * + * @see WP_List_Table + */ + class WP_Posts_List_Table extends \WP_List_Table + { + /** + * Whether the items should be displayed hierarchically or linearly. + * + * @since 3.1.0 + * @var bool + */ + protected $hierarchical_display; + /** + * Holds the number of pending comments for each post. + * + * @since 3.1.0 + * @var array + */ + protected $comment_pending_count; + /** + * Current level for output. + * + * @since 4.3.0 + * @var int + */ + protected $current_level = 0; + /** + * Constructor. + * + * @since 3.1.0 + * + * @see WP_List_Table::__construct() for more information on default arguments. + * + * @global WP_Post_Type $post_type_object Global post type object. + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param array $args An associative array of arguments. + */ + public function __construct($args = array()) + { + } + /** + * Sets whether the table layout should be hierarchical or not. + * + * @since 4.2.0 + * + * @param bool $display Whether the table layout should be hierarchical. + */ + public function set_hierarchical_display($display) + { + } + /** + * @return bool + */ + public function ajax_user_can() + { + } + /** + * @global string $mode List table view mode. + * @global array $avail_post_stati + * @global WP_Query $wp_query WordPress Query object. + * @global int $per_page + */ + public function prepare_items() + { + } + /** + * @return bool + */ + public function has_items() + { + } + /** + */ + public function no_items() + { + } + /** + * Determines if the current view is the "All" view. + * + * @since 4.2.0 + * + * @return bool Whether the current view is the "All" view. + */ + protected function is_base_request() + { + } + /** + * Creates a link to edit.php with params. + * + * @since 4.4.0 + * + * @param string[] $args Associative array of URL parameters for the link. + * @param string $link_text Link text. + * @param string $css_class Optional. Class attribute. Default empty string. + * @return string The formatted link string. + */ + protected function get_edit_link($args, $link_text, $css_class = '') + { + } + /** + * @global array $locked_post_status This seems to be deprecated. + * @global array $avail_post_stati + * @return array + */ + protected function get_views() + { + } + /** + * @return array + */ + protected function get_bulk_actions() + { + } + /** + * Displays a categories drop-down for filtering on the Posts list table. + * + * @since 4.6.0 + * + * @global int $cat Currently selected category. + * + * @param string $post_type Post type slug. + * @phpstan-return void + */ + protected function categories_dropdown($post_type) + { + } + /** + * Displays a formats drop-down for filtering items. + * + * @since 5.2.0 + * + * @param string $post_type Post type slug. + * @phpstan-return void + */ + protected function formats_dropdown($post_type) + { + } + /** + * @param string $which + */ + protected function extra_tablenav($which) + { + } + /** + * @return string + */ + public function current_action() + { + } + /** + * @global string $mode List table view mode. + * + * @return array + */ + protected function get_table_classes() + { + } + /** + * @return string[] Array of column titles keyed by their column name. + */ + public function get_columns() + { + } + /** + * @return array + */ + protected function get_sortable_columns() + { + } + /** + * Generates the list table rows. + * + * @since 3.1.0 + * + * @global WP_Query $wp_query WordPress Query object. + * @global int $per_page + * + * @param array $posts + * @param int $level + */ + public function display_rows($posts = array(), $level = 0) + { + } + /** + * Handles the checkbox column output. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_Post $item The current WP_Post object. + */ + public function column_cb($item) + { + } + /** + * @since 4.3.0 + * + * @param WP_Post $post + * @param string $classes + * @param string $data + * @param string $primary + */ + protected function _column_title($post, $classes, $data, $primary) + { + } + /** + * Handles the title column output. + * + * @since 4.3.0 + * + * @global string $mode List table view mode. + * + * @param WP_Post $post The current WP_Post object. + */ + public function column_title($post) + { + } + /** + * Handles the post date column output. + * + * @since 4.3.0 + * + * @global string $mode List table view mode. + * + * @param WP_Post $post The current WP_Post object. + */ + public function column_date($post) + { + } + /** + * Handles the comments column output. + * + * @since 4.3.0 + * + * @param WP_Post $post The current WP_Post object. + */ + public function column_comments($post) + { + } + /** + * Handles the post author column output. + * + * @since 4.3.0 + * @since 6.8.0 Added fallback text when author's name is unknown. + * + * @param WP_Post $post The current WP_Post object. + */ + public function column_author($post) + { + } + /** + * Handles the default column output. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_Post $item The current WP_Post object. + * @param string $column_name The current column name. + * @phpstan-return void + */ + public function column_default($item, $column_name) + { + } + /** + * @global WP_Post $post Global post object. + * + * @param int|WP_Post $post + * @param int $level + */ + public function single_row($post, $level = 0) + { + } + /** + * Gets the name of the default primary column. + * + * @since 4.3.0 + * + * @return string Name of the default primary column, in this case, 'title'. + */ + protected function get_default_primary_column_name() + { + } + /** + * Generates and displays row action links. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_Post $item Post being acted upon. + * @param string $column_name Current column name. + * @param string $primary Primary column name. + * @return string Row actions output for posts, or an empty string + * if the current column is not the primary column. + */ + protected function handle_row_actions($item, $column_name, $primary) + { + } + /** + * Outputs the hidden row displayed when inline editing + * + * @since 3.1.0 + * + * @global string $mode List table view mode. + */ + public function inline_edit() + { + } + } + /** + * List Table API: WP_Privacy_Requests_Table class + * + * @package WordPress + * @subpackage Administration + * @since 4.9.6 + */ + abstract class WP_Privacy_Requests_Table extends \WP_List_Table + { + /** + * Action name for the requests this table will work with. Classes + * which inherit from WP_Privacy_Requests_Table should define this. + * + * Example: 'export_personal_data'. + * + * @since 4.9.6 + * + * @var string $request_type Name of action. + */ + protected $request_type = 'INVALID'; + /** + * Post type to be used. + * + * @since 4.9.6 + * + * @var string $post_type The post type. + */ + protected $post_type = 'INVALID'; + /** + * Gets columns to show in the list table. + * + * @since 4.9.6 + * + * @return string[] Array of column titles keyed by their column name. + */ + public function get_columns() + { + } + /** + * Normalizes the admin URL to the current page (by request_type). + * + * @since 5.3.0 + * + * @return string URL to the current admin page. + */ + protected function get_admin_url() + { + } + /** + * Gets a list of sortable columns. + * + * @since 4.9.6 + * + * @return array Default sortable columns. + */ + protected function get_sortable_columns() + { + } + /** + * Returns the default primary column. + * + * @since 4.9.6 + * + * @return string Default primary column name. + */ + protected function get_default_primary_column_name() + { + } + /** + * Counts the number of requests for each status. + * + * @since 4.9.6 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @return object Number of posts for each status. + */ + protected function get_request_counts() + { + } + /** + * Gets an associative array ( id => link ) with the list of views available on this table. + * + * @since 4.9.6 + * + * @return string[] An array of HTML links keyed by their view. + */ + protected function get_views() + { + } + /** + * Gets bulk actions. + * + * @since 4.9.6 + * + * @return array Array of bulk action labels keyed by their action. + */ + protected function get_bulk_actions() + { + } + /** + * Process bulk actions. + * + * @since 4.9.6 + * @since 5.6.0 Added support for the `complete` action. + * @phpstan-return void + */ + public function process_bulk_action() + { + } + /** + * Prepares items to output. + * + * @since 4.9.6 + * @since 5.1.0 Added support for column sorting. + */ + public function prepare_items() + { + } + /** + * Returns the markup for the Checkbox column. + * + * @since 4.9.6 + * + * @param WP_User_Request $item Item being shown. + * @return string Checkbox column markup. + */ + public function column_cb($item) + { + } + /** + * Status column. + * + * @since 4.9.6 + * + * @param WP_User_Request $item Item being shown. + * @return string|void Status column markup. Returns a string if no status is found, + * otherwise it displays the markup. + */ + public function column_status($item) + { + } + /** + * Converts a timestamp for display. + * + * @since 4.9.6 + * + * @param int $timestamp Event timestamp. + * @return string Human readable date. + */ + protected function get_timestamp_as_date($timestamp) + { + } + /** + * Handles the default column. + * + * @since 4.9.6 + * @since 5.7.0 Added `manage_{$this->screen->id}_custom_column` action. + * + * @param WP_User_Request $item Item being shown. + * @param string $column_name Name of column being shown. + */ + public function column_default($item, $column_name) + { + } + /** + * Returns the markup for the Created timestamp column. Overridden by children. + * + * @since 5.7.0 + * + * @param WP_User_Request $item Item being shown. + * @return string Human readable date. + */ + public function column_created_timestamp($item) + { + } + /** + * Actions column. Overridden by children. + * + * @since 4.9.6 + * + * @param WP_User_Request $item Item being shown. + * @return string Email column markup. + */ + public function column_email($item) + { + } + /** + * Returns the markup for the next steps column. Overridden by children. + * + * @since 4.9.6 + * + * @param WP_User_Request $item Item being shown. + */ + public function column_next_steps($item) + { + } + /** + * Generates content for a single row of the table, + * + * @since 4.9.6 + * + * @param WP_User_Request $item The current item. + */ + public function single_row($item) + { + } + /** + * Embeds scripts used to perform actions. Overridden by children. + * + * @since 4.9.6 + */ + public function embed_scripts() + { + } + } + /** + * WP_Privacy_Data_Export_Requests_Table class. + * + * @since 4.9.6 + */ + class WP_Privacy_Data_Export_Requests_List_Table extends \WP_Privacy_Requests_Table + { + /** + * Action name for the requests this table will work with. + * + * @since 4.9.6 + * + * @var string $request_type Name of action. + */ + protected $request_type = 'export_personal_data'; + /** + * Post type for the requests. + * + * @since 4.9.6 + * + * @var string $post_type The post type. + */ + protected $post_type = 'user_request'; + /** + * Actions column. + * + * @since 4.9.6 + * + * @param WP_User_Request $item Item being shown. + * @return string Email column markup. + */ + public function column_email($item) + { + } + /** + * Displays the next steps column. + * + * @since 4.9.6 + * + * @param WP_User_Request $item Item being shown. + */ + public function column_next_steps($item) + { + } + } + /** + * WP_Privacy_Data_Removal_Requests_List_Table class. + * + * @since 4.9.6 + */ + class WP_Privacy_Data_Removal_Requests_List_Table extends \WP_Privacy_Requests_Table + { + /** + * Action name for the requests this table will work with. + * + * @since 4.9.6 + * + * @var string $request_type Name of action. + */ + protected $request_type = 'remove_personal_data'; + /** + * Post type for the requests. + * + * @since 4.9.6 + * + * @var string $post_type The post type. + */ + protected $post_type = 'user_request'; + /** + * Outputs the Actions column. + * + * @since 4.9.6 + * + * @param WP_User_Request $item Item being shown. + * @return string Email column markup. + */ + public function column_email($item) + { + } + /** + * Outputs the Next steps column. + * + * @since 4.9.6 + * + * @param WP_User_Request $item Item being shown. + */ + public function column_next_steps($item) + { + } + } + /** + * WP_Privacy_Policy_Content class. + * + * @package WordPress + * @subpackage Administration + * @since 4.9.6 + */ + #[\AllowDynamicProperties] + final class WP_Privacy_Policy_Content + { + /** + * Adds content to the postbox shown when editing the privacy policy. + * + * Plugins and themes should suggest text for inclusion in the site's privacy policy. + * The suggested text should contain information about any functionality that affects user privacy, + * and will be shown in the Suggested Privacy Policy Content postbox. + * + * Intended for use from `wp_add_privacy_policy_content()`. + * + * @since 4.9.6 + * + * @param string $plugin_name The name of the plugin or theme that is suggesting content for the site's privacy policy. + * @param string $policy_text The suggested content for inclusion in the policy. + * @phpstan-return void + */ + public static function add($plugin_name, $policy_text) + { + } + /** + * Performs a quick check to determine whether any privacy info has changed. + * + * @since 4.9.6 + */ + public static function text_change_check() + { + } + /** + * Outputs a warning when some privacy info has changed. + * + * @since 4.9.6 + * @phpstan-return void + */ + public static function policy_text_changed_notice() + { + } + /** + * Updates the cached policy info when the policy page is updated. + * + * @since 4.9.6 + * @access private + * + * @param int $post_id The ID of the updated post. + * @phpstan-return void + */ + public static function _policy_page_updated($post_id) + { + } + /** + * Checks for updated, added or removed privacy policy information from plugins. + * + * Caches the current info in post_meta of the policy page. + * + * @since 4.9.6 + * + * @return array The privacy policy text/information added by core and plugins. + */ + public static function get_suggested_policy_text() + { + } + /** + * Adds a notice with a link to the guide when editing the privacy policy page. + * + * @since 4.9.6 + * @since 5.0.0 The `$post` parameter was made optional. + * + * @global WP_Post $post Global post object. + * + * @param WP_Post|null $post The currently edited post. Default null. + * @phpstan-return void + */ + public static function notice($post = \null) + { + } + /** + * Outputs the privacy policy guide together with content from the theme and plugins. + * + * @since 4.9.6 + */ + public static function privacy_policy_guide() + { + } + /** + * Returns the default suggested privacy policy content. + * + * @since 4.9.6 + * @since 5.0.0 Added the `$blocks` parameter. + * + * @param bool $description Whether to include the descriptions under the section headings. Default false. + * @param bool $blocks Whether to format the content for the block editor. Default true. + * @return string The default policy content. + */ + public static function get_default_content($description = \false, $blocks = \true) + { + } + /** + * Adds the suggested privacy policy text to the policy postbox. + * + * @since 4.9.6 + */ + public static function add_suggested_content() + { + } + } + /** + * Core class used to implement an admin screen API. + * + * @since 3.3.0 + */ + #[\AllowDynamicProperties] + final class WP_Screen + { + /** + * Any action associated with the screen. + * + * 'add' for *-add.php and *-new.php screens. Empty otherwise. + * + * @since 3.3.0 + * @var string + */ + public $action; + /** + * The base type of the screen. + * + * This is typically the same as `$id` but with any post types and taxonomies stripped. + * For example, for an `$id` of 'edit-post' the base is 'edit'. + * + * @since 3.3.0 + * @var string + */ + public $base; + /** + * The unique ID of the screen. + * + * @since 3.3.0 + * @var string + */ + public $id; + /** + * Whether the screen is in the network admin. + * + * Deprecated. Use in_admin() instead. + * + * @since 3.3.0 + * @deprecated 3.5.0 + * @var bool + */ + public $is_network; + /** + * Whether the screen is in the user admin. + * + * Deprecated. Use in_admin() instead. + * + * @since 3.3.0 + * @deprecated 3.5.0 + * @var bool + */ + public $is_user; + /** + * The base menu parent. + * + * This is derived from `$parent_file` by removing the query string and any .php extension. + * `$parent_file` values of 'edit.php?post_type=page' and 'edit.php?post_type=post' + * have a `$parent_base` of 'edit'. + * + * @since 3.3.0 + * @var string|null + */ + public $parent_base; + /** + * The parent_file for the screen per the admin menu system. + * + * Some `$parent_file` values are 'edit.php?post_type=page', 'edit.php', and 'options-general.php'. + * + * @since 3.3.0 + * @var string|null + */ + public $parent_file; + /** + * The post type associated with the screen, if any. + * + * The 'edit.php?post_type=page' screen has a post type of 'page'. + * The 'edit-tags.php?taxonomy=$taxonomy&post_type=page' screen has a post type of 'page'. + * + * @since 3.3.0 + * @var string + */ + public $post_type; + /** + * The taxonomy associated with the screen, if any. + * + * The 'edit-tags.php?taxonomy=category' screen has a taxonomy of 'category'. + * + * @since 3.3.0 + * @var string + */ + public $taxonomy; + /** + * Whether the screen is using the block editor. + * + * @since 5.0.0 + * @var bool + */ + public $is_block_editor = \false; + /** + * Fetches a screen object. + * + * @since 3.3.0 + * + * @global string $hook_suffix + * + * @param string|WP_Screen $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen. + * Defaults to the current $hook_suffix global. + * @return WP_Screen Screen object. + */ + public static function get($hook_name = '') + { + } + /** + * Makes the screen object the current screen. + * + * @see set_current_screen() + * @since 3.3.0 + * + * @global WP_Screen $current_screen WordPress current screen object. + * @global string $typenow The post type of the current screen. + * @global string $taxnow The taxonomy of the current screen. + */ + public function set_current_screen() + { + } + /** + * Indicates whether the screen is in a particular admin. + * + * @since 3.5.0 + * + * @param string $admin The admin to check against (network | user | site). + * If empty any of the three admins will result in true. + * @return bool True if the screen is in the indicated admin, false otherwise. + */ + public function in_admin($admin = \null) + { + } + /** + * Sets or returns whether the block editor is loading on the current screen. + * + * @since 5.0.0 + * + * @param bool $set Optional. Sets whether the block editor is loading on the current screen or not. + * @return bool True if the block editor is being loaded, false otherwise. + */ + public function is_block_editor($set = \null) + { + } + /** + * Sets the old string-based contextual help for the screen for backward compatibility. + * + * @since 3.3.0 + * + * @param WP_Screen $screen A screen object. + * @param string $help Help text. + */ + public static function add_old_compat_help($screen, $help) + { + } + /** + * Sets the parent information for the screen. + * + * This is called in admin-header.php after the menu parent for the screen has been determined. + * + * @since 3.3.0 + * + * @param string $parent_file The parent file of the screen. Typically the $parent_file global. + */ + public function set_parentage($parent_file) + { + } + /** + * Adds an option for the screen. + * + * Call this in template files after admin.php is loaded and before admin-header.php is loaded + * to add screen options. + * + * @since 3.3.0 + * + * @param string $option Option ID. + * @param mixed $args Option-dependent arguments. + */ + public function add_option($option, $args = array()) + { + } + /** + * Removes an option from the screen. + * + * @since 3.8.0 + * + * @param string $option Option ID. + */ + public function remove_option($option) + { + } + /** + * Removes all options from the screen. + * + * @since 3.8.0 + */ + public function remove_options() + { + } + /** + * Gets the options registered for the screen. + * + * @since 3.8.0 + * + * @return array Options with arguments. + */ + public function get_options() + { + } + /** + * Gets the arguments for an option for the screen. + * + * @since 3.3.0 + * + * @param string $option Option name. + * @param string|false $key Optional. Specific array key for when the option is an array. + * Default false. + * @return string The option value if set, null otherwise. + */ + public function get_option($option, $key = \false) + { + } + /** + * Gets the help tabs registered for the screen. + * + * @since 3.4.0 + * @since 4.4.0 Help tabs are ordered by their priority. + * + * @return array Help tabs with arguments. + */ + public function get_help_tabs() + { + } + /** + * Gets the arguments for a help tab. + * + * @since 3.4.0 + * + * @param string $id Help Tab ID. + * @return array Help tab arguments. + */ + public function get_help_tab($id) + { + } + /** + * Adds a help tab to the contextual help for the screen. + * + * Call this on the `load-$pagenow` hook for the relevant screen, + * or fetch the `$current_screen` object, or use get_current_screen() + * and then call the method from the object. + * + * You may need to filter `$current_screen` using an if or switch statement + * to prevent new help tabs from being added to ALL admin screens. + * + * @since 3.3.0 + * @since 4.4.0 The `$priority` argument was added. + * + * @param array $args { + * Array of arguments used to display the help tab. + * + * @type string $title Title for the tab. Default false. + * @type string $id Tab ID. Must be HTML-safe and should be unique for this menu. + * It is NOT allowed to contain any empty spaces. Default false. + * @type string $content Optional. Help tab content in plain text or HTML. Default empty string. + * @type callable $callback Optional. A callback to generate the tab content. Default false. + * @type int $priority Optional. The priority of the tab, used for ordering. Default 10. + * } + * @phpstan-param array{ + * title?: string, + * id?: string, + * content?: string, + * callback?: callable, + * priority?: int, + * } $args + * @phpstan-return void + */ + public function add_help_tab($args) + { + } + /** + * Removes a help tab from the contextual help for the screen. + * + * @since 3.3.0 + * + * @param string $id The help tab ID. + */ + public function remove_help_tab($id) + { + } + /** + * Removes all help tabs from the contextual help for the screen. + * + * @since 3.3.0 + */ + public function remove_help_tabs() + { + } + /** + * Gets the content from a contextual help sidebar. + * + * @since 3.4.0 + * + * @return string Contents of the help sidebar. + */ + public function get_help_sidebar() + { + } + /** + * Adds a sidebar to the contextual help for the screen. + * + * Call this in template files after admin.php is loaded and before admin-header.php is loaded + * to add a sidebar to the contextual help. + * + * @since 3.3.0 + * + * @param string $content Sidebar content in plain text or HTML. + */ + public function set_help_sidebar($content) + { + } + /** + * Gets the number of layout columns the user has selected. + * + * The layout_columns option controls the max number and default number of + * columns. This method returns the number of columns within that range selected + * by the user via Screen Options. If no selection has been made, the default + * provisioned in layout_columns is returned. If the screen does not support + * selecting the number of layout columns, 0 is returned. + * + * @since 3.4.0 + * + * @return int Number of columns to display. + */ + public function get_columns() + { + } + /** + * Gets the accessible hidden headings and text used in the screen. + * + * @since 4.4.0 + * + * @see set_screen_reader_content() For more information on the array format. + * + * @return string[] An associative array of screen reader text strings. + */ + public function get_screen_reader_content() + { + } + /** + * Gets a screen reader text string. + * + * @since 4.4.0 + * + * @param string $key Screen reader text array named key. + * @return string Screen reader text string. + */ + public function get_screen_reader_text($key) + { + } + /** + * Adds accessible hidden headings and text for the screen. + * + * @since 4.4.0 + * + * @param array $content { + * An associative array of screen reader text strings. + * + * @type string $heading_views Screen reader text for the filter links heading. + * Default 'Filter items list'. + * @type string $heading_pagination Screen reader text for the pagination heading. + * Default 'Items list navigation'. + * @type string $heading_list Screen reader text for the items list heading. + * Default 'Items list'. + * } + * @phpstan-param array{ + * heading_views?: string, + * heading_pagination?: string, + * heading_list?: string, + * } $content + */ + public function set_screen_reader_content($content = array()) + { + } + /** + * Removes all the accessible hidden headings and text for the screen. + * + * @since 4.4.0 + */ + public function remove_screen_reader_content() + { + } + /** + * Renders the screen's help section. + * + * This will trigger the deprecated filters for backward compatibility. + * + * @since 3.3.0 + * + * @global string $screen_layout_columns + * @phpstan-return void + */ + public function render_screen_meta() + { + } + /** + * @since 3.3.0 + * + * @global array $wp_meta_boxes Global meta box state. + * + * @return bool + */ + public function show_screen_options() + { + } + /** + * Renders the screen options tab. + * + * @since 3.3.0 + * + * @param array $options { + * Options for the tab. + * + * @type bool $wrap Whether the screen-options-wrap div will be included. Defaults to true. + * } + * @phpstan-param array{ + * wrap?: bool, + * } $options + */ + public function render_screen_options($options = array()) + { + } + /** + * Renders the meta boxes preferences. + * + * @since 4.4.0 + * + * @global array $wp_meta_boxes Global meta box state. + * @phpstan-return void + */ + public function render_meta_boxes_preferences() + { + } + /** + * Renders the list table columns preferences. + * + * @since 4.4.0 + * @phpstan-return void + */ + public function render_list_table_columns_preferences() + { + } + /** + * Renders the option for number of columns on the page. + * + * @since 3.3.0 + * @phpstan-return void + */ + public function render_screen_layout() + { + } + /** + * Renders the items per page option. + * + * @since 3.3.0 + * @phpstan-return void + */ + public function render_per_page_options() + { + } + /** + * Renders the list table view mode preferences. + * + * @since 4.4.0 + * + * @global string $mode List table view mode. + * @phpstan-return void + */ + public function render_view_mode() + { + } + /** + * Renders screen reader text. + * + * @since 4.4.0 + * + * @param string $key The screen reader text array named key. + * @param string $tag Optional. The HTML tag to wrap the screen reader text. Default h2. + * @phpstan-return void + */ + public function render_screen_reader_content($key = '', $tag = 'h2') + { + } + } + /** + * Class for testing automatic updates in the WordPress code. + * + * @package WordPress + * @subpackage Site_Health + * @since 5.2.0 + */ + #[\AllowDynamicProperties] + class WP_Site_Health_Auto_Updates + { + /** + * WP_Site_Health_Auto_Updates constructor. + * + * @since 5.2.0 + */ + public function __construct() + { + } + /** + * Runs tests to determine if auto-updates can run. + * + * @since 5.2.0 + * + * @return array The test results. + */ + public function run_tests() + { + } + /** + * Tests if auto-updates related constants are set correctly. + * + * @since 5.2.0 + * @since 5.5.1 The `$value` parameter can accept an array. + * + * @param string $constant The name of the constant to check. + * @param bool|string|array $value The value that the constant should be, if set, + * or an array of acceptable values. + * @return array|null The test results if there are any constants set incorrectly, + * or null if the test passed. + */ + public function test_constants($constant, $value) + { + } + /** + * Checks if updates are intercepted by a filter. + * + * @since 5.2.0 + * + * @return array|null The test results if wp_version_check() is disabled, + * or null if the test passed. + */ + public function test_wp_version_check_attached() + { + } + /** + * Checks if automatic updates are disabled by a filter. + * + * @since 5.2.0 + * + * @return array|null The test results if the {@see 'automatic_updater_disabled'} filter is set, + * or null if the test passed. + */ + public function test_filters_automatic_updater_disabled() + { + } + /** + * Checks if automatic updates are disabled. + * + * @since 5.3.0 + * + * @return array|false The test results if auto-updates are disabled, false otherwise. + */ + public function test_wp_automatic_updates_disabled() + { + } + /** + * Checks if automatic updates have tried to run, but failed, previously. + * + * @since 5.2.0 + * + * @return array|false The test results if auto-updates previously failed, false otherwise. + */ + public function test_if_failed_update() + { + } + /** + * Checks if WordPress is controlled by a VCS (Git, Subversion etc). + * + * @since 5.2.0 + * + * @return array The test results. + */ + public function test_vcs_abspath() + { + } + /** + * Checks if we can access files without providing credentials. + * + * @since 5.2.0 + * + * @return array The test results. + */ + public function test_check_wp_filesystem_method() + { + } + /** + * Checks if core files are writable by the web user/group. + * + * @since 5.2.0 + * + * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. + * + * @return array|false The test results if at least some of WordPress core files are writeable, + * or if a list of the checksums could not be retrieved from WordPress.org. + * False if the core files are not writeable. + */ + public function test_all_files_writable() + { + } + /** + * Checks if the install is using a development branch and can use nightly packages. + * + * @since 5.2.0 + * + * @return array|false|null The test results if development updates are blocked. + * False if it isn't a development version. Null if the test passed. + */ + public function test_accepts_dev_updates() + { + } + /** + * Checks if the site supports automatic minor updates. + * + * @since 5.2.0 + * + * @return array|null The test results if minor updates are blocked, + * or null if the test passed. + */ + public function test_accepts_minor_updates() + { + } + } + /** + * Class for looking up a site's health based on a user's WordPress environment. + * + * @package WordPress + * @subpackage Site_Health + * @since 5.2.0 + */ + #[\AllowDynamicProperties] + class WP_Site_Health + { + public $is_mariadb = \false; + public $php_memory_limit; + public $schedules; + public $crons; + public $last_missed_cron = \null; + public $last_late_cron = \null; + /** + * WP_Site_Health constructor. + * + * @since 5.2.0 + */ + public function __construct() + { + } + /** + * Outputs the content of a tab in the Site Health screen. + * + * @since 5.8.0 + * + * @param string $tab Slug of the current tab being displayed. + */ + public function show_site_health_tab($tab) + { + } + /** + * Returns an instance of the WP_Site_Health class, or create one if none exist yet. + * + * @since 5.4.0 + * + * @return WP_Site_Health|null + */ + public static function get_instance() + { + } + /** + * Enqueues the site health scripts. + * + * @since 5.2.0 + * @phpstan-return void + */ + public function enqueue_scripts() + { + } + /** + * Tests whether `wp_version_check` is blocked. + * + * It's possible to block updates with the `wp_version_check` filter, but this can't be checked + * during an Ajax call, as the filter is never introduced then. + * + * This filter overrides a standard page request if it's made by an admin through the Ajax call + * with the right query argument to check for this. + * + * @since 5.2.0 + * @phpstan-return void + */ + public function check_wp_version_check_exists() + { + } + /** + * Tests for WordPress version and outputs it. + * + * Gives various results depending on what kind of updates are available, if any, to encourage + * the user to install security updates as a priority. + * + * @since 5.2.0 + * + * @return array The test result. + */ + public function get_test_wordpress_version() + { + } + /** + * Tests if plugins are outdated, or unnecessary. + * + * The test checks if your plugins are up to date, and encourages you to remove any + * that are not in use. + * + * @since 5.2.0 + * + * @return array The test result. + */ + public function get_test_plugin_version() + { + } + /** + * Tests if themes are outdated, or unnecessary. + * + * Checks if your site has a default theme (to fall back on if there is a need), + * if your themes are up to date and, finally, encourages you to remove any themes + * that are not needed. + * + * @since 5.2.0 + * + * @return array The test results. + */ + public function get_test_theme_version() + { + } + /** + * Tests if the supplied PHP version is supported. + * + * @since 5.2.0 + * + * @return array The test results. + */ + public function get_test_php_version() + { + } + /** + * Tests if required PHP modules are installed on the host. + * + * This test builds on the recommendations made by the WordPress Hosting Team + * as seen at https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions + * + * @since 5.2.0 + * + * @return array + */ + public function get_test_php_extensions() + { + } + /** + * Tests if the PHP default timezone is set to UTC. + * + * @since 5.3.1 + * + * @return array The test results. + */ + public function get_test_php_default_timezone() + { + } + /** + * Tests if there's an active PHP session that can affect loopback requests. + * + * @since 5.5.0 + * + * @return array The test results. + */ + public function get_test_php_sessions() + { + } + /** + * Tests if the SQL server is up to date. + * + * @since 5.2.0 + * + * @return array The test results. + */ + public function get_test_sql_server() + { + } + /** + * Tests if the site can communicate with WordPress.org. + * + * @since 5.2.0 + * + * @return array The test results. + */ + public function get_test_dotorg_communication() + { + } + /** + * Tests if debug information is enabled. + * + * When WP_DEBUG is enabled, errors and information may be disclosed to site visitors, + * or logged to a publicly accessible file. + * + * Debugging is also frequently left enabled after looking for errors on a site, + * as site owners do not understand the implications of this. + * + * @since 5.2.0 + * + * @return array The test results. + */ + public function get_test_is_in_debug_mode() + { + } + /** + * Tests if the site is serving content over HTTPS. + * + * Many sites have varying degrees of HTTPS support, the most common of which is sites that have it + * enabled, but only if you visit the right site address. + * + * @since 5.2.0 + * @since 5.7.0 Updated to rely on {@see wp_is_using_https()} and {@see wp_is_https_supported()}. + * + * @return array The test results. + */ + public function get_test_https_status() + { + } + /** + * Checks if the HTTP API can handle SSL/TLS requests. + * + * @since 5.2.0 + * + * @return array The test result. + */ + public function get_test_ssl_support() + { + } + /** + * Tests if scheduled events run as intended. + * + * If scheduled events are not running, this may indicate something with WP_Cron is not working + * as intended, or that there are orphaned events hanging around from older code. + * + * @since 5.2.0 + * + * @return array The test results. + */ + public function get_test_scheduled_events() + { + } + /** + * Tests if WordPress can run automated background updates. + * + * Background updates in WordPress are primarily used for minor releases and security updates. + * It's important to either have these working, or be aware that they are intentionally disabled + * for whatever reason. + * + * @since 5.2.0 + * + * @return array The test results. + */ + public function get_test_background_updates() + { + } + /** + * Tests if plugin and theme auto-updates appear to be configured correctly. + * + * @since 5.5.0 + * + * @return array The test results. + */ + public function get_test_plugin_theme_auto_updates() + { + } + /** + * Tests available disk space for updates. + * + * @since 6.3.0 + * + * @return array The test results. + */ + public function get_test_available_updates_disk_space() + { + } + /** + * Tests if plugin and theme temporary backup directories are writable or can be created. + * + * @since 6.3.0 + * + * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. + * + * @return array The test results. + */ + public function get_test_update_temp_backup_writable() + { + } + /** + * Tests if loopbacks work as expected. + * + * A loopback is when WordPress queries itself, for example to start a new WP_Cron instance, + * or when editing a plugin or theme. This has shown itself to be a recurring issue, + * as code can very easily break this interaction. + * + * @since 5.2.0 + * + * @return array The test results. + */ + public function get_test_loopback_requests() + { + } + /** + * Tests if HTTP requests are blocked. + * + * It's possible to block all outgoing communication (with the possibility of allowing certain + * hosts) via the HTTP API. This may create problems for users as many features are running as + * services these days. + * + * @since 5.2.0 + * + * @return array The test results. + */ + public function get_test_http_requests() + { + } + /** + * Tests if the REST API is accessible. + * + * Various security measures may block the REST API from working, or it may have been disabled in general. + * This is required for the new block editor to work, so we explicitly test for this. + * + * @since 5.2.0 + * + * @return array The test results. + */ + public function get_test_rest_availability() + { + } + /** + * Tests if 'file_uploads' directive in PHP.ini is turned off. + * + * @since 5.5.0 + * + * @return array The test results. + */ + public function get_test_file_uploads() + { + } + /** + * Tests if the Authorization header has the expected values. + * + * @since 5.6.0 + * + * @return array + */ + public function get_test_authorization_header() + { + } + /** + * Tests if a full page cache is available. + * + * @since 6.1.0 + * + * @return array The test result. + */ + public function get_test_page_cache() + { + } + /** + * Tests if the site uses persistent object cache and recommends to use it if not. + * + * @since 6.1.0 + * + * @return array The test result. + */ + public function get_test_persistent_object_cache() + { + } + /** + * Calculates total amount of autoloaded data. + * + * @since 6.6.0 + * + * @return int Autoloaded data in bytes. + */ + public function get_autoloaded_options_size() + { + } + /** + * Tests the number of autoloaded options. + * + * @since 6.6.0 + * + * @return array The test results. + */ + public function get_test_autoloaded_options() + { + } + /** + * Tests whether search engine indexing is enabled. + * + * Surfaces as “good” if `blog_public === 1`, or “recommended” if `blog_public === 0`. + * + * @since 6.9.0 + * + * @return array The test results. + */ + public function get_test_search_engine_visibility() + { + } + /** + * Returns a set of tests that belong to the site status page. + * + * Each site status test is defined here, they may be `direct` tests, that run on page load, or `async` tests + * which will run later down the line via JavaScript calls to improve page performance and hopefully also user + * experiences. + * + * @since 5.2.0 + * @since 5.6.0 Added support for `has_rest` and `permissions`. + * + * @return array The list of tests to run. + */ + public static function get_tests() + { + } + /** + * Adds a class to the body HTML tag. + * + * Filters the body class string for admin pages and adds our own class for easier styling. + * + * @since 5.2.0 + * + * @param string $body_class The body class string. + * @return string The modified body class string. + */ + public function admin_body_class($body_class) + { + } + /** + * Checks if any scheduled tasks have been missed. + * + * Returns a boolean value of `true` if a scheduled task has been missed and ends processing. + * + * If the list of crons is an instance of WP_Error, returns the instance instead of a boolean value. + * + * @since 5.2.0 + * + * @return bool|WP_Error True if a cron was missed, false if not. WP_Error if the cron is set to that. + */ + public function has_missed_cron() + { + } + /** + * Checks if any scheduled tasks are late. + * + * Returns a boolean value of `true` if a scheduled task is late and ends processing. + * + * If the list of crons is an instance of WP_Error, returns the instance instead of a boolean value. + * + * @since 5.3.0 + * + * @return bool|WP_Error True if a cron is late, false if not. WP_Error if the cron is set to that. + */ + public function has_late_cron() + { + } + /** + * Checks for potential issues with plugin and theme auto-updates. + * + * Though there is no way to 100% determine if plugin and theme auto-updates are configured + * correctly, a few educated guesses could be made to flag any conditions that would + * potentially cause unexpected behaviors. + * + * @since 5.5.0 + * + * @return object The test results. + */ + public function detect_plugin_theme_auto_update_issues() + { + } + /** + * Runs a loopback test on the site. + * + * Loopbacks are what WordPress uses to communicate with itself to start up WP_Cron, scheduled posts, + * make sure plugin or theme edits don't cause site failures and similar. + * + * @since 5.2.0 + * + * @return object The test results. + */ + public function can_perform_loopback() + { + } + /** + * Creates a weekly cron event, if one does not already exist. + * + * @since 5.4.0 + */ + public function maybe_create_scheduled_event() + { + } + /** + * Runs the scheduled event to check and update the latest site health status for the website. + * + * @since 5.4.0 + */ + public function wp_cron_scheduled_check() + { + } + /** + * Checks if the current environment type is set to 'development' or 'local'. + * + * @since 5.6.0 + * + * @return bool True if it is a development environment, false if not. + */ + public function is_development_environment() + { + } + /** + * Returns a list of headers and its verification callback to verify if page cache is enabled or not. + * + * Note: key is header name and value could be callable function to verify header value. + * Empty value mean existence of header detect page cache is enabled. + * + * @since 6.1.0 + * + * @return array List of client caching headers and their (optional) verification callbacks. + */ + public function get_page_cache_headers() + { + } + /** + * Determines whether to suggest using a persistent object cache. + * + * @since 6.1.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @return bool Whether to suggest using a persistent object cache. + */ + public function should_suggest_persistent_object_cache() + { + } + } + /** + * Core class used to implement site icon functionality. + * + * @since 4.3.0 + */ + #[\AllowDynamicProperties] + class WP_Site_Icon + { + /** + * The minimum size of the site icon. + * + * @since 4.3.0 + * @var int + */ + public $min_size = 512; + /** + * The size to which to crop the image so that we can display it in the UI nicely. + * + * @since 4.3.0 + * @var int + */ + public $page_crop = 512; + /** + * List of site icon sizes. + * + * @since 4.3.0 + * @var int[] + */ + public $site_icon_sizes = array( + /* + * Square, medium sized tiles for IE11+. + * + * See https://msdn.microsoft.com/library/dn455106(v=vs.85).aspx + */ + 270, + /* + * App icon for Android/Chrome. + * + * @link https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android + * @link https://developer.chrome.com/multidevice/android/installtohomescreen + */ + 192, + /* + * App icons up to iPhone 6 Plus. + * + * See https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html + */ + 180, + // Our regular Favicon. + 32, + ); + /** + * Registers actions and filters. + * + * @since 4.3.0 + */ + public function __construct() + { + } + /** + * Creates an attachment 'object'. + * + * @since 4.3.0 + * @deprecated 6.5.0 + * + * @param string $cropped Cropped image URL. + * @param int $parent_attachment_id Attachment ID of parent image. + * @return array An array with attachment object data. + */ + public function create_attachment_object($cropped, $parent_attachment_id) + { + } + /** + * Inserts an attachment. + * + * @since 4.3.0 + * + * @param array $attachment An array with attachment object data. + * @param string $file File path of the attached image. + * @return int Attachment ID. + */ + public function insert_attachment($attachment, $file) + { + } + /** + * Adds additional sizes to be made when creating the site icon images. + * + * @since 4.3.0 + * + * @param array[] $sizes Array of arrays containing information for additional sizes. + * @return array[] Array of arrays containing additional image sizes. + */ + public function additional_sizes($sizes = array()) + { + } + /** + * Adds Site Icon sizes to the array of image sizes on demand. + * + * @since 4.3.0 + * + * @param string[] $sizes Array of image size names. + * @return string[] Array of image size names. + */ + public function intermediate_image_sizes($sizes = array()) + { + } + /** + * Deletes the Site Icon when the image file is deleted. + * + * @since 4.3.0 + * + * @param int $post_id Attachment ID. + */ + public function delete_attachment_data($post_id) + { + } + /** + * Adds custom image sizes when meta data for an image is requested, that happens to be used as Site Icon. + * + * @since 4.3.0 + * + * @param null|array|string $value The value get_metadata() should return a single metadata value, or an + * array of values. + * @param int $post_id Post ID. + * @param string $meta_key Meta key. + * @param bool $single Whether to return only the first value of the specified `$meta_key`. + * @return array|null|string The attachment metadata value, array of values, or null. + */ + public function get_post_metadata($value, $post_id, $meta_key, $single) + { + } + } + /** + * Core class used to implement displaying terms in a list table. + * + * @since 3.1.0 + * + * @see WP_List_Table + */ + class WP_Terms_List_Table extends \WP_List_Table + { + public $callback_args; + /** + * Constructor. + * + * @since 3.1.0 + * + * @see WP_List_Table::__construct() for more information on default arguments. + * + * @global string $post_type Global post type. + * @global string $taxonomy Global taxonomy. + * @global string $action + * @global WP_Taxonomy $tax Global taxonomy object. + * + * @param array $args An associative array of arguments. + */ + public function __construct($args = array()) + { + } + /** + * @return bool + */ + public function ajax_user_can() + { + } + /** + */ + public function prepare_items() + { + } + /** + */ + public function no_items() + { + } + /** + * @return array + */ + protected function get_bulk_actions() + { + } + /** + * @return string + */ + public function current_action() + { + } + /** + * @return string[] Array of column titles keyed by their column name. + */ + public function get_columns() + { + } + /** + * @return array + */ + protected function get_sortable_columns() + { + } + /** + * @phpstan-return void + */ + public function display_rows_or_placeholder() + { + } + /** + * @global string $taxonomy Global taxonomy. + * + * @param WP_Term $tag Term object. + * @param int $level + */ + public function single_row($tag, $level = 0) + { + } + /** + * @since 5.9.0 Renamed `$tag` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_Term $item Term object. + * @return string + */ + public function column_cb($item) + { + } + /** + * @param WP_Term $tag Term object. + * @return string + */ + public function column_name($tag) + { + } + /** + * Gets the name of the default primary column. + * + * @since 4.3.0 + * + * @return string Name of the default primary column, in this case, 'name'. + */ + protected function get_default_primary_column_name() + { + } + /** + * Generates and displays row action links. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$tag` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_Term $item Tag being acted upon. + * @param string $column_name Current column name. + * @param string $primary Primary column name. + * @return string Row actions output for terms, or an empty string + * if the current column is not the primary column. + */ + protected function handle_row_actions($item, $column_name, $primary) + { + } + /** + * @param WP_Term $tag Term object. + * @return string + */ + public function column_description($tag) + { + } + /** + * @param WP_Term $tag Term object. + * @return string + */ + public function column_slug($tag) + { + } + /** + * @param WP_Term $tag Term object. + * @return string + */ + public function column_posts($tag) + { + } + /** + * @param WP_Term $tag Term object. + * @return string + */ + public function column_links($tag) + { + } + /** + * @since 5.9.0 Renamed `$tag` to `$item` to match parent class for PHP 8 named parameter support. + * + * @param WP_Term $item Term object. + * @param string $column_name Name of the column. + * @return string + */ + public function column_default($item, $column_name) + { + } + /** + * Outputs the hidden row displayed when inline editing + * + * @since 3.1.0 + * @phpstan-return void + */ + public function inline_edit() + { + } + } + /** + * Core class used to implement displaying installed themes in a list table. + * + * @since 3.1.0 + * + * @see WP_List_Table + */ + class WP_Themes_List_Table extends \WP_List_Table + { + protected $search_terms = array(); + public $features = array(); + /** + * Constructor. + * + * @since 3.1.0 + * + * @see WP_List_Table::__construct() for more information on default arguments. + * + * @param array $args An associative array of arguments. + */ + public function __construct($args = array()) + { + } + /** + * @return bool + */ + public function ajax_user_can() + { + } + /** + */ + public function prepare_items() + { + } + /** + * @phpstan-return void + */ + public function no_items() + { + } + /** + * @param string $which + * @phpstan-return void + */ + public function tablenav($which = 'top') + { + } + /** + * Displays the themes table. + * + * Overrides the parent display() method to provide a different container. + * + * @since 3.1.0 + */ + public function display() + { + } + /** + * @return string[] Array of column titles keyed by their column name. + */ + public function get_columns() + { + } + /** + */ + public function display_rows_or_placeholder() + { + } + /** + * Generates the list table rows. + * + * @since 3.1.0 + */ + public function display_rows() + { + } + /** + * @param WP_Theme $theme + * @return bool + */ + public function search_theme($theme) + { + } + /** + * Send required variables to JavaScript land + * + * @since 3.4.0 + * + * @param array $extra_args + */ + public function _js_vars($extra_args = array()) + { + } + } + /** + * Core class used to implement displaying themes to install in a list table. + * + * @since 3.1.0 + * + * @see WP_Themes_List_Table + */ + class WP_Theme_Install_List_Table extends \WP_Themes_List_Table + { + public $features = array(); + /** + * @return bool + */ + public function ajax_user_can() + { + } + /** + * @global array $tabs + * @global string $tab + * @global int $paged + * @global string $type + * @global array $theme_field_defaults + * @phpstan-return void + */ + public function prepare_items() + { + } + /** + */ + public function no_items() + { + } + /** + * @global array $tabs + * @global string $tab + * @return array + */ + protected function get_views() + { + } + /** + * Displays the theme install table. + * + * Overrides the parent display() method to provide a different container. + * + * @since 3.1.0 + */ + public function display() + { + } + /** + * Generates the list table rows. + * + * @since 3.1.0 + */ + public function display_rows() + { + } + /** + * Prints a theme from the WordPress.org API. + * + * @since 3.1.0 + * + * @global array $themes_allowedtags + * + * @param stdClass $theme { + * An object that contains theme data returned by the WordPress.org API. + * + * @type string $name Theme name, e.g. 'Twenty Twenty-One'. + * @type string $slug Theme slug, e.g. 'twentytwentyone'. + * @type string $version Theme version, e.g. '1.1'. + * @type string $author Theme author username, e.g. 'melchoyce'. + * @type string $preview_url Preview URL, e.g. 'https://2021.wordpress.net/'. + * @type string $screenshot_url Screenshot URL, e.g. 'https://wordpress.org/themes/twentytwentyone/'. + * @type float $rating Rating score. + * @type int $num_ratings The number of ratings. + * @type string $homepage Theme homepage, e.g. 'https://wordpress.org/themes/twentytwentyone/'. + * @type string $description Theme description. + * @type string $download_link Theme ZIP download URL. + * } + * @phpstan-param object{ + * name?: string, + * slug?: string, + * version?: string, + * author?: string, + * preview_url?: string, + * screenshot_url?: string, + * rating?: float, + * num_ratings?: int, + * homepage?: string, + * description?: string, + * download_link?: string, + * } $theme + * @phpstan-return void + */ + public function single_row($theme) + { + } + /** + * Prints the wrapper for the theme installer. + */ + public function theme_installer() + { + } + /** + * Prints the wrapper for the theme installer with a provided theme's data. + * Used to make the theme installer work for no-js. + * + * @param stdClass $theme A WordPress.org Theme API object. + */ + public function theme_installer_single($theme) + { + } + /** + * Prints the info for a theme (to be used in the theme installer modal). + * + * @global array $themes_allowedtags + * + * @param stdClass $theme A WordPress.org Theme API object. + * @phpstan-return void + */ + public function install_theme_info($theme) + { + } + /** + * Send required variables to JavaScript land + * + * @since 3.4.0 + * + * @global string $tab Current tab within Themes->Install screen + * @global string $type Type of search. + * + * @param array $extra_args Unused. + */ + public function _js_vars($extra_args = array()) + { + } + } + /** + * Core class used to implement displaying users in a list table. + * + * @since 3.1.0 + * + * @see WP_List_Table + */ + class WP_Users_List_Table extends \WP_List_Table + { + /** + * Site ID to generate the Users list table for. + * + * @since 3.1.0 + * @var int + */ + public $site_id; + /** + * Whether or not the current Users list table is for Multisite. + * + * @since 3.1.0 + * @var bool + */ + public $is_site_users; + /** + * Constructor. + * + * @since 3.1.0 + * + * @see WP_List_Table::__construct() for more information on default arguments. + * + * @param array $args An associative array of arguments. + */ + public function __construct($args = array()) + { + } + /** + * Checks the current user's permissions. + * + * @since 3.1.0 + * + * @return bool + */ + public function ajax_user_can() + { + } + /** + * Prepares the users list for display. + * + * @since 3.1.0 + * + * @global string $role + * @global string $usersearch + */ + public function prepare_items() + { + } + /** + * Outputs 'no users' message. + * + * @since 3.1.0 + */ + public function no_items() + { + } + /** + * Returns an associative array listing all the views that can be used + * with this table. + * + * Provides a list of roles and user count for that role for easy + * filtering of the user table. + * + * @since 3.1.0 + * + * @global string $role + * + * @return string[] An array of HTML links keyed by their view. + */ + protected function get_views() + { + } + /** + * Retrieves an associative array of bulk actions available on this table. + * + * @since 3.1.0 + * + * @return array Array of bulk action labels keyed by their action. + */ + protected function get_bulk_actions() + { + } + /** + * Outputs the controls to allow user roles to be changed in bulk. + * + * @since 3.1.0 + * + * @param string $which Whether this is being invoked above ("top") + * or below the table ("bottom"). + */ + protected function extra_tablenav($which) + { + } + /** + * Captures the bulk action required, and return it. + * + * Overridden from the base class implementation to capture + * the role change drop-down. + * + * @since 3.1.0 + * + * @return string The bulk action required. + */ + public function current_action() + { + } + /** + * Gets a list of columns for the list table. + * + * @since 3.1.0 + * + * @return string[] Array of column titles keyed by their column name. + */ + public function get_columns() + { + } + /** + * Gets a list of sortable columns for the list table. + * + * @since 3.1.0 + * + * @return array Array of sortable columns. + */ + protected function get_sortable_columns() + { + } + /** + * Generates the list table rows. + * + * @since 3.1.0 + */ + public function display_rows() + { + } + /** + * Generates HTML for a single row on the users.php admin panel. + * + * @since 3.1.0 + * @since 4.2.0 The `$style` parameter was deprecated. + * @since 4.4.0 The `$role` parameter was deprecated. + * + * @param WP_User $user_object The current user object. + * @param string $style Deprecated. Not used. + * @param string $role Deprecated. Not used. + * @param int $numposts Optional. Post count to display for this user. Defaults + * to zero, as in, a new user has made zero posts. + * @return string Output for a single row. + */ + public function single_row($user_object, $style = '', $role = '', $numposts = 0) + { + } + /** + * Gets the name of the default primary column. + * + * @since 4.3.0 + * + * @return string Name of the default primary column, in this case, 'username'. + */ + protected function get_default_primary_column_name() + { + } + /** + * Returns an array of translated user role names for a given user object. + * + * @since 4.4.0 + * + * @param WP_User $user_object The WP_User object. + * @return string[] An array of user role names keyed by role. + */ + protected function get_role_list($user_object) + { + } + } + /** + * WordPress User Search class. + * + * @since 2.1.0 + * @deprecated 3.1.0 Use WP_User_Query + */ + class WP_User_Search + { + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var mixed + */ + var $results; + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var string + */ + var $search_term; + /** + * Page number. + * + * @since 2.1.0 + * @access private + * @var int + */ + var $page; + /** + * Role name that users have. + * + * @since 2.5.0 + * @access private + * @var string + */ + var $role; + /** + * Raw page number. + * + * @since 2.1.0 + * @access private + * @var int|bool + */ + var $raw_page; + /** + * Amount of users to display per page. + * + * @since 2.1.0 + * @access public + * @var int + */ + var $users_per_page = 50; + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var int + */ + var $first_user; + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var int + */ + var $last_user; + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var string + */ + var $query_limit; + /** + * {@internal Missing Description}} + * + * @since 3.0.0 + * @access private + * @var string + */ + var $query_orderby; + /** + * {@internal Missing Description}} + * + * @since 3.0.0 + * @access private + * @var string + */ + var $query_from; + /** + * {@internal Missing Description}} + * + * @since 3.0.0 + * @access private + * @var string + */ + var $query_where; + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var int + */ + var $total_users_for_query = 0; + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var bool + */ + var $too_many_total_users = \false; + /** + * {@internal Missing Description}} + * + * @since 2.1.0 + * @access private + * @var WP_Error + */ + var $search_errors; + /** + * {@internal Missing Description}} + * + * @since 2.7.0 + * @access private + * @var string + */ + var $paging_text; + /** + * PHP5 Constructor - Sets up the object properties. + * + * @since 2.1.0 + * + * @param string $search_term Search terms string. + * @param int $page Optional. Page ID. + * @param string $role Role name. + * @return WP_User_Search + */ + function __construct($search_term = '', $page = '', $role = '') + { + } + /** + * PHP4 Constructor - Sets up the object properties. + * + * @since 2.1.0 + * + * @param string $search_term Search terms string. + * @param int $page Optional. Page ID. + * @param string $role Role name. + * @return WP_User_Search + */ + public function WP_User_Search($search_term = '', $page = '', $role = '') + { + } + /** + * Prepares the user search query (legacy). + * + * @since 2.1.0 + * @access public + * + * @global wpdb $wpdb WordPress database abstraction object. + */ + public function prepare_query() + { + } + /** + * Executes the user search query. + * + * @since 2.1.0 + * @access public + * + * @global wpdb $wpdb WordPress database abstraction object. + */ + public function query() + { + } + /** + * Prepares variables for use in templates. + * + * @since 2.1.0 + * @access public + */ + function prepare_vars_for_template_usage() + { + } + /** + * Handles paging for the user search query. + * + * @since 2.1.0 + * @access public + */ + public function do_paging() + { + } + /** + * Retrieves the user search query results. + * + * @since 2.1.0 + * @access public + * + * @return array + */ + public function get_results() + { + } + /** + * Displaying paging text. + * + * @see do_paging() Builds paging text. + * + * @since 2.1.0 + * @access public + */ + function page_links() + { + } + /** + * Whether paging is enabled. + * + * @see do_paging() Builds paging text. + * + * @since 2.1.0 + * @access public + * + * @return bool + */ + function results_are_paged() + { + } + /** + * Whether there are search terms. + * + * @since 2.1.0 + * @access public + * + * @return bool + */ + function is_search() + { + } + } + /** + * Previous class for list table for privacy data export requests. + * + * @since 4.9.6 + * @deprecated 5.3.0 + */ + class WP_Privacy_Data_Export_Requests_Table extends \WP_Privacy_Data_Export_Requests_List_Table + { + function __construct($args) + { + } + } + /** + * Previous class for list table for privacy data erasure requests. + * + * @since 4.9.6 + * @deprecated 5.3.0 + */ + class WP_Privacy_Data_Removal_Requests_Table extends \WP_Privacy_Data_Removal_Requests_List_Table + { + function __construct($args) + { + } + } + class getid3_lib + { + /** + * @param string $string + * @param bool $hex + * @param bool $spaces + * @param string|bool $htmlencoding + * + * @return string + */ + public static function PrintHexBytes($string, $hex = \true, $spaces = \true, $htmlencoding = 'UTF-8') + { + } + /** + * Truncates a floating-point number at the decimal point. + * + * @param float $floatnumber + * + * @return float|int returns int (if possible, otherwise float) + */ + public static function trunc($floatnumber) + { + } + /** + * @param int|null $variable + * @param-out int $variable + * @param int $increment + * + * @return bool + */ + public static function safe_inc(&$variable, $increment = 1) + { + } + /** + * @param int|float $floatnum + * + * @return int|float + */ + public static function CastAsInt($floatnum) + { + } + /** + * @param int $num + * + * @return bool + */ + public static function intValueSupported($num) + { + } + /** + * Perform a division, guarding against division by zero + * + * @param float|int $numerator + * @param float|int $denominator + * @param float|int $fallback + * @return float|int + */ + public static function SafeDiv($numerator, $denominator, $fallback = 0) + { + } + /** + * @param string $fraction + * + * @return float + */ + public static function DecimalizeFraction($fraction) + { + } + /** + * @param string $binarynumerator + * + * @return float + */ + public static function DecimalBinary2Float($binarynumerator) + { + } + /** + * @link http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html + * + * @param string $binarypointnumber + * @param int $maxbits + * + * @return array + */ + public static function NormalizeBinaryPoint($binarypointnumber, $maxbits = 52) + { + } + /** + * @link http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html + * + * @param float $floatvalue + * + * @return string + */ + public static function Float2BinaryDecimal($floatvalue) + { + } + /** + * @link http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee-expl.html + * + * @param float $floatvalue + * @param int $bits + * + * @return string|false + */ + public static function Float2String($floatvalue, $bits) + { + } + /** + * @param string $byteword + * + * @return float|false + */ + public static function LittleEndian2Float($byteword) + { + } + /** + * ANSI/IEEE Standard 754-1985, Standard for Binary Floating Point Arithmetic + * + * @link https://web.archive.org/web/20120325162206/http://www.psc.edu/general/software/packages/ieee/ieee.php + * @link http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee.html + * + * @param string $byteword + * + * @return float|false + */ + public static function BigEndian2Float($byteword) + { + } + /** + * @param string $byteword + * @param bool $synchsafe + * @param bool $signed + * + * @return int|float|false + * @throws Exception + */ + public static function BigEndian2Int($byteword, $synchsafe = \false, $signed = \false) + { + } + /** + * @param string $byteword + * @param bool $signed + * + * @return int|float|false + */ + public static function LittleEndian2Int($byteword, $signed = \false) + { + } + /** + * @param string $byteword + * + * @return string + */ + public static function LittleEndian2Bin($byteword) + { + } + /** + * @param string $byteword + * + * @return string + */ + public static function BigEndian2Bin($byteword) + { + } + /** + * @param int $number + * @param int $minbytes + * @param bool $synchsafe + * @param bool $signed + * + * @return string + * @throws Exception + */ + public static function BigEndian2String($number, $minbytes = 1, $synchsafe = \false, $signed = \false) + { + } + /** + * @param int|string $number + * + * @return string + */ + public static function Dec2Bin($number) + { + } + /** + * @param string $binstring + * @param bool $signed + * + * @return int|float + */ + public static function Bin2Dec($binstring, $signed = \false) + { + } + /** + * @param string $binstring + * + * @return string + */ + public static function Bin2String($binstring) + { + } + /** + * @param int $number + * @param int $minbytes + * @param bool $synchsafe + * + * @return string + */ + public static function LittleEndian2String($number, $minbytes = 1, $synchsafe = \false) + { + } + /** + * @param mixed $array1 + * @param mixed $array2 + * + * @return array|false + */ + public static function array_merge_clobber($array1, $array2) + { + } + /** + * @param mixed $array1 + * @param mixed $array2 + * + * @return array|false + */ + public static function array_merge_noclobber($array1, $array2) + { + } + /** + * @param mixed $array1 + * @param mixed $array2 + * + * @return array|false|null + */ + public static function flipped_array_merge_noclobber($array1, $array2) + { + } + /** + * @param array $theArray + * + * @return bool + */ + public static function ksort_recursive(&$theArray) + { + } + /** + * @param string $filename + * @param int $numextensions + * + * @return string + */ + public static function fileextension($filename, $numextensions = 1) + { + } + /** + * @param int $seconds + * + * @return string + */ + public static function PlaytimeString($seconds) + { + } + /** + * @param int $macdate + * + * @return int|float + */ + public static function DateMac2Unix($macdate) + { + } + /** + * @param string $rawdata + * + * @return float + */ + public static function FixedPoint8_8($rawdata) + { + } + /** + * @param string $rawdata + * + * @return float + */ + public static function FixedPoint16_16($rawdata) + { + } + /** + * @param string $rawdata + * + * @return float + */ + public static function FixedPoint2_30($rawdata) + { + } + /** + * @param string $ArrayPath + * @param string $Separator + * @param mixed $Value + * + * @return array + */ + public static function CreateDeepArray($ArrayPath, $Separator, $Value) + { + } + /** + * @param array $arraydata + * @param bool $returnkey + * + * @return int|false + */ + public static function array_max($arraydata, $returnkey = \false) + { + } + /** + * @param array $arraydata + * @param bool $returnkey + * + * @return int|false + */ + public static function array_min($arraydata, $returnkey = \false) + { + } + /** + * @param string $XMLstring + * + * @return array|false + */ + public static function XML2array($XMLstring) + { + } + /** + * @param SimpleXMLElement|array|mixed $XMLobject + * + * @return mixed + */ + public static function SimpleXMLelement2array($XMLobject) + { + } + /** + * Returns checksum for a file from starting position to absolute end position. + * + * @param string $file + * @param int $offset + * @param int $end + * @param string $algorithm + * + * @return string|false + * @throws getid3_exception + */ + public static function hash_data($file, $offset, $end, $algorithm) + { + } + /** + * @param string $filename_source + * @param string $filename_dest + * @param int $offset + * @param int $length + * + * @return bool + * @throws Exception + * + * @deprecated Unused, may be removed in future versions of getID3 + */ + public static function CopyFileParts($filename_source, $filename_dest, $offset, $length) + { + } + /** + * @param int $charval + * + * @return string + */ + public static function iconv_fallback_int_utf8($charval) + { + } + /** + * ISO-8859-1 => UTF-8 + * + * @param string $string + * @param bool $bom + * + * @return string + */ + public static function iconv_fallback_iso88591_utf8($string, $bom = \false) + { + } + /** + * ISO-8859-1 => UTF-16BE + * + * @param string $string + * @param bool $bom + * + * @return string + */ + public static function iconv_fallback_iso88591_utf16be($string, $bom = \false) + { + } + /** + * ISO-8859-1 => UTF-16LE + * + * @param string $string + * @param bool $bom + * + * @return string + */ + public static function iconv_fallback_iso88591_utf16le($string, $bom = \false) + { + } + /** + * ISO-8859-1 => UTF-16LE (BOM) + * + * @param string $string + * + * @return string + */ + public static function iconv_fallback_iso88591_utf16($string) + { + } + /** + * UTF-8 => ISO-8859-1 + * + * @param string $string + * + * @return string + */ + public static function iconv_fallback_utf8_iso88591($string) + { + } + /** + * UTF-8 => UTF-16BE + * + * @param string $string + * @param bool $bom + * + * @return string + */ + public static function iconv_fallback_utf8_utf16be($string, $bom = \false) + { + } + /** + * UTF-8 => UTF-16LE + * + * @param string $string + * @param bool $bom + * + * @return string + */ + public static function iconv_fallback_utf8_utf16le($string, $bom = \false) + { + } + /** + * UTF-8 => UTF-16LE (BOM) + * + * @param string $string + * + * @return string + */ + public static function iconv_fallback_utf8_utf16($string) + { + } + /** + * UTF-16BE => UTF-8 + * + * @param string $string + * + * @return string + */ + public static function iconv_fallback_utf16be_utf8($string) + { + } + /** + * UTF-16LE => UTF-8 + * + * @param string $string + * + * @return string + */ + public static function iconv_fallback_utf16le_utf8($string) + { + } + /** + * UTF-16BE => ISO-8859-1 + * + * @param string $string + * + * @return string + */ + public static function iconv_fallback_utf16be_iso88591($string) + { + } + /** + * UTF-16LE => ISO-8859-1 + * + * @param string $string + * + * @return string + */ + public static function iconv_fallback_utf16le_iso88591($string) + { + } + /** + * UTF-16 (BOM) => ISO-8859-1 + * + * @param string $string + * + * @return string + */ + public static function iconv_fallback_utf16_iso88591($string) + { + } + /** + * UTF-16 (BOM) => UTF-8 + * + * @param string $string + * + * @return string + */ + public static function iconv_fallback_utf16_utf8($string) + { + } + /** + * @param string $in_charset + * @param string $out_charset + * @param string $string + * + * @return string + * @throws Exception + */ + public static function iconv_fallback($in_charset, $out_charset, $string) + { + } + /** + * @param mixed $data + * @param string $charset + * + * @return mixed + */ + public static function recursiveMultiByteCharString2HTML($data, $charset = 'ISO-8859-1') + { + } + /** + * @param string|int|float $string + * @param string $charset + * + * @return string + */ + public static function MultiByteCharString2HTML($string, $charset = 'ISO-8859-1') + { + } + /** + * @param int $namecode + * + * @return string + */ + public static function RGADnameLookup($namecode) + { + } + /** + * @param int $originatorcode + * + * @return string + */ + public static function RGADoriginatorLookup($originatorcode) + { + } + /** + * @param int $rawadjustment + * @param int $signbit + * + * @return float + */ + public static function RGADadjustmentLookup($rawadjustment, $signbit) + { + } + /** + * @param int $namecode + * @param int $originatorcode + * @param int $replaygain + * + * @return string + */ + public static function RGADgainString($namecode, $originatorcode, $replaygain) + { + } + /** + * @param float $amplitude + * + * @return float + */ + public static function RGADamplitude2dB($amplitude) + { + } + /** + * @param string $imgData + * @param array $imageinfo + * + * @return array|false + */ + public static function GetDataImageSize($imgData, &$imageinfo = array()) + { + } + /** + * @param string $mime_type + * + * @return string + */ + public static function ImageExtFromMime($mime_type) + { + } + /** + * @param array $ThisFileInfo + * @param bool $option_tags_html default true (just as in the main getID3 class) + * + * @return bool + */ + public static function CopyTagsToComments(&$ThisFileInfo, $option_tags_html = \true) + { + } + /** + * @param string $key + * @param int $begin + * @param int $end + * @param string $file + * @param string $name + * + * @return string + */ + public static function EmbeddedLookup($key, $begin, $end, $file, $name) + { + } + /** + * @param string $filename + * @param string $sourcefile + * @param bool $DieOnFailure + * + * @return bool + * @throws Exception + */ + public static function IncludeDependency($filename, $sourcefile, $DieOnFailure = \false) + { + } + /** + * @param string $string + * + * @return string + */ + public static function trimNullByte($string) + { + } + /** + * @param string $path + * + * @return float|bool + */ + public static function getFileSizeSyscall($path) + { + } + /** + * @param string $filename + * + * @return string|false + */ + public static function truepath($filename) + { + } + /** + * Workaround for Bug #37268 (https://bugs.php.net/bug.php?id=37268) + * + * @param string $path A path. + * @param string $suffix If the name component ends in suffix this will also be cut off. + * + * @return string + */ + public static function mb_basename($path, $suffix = '') + { + } + } + class getID3 + { + /** + * CASE SENSITIVE! - i.e. (must be supported by iconv()). Examples: ISO-8859-1 UTF-8 UTF-16 UTF-16BE + * + * @var string + */ + public $encoding = 'UTF-8'; + /** + * Should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'EUC-CN' or 'CP1252' + * + * @var string + */ + public $encoding_id3v1 = 'ISO-8859-1'; + /** + * ID3v1 should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'Windows-1251' or 'KOI8-R'. If true attempt to detect these encodings, but may return incorrect values for some tags actually in ISO-8859-1 encoding + * + * @var bool + */ + public $encoding_id3v1_autodetect = \false; + /** + * Read and process ID3v1 tags + * + * @var bool + */ + public $option_tag_id3v1 = \true; + /** + * Read and process ID3v2 tags + * + * @var bool + */ + public $option_tag_id3v2 = \true; + /** + * Read and process Lyrics3 tags + * + * @var bool + */ + public $option_tag_lyrics3 = \true; + /** + * Read and process APE tags + * + * @var bool + */ + public $option_tag_apetag = \true; + /** + * Copy tags to root key 'tags' and encode to $this->encoding + * + * @var bool + */ + public $option_tags_process = \true; + /** + * Copy tags to root key 'tags_html' properly translated from various encodings to HTML entities + * + * @var bool + */ + public $option_tags_html = \true; + /** + * Calculate additional info such as bitrate, channelmode etc + * + * @var bool + */ + public $option_extra_info = \true; + /** + * Defaults to true (ATTACHMENTS_INLINE) for backward compatibility + * + * @var bool|string + */ + public $option_save_attachments = \true; + /** + * Get MD5 sum of data part - slow + * + * @var bool + */ + public $option_md5_data = \false; + /** + * Use MD5 of source file if available - only FLAC and OptimFROG + * + * @var bool + */ + public $option_md5_data_source = \false; + /** + * Get SHA1 sum of data part - slow + * + * @var bool + */ + public $option_sha1_data = \false; + /** + * Check whether file is larger than 2GB and thus not supported by 32-bit PHP (null: auto-detect based on + * PHP_INT_MAX) + * + * @var bool|null + */ + public $option_max_2gb_check; + /** + * Read buffer size in bytes + * + * @var int + */ + public $option_fread_buffer_size = 32768; + /** archive.rar + * if true use PHP RarArchive extension, if false (non-extension parsing not yet written in getID3) + * + * @var bool + */ + public $options_archive_rar_use_php_rar_extension = \true; + /** archive.gzip + * Optional file list - disable for speed. + * Decode gzipped files, if possible, and parse recursively (.tar.gz for example). + * + * @var bool + */ + public $options_archive_gzip_parse_contents = \false; + /** audio.midi + * if false only parse most basic information, much faster for some files but may be inaccurate + * + * @var bool + */ + public $options_audio_midi_scanwholefile = \true; + /** audio.mp3 + * Forces getID3() to scan the file byte-by-byte and log all the valid audio frame headers - extremely slow, + * unrecommended, but may provide data from otherwise-unusable files. + * + * @var bool + */ + public $options_audio_mp3_allow_bruteforce = \false; + /** audio.mp3 + * number of frames to scan to determine if MPEG-audio sequence is valid + * Lower this number to 5-20 for faster scanning + * Increase this number to 50+ for most accurate detection of valid VBR/CBR mpeg-audio streams + * + * @var int + */ + public $options_audio_mp3_mp3_valid_check_frames = 50; + /** audio.wavpack + * Avoid scanning all frames (break after finding ID_RIFF_HEADER and ID_CONFIG_BLOCK, + * significantly faster for very large files but other data may be missed + * + * @var bool + */ + public $options_audio_wavpack_quick_parsing = \false; + /** audio-video.flv + * Break out of the loop if too many frames have been scanned; only scan this + * many if meta frame does not contain useful duration. + * + * @var int + */ + public $options_audiovideo_flv_max_frames = 100000; + /** audio-video.matroska + * If true, do not return information about CLUSTER chunks, since there's a lot of them + * and they're not usually useful [default: TRUE]. + * + * @var bool + */ + public $options_audiovideo_matroska_hide_clusters = \true; + /** audio-video.matroska + * True to parse the whole file, not only header [default: FALSE]. + * + * @var bool + */ + public $options_audiovideo_matroska_parse_whole_file = \false; + /** audio-video.quicktime + * return all parsed data from all atoms if true, otherwise just returned parsed metadata + * + * @var bool + */ + public $options_audiovideo_quicktime_ReturnAtomData = \false; + /** audio-video.quicktime + * return all parsed data from all atoms if true, otherwise just returned parsed metadata + * + * @var bool + */ + public $options_audiovideo_quicktime_ParseAllPossibleAtoms = \false; + /** audio-video.swf + * return all parsed tags if true, otherwise do not return tags not parsed by getID3 + * + * @var bool + */ + public $options_audiovideo_swf_ReturnAllTagData = \false; + /** graphic.bmp + * return BMP palette + * + * @var bool + */ + public $options_graphic_bmp_ExtractPalette = \false; + /** graphic.bmp + * return image data + * + * @var bool + */ + public $options_graphic_bmp_ExtractData = \false; + /** graphic.png + * If data chunk is larger than this do not read it completely (getID3 only needs the first + * few dozen bytes for parsing). + * + * @var int + */ + public $options_graphic_png_max_data_bytes = 10000000; + /** misc.pdf + * return full details of PDF Cross-Reference Table (XREF) + * + * @var bool + */ + public $options_misc_pdf_returnXREF = \false; + /** misc.torrent + * Assume all .torrent files are less than 1MB and just read entire thing into memory for easy processing. + * Override this value if you need to process files larger than 1MB + * + * @var int + */ + public $options_misc_torrent_max_torrent_filesize = 1048576; + /** + * Filename of file being analysed. + * + * @var string + */ + public $filename; + /** + * Filepointer to file being analysed. + * + * @var resource + */ + public $fp; + /** + * Result array. + * + * @var array + */ + public $info; + /** + * @var string + */ + public $tempdir = \GETID3_TEMP_DIR; + /** + * @var int + */ + public $memory_limit = 0; + /** + * @var string + */ + protected $startup_error = ''; + /** + * @var string + */ + protected $startup_warning = ''; + const VERSION = '1.9.24-202509040923'; + const FREAD_BUFFER_SIZE = 32768; + const ATTACHMENTS_NONE = \false; + const ATTACHMENTS_INLINE = \true; + /** + * @throws getid3_exception + * @phpstan-return void + */ + public function __construct() + { + } + /** + * @return string + */ + public function version() + { + } + /** + * @return int + */ + public function fread_buffer_size() + { + } + /** + * @param array $optArray + * + * @return bool + */ + public function setOption($optArray) + { + } + /** + * @param string $filename + * @param int $filesize + * @param resource $fp + * + * @return bool + * + * @throws getid3_exception + */ + public function openfile($filename, $filesize = \null, $fp = \null) + { + } + /** + * analyze file + * + * @param string $filename + * @param int $filesize + * @param string $original_filename + * @param resource $fp + * + * @return array + */ + public function analyze($filename, $filesize = \null, $original_filename = '', $fp = \null) + { + } + /** + * Error handling. + * + * @param string $message + * + * @return array + */ + public function error($message) + { + } + /** + * Warning handling. + * + * @param string $message + * + * @return bool + */ + public function warning($message) + { + } + /** + * Return array containing information about all supported formats. + * + * @return array + */ + public function GetFileFormatArray() + { + } + /** + * @param string $filedata + * @param string $filename + * + * @return mixed|false + */ + public function GetFileFormat(&$filedata, $filename = '') + { + } + /** + * Converts array to $encoding charset from $this->encoding. + * + * @param array $array + * @param string $encoding + * @phpstan-return void + */ + public function CharConvert(&$array, $encoding) + { + } + /** + * @return bool + */ + public function HandleAllTags() + { + } + /** + * Calls getid3_lib::CopyTagsToComments() but passes in the option_tags_html setting from this instance of getID3 + * + * @param array $ThisFileInfo + * + * @return bool + */ + public function CopyTagsToComments(&$ThisFileInfo) + { + } + /** + * @param string $algorithm + * + * @return array|bool + */ + public function getHashdata($algorithm) + { + } + public function ChannelsBitratePlaytimeCalculations() + { + } + /** + * @return bool + */ + public function CalculateCompressionRatioVideo() + { + } + /** + * @return bool + */ + public function CalculateCompressionRatioAudio() + { + } + /** + * @return bool + */ + public function CalculateReplayGain() + { + } + /** + * @return bool + */ + public function ProcessAudioStreams() + { + } + /** + * @return string|bool + */ + public function getid3_tempnam() + { + } + /** + * @param string $name + * + * @return bool + * + * @throws getid3_exception + */ + public function include_module($name) + { + } + /** + * @param string $filename + * + * @return bool + */ + public static function is_writable($filename) + { + } + } + abstract class getid3_handler + { + /** + * @var getID3 + */ + protected $getid3; + /** + * Analyzing filepointer or string. + * + * @var bool + */ + protected $data_string_flag = \false; + /** + * String to analyze. + * + * @var string + */ + protected $data_string = ''; + /** + * Seek position in string. + * + * @var int + */ + protected $data_string_position = 0; + /** + * String length. + * + * @var int + */ + protected $data_string_length = 0; + /** + * getid3_handler constructor. + * + * @param getID3 $getid3 + * @param string $call_module + */ + public function __construct(\getID3 $getid3, $call_module = \null) + { + } + /** + * Analyze from file pointer. + * + * @return bool + */ + abstract public function Analyze(); + /** + * Analyze from string instead. + * + * @param string $string + */ + public function AnalyzeString($string) + { + } + /** + * @param string $string + */ + public function setStringMode($string) + { + } + /** + * @phpstan-impure + * + * @return int|bool + */ + protected function ftell() + { + } + /** + * @param int $bytes + * + * @phpstan-impure + * + * @return string|false + * + * @throws getid3_exception + */ + protected function fread($bytes) + { + } + /** + * @param int $bytes + * @param int $whence + * + * @phpstan-impure + * + * @return int + * + * @throws getid3_exception + */ + protected function fseek($bytes, $whence = \SEEK_SET) + { + } + /** + * @phpstan-impure + * + * @return string|false + * + * @throws getid3_exception + */ + protected function fgets() + { + } + /** + * @phpstan-impure + * + * @return bool + */ + protected function feof() + { + } + /** + * @param string $module + * + * @return bool + */ + final protected function isDependencyFor($module) + { + } + /** + * @param string $text + * + * @return bool + */ + protected function error($text) + { + } + /** + * @param string $text + * + * @return bool + */ + protected function warning($text) + { + } + /** + * @param string $text + */ + protected function notice($text) + { + } + /** + * @param string $name + * @param int $offset + * @param int $length + * @param string $image_mime + * + * @return string|null + * + * @throws Exception + * @throws getid3_exception + */ + public function saveAttachment($name, $offset, $length, $image_mime = \null) + { + } + } + class getid3_exception extends \Exception + { + public $message; + } + class getid3_asf extends \getid3_handler + { + protected static $ASFIndexParametersObjectIndexSpecifiersIndexTypes = array(1 => 'Nearest Past Data Packet', 2 => 'Nearest Past Media Object', 3 => 'Nearest Past Cleanpoint'); + protected static $ASFMediaObjectIndexParametersObjectIndexSpecifiersIndexTypes = array(1 => 'Nearest Past Data Packet', 2 => 'Nearest Past Media Object', 3 => 'Nearest Past Cleanpoint', 0xff => 'Frame Number Offset'); + protected static $ASFTimecodeIndexParametersObjectIndexSpecifiersIndexTypes = array(2 => 'Nearest Past Media Object', 3 => 'Nearest Past Cleanpoint'); + /** + * @param getID3 $getid3 + */ + public function __construct(\getID3 $getid3) + { + } + /** + * @return bool + */ + public function Analyze() + { + } + /** + * @param int $CodecListType + * + * @return string + */ + public static function codecListObjectTypeLookup($CodecListType) + { + } + /** + * @return array + */ + public static function KnownGUIDs() + { + } + /** + * @param string $GUIDstring + * + * @return string|false + */ + public static function GUIDname($GUIDstring) + { + } + /** + * @param int $id + * + * @return string + */ + public static function ASFIndexObjectIndexTypeLookup($id) + { + } + /** + * @param string $GUIDstring + * + * @return string + */ + public static function GUIDtoBytestring($GUIDstring) + { + } + /** + * @param string $Bytestring + * + * @return string + */ + public static function BytestringToGUID($Bytestring) + { + } + /** + * @param int $FILETIME + * @param bool $round + * + * @return float|int + */ + public static function FILETIMEtoUNIXtime($FILETIME, $round = \true) + { + } + /** + * @param int $WMpictureType + * + * @return string + */ + public static function WMpictureTypeLookup($WMpictureType) + { + } + /** + * @param string $asf_header_extension_object_data + * @param int $unhandled_sections + * + * @return array + */ + public function HeaderExtensionObjectDataParse(&$asf_header_extension_object_data, &$unhandled_sections) + { + } + /** + * @param int $id + * + * @return string + */ + public static function metadataLibraryObjectDataTypeLookup($id) + { + } + /** + * @param string $data + * + * @return array + */ + public function ASF_WMpicture(&$data) + { + } + /** + * Remove terminator 00 00 and convert UTF-16LE to Latin-1. + * + * @param string $string + * + * @return string + */ + public static function TrimConvert($string) + { + } + /** + * Remove terminator 00 00. + * + * @param string $string + * + * @return string + */ + public static function TrimTerm($string) + { + } + } + class getid3_flv extends \getid3_handler + { + const magic = 'FLV'; + /** + * Break out of the loop if too many frames have been scanned; only scan this + * many if meta frame does not contain useful duration. + * + * @var int + */ + public $max_frames = 100000; + /** + * @return bool + */ + public function Analyze() + { + } + /** + * @param int $id + * + * @return string|false + */ + public static function audioFormatLookup($id) + { + } + /** + * @param int $id + * + * @return int|false + */ + public static function audioRateLookup($id) + { + } + /** + * @param int $id + * + * @return int|false + */ + public static function audioBitDepthLookup($id) + { + } + /** + * @param int $id + * + * @return string|false + */ + public static function videoCodecLookup($id) + { + } + } + class AMFStream + { + /** + * @var string + */ + public $bytes; + /** + * @var int + */ + public $pos; + /** + * @param string $bytes + */ + public function __construct(&$bytes) + { + } + /** + * @return int + */ + public function readByte() + { + } + /** + * @return int + */ + public function readInt() + { + } + /** + * @return int + */ + public function readLong() + { + } + /** + * @return float|false + */ + public function readDouble() + { + } + /** + * @return string + */ + public function readUTF() + { + } + /** + * @return string + */ + public function readLongUTF() + { + } + /** + * @param int $length + * + * @return string + */ + public function read($length) + { + } + /** + * @return int + */ + public function peekByte() + { + } + /** + * @return int + */ + public function peekInt() + { + } + /** + * @return int + */ + public function peekLong() + { + } + /** + * @return float|false + */ + public function peekDouble() + { + } + /** + * @return string + */ + public function peekUTF() + { + } + /** + * @return string + */ + public function peekLongUTF() + { + } + } + class AMFReader + { + /** + * @var AMFStream + */ + public $stream; + /** + * @param AMFStream $stream + */ + public function __construct(\AMFStream $stream) + { + } + /** + * @return mixed + */ + public function readData() + { + } + /** + * @return float|false + */ + public function readDouble() + { + } + /** + * @return bool + */ + public function readBoolean() + { + } + /** + * @return string + */ + public function readString() + { + } + /** + * @return array + */ + public function readObject() + { + } + /** + * @return array + */ + public function readMixedArray() + { + } + /** + * @return array + */ + public function readArray() + { + } + /** + * @return float|false + */ + public function readDate() + { + } + /** + * @return string + */ + public function readLongString() + { + } + /** + * @return string + */ + public function readXML() + { + } + /** + * @return array + */ + public function readTypedObject() + { + } + } + class AVCSequenceParameterSetReader + { + /** + * @var string + */ + public $sps; + public $start = 0; + public $currentBytes = 0; + public $currentBits = 0; + /** + * @var int + */ + public $width; + /** + * @var int + */ + public $height; + /** + * @param string $sps + */ + public function __construct($sps) + { + } + public function readData() + { + } + /** + * @param int $bits + */ + public function skipBits($bits) + { + } + /** + * @return int + */ + public function getBit() + { + } + /** + * @param int $bits + * + * @return int + */ + public function getBits($bits) + { + } + /** + * @return int + */ + public function expGolombUe() + { + } + /** + * @return int + */ + public function expGolombSe() + { + } + /** + * @return int + */ + public function getWidth() + { + } + /** + * @return int + */ + public function getHeight() + { + } + } + /** + * @tutorial http://www.matroska.org/technical/specs/index.html + * + * @todo Rewrite EBML parser to reduce it's size and honor default element values + * @todo After rewrite implement stream size calculation, that will provide additional useful info and enable AAC/FLAC audio bitrate detection + */ + class getid3_matroska extends \getid3_handler + { + /** + * If true, do not return information about CLUSTER chunks, since there's a lot of them + * and they're not usually useful [default: TRUE]. + * + * @var bool + */ + public $hide_clusters = \true; + /** + * True to parse the whole file, not only header [default: FALSE]. + * + * @var bool + */ + public $parse_whole_file = \false; + /** + * @return bool + */ + public function Analyze() + { + } + /** + * @param int $target_type + * + * @return string|int + */ + public static function TargetTypeValue($target_type) + { + } + /** + * @param int $lacingtype + * + * @return string|int + */ + public static function BlockLacingType($lacingtype) + { + } + /** + * @param string $codecid + * + * @return string + */ + public static function CodecIDtoCommonName($codecid) + { + } + /** + * @param int $value + * + * @return string + */ + public static function displayUnit($value) + { + } + } + class getid3_quicktime extends \getid3_handler + { + /** audio-video.quicktime + * return all parsed data from all atoms if true, otherwise just returned parsed metadata + * + * @var bool + */ + public $ReturnAtomData = \false; + /** audio-video.quicktime + * return all parsed data from all atoms if true, otherwise just returned parsed metadata + * + * @var bool + */ + public $ParseAllPossibleAtoms = \false; + /** + * @return bool + */ + public function Analyze() + { + } + /** + * @param string $atomname + * @param int $atomsize + * @param string $atom_data + * @param int $baseoffset + * @param array $atomHierarchy + * @param bool $ParseAllPossibleAtoms + * + * @return array|false + */ + public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms) + { + } + /** + * @param string $atom_data + * @param int $baseoffset + * @param array $atomHierarchy + * @param bool $ParseAllPossibleAtoms + * + * @return array|false + */ + public function QuicktimeParseContainerAtom($atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms) + { + } + /** + * @param string $data + * @param int $offset + * + * @return int + */ + public function quicktime_read_mp4_descr_length($data, &$offset) + { + } + /** + * @param int $languageid + * + * @return string + */ + public function QuicktimeLanguageLookup($languageid) + { + } + /** + * @param string $codecid + * + * @return string + */ + public function QuicktimeVideoCodecLookup($codecid) + { + } + /** + * @param string $codecid + * + * @return mixed|string + */ + public function QuicktimeAudioCodecLookup($codecid) + { + } + /** + * @param string $compressionid + * + * @return string + */ + public function QuicktimeDCOMLookup($compressionid) + { + } + /** + * @param int $colordepthid + * + * @return string + */ + public function QuicktimeColorNameLookup($colordepthid) + { + } + /** + * @param int $stik + * + * @return string + */ + public function QuicktimeSTIKLookup($stik) + { + } + /** + * @param int $audio_profile_id + * + * @return string + */ + public function QuicktimeIODSaudioProfileName($audio_profile_id) + { + } + /** + * @param int $video_profile_id + * + * @return string + */ + public function QuicktimeIODSvideoProfileName($video_profile_id) + { + } + /** + * @param int $rtng + * + * @return string + */ + public function QuicktimeContentRatingLookup($rtng) + { + } + /** + * @param int $akid + * + * @return string + */ + public function QuicktimeStoreAccountTypeLookup($akid) + { + } + /** + * @param int $sfid + * + * @return string + */ + public function QuicktimeStoreFrontCodeLookup($sfid) + { + } + /** + * @param string $keyname + * @param string|array $data + * @param string $boxname + * + * @return bool + */ + public function CopyToAppropriateCommentsSection($keyname, $data, $boxname = '') + { + } + /** + * @param string $lstring + * @param int $count + * + * @return string + */ + public function LociString($lstring, &$count) + { + } + /** + * @param string $nullterminatedstring + * + * @return string + */ + public function NoNullString($nullterminatedstring) + { + } + /** + * @param string $pascalstring + * + * @return string + */ + public function Pascal2String($pascalstring) + { + } + /** + * @param string $pascalstring + * + * @return string + */ + public function MaybePascal2String($pascalstring) + { + } + /** + * Helper functions for m4b audiobook chapters + * code by Steffen Hartmann 2015-Nov-08. + * + * @param array $info + * @param string $tag + * @param string $history + * @param array $result + */ + public function search_tag_by_key($info, $tag, $history, &$result) + { + } + /** + * @param array $info + * @param string $k + * @param string $v + * @param string $history + * @param array $result + */ + public function search_tag_by_pair($info, $k, $v, $history, &$result) + { + } + /** + * @param array $info + * + * @return array + */ + public function quicktime_time_to_sample_table($info) + { + } + /** + * @param array $info + * + * @return int + */ + public function quicktime_bookmark_time_scale($info) + { + } + /* + // END helper functions for m4b audiobook chapters + */ + } + class getid3_riff extends \getid3_handler + { + protected $container = 'riff'; + /** + * @return bool + * + * @throws getid3_exception + */ + public function Analyze() + { + } + /** + * @param int $startoffset + * @param int $maxoffset + * + * @return array|false + * + * @throws Exception + * @throws getid3_exception + */ + public function ParseRIFFAMV($startoffset, $maxoffset) + { + } + /** + * @param int $startoffset + * @param int $maxoffset + * + * @return array|false + * @throws getid3_exception + */ + public function ParseRIFF($startoffset, $maxoffset) + { + } + /** + * @param string $RIFFdata + * + * @return bool + */ + public function ParseRIFFdata(&$RIFFdata) + { + } + /** + * @param array $RIFFinfoArray + * @param array $CommentsTargetArray + * + * @return bool + */ + public static function parseComments(&$RIFFinfoArray, &$CommentsTargetArray) + { + } + /** + * @param string $WaveFormatExData + * + * @return array + */ + public static function parseWAVEFORMATex($WaveFormatExData) + { + } + /** + * @param string $WavPackChunkData + * + * @return bool + */ + public function parseWavPackHeader($WavPackChunkData) + { + } + /** + * @param string $BITMAPINFOHEADER + * @param bool $littleEndian + * + * @return array + */ + public static function ParseBITMAPINFOHEADER($BITMAPINFOHEADER, $littleEndian = \true) + { + } + /** + * @param string $DIVXTAG + * @param bool $raw + * + * @return array + */ + public static function ParseDIVXTAG($DIVXTAG, $raw = \false) + { + } + /** + * @param string $tagshortname + * + * @return string + */ + public static function waveSNDMtagLookup($tagshortname) + { + } + /** + * @param int $wFormatTag + * + * @return string + */ + public static function wFormatTagLookup($wFormatTag) + { + } + /** + * @param string $fourcc + * + * @return string + */ + public static function fourccLookup($fourcc) + { + } + } + class getid3_ac3 extends \getid3_handler + { + const syncword = 0xb77; + /** + * @return bool + */ + public function Analyze() + { + } + /** + * @param int $fscod + * + * @return int|string|false + */ + public static function sampleRateCodeLookup($fscod) + { + } + /** + * @param int $fscod2 + * + * @return int|string|false + */ + public static function sampleRateCodeLookup2($fscod2) + { + } + /** + * @param int $bsmod + * @param int $acmod + * + * @return string|false + */ + public static function serviceTypeLookup($bsmod, $acmod) + { + } + /** + * @param int $acmod + * + * @return array|false + */ + public static function audioCodingModeLookup($acmod) + { + } + /** + * @param int $cmixlev + * + * @return int|float|string|false + */ + public static function centerMixLevelLookup($cmixlev) + { + } + /** + * @param int $surmixlev + * + * @return int|float|string|false + */ + public static function surroundMixLevelLookup($surmixlev) + { + } + /** + * @param int $dsurmod + * + * @return string|false + */ + public static function dolbySurroundModeLookup($dsurmod) + { + } + /** + * @param int $acmod + * @param bool $lfeon + * + * @return array + */ + public static function channelsEnabledLookup($acmod, $lfeon) + { + } + /** + * @param int $compre + * + * @return float|int + */ + public static function heavyCompression($compre) + { + } + /** + * @param int $roomtyp + * + * @return string|false + */ + public static function roomTypeLookup($roomtyp) + { + } + /** + * @param int $frmsizecod + * @param int $fscod + * + * @return int|false + */ + public static function frameSizeLookup($frmsizecod, $fscod) + { + } + /** + * @param int $frmsizecod + * + * @return int|false + */ + public static function bitrateLookup($frmsizecod) + { + } + /** + * @param int $numblkscod + * + * @return int|false + */ + public static function blocksPerSyncFrame($numblkscod) + { + } + } + /** + * @tutorial http://wiki.multimedia.cx/index.php?title=DTS + */ + class getid3_dts extends \getid3_handler + { + /** + * Default DTS syncword used in native .cpt or .dts formats. + */ + const syncword = "\xfe\x80\x01"; + /** + * Possible syncwords indicating bitstream encoding. + */ + public static $syncwords = array( + 0 => "\xfe\x80\x01", + // raw big-endian + 1 => "\xfe\x01\x80", + // raw little-endian + 2 => "\x1f\xff\xe8\x00", + // 14-bit big-endian + 3 => "\xff\x1f\x00\xe8", + ); + /** + * @return bool + */ + public function Analyze() + { + } + /** + * @param int $index + * + * @return int|string|false + */ + public static function bitrateLookup($index) + { + } + /** + * @param int $index + * + * @return int|string|false + */ + public static function sampleRateLookup($index) + { + } + /** + * @param int $index + * + * @return int|false + */ + public static function bitPerSampleLookup($index) + { + } + /** + * @param int $index + * + * @return int|false + */ + public static function numChannelsLookup($index) + { + } + /** + * @param int $index + * + * @return string + */ + public static function channelArrangementLookup($index) + { + } + /** + * @param int $index + * @param int $version + * + * @return int|false + */ + public static function dialogNormalization($index, $version) + { + } + } + /** + * @tutorial http://flac.sourceforge.net/format.html + */ + class getid3_flac extends \getid3_handler + { + const syncword = 'fLaC'; + /** + * @return bool + */ + public function Analyze() + { + } + /** + * @return bool + */ + public function parseMETAdata() + { + } + /** + * @param string $BlockData + * + * @return array + */ + public static function parseSTREAMINFOdata($BlockData) + { + } + /** + * Parse METADATA_BLOCK_PICTURE flac structure and extract attachment + * External usage: audio.ogg + * + * @return bool + */ + public function parsePICTURE() + { + } + /** + * @param int $blocktype + * + * @return string + */ + public static function metaBlockTypeLookup($blocktype) + { + } + /** + * @param int $applicationid + * + * @return string + */ + public static function applicationIDLookup($applicationid) + { + } + /** + * @param int $type_id + * + * @return string + */ + public static function pictureTypeLookup($type_id) + { + } + } + class getid3_mp3 extends \getid3_handler + { + /** + * Forces getID3() to scan the file byte-by-byte and log all the valid audio frame headers - extremely slow, + * unrecommended, but may provide data from otherwise-unusable files. + * + * @var bool + */ + public $allow_bruteforce = \false; + /** + * number of frames to scan to determine if MPEG-audio sequence is valid + * Lower this number to 5-20 for faster scanning + * Increase this number to 50+ for most accurate detection of valid VBR/CBR mpeg-audio streams + * + * @var int + */ + public $mp3_valid_check_frames = 50; + /** + * @return bool + */ + public function Analyze() + { + } + /** + * @return string + */ + public function GuessEncoderOptions() + { + } + /** + * @param int $offset + * @param array $info + * @param bool $recursivesearch + * @param bool $ScanAsCBR + * @param bool $FastMPEGheaderScan + * + * @return bool + */ + public function decodeMPEGaudioHeader($offset, &$info, $recursivesearch = \true, $ScanAsCBR = \false, $FastMPEGheaderScan = \false) + { + } + /** + * @param int $offset + * @param int $nextframetestoffset + * @param bool $ScanAsCBR + * + * @return bool + */ + public function RecursiveFrameScanning(&$offset, &$nextframetestoffset, $ScanAsCBR) + { + } + /** + * @param int $offset + * @param bool $deepscan + * + * @return int|false + */ + public function FreeFormatFrameLength($offset, $deepscan = \false) + { + } + /** + * @return bool + */ + public function getOnlyMPEGaudioInfoBruteForce() + { + } + /** + * @param int $avdataoffset + * @param bool $BitrateHistogram + * + * @return bool + */ + public function getOnlyMPEGaudioInfo($avdataoffset, $BitrateHistogram = \false) + { + } + /** + * @return array + */ + public static function MPEGaudioVersionArray() + { + } + /** + * @return array + */ + public static function MPEGaudioLayerArray() + { + } + /** + * @return array + */ + public static function MPEGaudioBitrateArray() + { + } + /** + * @return array + */ + public static function MPEGaudioFrequencyArray() + { + } + /** + * @return array + */ + public static function MPEGaudioChannelModeArray() + { + } + /** + * @return array + */ + public static function MPEGaudioModeExtensionArray() + { + } + /** + * @return array + */ + public static function MPEGaudioEmphasisArray() + { + } + /** + * @param string $head4 + * @param bool $allowBitrate15 + * + * @return bool + */ + public static function MPEGaudioHeaderBytesValid($head4, $allowBitrate15 = \false) + { + } + /** + * @param array $rawarray + * @param bool $echoerrors + * @param bool $allowBitrate15 + * + * @return bool + */ + public static function MPEGaudioHeaderValid($rawarray, $echoerrors = \false, $allowBitrate15 = \false) + { + } + /** + * @param string $Header4Bytes + * + * @return array|false + */ + public static function MPEGaudioHeaderDecode($Header4Bytes) + { + } + /** + * @param int|string $bitrate + * @param string $version + * @param string $layer + * @param bool $padding + * @param int $samplerate + * + * @return int|false + */ + public static function MPEGaudioFrameLength(&$bitrate, &$version, &$layer, $padding, &$samplerate) + { + } + /** + * @param float|int $bit_rate + * + * @return int|float|string + */ + public static function ClosestStandardMP3Bitrate($bit_rate) + { + } + /** + * @param string $version + * @param string $channelmode + * + * @return int + */ + public static function XingVBRidOffset($version, $channelmode) + { + } + /** + * @param int $VBRmethodID + * + * @return string + */ + public static function LAMEvbrMethodLookup($VBRmethodID) + { + } + /** + * @param int $StereoModeID + * + * @return string + */ + public static function LAMEmiscStereoModeLookup($StereoModeID) + { + } + /** + * @param int $SourceSampleFrequencyID + * + * @return string + */ + public static function LAMEmiscSourceSampleFrequencyLookup($SourceSampleFrequencyID) + { + } + /** + * @param int $SurroundInfoID + * + * @return string + */ + public static function LAMEsurroundInfoLookup($SurroundInfoID) + { + } + /** + * @param array $LAMEtag + * + * @return string + */ + public static function LAMEpresetUsedLookup($LAMEtag) + { + } + } + class getid3_ogg extends \getid3_handler + { + /** + * @link http://xiph.org/vorbis/doc/Vorbis_I_spec.html + * + * @return bool + */ + public function Analyze() + { + } + /** + * @param string $filedata + * @param int $filedataoffset + * @param array $oggpageinfo + * + * @return bool + */ + public function ParseVorbisPageHeader(&$filedata, &$filedataoffset, &$oggpageinfo) + { + } + /** + * @link http://tools.ietf.org/html/draft-ietf-codec-oggopus-03 + * + * @param string $filedata + * @param int $filedataoffset + * @param array $oggpageinfo + * + * @return bool + */ + public function ParseOpusPageHeader(&$filedata, &$filedataoffset, &$oggpageinfo) + { + } + /** + * @return array|false + */ + public function ParseOggPageHeader() + { + } + /** + * @link http://xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-810005 + * + * @return bool + */ + public function ParseVorbisComments() + { + } + /** + * @param int $mode + * + * @return string|null + */ + public static function SpeexBandModeLookup($mode) + { + } + /** + * @param array $OggInfoArray + * @param int $SegmentNumber + * + * @return int + */ + public static function OggPageSegmentLength($OggInfoArray, $SegmentNumber = 1) + { + } + /** + * @param int $nominal_bitrate + * + * @return float + */ + public static function get_quality_from_nominal_bitrate($nominal_bitrate) + { + } + /** + * @param int $colorspace_id + * + * @return string|null + */ + public static function TheoraColorSpace($colorspace_id) + { + } + /** + * @param int $pixelformat_id + * + * @return string|null + */ + public static function TheoraPixelFormat($pixelformat_id) + { + } + } + class getid3_apetag extends \getid3_handler + { + /** + * true: return full data for all attachments; + * false: return no data for all attachments; + * integer: return data for attachments <= than this; + * string: save as file to this directory. + * + * @var int|bool|string + */ + public $inline_attachments = \true; + public $overrideendoffset = 0; + /** + * @return bool + */ + public function Analyze() + { + } + /** + * @param string $APEheaderFooterData + * + * @return array|false + */ + public function parseAPEheaderFooter($APEheaderFooterData) + { + } + /** + * @param int $rawflagint + * + * @return array + */ + public function parseAPEtagFlags($rawflagint) + { + } + /** + * @param int $contenttypeid + * + * @return string + */ + public function APEcontentTypeFlagLookup($contenttypeid) + { + } + /** + * @param string $itemkey + * + * @return bool + */ + public function APEtagItemIsUTF8Lookup($itemkey) + { + } + } + class getid3_id3v1 extends \getid3_handler + { + /** + * @return bool + */ + public function Analyze() + { + } + /** + * @param string $str + * + * @return string + */ + public static function cutfield($str) + { + } + /** + * @param bool $allowSCMPXextended + * + * @return string[] + */ + public static function ArrayOfGenres($allowSCMPXextended = \false) + { + } + /** + * @param string $genreid + * @param bool $allowSCMPXextended + * + * @return string|false + */ + public static function LookupGenreName($genreid, $allowSCMPXextended = \true) + { + } + /** + * @param string $genre + * @param bool $allowSCMPXextended + * + * @return string|false + */ + public static function LookupGenreID($genre, $allowSCMPXextended = \false) + { + } + /** + * @param string $OriginalGenre + * + * @return string|false + */ + public static function StandardiseID3v1GenreName($OriginalGenre) + { + } + /** + * @param string $title + * @param string $artist + * @param string $album + * @param string $year + * @param int $genreid + * @param string $comment + * @param int|string $track + * + * @return string + */ + public static function GenerateID3v1Tag($title, $artist, $album, $year, $genreid, $comment, $track = '') + { + } + } + class getid3_id3v2 extends \getid3_handler + { + public $StartingOffset = 0; + /** + * @return bool + */ + public function Analyze() + { + } + /** + * @param string $genrestring + * + * @return array + */ + public function ParseID3v2GenreString($genrestring) + { + } + /** + * @param array $parsedFrame + * + * @return bool + */ + public function ParseID3v2Frame(&$parsedFrame) + { + } + /** + * @param string $data + * + * @return string + */ + public function DeUnsynchronise($data) + { + } + /** + * @param int $index + * + * @return string + */ + public function LookupExtendedHeaderRestrictionsTagSizeLimits($index) + { + } + /** + * @param int $index + * + * @return string + */ + public function LookupExtendedHeaderRestrictionsTextEncodings($index) + { + } + /** + * @param int $index + * + * @return string + */ + public function LookupExtendedHeaderRestrictionsTextFieldSize($index) + { + } + /** + * @param int $index + * + * @return string + */ + public function LookupExtendedHeaderRestrictionsImageEncoding($index) + { + } + /** + * @param int $index + * + * @return string + */ + public function LookupExtendedHeaderRestrictionsImageSizeSize($index) + { + } + /** + * @param string $currencyid + * + * @return string + */ + public function LookupCurrencyUnits($currencyid) + { + } + /** + * @param string $currencyid + * + * @return string + */ + public function LookupCurrencyCountry($currencyid) + { + } + /** + * @param string $languagecode + * @param bool $casesensitive + * + * @return string + */ + public static function LanguageLookup($languagecode, $casesensitive = \false) + { + } + /** + * @param int $index + * + * @return string + */ + public static function ETCOEventLookup($index) + { + } + /** + * @param int $index + * + * @return string + */ + public static function SYTLContentTypeLookup($index) + { + } + /** + * @param int $index + * @param bool $returnarray + * + * @return array|string + */ + public static function APICPictureTypeLookup($index, $returnarray = \false) + { + } + /** + * @param int $index + * + * @return string + */ + public static function COMRReceivedAsLookup($index) + { + } + /** + * @param int $index + * + * @return string + */ + public static function RVA2ChannelTypeLookup($index) + { + } + /** + * @param string $framename + * + * @return string + */ + public static function FrameNameLongLookup($framename) + { + } + /** + * @param string $framename + * + * @return string + */ + public static function FrameNameShortLookup($framename) + { + } + /** + * @param string $encoding + * + * @return string + */ + public static function TextEncodingTerminatorLookup($encoding) + { + } + /** + * @param int $encoding + * + * @return string + */ + public static function TextEncodingNameLookup($encoding) + { + } + /** + * @param string $string + * @param string $terminator + * + * @return string + */ + public static function RemoveStringTerminator($string, $terminator) + { + } + /** + * @param string $string + * + * @return string + */ + public static function MakeUTF16emptyStringEmpty($string) + { + } + /** + * @param string $framename + * @param int $id3v2majorversion + * + * @return bool|int + */ + public static function IsValidID3v2FrameName($framename, $id3v2majorversion) + { + } + /** + * @param string $numberstring + * @param bool $allowdecimal + * @param bool $allownegative + * + * @return bool + */ + public static function IsANumber($numberstring, $allowdecimal = \false, $allownegative = \false) + { + } + /** + * @param string $datestamp + * + * @return bool + */ + public static function IsValidDateStampString($datestamp) + { + } + /** + * @param int $majorversion + * + * @return int + */ + public static function ID3v2HeaderLength($majorversion) + { + } + /** + * @param string $frame_name + * + * @return string|false + */ + public static function ID3v22iTunesBrokenFrameName($frame_name) + { + } + } + class getid3_lyrics3 extends \getid3_handler + { + /** + * @return bool + */ + public function Analyze() + { + } + /** + * @param int $endoffset + * @param int $version + * @param int $length + * + * @return bool + */ + public function getLyrics3Data($endoffset, $version, $length) + { + } + /** + * @param string $rawtimestamp + * + * @return int|false + */ + public function Lyrics3Timestamp2Seconds($rawtimestamp) + { + } + /** + * @param array $Lyrics3data + * + * @return bool + */ + public function Lyrics3LyricsTimestampParse(&$Lyrics3data) + { + } + /** + * @param string $char + * + * @return bool|null + */ + public function IntString2Bool($char) + { + } + } + /** + * IXR_Base64 + * + * @package IXR + * @since 1.5.0 + */ + class IXR_Base64 + { + var $data; + /** + * PHP5 constructor. + */ + function __construct($data) + { + } + /** + * PHP4 constructor. + */ + public function IXR_Base64($data) + { + } + function getXml() + { + } + } + /** + * IXR_Client + * + * @package IXR + * @since 1.5.0 + * + */ + class IXR_Client + { + var $server; + var $port; + var $path; + var $useragent; + var $response; + var $message = \false; + var $debug = \false; + var $timeout; + var $headers = array(); + var $error = \false; + /** + * PHP5 constructor. + */ + function __construct($server, $path = \false, $port = 80, $timeout = 15) + { + } + /** + * PHP4 constructor. + */ + public function IXR_Client($server, $path = \false, $port = 80, $timeout = 15) + { + } + /** + * @since 1.5.0 + * @since 5.5.0 Formalized the existing `...$args` parameter by adding it + * to the function signature. + * + * @return bool + */ + function query(...$args) + { + } + function getResponse() + { + } + function isError() + { + } + function getErrorCode() + { + } + function getErrorMessage() + { + } + } + /** + * IXR_ClientMulticall + * + * @package IXR + * @since 1.5.0 + */ + class IXR_ClientMulticall extends \IXR_Client + { + var $calls = array(); + /** + * PHP5 constructor. + */ + function __construct($server, $path = \false, $port = 80) + { + } + /** + * PHP4 constructor. + */ + public function IXR_ClientMulticall($server, $path = \false, $port = 80) + { + } + /** + * @since 1.5.0 + * @since 5.5.0 Formalized the existing `...$args` parameter by adding it + * to the function signature. + */ + function addCall(...$args) + { + } + /** + * @since 1.5.0 + * @since 5.5.0 Formalized the existing `...$args` parameter by adding it + * to the function signature. + * + * @return bool + */ + function query(...$args) + { + } + } + /** + * IXR_Date + * + * @package IXR + * @since 1.5.0 + */ + class IXR_Date + { + var $year; + var $month; + var $day; + var $hour; + var $minute; + var $second; + var $timezone; + /** + * PHP5 constructor. + */ + function __construct($time) + { + } + /** + * PHP4 constructor. + */ + public function IXR_Date($time) + { + } + function parseTimestamp($timestamp) + { + } + function parseIso($iso) + { + } + function getIso() + { + } + function getXml() + { + } + function getTimestamp() + { + } + } + /** + * IXR_Error + * + * @package IXR + * @since 1.5.0 + */ + class IXR_Error + { + var $code; + var $message; + /** + * PHP5 constructor. + */ + function __construct($code, $message) + { + } + /** + * PHP4 constructor. + */ + public function IXR_Error($code, $message) + { + } + function getXml() + { + } + } + /** + * IXR_Server + * + * @package IXR + * @since 1.5.0 + */ + class IXR_Server + { + var $data; + var $callbacks = array(); + var $message; + var $capabilities; + /** + * PHP5 constructor. + */ + function __construct($callbacks = \false, $data = \false, $wait = \false) + { + } + /** + * PHP4 constructor. + */ + public function IXR_Server($callbacks = \false, $data = \false, $wait = \false) + { + } + function serve($data = \false) + { + } + function call($methodname, $args) + { + } + function error($error, $message = \false) + { + } + function output($xml) + { + } + function hasMethod($method) + { + } + function setCapabilities() + { + } + function getCapabilities($args) + { + } + function setCallbacks() + { + } + function listMethods($args) + { + } + function multiCall($methodcalls) + { + } + } + /** + * IXR_IntrospectionServer + * + * @package IXR + * @since 1.5.0 + */ + class IXR_IntrospectionServer extends \IXR_Server + { + var $signatures; + var $help; + /** + * PHP5 constructor. + */ + function __construct() + { + } + /** + * PHP4 constructor. + */ + public function IXR_IntrospectionServer() + { + } + function addCallback($method, $callback, $args, $help) + { + } + function call($methodname, $args) + { + } + function methodSignature($method) + { + } + function methodHelp($method) + { + } + } + /** + * IXR_MESSAGE + * + * @package IXR + * @since 1.5.0 + * + */ + class IXR_Message + { + var $message = \false; + var $messageType = \false; + var $faultCode = \false; + var $faultString = \false; + var $methodName = ''; + var $params = array(); + var $_arraystructs = array(); + var $_arraystructstypes = array(); + var $_currentStructName = array(); + var $_param; + var $_value; + var $_currentTag; + var $_currentTagContents; + var $_parser; + /** + * PHP5 constructor. + */ + function __construct($message) + { + } + /** + * PHP4 constructor. + */ + public function IXR_Message($message) + { + } + function parse() + { + } + function tag_open($parser, $tag, $attr) + { + } + function cdata($parser, $cdata) + { + } + function tag_close($parser, $tag) + { + } + } + /** + * IXR_Request + * + * @package IXR + * @since 1.5.0 + */ + class IXR_Request + { + var $method; + var $args; + var $xml; + /** + * PHP5 constructor. + */ + function __construct($method, $args) + { + } + /** + * PHP4 constructor. + */ + public function IXR_Request($method, $args) + { + } + function getLength() + { + } + function getXml() + { + } + } + /** + * IXR_Value + * + * @package IXR + * @since 1.5.0 + */ + class IXR_Value + { + var $data; + var $type; + /** + * PHP5 constructor. + */ + function __construct($data, $type = \false) + { + } + /** + * PHP4 constructor. + */ + public function IXR_Value($data, $type = \false) + { + } + function calculateType() + { + } + function getXml() + { + } + /** + * Checks whether or not the supplied array is a struct or not + * + * @param array $array + * @return bool + */ + function isStruct($array) + { + } + } +} +namespace PHPMailer\PHPMailer { + /** + * Configure PHPMailer with DSN string. + * + * @see https://en.wikipedia.org/wiki/Data_source_name + * + * @author Oleg Voronkovich + */ + class DSNConfigurator + { + /** + * Create new PHPMailer instance configured by DSN. + * + * @param string $dsn DSN + * @param bool $exceptions Should we throw external exceptions? + * + * @return PHPMailer + */ + public static function mailer($dsn, $exceptions = null) + { + } + /** + * Configure PHPMailer instance with DSN string. + * + * @param PHPMailer $mailer PHPMailer instance + * @param string $dsn DSN + * + * @return PHPMailer + */ + public function configure(\PHPMailer\PHPMailer\PHPMailer $mailer, $dsn) + { + } + /** + * Parse a URL. + * Wrapper for the built-in parse_url function to work around a bug in PHP 5.5. + * + * @param string $url URL + * + * @return array|false + */ + protected function parseUrl($url) + { + } + } + /** + * PHPMailer exception handler. + * + * @author Marcus Bointon + */ + class Exception extends \Exception + { + /** + * Prettify error message output. + * + * @return string + */ + public function errorMessage() + { + } + } + /** + * OAuthTokenProvider - OAuth2 token provider interface. + * Provides base64 encoded OAuth2 auth strings for SMTP authentication. + * + * @see OAuth + * @see SMTP::authenticate() + * + * @author Peter Scopes (pdscopes) + * @author Marcus Bointon (Synchro/coolbru) + */ + interface OAuthTokenProvider + { + /** + * Generate a base64-encoded OAuth token ensuring that the access token has not expired. + * The string to be base 64 encoded should be in the form: + * "user=\001auth=Bearer \001\001" + * + * @return string + */ + public function getOauth64(); + } + /** + * OAuth - OAuth2 authentication wrapper class. + * Uses the oauth2-client package from the League of Extraordinary Packages. + * + * @see https://oauth2-client.thephpleague.com + * + * @author Marcus Bointon (Synchro/coolbru) + */ + class OAuth implements \PHPMailer\PHPMailer\OAuthTokenProvider + { + /** + * An instance of the League OAuth Client Provider. + * + * @var AbstractProvider + */ + protected $provider; + /** + * The current OAuth access token. + * + * @var AccessToken + */ + protected $oauthToken; + /** + * The user's email address, usually used as the login ID + * and also the from address when sending email. + * + * @var string + */ + protected $oauthUserEmail = ''; + /** + * The client secret, generated in the app definition of the service you're connecting to. + * + * @var string + */ + protected $oauthClientSecret = ''; + /** + * The client ID, generated in the app definition of the service you're connecting to. + * + * @var string + */ + protected $oauthClientId = ''; + /** + * The refresh token, used to obtain new AccessTokens. + * + * @var string + */ + protected $oauthRefreshToken = ''; + /** + * OAuth constructor. + * + * @param array $options Associative array containing + * `provider`, `userName`, `clientSecret`, `clientId` and `refreshToken` elements + */ + public function __construct($options) + { + } + /** + * Get a new RefreshToken. + * + * @return RefreshToken + */ + protected function getGrant() + { + } + /** + * Get a new AccessToken. + * + * @return AccessToken + */ + protected function getToken() + { + } + /** + * Generate a base64-encoded OAuth token. + * + * @return string + */ + public function getOauth64() + { + } + } + /** + * PHPMailer - PHP email creation and transport class. + * + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + */ + class PHPMailer + { + const CHARSET_ASCII = 'us-ascii'; + const CHARSET_ISO88591 = 'iso-8859-1'; + const CHARSET_UTF8 = 'utf-8'; + const CONTENT_TYPE_PLAINTEXT = 'text/plain'; + const CONTENT_TYPE_TEXT_CALENDAR = 'text/calendar'; + const CONTENT_TYPE_TEXT_HTML = 'text/html'; + const CONTENT_TYPE_MULTIPART_ALTERNATIVE = 'multipart/alternative'; + const CONTENT_TYPE_MULTIPART_MIXED = 'multipart/mixed'; + const CONTENT_TYPE_MULTIPART_RELATED = 'multipart/related'; + const ENCODING_7BIT = '7bit'; + const ENCODING_8BIT = '8bit'; + const ENCODING_BASE64 = 'base64'; + const ENCODING_BINARY = 'binary'; + const ENCODING_QUOTED_PRINTABLE = 'quoted-printable'; + const ENCRYPTION_STARTTLS = 'tls'; + const ENCRYPTION_SMTPS = 'ssl'; + const ICAL_METHOD_REQUEST = 'REQUEST'; + const ICAL_METHOD_PUBLISH = 'PUBLISH'; + const ICAL_METHOD_REPLY = 'REPLY'; + const ICAL_METHOD_ADD = 'ADD'; + const ICAL_METHOD_CANCEL = 'CANCEL'; + const ICAL_METHOD_REFRESH = 'REFRESH'; + const ICAL_METHOD_COUNTER = 'COUNTER'; + const ICAL_METHOD_DECLINECOUNTER = 'DECLINECOUNTER'; + /** + * Email priority. + * Options: null (default), 1 = High, 3 = Normal, 5 = low. + * When null, the header is not set at all. + * + * @var int|null + */ + public $Priority; + /** + * The character set of the message. + * + * @var string + */ + public $CharSet = self::CHARSET_ISO88591; + /** + * The MIME Content-type of the message. + * + * @var string + */ + public $ContentType = self::CONTENT_TYPE_PLAINTEXT; + /** + * The message encoding. + * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable". + * + * @var string + */ + public $Encoding = self::ENCODING_8BIT; + /** + * Holds the most recent mailer error message. + * + * @var string + */ + public $ErrorInfo = ''; + /** + * The From email address for the message. + * + * @var string + */ + public $From = ''; + /** + * The From name of the message. + * + * @var string + */ + public $FromName = ''; + /** + * The envelope sender of the message. + * This will usually be turned into a Return-Path header by the receiver, + * and is the address that bounces will be sent to. + * If not empty, will be passed via `-f` to sendmail or as the 'MAIL FROM' value over SMTP. + * + * @var string + */ + public $Sender = ''; + /** + * The Subject of the message. + * + * @var string + */ + public $Subject = ''; + /** + * An HTML or plain text message body. + * If HTML then call isHTML(true). + * + * @var string + */ + public $Body = ''; + /** + * The plain-text message body. + * This body can be read by mail clients that do not have HTML email + * capability such as mutt & Eudora. + * Clients that can read HTML will view the normal Body. + * + * @var string + */ + public $AltBody = ''; + /** + * An iCal message part body. + * Only supported in simple alt or alt_inline message types + * To generate iCal event structures, use classes like EasyPeasyICS or iCalcreator. + * + * @see https://kigkonsult.se/iCalcreator/ + * + * @var string + */ + public $Ical = ''; + /** + * Value-array of "method" in Contenttype header "text/calendar" + * + * @var string[] + */ + protected static $IcalMethods = [self::ICAL_METHOD_REQUEST, self::ICAL_METHOD_PUBLISH, self::ICAL_METHOD_REPLY, self::ICAL_METHOD_ADD, self::ICAL_METHOD_CANCEL, self::ICAL_METHOD_REFRESH, self::ICAL_METHOD_COUNTER, self::ICAL_METHOD_DECLINECOUNTER]; + /** + * The complete compiled MIME message body. + * + * @var string + */ + protected $MIMEBody = ''; + /** + * The complete compiled MIME message headers. + * + * @var string + */ + protected $MIMEHeader = ''; + /** + * Extra headers that createHeader() doesn't fold in. + * + * @var string + */ + protected $mailHeader = ''; + /** + * Word-wrap the message body to this number of chars. + * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance. + * + * @see static::STD_LINE_LENGTH + * + * @var int + */ + public $WordWrap = 0; + /** + * Which method to use to send mail. + * Options: "mail", "sendmail", or "smtp". + * + * @var string + */ + public $Mailer = 'mail'; + /** + * The path to the sendmail program. + * + * @var string + */ + public $Sendmail = '/usr/sbin/sendmail'; + /** + * Whether mail() uses a fully sendmail-compatible MTA. + * One which supports sendmail's "-oi -f" options. + * + * @var bool + */ + public $UseSendmailOptions = true; + /** + * The email address that a reading confirmation should be sent to, also known as read receipt. + * + * @var string + */ + public $ConfirmReadingTo = ''; + /** + * The hostname to use in the Message-ID header and as default HELO string. + * If empty, PHPMailer attempts to find one with, in order, + * $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value + * 'localhost.localdomain'. + * + * @see PHPMailer::$Helo + * + * @var string + */ + public $Hostname = ''; + /** + * An ID to be used in the Message-ID header. + * If empty, a unique id will be generated. + * You can set your own, but it must be in the format "", + * as defined in RFC5322 section 3.6.4 or it will be ignored. + * + * @see https://www.rfc-editor.org/rfc/rfc5322#section-3.6.4 + * + * @var string + */ + public $MessageID = ''; + /** + * The message Date to be used in the Date header. + * If empty, the current date will be added. + * + * @var string + */ + public $MessageDate = ''; + /** + * SMTP hosts. + * Either a single hostname or multiple semicolon-delimited hostnames. + * You can also specify a different port + * for each host by using this format: [hostname:port] + * (e.g. "smtp1.example.com:25;smtp2.example.com"). + * You can also specify encryption type, for example: + * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). + * Hosts will be tried in order. + * + * @var string + */ + public $Host = 'localhost'; + /** + * The default SMTP server port. + * + * @var int + */ + public $Port = 25; + /** + * The SMTP HELO/EHLO name used for the SMTP connection. + * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find + * one with the same method described above for $Hostname. + * + * @see PHPMailer::$Hostname + * + * @var string + */ + public $Helo = ''; + /** + * What kind of encryption to use on the SMTP connection. + * Options: '', static::ENCRYPTION_STARTTLS, or static::ENCRYPTION_SMTPS. + * + * @var string + */ + public $SMTPSecure = ''; + /** + * Whether to enable TLS encryption automatically if a server supports it, + * even if `SMTPSecure` is not set to 'tls'. + * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid. + * + * @var bool + */ + public $SMTPAutoTLS = true; + /** + * Whether to use SMTP authentication. + * Uses the Username and Password properties. + * + * @see PHPMailer::$Username + * @see PHPMailer::$Password + * + * @var bool + */ + public $SMTPAuth = false; + /** + * Options array passed to stream_context_create when connecting via SMTP. + * + * @var array + */ + public $SMTPOptions = []; + /** + * SMTP username. + * + * @var string + */ + public $Username = ''; + /** + * SMTP password. + * + * @var string + */ + public $Password = ''; + /** + * SMTP authentication type. Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2. + * If not specified, the first one from that list that the server supports will be selected. + * + * @var string + */ + public $AuthType = ''; + /** + * SMTP SMTPXClient command attributes + * + * @var array + */ + protected $SMTPXClient = []; + /** + * An implementation of the PHPMailer OAuthTokenProvider interface. + * + * @var OAuthTokenProvider + */ + protected $oauth; + /** + * The SMTP server timeout in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. + * + * @var int + */ + public $Timeout = 300; + /** + * Comma separated list of DSN notifications + * 'NEVER' under no circumstances a DSN must be returned to the sender. + * If you use NEVER all other notifications will be ignored. + * 'SUCCESS' will notify you when your mail has arrived at its destination. + * 'FAILURE' will arrive if an error occurred during delivery. + * 'DELAY' will notify you if there is an unusual delay in delivery, but the actual + * delivery's outcome (success or failure) is not yet decided. + * + * @see https://www.rfc-editor.org/rfc/rfc3461.html#section-4.1 for more information about NOTIFY + */ + public $dsn = ''; + /** + * SMTP class debug output mode. + * Debug output level. + * Options: + * @see SMTP::DEBUG_OFF: No output + * @see SMTP::DEBUG_CLIENT: Client messages + * @see SMTP::DEBUG_SERVER: Client and server messages + * @see SMTP::DEBUG_CONNECTION: As SERVER plus connection status + * @see SMTP::DEBUG_LOWLEVEL: Noisy, low-level data output, rarely needed + * + * @see SMTP::$do_debug + * + * @var int + */ + public $SMTPDebug = 0; + /** + * How to handle debug output. + * Options: + * * `echo` Output plain-text as-is, appropriate for CLI + * * `html` Output escaped, line breaks converted to `
`, appropriate for browser output + * * `error_log` Output to error log as configured in php.ini + * By default PHPMailer will use `echo` if run from a `cli` or `cli-server` SAPI, `html` otherwise. + * Alternatively, you can provide a callable expecting two params: a message string and the debug level: + * + * ```php + * $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; + * ``` + * + * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` + * level output is used: + * + * ```php + * $mail->Debugoutput = new myPsr3Logger; + * ``` + * + * @see SMTP::$Debugoutput + * + * @var string|callable|\Psr\Log\LoggerInterface + */ + public $Debugoutput = 'echo'; + /** + * Whether to keep the SMTP connection open after each message. + * If this is set to true then the connection will remain open after a send, + * and closing the connection will require an explicit call to smtpClose(). + * It's a good idea to use this if you are sending multiple messages as it reduces overhead. + * See the mailing list example for how to use it. + * + * @var bool + */ + public $SMTPKeepAlive = false; + /** + * Whether to split multiple to addresses into multiple messages + * or send them all in one message. + * Only supported in `mail` and `sendmail` transports, not in SMTP. + * + * @var bool + * + * @deprecated 6.0.0 PHPMailer isn't a mailing list manager! + */ + public $SingleTo = false; + /** + * Storage for addresses when SingleTo is enabled. + * + * @var array + */ + protected $SingleToArray = []; + /** + * Whether to generate VERP addresses on send. + * Only applicable when sending via SMTP. + * + * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path + * @see https://www.postfix.org/VERP_README.html Postfix VERP info + * + * @var bool + */ + public $do_verp = false; + /** + * Whether to allow sending messages with an empty body. + * + * @var bool + */ + public $AllowEmpty = false; + /** + * DKIM selector. + * + * @var string + */ + public $DKIM_selector = ''; + /** + * DKIM Identity. + * Usually the email address used as the source of the email. + * + * @var string + */ + public $DKIM_identity = ''; + /** + * DKIM passphrase. + * Used if your key is encrypted. + * + * @var string + */ + public $DKIM_passphrase = ''; + /** + * DKIM signing domain name. + * + * @example 'example.com' + * + * @var string + */ + public $DKIM_domain = ''; + /** + * DKIM Copy header field values for diagnostic use. + * + * @var bool + */ + public $DKIM_copyHeaderFields = true; + /** + * DKIM Extra signing headers. + * + * @example ['List-Unsubscribe', 'List-Help'] + * + * @var array + */ + public $DKIM_extraHeaders = []; + /** + * DKIM private key file path. + * + * @var string + */ + public $DKIM_private = ''; + /** + * DKIM private key string. + * + * If set, takes precedence over `$DKIM_private`. + * + * @var string + */ + public $DKIM_private_string = ''; + /** + * Callback Action function name. + * + * The function that handles the result of the send email action. + * It is called out by send() for each email sent. + * + * Value can be any php callable: https://www.php.net/is_callable + * + * Parameters: + * bool $result result of the send action + * array $to email addresses of the recipients + * array $cc cc email addresses + * array $bcc bcc email addresses + * string $subject the subject + * string $body the email body + * string $from email address of sender + * string $extra extra information of possible use + * 'smtp_transaction_id' => last smtp transaction id + * + * @var callable|callable-string + */ + public $action_function = ''; + /** + * What to put in the X-Mailer header. + * Options: An empty string for PHPMailer default, whitespace/null for none, or a string to use. + * + * @var string|null + */ + public $XMailer = ''; + /** + * Which validator to use by default when validating email addresses. + * May be a callable to inject your own validator, but there are several built-in validators. + * The default validator uses PHP's FILTER_VALIDATE_EMAIL filter_var option. + * + * If CharSet is UTF8, the validator is left at the default value, + * and you send to addresses that use non-ASCII local parts, then + * PHPMailer automatically changes to the 'eai' validator. + * + * @see PHPMailer::validateAddress() + * + * @var string|callable + */ + public static $validator = 'php'; + /** + * An instance of the SMTP sender class. + * + * @var SMTP + */ + protected $smtp; + /** + * The array of 'to' names and addresses. + * + * @var array + */ + protected $to = []; + /** + * The array of 'cc' names and addresses. + * + * @var array + */ + protected $cc = []; + /** + * The array of 'bcc' names and addresses. + * + * @var array + */ + protected $bcc = []; + /** + * The array of reply-to names and addresses. + * + * @var array + */ + protected $ReplyTo = []; + /** + * An array of all kinds of addresses. + * Includes all of $to, $cc, $bcc. + * + * @see PHPMailer::$to + * @see PHPMailer::$cc + * @see PHPMailer::$bcc + * + * @var array + */ + protected $all_recipients = []; + /** + * An array of names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $all_recipients + * and one of $to, $cc, or $bcc. + * This array is used only for addresses with IDN. + * + * @see PHPMailer::$to + * @see PHPMailer::$cc + * @see PHPMailer::$bcc + * @see PHPMailer::$all_recipients + * + * @var array + */ + protected $RecipientsQueue = []; + /** + * An array of reply-to names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $ReplyTo. + * This array is used only for addresses with IDN. + * + * @see PHPMailer::$ReplyTo + * + * @var array + */ + protected $ReplyToQueue = []; + /** + * Whether the need for SMTPUTF8 has been detected. Set by + * preSend() if necessary. + * + * @var bool + */ + public $UseSMTPUTF8 = false; + /** + * The array of attachments. + * + * @var array + */ + protected $attachment = []; + /** + * The array of custom headers. + * + * @var array + */ + protected $CustomHeader = []; + /** + * The most recent Message-ID (including angular brackets). + * + * @var string + */ + protected $lastMessageID = ''; + /** + * The message's MIME type. + * + * @var string + */ + protected $message_type = ''; + /** + * The array of MIME boundary strings. + * + * @var array + */ + protected $boundary = []; + /** + * The array of available text strings for the current language. + * + * @var array + */ + protected static $language = []; + /** + * The number of errors encountered. + * + * @var int + */ + protected $error_count = 0; + /** + * The S/MIME certificate file path. + * + * @var string + */ + protected $sign_cert_file = ''; + /** + * The S/MIME key file path. + * + * @var string + */ + protected $sign_key_file = ''; + /** + * The optional S/MIME extra certificates ("CA Chain") file path. + * + * @var string + */ + protected $sign_extracerts_file = ''; + /** + * The S/MIME password for the key. + * Used only if the key is encrypted. + * + * @var string + */ + protected $sign_key_pass = ''; + /** + * Whether to throw exceptions for errors. + * + * @var bool + */ + protected $exceptions = false; + /** + * Unique ID used for message ID and boundaries. + * + * @var string + */ + protected $uniqueid = ''; + /** + * The PHPMailer Version number. + * + * @var string + */ + const VERSION = '7.0.0'; + /** + * Error severity: message only, continue processing. + * + * @var int + */ + const STOP_MESSAGE = 0; + /** + * Error severity: message, likely ok to continue processing. + * + * @var int + */ + const STOP_CONTINUE = 1; + /** + * Error severity: message, plus full stop, critical error reached. + * + * @var int + */ + const STOP_CRITICAL = 2; + /** + * The SMTP standard CRLF line break. + * If you want to change line break format, change static::$LE, not this. + */ + const CRLF = "\r\n"; + /** + * "Folding White Space" a white space string used for line folding. + */ + const FWS = ' '; + /** + * SMTP RFC standard line ending; Carriage Return, Line Feed. + * + * @var string + */ + protected static $LE = self::CRLF; + /** + * The maximum line length supported by mail(). + * + * Background: mail() will sometimes corrupt messages + * with headers longer than 65 chars, see #818. + * + * @var int + */ + const MAIL_MAX_LINE_LENGTH = 63; + /** + * The maximum line length allowed by RFC 2822 section 2.1.1. + * + * @var int + */ + const MAX_LINE_LENGTH = 998; + /** + * The lower maximum line length allowed by RFC 2822 section 2.1.1. + * This length does NOT include the line break + * 76 means that lines will be 77 or 78 chars depending on whether + * the line break format is LF or CRLF; both are valid. + * + * @var int + */ + const STD_LINE_LENGTH = 76; + /** + * Constructor. + * + * @param bool $exceptions Should we throw external exceptions? + */ + public function __construct($exceptions = null) + { + } + /** + * Destructor. + */ + public function __destruct() + { + } + /** + * Output debugging info via a user-defined method. + * Only generates output if debug output is enabled. + * + * @see PHPMailer::$Debugoutput + * @see PHPMailer::$SMTPDebug + * + * @param string $str + * @phpstan-return void + */ + protected function edebug($str) + { + } + /** + * Sets message type to HTML or plain. + * + * @param bool $isHtml True for HTML mode + */ + public function isHTML($isHtml = true) + { + } + /** + * Send messages using SMTP. + */ + public function isSMTP() + { + } + /** + * Send messages using PHP's mail() function. + */ + public function isMail() + { + } + /** + * Send messages using $Sendmail. + */ + public function isSendmail() + { + } + /** + * Send messages using qmail. + */ + public function isQmail() + { + } + /** + * Add a "To" address. + * + * @param string $address The email address to send to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addAddress($address, $name = '') + { + } + /** + * Add a "CC" address. + * + * @param string $address The email address to send to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addCC($address, $name = '') + { + } + /** + * Add a "BCC" address. + * + * @param string $address The email address to send to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addBCC($address, $name = '') + { + } + /** + * Add a "Reply-To" address. + * + * @param string $address The email address to reply to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addReplyTo($address, $name = '') + { + } + /** + * Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer + * can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still + * be modified after calling this function), addition of such addresses is delayed until send(). + * Addresses that have been added already return false, but do not throw exceptions. + * + * @param string $kind One of 'to', 'cc', 'bcc', or 'Reply-To' + * @param string $address The email address + * @param string $name An optional username associated with the address + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + * @phpstan-param 'to'|'cc'|'bcc'|'Reply-To' $kind + */ + protected function addOrEnqueueAnAddress($kind, $address, $name) + { + } + /** + * Set the boundaries to use for delimiting MIME parts. + * If you override this, ensure you set all 3 boundaries to unique values. + * The default boundaries include a "=_" sequence which cannot occur in quoted-printable bodies, + * as suggested by https://www.rfc-editor.org/rfc/rfc2045#section-6.7 + * + * @return void + */ + public function setBoundaries() + { + } + /** + * Add an address to one of the recipient arrays or to the ReplyTo array. + * Addresses that have been added already return false, but do not throw exceptions. + * + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + * @phpstan-param 'to'|'cc'|'bcc'|'ReplyTo' $kind + */ + protected function addAnAddress($kind, $address, $name = '') + { + } + /** + * Parse and validate a string containing one or more RFC822-style comma-separated email addresses + * of the form "display name
" into an array of name/address pairs. + * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. + * Note that quotes in the name part are removed. + * + * @see https://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation + * + * @param string $addrstr The address list string + * @param null $useimap Deprecated argument since 6.11.0. + * @param string $charset The charset to use when decoding the address list string. + * + * @return array + */ + public static function parseAddresses($addrstr, $useimap = null, $charset = self::CHARSET_ISO88591) + { + } + /** + * Parse a string containing one or more RFC822-style comma-separated email addresses + * with the form "display name
" into an array of name/address pairs. + * Uses a simpler parser that does not require the IMAP extension but doesnt support + * the full RFC822 spec. For full RFC822 support, use the PHP IMAP extension. + * + * @param string $addrstr The address list string + * @param string $charset The charset to use when decoding the address list string. + * + * @return array + */ + protected static function parseSimplerAddresses($addrstr, $charset) + { + } + /** + * Set the From and FromName properties. + * + * @param string $address + * @param string $name + * @param bool $auto Whether to also set the Sender address, defaults to true + * + * @throws Exception + * + * @return bool + */ + public function setFrom($address, $name = '', $auto = true) + { + } + /** + * Return the Message-ID header of the last email. + * Technically this is the value from the last time the headers were created, + * but it's also the message ID of the last sent message except in + * pathological cases. + * + * @return string + */ + public function getLastMessageID() + { + } + /** + * Check that a string looks like an email address. + * Validation patterns supported: + * * `auto` Pick best pattern automatically; + * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0; + * * `pcre` Use old PCRE implementation; + * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; + * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. + * * `eai` Use a pattern similar to the HTML5 spec for 'email' and to firefox, extended to support EAI (RFC6530). + * * `noregex` Don't use a regex: super fast, really dumb. + * Alternatively you may pass in a callable to inject your own validator, for example: + * + * ```php + * PHPMailer::validateAddress('user@example.com', function($address) { + * return (strpos($address, '@') !== false); + * }); + * ``` + * + * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. + * + * @param string $address The email address to check + * @param string|callable $patternselect Which pattern to use + * + * @return bool + */ + public static function validateAddress($address, $patternselect = null) + { + } + /** + * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the + * `intl` and `mbstring` PHP extensions. + * + * @return bool `true` if required functions for IDN support are present + */ + public static function idnSupported() + { + } + /** + * Converts IDN in given email address to its ASCII form, also known as punycode, if possible. + * Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. + * This function silently returns unmodified address if: + * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) + * - Conversion to punycode is impossible (e.g. required PHP functions are not available) + * or fails for any reason (e.g. domain contains characters not allowed in an IDN). + * + * @see PHPMailer::$CharSet + * + * @param string $address The email address to convert + * + * @return string The encoded address in ASCII form + */ + public function punyencodeAddress($address) + { + } + /** + * Create a message and send it. + * Uses the sending method specified by $Mailer. + * + * @throws Exception + * + * @return bool false on error - See the ErrorInfo property for details of the error + */ + public function send() + { + } + /** + * Prepare a message for sending. + * + * @throws Exception + * + * @return bool + */ + public function preSend() + { + } + /** + * Actually send a message via the selected mechanism. + * + * @throws Exception + * + * @return bool + */ + public function postSend() + { + } + /** + * Send mail using the $Sendmail program. + * + * @see PHPMailer::$Sendmail + * + * @param string $header The message headers + * @param string $body The message body + * + * @throws Exception + * + * @return bool + */ + protected function sendmailSend($header, $body) + { + } + /** + * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters. + * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows. + * + * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report + * + * @param string $string The string to be validated + * + * @return bool + */ + protected static function isShellSafe($string) + { + } + /** + * Check whether a file path is of a permitted type. + * Used to reject URLs and phar files from functions that access local file paths, + * such as addAttachment. + * + * @param string $path A relative or absolute path to a file + * + * @return bool + */ + protected static function isPermittedPath($path) + { + } + /** + * Check whether a file path is safe, accessible, and readable. + * + * @param string $path A relative or absolute path to a file + * + * @return bool + */ + protected static function fileIsAccessible($path) + { + } + /** + * Send mail using the PHP mail() function. + * + * @see https://www.php.net/manual/en/book.mail.php + * + * @param string $header The message headers + * @param string $body The message body + * + * @throws Exception + * + * @return bool + */ + protected function mailSend($header, $body) + { + } + /** + * Get an instance to use for SMTP operations. + * Override this function to load your own SMTP implementation, + * or set one with setSMTPInstance. + * + * @return SMTP + */ + public function getSMTPInstance() + { + } + /** + * Provide an instance to use for SMTP operations. + * + * @return SMTP + */ + public function setSMTPInstance(\PHPMailer\PHPMailer\SMTP $smtp) + { + } + /** + * Provide SMTP XCLIENT attributes + * + * @param string $name Attribute name + * @param ?string $value Attribute value + * + * @return bool + */ + public function setSMTPXclientAttribute($name, $value) + { + } + /** + * Get SMTP XCLIENT attributes + * + * @return array + */ + public function getSMTPXclientAttributes() + { + } + /** + * Send mail via SMTP. + * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. + * + * @see PHPMailer::setSMTPInstance() to use a different class. + * + * @uses \PHPMailer\PHPMailer\SMTP + * + * @param string $header The message headers + * @param string $body The message body + * + * @throws Exception + * + * @return bool + */ + protected function smtpSend($header, $body) + { + } + /** + * Initiate a connection to an SMTP server. + * Returns false if the operation failed. + * + * @param array $options An array of options compatible with stream_context_create() + * + * @throws Exception + * + * @uses \PHPMailer\PHPMailer\SMTP + * + * @return bool + */ + public function smtpConnect($options = null) + { + } + /** + * Close the active SMTP session if one exists. + */ + public function smtpClose() + { + } + /** + * Set the language for error messages. + * The default language is English. + * + * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") + * Optionally, the language code can be enhanced with a 4-character + * script annotation and/or a 2-character country annotation. + * @param string $lang_path Path to the language file directory, with trailing separator (slash) + * Do not set this from user input! + * + * @return bool Returns true if the requested language was loaded, false otherwise. + */ + public static function setLanguage($langcode = 'en', $lang_path = '') + { + } + /** + * Get the array of strings for the current language. + * + * @return array + */ + public function getTranslations() + { + } + /** + * Create recipient headers. + * + * @param string $type + * @param array $addr An array of recipients, + * where each recipient is a 2-element indexed array with element 0 containing an address + * and element 1 containing a name, like: + * [['joe@example.com', 'Joe User'], ['zoe@example.com', 'Zoe User']] + * + * @return string + */ + public function addrAppend($type, $addr) + { + } + /** + * Format an address for use in a message header. + * + * @param array $addr A 2-element indexed array, element 0 containing an address, element 1 containing a name like + * ['joe@example.com', 'Joe User'] + * + * @return string + */ + public function addrFormat($addr) + { + } + /** + * Word-wrap message. + * For use with mailers that do not automatically perform wrapping + * and for quoted-printable encoded messages. + * Original written by philippe. + * + * @param string $message The message to wrap + * @param int $length The line length to wrap to + * @param bool $qp_mode Whether to run in Quoted-Printable mode + * + * @return string + */ + public function wrapText($message, $length, $qp_mode = false) + { + } + /** + * Find the last character boundary prior to $maxLength in a utf-8 + * quoted-printable encoded string. + * Original written by Colin Brown. + * + * @param string $encodedText utf-8 QP text + * @param int $maxLength Find the last character boundary prior to this length + * + * @return int + */ + public function utf8CharBoundary($encodedText, $maxLength) + { + } + /** + * Apply word wrapping to the message body. + * Wraps the message body to the number of chars set in the WordWrap property. + * You should only do this to plain-text bodies as wrapping HTML tags may break them. + * This is called automatically by createBody(), so you don't need to call it yourself. + * @phpstan-return void + */ + public function setWordWrap() + { + } + /** + * Assemble message headers. + * + * @return string The assembled headers + */ + public function createHeader() + { + } + /** + * Get the message MIME type headers. + * + * @return string + */ + public function getMailMIME() + { + } + /** + * Returns the whole MIME message. + * Includes complete headers and body. + * Only valid post preSend(). + * + * @see PHPMailer::preSend() + * + * @return string + */ + public function getSentMIMEMessage() + { + } + /** + * Create a unique ID to use for boundaries. + * + * @return string + */ + protected function generateId() + { + } + /** + * Assemble the message body. + * Returns an empty string on failure. + * + * @throws Exception + * + * @return string The assembled message body + */ + public function createBody() + { + } + /** + * Get the boundaries that this message will use + * @return array + */ + public function getBoundaries() + { + } + /** + * Return the start of a message boundary. + * + * @param string $boundary + * @param string $charSet + * @param string $contentType + * @param string $encoding + * + * @return string + */ + protected function getBoundary($boundary, $charSet, $contentType, $encoding) + { + } + /** + * Return the end of a message boundary. + * + * @param string $boundary + * + * @return string + */ + protected function endBoundary($boundary) + { + } + /** + * Set the message type. + * PHPMailer only supports some preset message types, not arbitrary MIME structures. + */ + protected function setMessageType() + { + } + /** + * Format a header line. + * + * @param string $name + * @param string|int $value + * + * @return string + */ + public function headerLine($name, $value) + { + } + /** + * Return a formatted mail line. + * + * @param string $value + * + * @return string + */ + public function textLine($value) + { + } + /** + * Add an attachment from a path on the filesystem. + * Never use a user-supplied path to a file! + * Returns false if the file could not be found or read. + * Explicitly *does not* support passing URLs; PHPMailer is not an HTTP client. + * If you need to do that, fetch the resource yourself and pass it in via a local file or string. + * + * @param string $path Path to the attachment + * @param string $name Overrides the attachment name + * @param string $encoding File encoding (see $Encoding) + * @param string $type MIME type, e.g. `image/jpeg`; determined automatically from $path if not specified + * @param string $disposition Disposition to use + * + * @throws Exception + * + * @return bool + */ + public function addAttachment($path, $name = '', $encoding = self::ENCODING_BASE64, $type = '', $disposition = 'attachment') + { + } + /** + * Return the array of attachments. + * + * @return array + */ + public function getAttachments() + { + } + /** + * Attach all file, string, and binary attachments to the message. + * Returns an empty string on failure. + * + * @param string $disposition_type + * @param string $boundary + * + * @throws Exception + * + * @return string + */ + protected function attachAll($disposition_type, $boundary) + { + } + /** + * Encode a file attachment in requested format. + * Returns an empty string on failure. + * + * @param string $path The full path to the file + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * + * @return string + */ + protected function encodeFile($path, $encoding = self::ENCODING_BASE64) + { + } + /** + * Encode a string in requested format. + * Returns an empty string on failure. + * + * @param string $str The text to encode + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * + * @throws Exception + * + * @return string + */ + public function encodeString($str, $encoding = self::ENCODING_BASE64) + { + } + /** + * Encode a header value (not including its label) optimally. + * Picks shortest of Q, B, or none. Result includes folding if needed. + * See RFC822 definitions for phrase, comment and text positions, + * and RFC2047 for inline encodings. + * + * @param string $str The header value to encode + * @param string $position What context the string will be used in + * + * @return string + */ + public function encodeHeader($str, $position = 'text') + { + } + /** + * Decode an RFC2047-encoded header value + * Attempts multiple strategies so it works even when the mbstring extension is disabled. + * + * @param string $value The header value to decode + * @param string $charset The target charset to convert to, defaults to ISO-8859-1 for BC + * + * @return string The decoded header value + */ + public static function decodeHeader($value, $charset = self::CHARSET_ISO88591) + { + } + /** + * Check if a string contains multi-byte characters. + * + * @param string $str multi-byte text to wrap encode + * + * @return bool + */ + public function hasMultiBytes($str) + { + } + /** + * Does a string contain any 8-bit chars (in any charset)? + * + * @param string $text + * + * @return bool + */ + public function has8bitChars($text) + { + } + /** + * Encode and wrap long multibyte strings for mail headers + * without breaking lines within a character. + * Adapted from a function by paravoid. + * + * @see https://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283 + * + * @param string $str multi-byte text to wrap encode + * @param string $linebreak string to use as linefeed/end-of-line + * + * @return string + */ + public function base64EncodeWrapMB($str, $linebreak = null) + { + } + /** + * Encode a string in quoted-printable format. + * According to RFC2045 section 6.7. + * + * @param string $string The text to encode + * + * @return string + */ + public function encodeQP($string) + { + } + /** + * Encode a string using Q encoding. + * + * @see https://www.rfc-editor.org/rfc/rfc2047#section-4.2 + * + * @param string $str the text to encode + * @param string $position Where the text is going to be used, see the RFC for what that means + * + * @return string + */ + public function encodeQ($str, $position = 'text') + { + } + /** + * Add a string or binary attachment (non-filesystem). + * This method can be used to attach ascii or binary data, + * such as a BLOB record from a database. + * + * @param string $string String attachment data + * @param string $filename Name of the attachment + * @param string $encoding File encoding (see $Encoding) + * @param string $type File extension (MIME) type + * @param string $disposition Disposition to use + * + * @throws Exception + * + * @return bool True on successfully adding an attachment + */ + public function addStringAttachment($string, $filename, $encoding = self::ENCODING_BASE64, $type = '', $disposition = 'attachment') + { + } + /** + * Add an embedded (inline) attachment from a file. + * This can include images, sounds, and just about any other document type. + * These differ from 'regular' attachments in that they are intended to be + * displayed inline with the message, not just attached for download. + * This is used in HTML messages that embed the images + * the HTML refers to using the `$cid` value in `img` tags, for example ``. + * Never use a user-supplied path to a file! + * + * @param string $path Path to the attachment + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML + * @param string $name Overrides the attachment filename + * @param string $encoding File encoding (see $Encoding) defaults to `base64` + * @param string $type File MIME type (by default mapped from the `$path` filename's extension) + * @param string $disposition Disposition to use: `inline` (default) or `attachment` + * (unlikely you want this – {@see `addAttachment()`} instead) + * + * @return bool True on successfully adding an attachment + * @throws Exception + * + */ + public function addEmbeddedImage($path, $cid, $name = '', $encoding = self::ENCODING_BASE64, $type = '', $disposition = 'inline') + { + } + /** + * Add an embedded stringified attachment. + * This can include images, sounds, and just about any other document type. + * If your filename doesn't contain an extension, be sure to set the $type to an appropriate MIME type. + * + * @param string $string The attachment binary data + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML + * @param string $name A filename for the attachment. If this contains an extension, + * PHPMailer will attempt to set a MIME type for the attachment. + * For example 'file.jpg' would get an 'image/jpeg' MIME type. + * @param string $encoding File encoding (see $Encoding), defaults to 'base64' + * @param string $type MIME type - will be used in preference to any automatically derived type + * @param string $disposition Disposition to use + * + * @throws Exception + * + * @return bool True on successfully adding an attachment + */ + public function addStringEmbeddedImage($string, $cid, $name = '', $encoding = self::ENCODING_BASE64, $type = '', $disposition = 'inline') + { + } + /** + * Validate encodings. + * + * @param string $encoding + * + * @return bool + */ + protected function validateEncoding($encoding) + { + } + /** + * Check if an embedded attachment is present with this cid. + * + * @param string $cid + * + * @return bool + */ + protected function cidExists($cid) + { + } + /** + * Check if an inline attachment is present. + * + * @return bool + */ + public function inlineImageExists() + { + } + /** + * Check if an attachment (non-inline) is present. + * + * @return bool + */ + public function attachmentExists() + { + } + /** + * Check if this message has an alternative body set. + * + * @return bool + */ + public function alternativeExists() + { + } + /** + * Clear queued addresses of given kind. + * + * @param string $kind 'to', 'cc', or 'bcc' + */ + public function clearQueuedAddresses($kind) + { + } + /** + * Clear all To recipients. + */ + public function clearAddresses() + { + } + /** + * Clear all CC recipients. + */ + public function clearCCs() + { + } + /** + * Clear all BCC recipients. + */ + public function clearBCCs() + { + } + /** + * Clear all ReplyTo recipients. + */ + public function clearReplyTos() + { + } + /** + * Clear all recipient types. + */ + public function clearAllRecipients() + { + } + /** + * Clear all filesystem, string, and binary attachments. + */ + public function clearAttachments() + { + } + /** + * Clear all custom headers. + */ + public function clearCustomHeaders() + { + } + /** + * Clear a specific custom header by name or name and value. + * $name value can be overloaded to contain + * both header name and value (name:value). + * + * @param string $name Custom header name + * @param string|null $value Header value + * + * @return bool True if a header was replaced successfully + */ + public function clearCustomHeader($name, $value = null) + { + } + /** + * Replace a custom header. + * $name value can be overloaded to contain + * both header name and value (name:value). + * + * @param string $name Custom header name + * @param string|null $value Header value + * + * @return bool True if a header was replaced successfully + * @throws Exception + */ + public function replaceCustomHeader($name, $value = null) + { + } + /** + * Add an error message to the error container. + * + * @param string $msg + */ + protected function setError($msg) + { + } + /** + * Return an RFC 822 formatted date. + * + * @return string + */ + public static function rfcDate() + { + } + /** + * Get the server hostname. + * Returns 'localhost.localdomain' if unknown. + * + * @return string + */ + protected function serverHostname() + { + } + /** + * Validate whether a string contains a valid value to use as a hostname or IP address. + * IPv6 addresses must include [], e.g. `[::1]`, not just `::1`. + * + * @param string $host The host name or IP address to check + * + * @return bool + */ + public static function isValidHost($host) + { + } + /** + * Check whether the supplied address uses Unicode in the local part. + * + * @return bool + */ + protected function addressHasUnicodeLocalPart($address) + { + } + /** + * Check whether any of the supplied addresses use Unicode in the local part. + * + * @return bool + */ + protected function anyAddressHasUnicodeLocalPart($addresses) + { + } + /** + * Check whether the message requires SMTPUTF8 based on what's known so far. + * + * @return bool + */ + public function needsSMTPUTF8() + { + } + /** + * Get an error message in the current language. + * + * @param string $key + * + * @return string + */ + protected static function lang($key) + { + } + /** + * Check if an error occurred. + * + * @return bool True if an error did occur + */ + public function isError() + { + } + /** + * Add a custom header. + * $name value can be overloaded to contain + * both header name and value (name:value). + * + * @param string $name Custom header name + * @param string|null $value Header value + * + * @return bool True if a header was set successfully + * @throws Exception + */ + public function addCustomHeader($name, $value = null) + { + } + /** + * Returns all custom headers. + * + * @return array + */ + public function getCustomHeaders() + { + } + /** + * Create a message body from an HTML string. + * Automatically inlines images and creates a plain-text version by converting the HTML, + * overwriting any existing values in Body and AltBody. + * Do not source $message content from user input! + * $basedir is prepended when handling relative URLs, e.g. and must not be empty + * will look for an image file in $basedir/images/a.png and convert it to inline. + * If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email) + * Converts data-uri images into embedded attachments. + * If you don't want to apply these transformations to your HTML, just set Body and AltBody directly. + * + * @param string $message HTML message string + * @param string $basedir Absolute path to a base directory to prepend to relative paths to images + * @param bool|callable $advanced Whether to use the internal HTML to text converter + * or your own custom converter + * @return string The transformed message body + * + * @throws Exception + * + * @see PHPMailer::html2text() + */ + public function msgHTML($message, $basedir = '', $advanced = false) + { + } + /** + * Convert an HTML string into plain text. + * This is used by msgHTML(). + * Note - older versions of this function used a bundled advanced converter + * which was removed for license reasons in #232. + * Example usage: + * + * ```php + * //Use default conversion + * $plain = $mail->html2text($html); + * //Use your own custom converter + * $plain = $mail->html2text($html, function($html) { + * $converter = new MyHtml2text($html); + * return $converter->get_text(); + * }); + * ``` + * + * @param string $html The HTML text to convert + * @param bool|callable $advanced Any boolean value to use the internal converter, + * or provide your own callable for custom conversion. + * *Never* pass user-supplied data into this parameter + * + * @return string + */ + public function html2text($html, $advanced = false) + { + } + /** + * Get the MIME type for a file extension. + * + * @param string $ext File extension + * + * @return string MIME type of file + */ + public static function _mime_types($ext = '') + { + } + /** + * Map a file name to a MIME type. + * Defaults to 'application/octet-stream', i.e.. arbitrary binary data. + * + * @param string $filename A file name or full path, does not need to exist as a file + * + * @return string + */ + public static function filenameToType($filename) + { + } + /** + * Multi-byte-safe pathinfo replacement. + * Drop-in replacement for pathinfo(), but multibyte- and cross-platform-safe. + * + * @see https://www.php.net/manual/en/function.pathinfo.php#107461 + * + * @param string $path A filename or path, does not need to exist as a file + * @param int|string $options Either a PATHINFO_* constant, + * or a string name to return only the specified piece + * + * @return string|array + */ + public static function mb_pathinfo($path, $options = null) + { + } + /** + * Set or reset instance properties. + * You should avoid this function - it's more verbose, less efficient, more error-prone and + * harder to debug than setting properties directly. + * Usage Example: + * `$mail->set('SMTPSecure', static::ENCRYPTION_STARTTLS);` + * is the same as: + * `$mail->SMTPSecure = static::ENCRYPTION_STARTTLS;`. + * + * @param string $name The property name to set + * @param mixed $value The value to set the property to + * + * @return bool + */ + public function set($name, $value = '') + { + } + /** + * Strip newlines to prevent header injection. + * + * @param string $str + * + * @return string + */ + public function secureHeader($str) + { + } + /** + * Normalize line breaks in a string. + * Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format. + * Defaults to CRLF (for message bodies) and preserves consecutive breaks. + * + * @param string $text + * @param string $breaktype What kind of line break to use; defaults to static::$LE + * + * @return string + */ + public static function normalizeBreaks($text, $breaktype = null) + { + } + /** + * Remove trailing whitespace from a string. + * + * @param string $text + * + * @return string The text to remove whitespace from + */ + public static function stripTrailingWSP($text) + { + } + /** + * Strip trailing line breaks from a string. + * + * @param string $text + * + * @return string The text to remove breaks from + */ + public static function stripTrailingBreaks($text) + { + } + /** + * Return the current line break format string. + * + * @return string + */ + public static function getLE() + { + } + /** + * Set the line break format string, e.g. "\r\n". + * + * @param string $le + */ + protected static function setLE($le) + { + } + /** + * Set the public and private key files and password for S/MIME signing. + * + * @param string $cert_filename + * @param string $key_filename + * @param string $key_pass Password for private key + * @param string $extracerts_filename Optional path to chain certificate + */ + public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '') + { + } + /** + * Quoted-Printable-encode a DKIM header. + * + * @param string $txt + * + * @return string + */ + public function DKIM_QP($txt) + { + } + /** + * Generate a DKIM signature. + * + * @param string $signHeader + * + * @throws Exception + * + * @return string The DKIM signature value + */ + public function DKIM_Sign($signHeader) + { + } + /** + * Generate a DKIM canonicalization header. + * Uses the 'relaxed' algorithm from RFC6376 section 3.4.2. + * Canonicalized headers should *always* use CRLF, regardless of mailer setting. + * + * @see https://www.rfc-editor.org/rfc/rfc6376#section-3.4.2 + * + * @param string $signHeader Header + * + * @return string + */ + public function DKIM_HeaderC($signHeader) + { + } + /** + * Generate a DKIM canonicalization body. + * Uses the 'simple' algorithm from RFC6376 section 3.4.3. + * Canonicalized bodies should *always* use CRLF, regardless of mailer setting. + * + * @see https://www.rfc-editor.org/rfc/rfc6376#section-3.4.3 + * + * @param string $body Message Body + * + * @return string + */ + public function DKIM_BodyC($body) + { + } + /** + * Create the DKIM header and body in a new message header. + * + * @param string $headers_line Header lines + * @param string $subject Subject + * @param string $body Body + * + * @throws Exception + * + * @return string + */ + public function DKIM_Add($headers_line, $subject, $body) + { + } + /** + * Detect if a string contains a line longer than the maximum line length + * allowed by RFC 2822 section 2.1.1. + * + * @param string $str + * + * @return bool + */ + public static function hasLineLongerThanMax($str) + { + } + /** + * If a string contains any "special" characters, double-quote the name, + * and escape any double quotes with a backslash. + * + * @param string $str + * + * @return string + * + * @see RFC822 3.4.1 + */ + public static function quotedString($str) + { + } + /** + * Allows for public read access to 'to' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getToAddresses() + { + } + /** + * Allows for public read access to 'cc' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getCcAddresses() + { + } + /** + * Allows for public read access to 'bcc' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getBccAddresses() + { + } + /** + * Allows for public read access to 'ReplyTo' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getReplyToAddresses() + { + } + /** + * Allows for public read access to 'all_recipients' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getAllRecipientAddresses() + { + } + /** + * Perform a callback. + * + * @param bool $isSent + * @param array $to + * @param array $cc + * @param array $bcc + * @param string $subject + * @param string $body + * @param string $from + * @param array $extra + */ + protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from, $extra) + { + } + /** + * Get the OAuthTokenProvider instance. + * + * @return OAuthTokenProvider + */ + public function getOAuth() + { + } + /** + * Set an OAuthTokenProvider instance. + */ + public function setOAuth(\PHPMailer\PHPMailer\OAuthTokenProvider $oauth) + { + } + } + /** + * PHPMailer POP-Before-SMTP Authentication Class. + * Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication. + * 1) This class does not support APOP authentication. + * 2) Opening and closing lots of POP3 connections can be quite slow. If you need + * to send a batch of emails then just perform the authentication once at the start, + * and then loop through your mail sending script. Providing this process doesn't + * take longer than the verification period lasts on your POP3 server, you should be fine. + * 3) This is really ancient technology; you should only need to use it to talk to very old systems. + * 4) This POP3 class is deliberately lightweight and incomplete, implementing just + * enough to do authentication. + * If you want a more complete class there are other POP3 classes for PHP available. + * + * @author Richard Davey (original author) + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + */ + class POP3 + { + /** + * The POP3 PHPMailer Version number. + * + * @var string + */ + const VERSION = '7.0.0'; + /** + * Default POP3 port number. + * + * @var int + */ + const DEFAULT_PORT = 110; + /** + * Default timeout in seconds. + * + * @var int + */ + const DEFAULT_TIMEOUT = 30; + /** + * POP3 class debug output mode. + * Debug output level. + * Options: + * @see POP3::DEBUG_OFF: No output + * @see POP3::DEBUG_SERVER: Server messages, connection/server errors + * @see POP3::DEBUG_CLIENT: Client and Server messages, connection/server errors + * + * @var int + */ + public $do_debug = self::DEBUG_OFF; + /** + * POP3 mail server hostname. + * + * @var string + */ + public $host; + /** + * POP3 port number. + * + * @var int + */ + public $port; + /** + * POP3 Timeout Value in seconds. + * + * @var int + */ + public $tval; + /** + * POP3 username. + * + * @var string + */ + public $username; + /** + * POP3 password. + * + * @var string + */ + public $password; + /** + * Resource handle for the POP3 connection socket. + * + * @var resource + */ + protected $pop_conn; + /** + * Are we connected? + * + * @var bool + */ + protected $connected = false; + /** + * Error container. + * + * @var array + */ + protected $errors = []; + /** + * Line break constant. + */ + const LE = "\r\n"; + /** + * Debug level for no output. + * + * @var int + */ + const DEBUG_OFF = 0; + /** + * Debug level to show server -> client messages + * also shows clients connection errors or errors from server + * + * @var int + */ + const DEBUG_SERVER = 1; + /** + * Debug level to show client -> server and server -> client messages. + * + * @var int + */ + const DEBUG_CLIENT = 2; + /** + * Simple static wrapper for all-in-one POP before SMTP. + * + * @param string $host The hostname to connect to + * @param int|bool $port The port number to connect to + * @param int|bool $timeout The timeout value + * @param string $username + * @param string $password + * @param int $debug_level + * + * @return bool + */ + public static function popBeforeSmtp($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0) + { + } + /** + * Authenticate with a POP3 server. + * A connect, login, disconnect sequence + * appropriate for POP-before SMTP authorisation. + * + * @param string $host The hostname to connect to + * @param int|bool $port The port number to connect to + * @param int|bool $timeout The timeout value + * @param string $username + * @param string $password + * @param int $debug_level + * + * @return bool + */ + public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0) + { + } + /** + * Connect to a POP3 server. + * + * @param string $host + * @param int|bool $port + * @param int $tval + * + * @return bool + */ + public function connect($host, $port = false, $tval = 30) + { + } + /** + * Log in to the POP3 server. + * Does not support APOP (RFC 2828, 4949). + * + * @param string $username + * @param string $password + * + * @return bool + */ + public function login($username = '', $password = '') + { + } + /** + * Disconnect from the POP3 server. + * @phpstan-return void + */ + public function disconnect() + { + } + /** + * Get a response from the POP3 server. + * + * @param int $size The maximum number of bytes to retrieve + * + * @return string + */ + protected function getResponse($size = 128) + { + } + /** + * Send raw data to the POP3 server. + * + * @param string $string + * + * @return int + */ + protected function sendString($string) + { + } + /** + * Checks the POP3 server response. + * Looks for for +OK or -ERR. + * + * @param string $string + * + * @return bool + */ + protected function checkResponse($string) + { + } + /** + * Add an error to the internal error store. + * Also display debug output if it's enabled. + * + * @param string $error + */ + protected function setError($error) + { + } + /** + * Get an array of error messages, if any. + * + * @return array + */ + public function getErrors() + { + } + /** + * POP3 connection error handler. + * + * @param int $errno + * @param string $errstr + * @param string $errfile + * @param int $errline + */ + protected function catchWarning($errno, $errstr, $errfile, $errline) + { + } + } + /** + * PHPMailer RFC821 SMTP email transport class. + * Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server. + * + * @author Chris Ryan + * @author Marcus Bointon + */ + class SMTP + { + /** + * The PHPMailer SMTP version number. + * + * @var string + */ + const VERSION = '7.0.0'; + /** + * SMTP line break constant. + * + * @var string + */ + const LE = "\r\n"; + /** + * The SMTP port to use if one is not specified. + * + * @var int + */ + const DEFAULT_PORT = 25; + /** + * The SMTPs port to use if one is not specified. + * + * @var int + */ + const DEFAULT_SECURE_PORT = 465; + /** + * The maximum line length allowed by RFC 5321 section 4.5.3.1.6, + * *excluding* a trailing CRLF break. + * + * @see https://www.rfc-editor.org/rfc/rfc5321#section-4.5.3.1.6 + * + * @var int + */ + const MAX_LINE_LENGTH = 998; + /** + * The maximum line length allowed for replies in RFC 5321 section 4.5.3.1.5, + * *including* a trailing CRLF line break. + * + * @see https://www.rfc-editor.org/rfc/rfc5321#section-4.5.3.1.5 + * + * @var int + */ + const MAX_REPLY_LENGTH = 512; + /** + * Debug level for no output. + * + * @var int + */ + const DEBUG_OFF = 0; + /** + * Debug level to show client -> server messages. + * + * @var int + */ + const DEBUG_CLIENT = 1; + /** + * Debug level to show client -> server and server -> client messages. + * + * @var int + */ + const DEBUG_SERVER = 2; + /** + * Debug level to show connection status, client -> server and server -> client messages. + * + * @var int + */ + const DEBUG_CONNECTION = 3; + /** + * Debug level to show all messages. + * + * @var int + */ + const DEBUG_LOWLEVEL = 4; + /** + * Debug output level. + * Options: + * * self::DEBUG_OFF (`0`) No debug output, default + * * self::DEBUG_CLIENT (`1`) Client commands + * * self::DEBUG_SERVER (`2`) Client commands and server responses + * * self::DEBUG_CONNECTION (`3`) As DEBUG_SERVER plus connection status + * * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages. + * + * @var int + */ + public $do_debug = self::DEBUG_OFF; + /** + * How to handle debug output. + * Options: + * * `echo` Output plain-text as-is, appropriate for CLI + * * `html` Output escaped, line breaks converted to `
`, appropriate for browser output + * * `error_log` Output to error log as configured in php.ini + * Alternatively, you can provide a callable expecting two params: a message string and the debug level: + * + * ```php + * $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; + * ``` + * + * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` + * level output is used: + * + * ```php + * $mail->Debugoutput = new myPsr3Logger; + * ``` + * + * @var string|callable|\Psr\Log\LoggerInterface + */ + public $Debugoutput = 'echo'; + /** + * Whether to use VERP. + * + * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path + * @see https://www.postfix.org/VERP_README.html Info on VERP + * + * @var bool + */ + public $do_verp = false; + /** + * Whether to use SMTPUTF8. + * + * @see https://www.rfc-editor.org/rfc/rfc6531 + * + * @var bool + */ + public $do_smtputf8 = false; + /** + * The timeout value for connection, in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. + * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure. + * + * @see https://www.rfc-editor.org/rfc/rfc2821#section-4.5.3.2 + * + * @var int + */ + public $Timeout = 300; + /** + * How long to wait for commands to complete, in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. + * + * @var int + */ + public $Timelimit = 300; + /** + * Patterns to extract an SMTP transaction id from reply to a DATA command. + * The first capture group in each regex will be used as the ID. + * MS ESMTP returns the message ID, which may not be correct for internal tracking. + * + * @var string[] + */ + protected $smtp_transaction_id_patterns = ['exim' => '/[\d]{3} OK id=(.*)/', 'sendmail' => '/[\d]{3} 2\.0\.0 (.*) Message/', 'postfix' => '/[\d]{3} 2\.0\.0 Ok: queued as (.*)/', 'Microsoft_ESMTP' => '/[0-9]{3} 2\.[\d]\.0 (.*)@(?:.*) Queued mail for delivery/', 'Amazon_SES' => '/[\d]{3} Ok (.*)/', 'SendGrid' => '/[\d]{3} Ok: queued as (.*)/', 'CampaignMonitor' => '/[\d]{3} 2\.0\.0 OK:([a-zA-Z\d]{48})/', 'Haraka' => '/[\d]{3} Message Queued \((.*)\)/', 'ZoneMTA' => '/[\d]{3} Message queued as (.*)/', 'Mailjet' => '/[\d]{3} OK queued as (.*)/', 'Gsmtp' => '/[\d]{3} 2\.0\.0 OK (.*) - gsmtp/']; + /** + * Allowed SMTP XCLIENT attributes. + * Must be allowed by the SMTP server. EHLO response is not checked. + * + * @see https://www.postfix.org/XCLIENT_README.html + * + * @var array + */ + public static $xclient_allowed_attributes = ['NAME', 'ADDR', 'PORT', 'PROTO', 'HELO', 'LOGIN', 'DESTADDR', 'DESTPORT']; + /** + * The last transaction ID issued in response to a DATA command, + * if one was detected. + * + * @var string|bool|null + */ + protected $last_smtp_transaction_id; + /** + * The socket for the server connection. + * + * @var ?resource + */ + protected $smtp_conn; + /** + * Error information, if any, for the last SMTP command. + * + * @var array + */ + protected $error = ['error' => '', 'detail' => '', 'smtp_code' => '', 'smtp_code_ex' => '']; + /** + * The reply the server sent to us for HELO. + * If null, no HELO string has yet been received. + * + * @var string|null + */ + protected $helo_rply; + /** + * The set of SMTP extensions sent in reply to EHLO command. + * Indexes of the array are extension names. + * Value at index 'HELO' or 'EHLO' (according to command that was sent) + * represents the server name. In case of HELO it is the only element of the array. + * Other values can be boolean TRUE or an array containing extension options. + * If null, no HELO/EHLO string has yet been received. + * + * @var array|null + */ + protected $server_caps; + /** + * The most recent reply received from the server. + * + * @var string + */ + protected $last_reply = ''; + /** + * Output debugging info via a user-selected method. + * + * @param string $str Debug string to output + * @param int $level The debug level of this message; see DEBUG_* constants + * + * @see SMTP::$Debugoutput + * @see SMTP::$do_debug + * @phpstan-return void + */ + protected function edebug($str, $level = 0) + { + } + /** + * Connect to an SMTP server. + * + * @param string $host SMTP server IP or host name + * @param int $port The port number to connect to + * @param int $timeout How long to wait for the connection to open + * @param array $options An array of options for stream_context_create() + * + * @return bool + */ + public function connect($host, $port = null, $timeout = 30, $options = []) + { + } + /** + * Create connection to the SMTP server. + * + * @param string $host SMTP server IP or host name + * @param int $port The port number to connect to + * @param int $timeout How long to wait for the connection to open + * @param array $options An array of options for stream_context_create() + * + * @return false|resource + */ + protected function getSMTPConnection($host, $port = null, $timeout = 30, $options = []) + { + } + /** + * Initiate a TLS (encrypted) session. + * + * @return bool + */ + public function startTLS() + { + } + /** + * Perform SMTP authentication. + * Must be run after hello(). + * + * @see hello() + * + * @param string $username The user name + * @param string $password The password + * @param string $authtype The auth type (CRAM-MD5, PLAIN, LOGIN, XOAUTH2) + * @param OAuthTokenProvider $OAuth An optional OAuthTokenProvider instance for XOAUTH2 authentication + * + * @return bool True if successfully authenticated + */ + public function authenticate($username, $password, $authtype = null, $OAuth = null) + { + } + /** + * Calculate an MD5 HMAC hash. + * Works like hash_hmac('md5', $data, $key) + * in case that function is not available. + * + * @param string $data The data to hash + * @param string $key The key to hash with + * + * @return string + */ + protected function hmac($data, $key) + { + } + /** + * Check connection state. + * + * @return bool True if connected + */ + public function connected() + { + } + /** + * Close the socket and clean up the state of the class. + * Don't use this function without first trying to use QUIT. + * + * @see quit() + */ + public function close() + { + } + /** + * Send an SMTP DATA command. + * Issues a data command and sends the msg_data to the server, + * finalizing the mail transaction. $msg_data is the message + * that is to be sent with the headers. Each header needs to be + * on a single line followed by a with the message headers + * and the message body being separated by an additional . + * Implements RFC 821: DATA . + * + * @param string $msg_data Message data to send + * + * @return bool + */ + public function data($msg_data) + { + } + /** + * Send an SMTP HELO or EHLO command. + * Used to identify the sending server to the receiving server. + * This makes sure that client and server are in a known state. + * Implements RFC 821: HELO + * and RFC 2821 EHLO. + * + * @param string $host The host name or IP to connect to + * + * @return bool + */ + public function hello($host = '') + { + } + /** + * Send an SMTP HELO or EHLO command. + * Low-level implementation used by hello(). + * + * @param string $hello The HELO string + * @param string $host The hostname to say we are + * + * @return bool + * + * @see hello() + */ + protected function sendHello($hello, $host) + { + } + /** + * Parse a reply to HELO/EHLO command to discover server extensions. + * In case of HELO, the only parameter that can be discovered is a server name. + * + * @param string $type `HELO` or `EHLO` + */ + protected function parseHelloFields($type) + { + } + /** + * Send an SMTP MAIL command. + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more recipient + * commands may be called followed by a data command. + * Implements RFC 821: MAIL FROM: and + * two extensions, namely XVERP and SMTPUTF8. + * + * The server's EHLO response is not checked. If use of either + * extensions is enabled even though the server does not support + * that, mail submission will fail. + * + * XVERP is documented at https://www.postfix.org/VERP_README.html + * and SMTPUTF8 is specified in RFC 6531. + * + * @param string $from Source address of this message + * + * @return bool + */ + public function mail($from) + { + } + /** + * Send an SMTP QUIT command. + * Closes the socket if there is no error or the $close_on_error argument is true. + * Implements from RFC 821: QUIT . + * + * @param bool $close_on_error Should the connection close if an error occurs? + * + * @return bool + */ + public function quit($close_on_error = true) + { + } + /** + * Send an SMTP RCPT command. + * Sets the TO argument to $toaddr. + * Returns true if the recipient was accepted false if it was rejected. + * Implements from RFC 821: RCPT TO: . + * + * @param string $address The address the message is being sent to + * @param string $dsn Comma separated list of DSN notifications. NEVER, SUCCESS, FAILURE + * or DELAY. If you specify NEVER all other notifications are ignored. + * + * @return bool + */ + public function recipient($address, $dsn = '') + { + } + /** + * Send SMTP XCLIENT command to server and check its return code. + * + * @return bool True on success + */ + public function xclient(array $vars) + { + } + /** + * Send an SMTP RSET command. + * Abort any transaction that is currently in progress. + * Implements RFC 821: RSET . + * + * @return bool True on success + */ + public function reset() + { + } + /** + * Send a command to an SMTP server and check its return code. + * + * @param string $command The command name - not sent to the server + * @param string $commandstring The actual command to send + * @param int|array $expect One or more expected integer success codes + * + * @return bool True on success + */ + protected function sendCommand($command, $commandstring, $expect) + { + } + /** + * Send an SMTP SAML command. + * Starts a mail transaction from the email address specified in $from. + * Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more recipient + * commands may be called followed by a data command. This command + * will send the message to the users terminal if they are logged + * in and send them an email. + * Implements RFC 821: SAML FROM: . + * + * @param string $from The address the message is from + * + * @return bool + */ + public function sendAndMail($from) + { + } + /** + * Send an SMTP VRFY command. + * + * @param string $name The name to verify + * + * @return bool + */ + public function verify($name) + { + } + /** + * Send an SMTP NOOP command. + * Used to keep keep-alives alive, doesn't actually do anything. + * + * @return bool + */ + public function noop() + { + } + /** + * Send an SMTP TURN command. + * This is an optional command for SMTP that this class does not support. + * This method is here to make the RFC821 Definition complete for this class + * and _may_ be implemented in future. + * Implements from RFC 821: TURN . + * + * @return bool + */ + public function turn() + { + } + /** + * Send raw data to the server. + * + * @param string $data The data to send + * @param string $command Optionally, the command this is part of, used only for controlling debug output + * + * @return int|bool The number of bytes sent to the server or false on error + */ + public function client_send($data, $command = '') + { + } + /** + * Get the latest error. + * + * @return array + */ + public function getError() + { + } + /** + * Get SMTP extensions available on the server. + * + * @return array|null + */ + public function getServerExtList() + { + } + /** + * Get metadata about the SMTP server from its HELO/EHLO response. + * The method works in three ways, dependent on argument value and current state: + * 1. HELO/EHLO has not been sent - returns null and populates $this->error. + * 2. HELO has been sent - + * $name == 'HELO': returns server name + * $name == 'EHLO': returns boolean false + * $name == any other string: returns null and populates $this->error + * 3. EHLO has been sent - + * $name == 'HELO'|'EHLO': returns the server name + * $name == any other string: if extension $name exists, returns True + * or its options (e.g. AUTH mechanisms supported). Otherwise returns False. + * + * @param string $name Name of SMTP extension or 'HELO'|'EHLO' + * + * @return string|bool|null + */ + public function getServerExt($name) + { + } + /** + * Get the last reply from the server. + * + * @return string + */ + public function getLastReply() + { + } + /** + * Read the SMTP server's response. + * Either before eof or socket timeout occurs on the operation. + * With SMTP we can tell if we have more lines to read if the + * 4th character is '-' symbol. If it is a space then we don't + * need to read anything else. + * + * @return string + */ + protected function get_lines() + { + } + /** + * Enable or disable VERP address generation. + * + * @param bool $enabled + */ + public function setVerp($enabled = false) + { + } + /** + * Get VERP address generation mode. + * + * @return bool + */ + public function getVerp() + { + } + /** + * Enable or disable use of SMTPUTF8. + * + * @param bool $enabled + */ + public function setSMTPUTF8($enabled = false) + { + } + /** + * Get SMTPUTF8 use. + * + * @return bool + */ + public function getSMTPUTF8() + { + } + /** + * Set error messages and codes. + * + * @param string $message The error message + * @param string $detail Further detail on the error + * @param string $smtp_code An associated SMTP error code + * @param string $smtp_code_ex Extended SMTP code + */ + protected function setError($message, $detail = '', $smtp_code = '', $smtp_code_ex = '') + { + } + /** + * Set debug output method. + * + * @param string|callable $method The name of the mechanism to use for debugging output, or a callable to handle it + */ + public function setDebugOutput($method = 'echo') + { + } + /** + * Get debug output method. + * + * @return string + */ + public function getDebugOutput() + { + } + /** + * Set debug output level. + * + * @param int $level + */ + public function setDebugLevel($level = 0) + { + } + /** + * Get debug output level. + * + * @return int + */ + public function getDebugLevel() + { + } + /** + * Set SMTP timeout. + * + * @param int $timeout The timeout duration in seconds + */ + public function setTimeout($timeout = 0) + { + } + /** + * Get SMTP timeout. + * + * @return int + */ + public function getTimeout() + { + } + /** + * Reports an error number and string. + * + * @param int $errno The error number returned by PHP + * @param string $errmsg The error message returned by PHP + * @param string $errfile The file the error occurred in + * @param int $errline The line number the error occurred on + */ + protected function errorHandler($errno, $errmsg, $errfile = '', $errline = 0) + { + } + /** + * Extract and return the ID of the last SMTP transaction based on + * a list of patterns provided in SMTP::$smtp_transaction_id_patterns. + * Relies on the host providing the ID in response to a DATA command. + * If no reply has been received yet, it will return null. + * If no pattern was matched, it will return false. + * + * @return bool|string|null + */ + protected function recordLastTransactionID() + { + } + /** + * Get the queue/transaction ID of the last SMTP transaction + * If no reply has been received yet, it will return null. + * If no pattern was matched, it will return false. + * + * @return bool|string|null + * + * @see recordLastTransactionID() + */ + public function getLastTransactionID() + { + } + } +} +namespace WpOrg\Requests { + /** + * Authentication provider interface + * + * Implement this interface to act as an authentication provider. + * + * Parameters should be passed via the constructor where possible, as this + * makes it much easier for users to use your provider. + * + * @see \WpOrg\Requests\Hooks + * + * @package Requests\Authentication + */ + interface Auth + { + /** + * Register hooks as needed + * + * This method is called in {@see \WpOrg\Requests\Requests::request()} when the user + * has set an instance as the 'auth' option. Use this callback to register all the + * hooks you'll need. + * + * @see \WpOrg\Requests\Hooks::register() + * @param \WpOrg\Requests\Hooks $hooks Hook system + */ + public function register(\WpOrg\Requests\Hooks $hooks); + } +} +namespace WpOrg\Requests\Auth { + /** + * Basic Authentication provider + * + * Provides a handler for Basic HTTP authentication via the Authorization + * header. + * + * @package Requests\Authentication + */ + class Basic implements \WpOrg\Requests\Auth + { + /** + * Username + * + * @var string + */ + public $user; + /** + * Password + * + * @var string + */ + public $pass; + /** + * Constructor + * + * @since 2.0 Throws an `InvalidArgument` exception. + * @since 2.0 Throws an `ArgumentCount` exception instead of the Requests base `Exception. + * + * @param array|null $args Array of user and password. Must have exactly two elements + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not an array or null. + * @throws \WpOrg\Requests\Exception\ArgumentCount On incorrect number of array elements (`authbasicbadargs`). + * @phpstan-return void + */ + public function __construct($args = null) + { + } + /** + * Register the necessary callbacks + * + * @see \WpOrg\Requests\Auth\Basic::curl_before_send() + * @see \WpOrg\Requests\Auth\Basic::fsockopen_header() + * @param \WpOrg\Requests\Hooks $hooks Hook system + */ + public function register(\WpOrg\Requests\Hooks $hooks) + { + } + /** + * Set cURL parameters before the data is sent + * + * @param resource|\CurlHandle $handle cURL handle + */ + public function curl_before_send(&$handle) + { + } + /** + * Add extra headers to the request before sending + * + * @param string $out HTTP header string + */ + public function fsockopen_header(&$out) + { + } + /** + * Get the authentication string (user:pass) + * + * @return string + */ + public function getAuthString() + { + } + } +} +namespace WpOrg\Requests { + /** + * Autoloader for Requests for PHP. + * + * This autoloader supports the PSR-4 based Requests 2.0.0 classes in a case-sensitive manner + * as the most common server OS-es are case-sensitive and the file names are in mixed case. + * + * For the PSR-0 Requests 1.x BC-layer, requested classes will be treated case-insensitively. + * + * @package Requests + */ + final class Autoload + { + /** + * Register the autoloader. + * + * Note: the autoloader is *prepended* in the autoload queue. + * This is done to ensure that the Requests 2.0 autoloader takes precedence + * over a potentially (dependency-registered) Requests 1.x autoloader. + * + * @internal This method contains a safeguard against the autoloader being + * registered multiple times. This safeguard uses a global constant to + * (hopefully/in most cases) still function correctly, even if the + * class would be renamed. + * + * @return void + */ + public static function register() + { + } + /** + * Autoloader. + * + * @param string $class_name Name of the class name to load. + * + * @return bool Whether a class was loaded or not. + */ + public static function load($class_name) + { + } + } + /** + * Capability interface declaring the known capabilities. + * + * This is used as the authoritative source for which capabilities can be queried. + * + * @package Requests\Utilities + */ + interface Capability + { + /** + * Support for SSL. + * + * @var string + */ + const SSL = 'ssl'; + /** + * Collection of all capabilities supported in Requests. + * + * Note: this does not automatically mean that the capability will be supported for your chosen transport! + * + * @var string[] + */ + const ALL = [self::SSL]; + } + /** + * Cookie storage object + * + * @package Requests\Cookies + */ + class Cookie + { + /** + * Cookie name. + * + * @var string + */ + public $name; + /** + * Cookie value. + * + * @var string + */ + public $value; + /** + * Cookie attributes + * + * Valid keys are `'path'`, `'domain'`, `'expires'`, `'max-age'`, `'secure'` and + * `'httponly'`. + * + * @var \WpOrg\Requests\Utility\CaseInsensitiveDictionary|array Array-like object + */ + public $attributes = []; + /** + * Cookie flags + * + * Valid keys are `'creation'`, `'last-access'`, `'persistent'` and `'host-only'`. + * + * @var array + */ + public $flags = []; + /** + * Reference time for relative calculations + * + * This is used in place of `time()` when calculating Max-Age expiration and + * checking time validity. + * + * @var int + */ + public $reference_time = 0; + /** + * Create a new cookie object + * + * @param string $name The name of the cookie. + * @param string $value The value for the cookie. + * @param array|\WpOrg\Requests\Utility\CaseInsensitiveDictionary $attributes Associative array of attribute data + * @param array $flags The flags for the cookie. + * Valid keys are `'creation'`, `'last-access'`, + * `'persistent'` and `'host-only'`. + * @param int|null $reference_time Reference time for relative calculations. + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $name argument is not a string. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $value argument is not a string. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $attributes argument is not an array or iterable object with array access. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $flags argument is not an array. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $reference_time argument is not an integer or null. + */ + public function __construct($name, $value, $attributes = [], $flags = [], $reference_time = null) + { + } + /** + * Get the cookie value + * + * Attributes and other data can be accessed via methods. + */ + public function __toString() + { + } + /** + * Check if a cookie is expired. + * + * Checks the age against $this->reference_time to determine if the cookie + * is expired. + * + * @return boolean True if expired, false if time is valid. + */ + public function is_expired() + { + } + /** + * Check if a cookie is valid for a given URI + * + * @param \WpOrg\Requests\Iri $uri URI to check + * @return boolean Whether the cookie is valid for the given URI + */ + public function uri_matches(\WpOrg\Requests\Iri $uri) + { + } + /** + * Check if a cookie is valid for a given domain + * + * @param string $domain Domain to check + * @return boolean Whether the cookie is valid for the given domain + */ + public function domain_matches($domain) + { + } + /** + * Check if a cookie is valid for a given path + * + * From the path-match check in RFC 6265 section 5.1.4 + * + * @param string $request_path Path to check + * @return boolean Whether the cookie is valid for the given path + */ + public function path_matches($request_path) + { + } + /** + * Normalize cookie and attributes + * + * @return boolean Whether the cookie was successfully normalized + */ + public function normalize() + { + } + /** + * Parse an individual cookie attribute + * + * Handles parsing individual attributes from the cookie values. + * + * @param string $name Attribute name + * @param string|int|bool $value Attribute value (string/integer value, or true if empty/flag) + * @return mixed Value if available, or null if the attribute value is invalid (and should be skipped) + */ + protected function normalize_attribute($name, $value) + { + } + /** + * Format a cookie for a Cookie header + * + * This is used when sending cookies to a server. + * + * @return string Cookie formatted for Cookie header + */ + public function format_for_header() + { + } + /** + * Format a cookie for a Set-Cookie header + * + * This is used when sending cookies to clients. This isn't really + * applicable to client-side usage, but might be handy for debugging. + * + * @return string Cookie formatted for Set-Cookie header + */ + public function format_for_set_cookie() + { + } + /** + * Parse a cookie string into a cookie object + * + * Based on Mozilla's parsing code in Firefox and related projects, which + * is an intentional deviation from RFC 2109 and RFC 2616. RFC 6265 + * specifies some of this handling, but not in a thorough manner. + * + * @param string $cookie_header Cookie header value (from a Set-Cookie header) + * @param string $name + * @param int|null $reference_time + * @return \WpOrg\Requests\Cookie Parsed cookie object + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $cookie_header argument is not a string. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $name argument is not a string. + */ + public static function parse($cookie_header, $name = '', $reference_time = null) + { + } + /** + * Parse all Set-Cookie headers from request headers + * + * @param \WpOrg\Requests\Response\Headers $headers Headers to parse from + * @param \WpOrg\Requests\Iri|null $origin URI for comparing cookie origins + * @param int|null $time Reference time for expiration calculation + * @return array + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $origin argument is not null or an instance of the Iri class. + */ + public static function parse_from_headers(\WpOrg\Requests\Response\Headers $headers, $origin = null, $time = null) + { + } + } +} +namespace WpOrg\Requests\Cookie { + /** + * Cookie holder object + * + * @package Requests\Cookies + */ + class Jar implements \ArrayAccess, \IteratorAggregate + { + /** + * Actual item data + * + * @var array + */ + protected $cookies = []; + /** + * Create a new jar + * + * @param array $cookies Existing cookie values + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not an array. + */ + public function __construct($cookies = []) + { + } + /** + * Normalise cookie data into a \WpOrg\Requests\Cookie + * + * @param string|\WpOrg\Requests\Cookie $cookie Cookie header value, possibly pre-parsed (object). + * @param string $key Optional. The name for this cookie. + * @return \WpOrg\Requests\Cookie + */ + public function normalize_cookie($cookie, $key = '') + { + } + /** + * Check if the given item exists + * + * @param string $offset Item key + * @return boolean Does the item exist? + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + } + /** + * Get the value for the item + * + * @param string $offset Item key + * @return string|null Item value (null if offsetExists is false) + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + } + /** + * Set the given item + * + * @param string $offset Item name + * @param string $value Item value + * + * @throws \WpOrg\Requests\Exception On attempting to use dictionary as list (`invalidset`) + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + } + /** + * Unset the given header + * + * @param string $offset The key for the item to unset. + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + } + /** + * Get an iterator for the data + * + * @return \ArrayIterator + */ + #[\ReturnTypeWillChange] + public function getIterator() + { + } + /** + * Register the cookie handler with the request's hooking system + * + * @param \WpOrg\Requests\HookManager $hooks Hooking system + */ + public function register(\WpOrg\Requests\HookManager $hooks) + { + } + /** + * Add Cookie header to a request if we have any + * + * As per RFC 6265, cookies are separated by '; ' + * + * @param string $url + * @param array $headers + * @param array $data + * @param string $type + * @param array $options + */ + public function before_request($url, &$headers, &$data, &$type, &$options) + { + } + /** + * Parse all cookies from a response and attach them to the response + * + * @param \WpOrg\Requests\Response $response Response as received. + */ + public function before_redirect_check(\WpOrg\Requests\Response $response) + { + } + } +} +namespace WpOrg\Requests { + /** + * Exception for HTTP requests + * + * @package Requests\Exceptions + */ + class Exception extends \Exception + { + /** + * Type of exception + * + * @var string + */ + protected $type; + /** + * Data associated with the exception + * + * @var mixed + */ + protected $data; + /** + * Create a new exception + * + * @param string $message Exception message + * @param string $type Exception type + * @param mixed $data Associated data + * @param integer $code Exception numerical code, if applicable + */ + public function __construct($message, $type, $data = null, $code = 0) + { + } + /** + * Like {@see \Exception::getCode()}, but a string code. + * + * @codeCoverageIgnore + * @return string + */ + public function getType() + { + } + /** + * Gives any relevant data + * + * @codeCoverageIgnore + * @return mixed + */ + public function getData() + { + } + } +} +namespace WpOrg\Requests\Exception { + /** + * Exception for when an incorrect number of arguments are passed to a method. + * + * Typically, this exception is used when all arguments for a method are optional, + * but certain arguments need to be passed together, i.e. a method which can be called + * with no arguments or with two arguments, but not with one argument. + * + * Along the same lines, this exception is also used if a method expects an array + * with a certain number of elements and the provided number of elements does not comply. + * + * @package Requests\Exceptions + * @since 2.0.0 + */ + final class ArgumentCount extends \WpOrg\Requests\Exception + { + /** + * Create a new argument count exception with a standardized text. + * + * @param string $expected The argument count expected as a phrase. + * For example: `at least 2 arguments` or `exactly 1 argument`. + * @param int $received The actual argument count received. + * @param string $type Exception type. + * + * @return \WpOrg\Requests\Exception\ArgumentCount + */ + public static function create($expected, $received, $type) + { + } + } + /** + * Exception based on HTTP response + * + * @package Requests\Exceptions + */ + class Http extends \WpOrg\Requests\Exception + { + /** + * HTTP status code + * + * @var integer + */ + protected $code = 0; + /** + * Reason phrase + * + * @var string + */ + protected $reason = 'Unknown'; + /** + * Create a new exception + * + * There is no mechanism to pass in the status code, as this is set by the + * subclass used. Reason phrases can vary, however. + * + * @param string|null $reason Reason phrase + * @param mixed $data Associated data + */ + public function __construct($reason = null, $data = null) + { + } + /** + * Get the status message. + * + * @return string + */ + public function getReason() + { + } + /** + * Get the correct exception class for a given error code + * + * @param int|bool $code HTTP status code, or false if unavailable + * @return string Exception class name to use + */ + public static function get_class($code) + { + } + } +} +namespace WpOrg\Requests\Exception\Http { + /** + * Exception for 304 Not Modified responses + * + * @package Requests\Exceptions + */ + final class Status304 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 305 Use Proxy responses + * + * @package Requests\Exceptions + */ + final class Status305 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 306 Switch Proxy responses + * + * @package Requests\Exceptions + */ + final class Status306 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 400 Bad Request responses + * + * @package Requests\Exceptions + */ + final class Status400 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 401 Unauthorized responses + * + * @package Requests\Exceptions + */ + final class Status401 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 402 Payment Required responses + * + * @package Requests\Exceptions + */ + final class Status402 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 403 Forbidden responses + * + * @package Requests\Exceptions + */ + final class Status403 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 404 Not Found responses + * + * @package Requests\Exceptions + */ + final class Status404 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 405 Method Not Allowed responses + * + * @package Requests\Exceptions + */ + final class Status405 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 406 Not Acceptable responses + * + * @package Requests\Exceptions + */ + final class Status406 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 407 Proxy Authentication Required responses + * + * @package Requests\Exceptions + */ + final class Status407 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 408 Request Timeout responses + * + * @package Requests\Exceptions + */ + final class Status408 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 409 Conflict responses + * + * @package Requests\Exceptions + */ + final class Status409 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 410 Gone responses + * + * @package Requests\Exceptions + */ + final class Status410 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 411 Length Required responses + * + * @package Requests\Exceptions + */ + final class Status411 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 412 Precondition Failed responses + * + * @package Requests\Exceptions + */ + final class Status412 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 413 Request Entity Too Large responses + * + * @package Requests\Exceptions + */ + final class Status413 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 414 Request-URI Too Large responses + * + * @package Requests\Exceptions + */ + final class Status414 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 415 Unsupported Media Type responses + * + * @package Requests\Exceptions + */ + final class Status415 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 416 Requested Range Not Satisfiable responses + * + * @package Requests\Exceptions + */ + final class Status416 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 417 Expectation Failed responses + * + * @package Requests\Exceptions + */ + final class Status417 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 418 I'm A Teapot responses + * + * @link https://tools.ietf.org/html/rfc2324 + * + * @package Requests\Exceptions + */ + final class Status418 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 428 Precondition Required responses + * + * @link https://tools.ietf.org/html/rfc6585 + * + * @package Requests\Exceptions + */ + final class Status428 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 429 Too Many Requests responses + * + * @link https://tools.ietf.org/html/draft-nottingham-http-new-status-04 + * + * @package Requests\Exceptions + */ + final class Status429 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 431 Request Header Fields Too Large responses + * + * @link https://tools.ietf.org/html/rfc6585 + * + * @package Requests\Exceptions + */ + final class Status431 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 500 Internal Server Error responses + * + * @package Requests\Exceptions + */ + final class Status500 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 501 Not Implemented responses + * + * @package Requests\Exceptions + */ + final class Status501 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 502 Bad Gateway responses + * + * @package Requests\Exceptions + */ + final class Status502 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 503 Service Unavailable responses + * + * @package Requests\Exceptions + */ + final class Status503 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 504 Gateway Timeout responses + * + * @package Requests\Exceptions + */ + final class Status504 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 505 HTTP Version Not Supported responses + * + * @package Requests\Exceptions + */ + final class Status505 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for 511 Network Authentication Required responses + * + * @link https://tools.ietf.org/html/rfc6585 + * + * @package Requests\Exceptions + */ + final class Status511 extends \WpOrg\Requests\Exception\Http + { + } + /** + * Exception for unknown status responses + * + * @package Requests\Exceptions + */ + final class StatusUnknown extends \WpOrg\Requests\Exception\Http + { + /** + * Create a new exception + * + * If `$data` is an instance of {@see \WpOrg\Requests\Response}, uses the status + * code from it. Otherwise, sets as 0 + * + * @param string|null $reason Reason phrase + * @param mixed $data Associated data + */ + public function __construct($reason = null, $data = null) + { + } + } +} +namespace WpOrg\Requests\Exception { + /** + * Exception for an invalid argument passed. + * + * @package Requests\Exceptions + * @since 2.0.0 + */ + final class InvalidArgument extends \InvalidArgumentException + { + /** + * Create a new invalid argument exception with a standardized text. + * + * @param int $position The argument position in the function signature. 1-based. + * @param string $name The argument name in the function signature. + * @param string $expected The argument type expected as a string. + * @param string $received The actual argument type received. + * + * @return \WpOrg\Requests\Exception\InvalidArgument + */ + public static function create($position, $name, $expected, $received) + { + } + } + /** + * Transport Exception + * + * @package Requests\Exceptions + */ + class Transport extends \WpOrg\Requests\Exception + { + } +} +namespace WpOrg\Requests\Exception\Transport { + /** + * CURL Transport Exception. + * + * @package Requests\Exceptions + */ + final class Curl extends \WpOrg\Requests\Exception\Transport + { + const EASY = 'cURLEasy'; + const MULTI = 'cURLMulti'; + const SHARE = 'cURLShare'; + /** + * Create a new exception. + * + * @param string $message Exception message. + * @param string $type Exception type. + * @param mixed $data Associated data, if applicable. + * @param int $code Exception numerical code, if applicable. + */ + public function __construct($message, $type, $data = null, $code = 0) + { + } + /** + * Get the error message. + * + * @return string + */ + public function getReason() + { + } + } +} +namespace WpOrg\Requests { + /** + * Event dispatcher + * + * @package Requests\EventDispatcher + */ + interface HookManager + { + /** + * Register a callback for a hook + * + * @param string $hook Hook name + * @param callable $callback Function/method to call on event + * @param int $priority Priority number. <0 is executed earlier, >0 is executed later + */ + public function register($hook, $callback, $priority = 0); + /** + * Dispatch a message + * + * @param string $hook Hook name + * @param array $parameters Parameters to pass to callbacks + * @return boolean Successfulness + */ + public function dispatch($hook, $parameters = []); + } + /** + * Handles adding and dispatching events + * + * @package Requests\EventDispatcher + */ + class Hooks implements \WpOrg\Requests\HookManager + { + /** + * Registered callbacks for each hook + * + * @var array + */ + protected $hooks = []; + /** + * Register a callback for a hook + * + * @param string $hook Hook name + * @param callable $callback Function/method to call on event + * @param int $priority Priority number. <0 is executed earlier, >0 is executed later + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $hook argument is not a string. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $callback argument is not callable. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $priority argument is not an integer. + */ + public function register($hook, $callback, $priority = 0) + { + } + /** + * Dispatch a message + * + * @param string $hook Hook name + * @param array $parameters Parameters to pass to callbacks + * @return boolean Successfulness + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $hook argument is not a string. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $parameters argument is not an array. + */ + public function dispatch($hook, $parameters = []) + { + } + public function __wakeup() + { + } + } + /** + * IDNA URL encoder + * + * Note: Not fully compliant, as nameprep does nothing yet. + * + * @package Requests\Utilities + * + * @link https://tools.ietf.org/html/rfc3490 IDNA specification + * @link https://tools.ietf.org/html/rfc3492 Punycode/Bootstrap specification + */ + class IdnaEncoder + { + /** + * ACE prefix used for IDNA + * + * @link https://tools.ietf.org/html/rfc3490#section-5 + * @var string + */ + const ACE_PREFIX = 'xn--'; + /** + * Maximum length of a IDNA URL in ASCII. + * + * @see \WpOrg\Requests\IdnaEncoder::to_ascii() + * + * @since 2.0.0 + * + * @var int + */ + const MAX_LENGTH = 64; + /**#@+ + * Bootstrap constant for Punycode + * + * @link https://tools.ietf.org/html/rfc3492#section-5 + * @var int + */ + const BOOTSTRAP_BASE = 36; + const BOOTSTRAP_TMIN = 1; + const BOOTSTRAP_TMAX = 26; + const BOOTSTRAP_SKEW = 38; + const BOOTSTRAP_DAMP = 700; + const BOOTSTRAP_INITIAL_BIAS = 72; + const BOOTSTRAP_INITIAL_N = 128; + /**#@-*/ + /** + * Encode a hostname using Punycode + * + * @param string|Stringable $hostname Hostname + * @return string Punycode-encoded hostname + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not a string or a stringable object. + */ + public static function encode($hostname) + { + } + /** + * Convert a UTF-8 text string to an ASCII string using Punycode + * + * @param string $text ASCII or UTF-8 string (max length 64 characters) + * @return string ASCII string + * + * @throws \WpOrg\Requests\Exception Provided string longer than 64 ASCII characters (`idna.provided_too_long`) + * @throws \WpOrg\Requests\Exception Prepared string longer than 64 ASCII characters (`idna.prepared_too_long`) + * @throws \WpOrg\Requests\Exception Provided string already begins with xn-- (`idna.provided_is_prefixed`) + * @throws \WpOrg\Requests\Exception Encoded string longer than 64 ASCII characters (`idna.encoded_too_long`) + */ + public static function to_ascii($text) + { + } + /** + * Check whether a given text string contains only ASCII characters + * + * @internal (Testing found regex was the fastest implementation) + * + * @param string $text Text to examine. + * @return bool Is the text string ASCII-only? + */ + protected static function is_ascii($text) + { + } + /** + * Prepare a text string for use as an IDNA name + * + * @todo Implement this based on RFC 3491 and the newer 5891 + * @param string $text Text to prepare. + * @return string Prepared string + */ + protected static function nameprep($text) + { + } + /** + * Convert a UTF-8 string to a UCS-4 codepoint array + * + * Based on \WpOrg\Requests\Iri::replace_invalid_with_pct_encoding() + * + * @param string $input Text to convert. + * @return array Unicode code points + * + * @throws \WpOrg\Requests\Exception Invalid UTF-8 codepoint (`idna.invalidcodepoint`) + */ + protected static function utf8_to_codepoints($input) + { + } + /** + * RFC3492-compliant encoder + * + * @internal Pseudo-code from Section 6.3 is commented with "#" next to relevant code + * + * @param string $input UTF-8 encoded string to encode + * @return string Punycode-encoded string + * + * @throws \WpOrg\Requests\Exception On character outside of the domain (never happens with Punycode) (`idna.character_outside_domain`) + */ + public static function punycode_encode($input) + { + } + /** + * Convert a digit to its respective character + * + * @link https://tools.ietf.org/html/rfc3492#section-5 + * + * @param int $digit Digit in the range 0-35 + * @return string Single character corresponding to digit + * + * @throws \WpOrg\Requests\Exception On invalid digit (`idna.invalid_digit`) + */ + protected static function digit_to_char($digit) + { + } + /** + * Adapt the bias + * + * @link https://tools.ietf.org/html/rfc3492#section-6.1 + * @param int $delta + * @param int $numpoints + * @param bool $firsttime + * @return int|float New bias + * + * function adapt(delta,numpoints,firsttime): + */ + protected static function adapt($delta, $numpoints, $firsttime) + { + } + } + /** + * Class to validate and to work with IPv6 addresses + * + * This was originally based on the PEAR class of the same name, but has been + * entirely rewritten. + * + * @package Requests\Utilities + */ + final class Ipv6 + { + /** + * Uncompresses an IPv6 address + * + * RFC 4291 allows you to compress consecutive zero pieces in an address to + * '::'. This method expects a valid IPv6 address and expands the '::' to + * the required number of zero pieces. + * + * Example: FF01::101 -> FF01:0:0:0:0:0:0:101 + * ::1 -> 0:0:0:0:0:0:0:1 + * + * @author Alexander Merz + * @author elfrink at introweb dot nl + * @author Josh Peck + * @copyright 2003-2005 The PHP Group + * @license https://opensource.org/licenses/bsd-license.php + * + * @param string|Stringable $ip An IPv6 address + * @return string The uncompressed IPv6 address + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not a string or a stringable object. + */ + public static function uncompress($ip) + { + } + /** + * Compresses an IPv6 address + * + * RFC 4291 allows you to compress consecutive zero pieces in an address to + * '::'. This method expects a valid IPv6 address and compresses consecutive + * zero pieces to '::'. + * + * Example: FF01:0:0:0:0:0:0:101 -> FF01::101 + * 0:0:0:0:0:0:0:1 -> ::1 + * + * @see \WpOrg\Requests\Ipv6::uncompress() + * + * @param string $ip An IPv6 address + * @return string The compressed IPv6 address + */ + public static function compress($ip) + { + } + /** + * Checks an IPv6 address + * + * Checks if the given IP is a valid IPv6 address + * + * @param string $ip An IPv6 address + * @return bool true if $ip is a valid IPv6 address + */ + public static function check_ipv6($ip) + { + } + } + /** + * IRI parser/serialiser/normaliser + * + * Copyright (c) 2007-2010, Geoffrey Sneddon and Steve Minutillo. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of the SimplePie Team nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @package Requests\Utilities + * @author Geoffrey Sneddon + * @author Steve Minutillo + * @copyright 2007-2009 Geoffrey Sneddon and Steve Minutillo + * @license https://opensource.org/licenses/bsd-license.php + * @link http://hg.gsnedders.com/iri/ + * + * @property string $iri IRI we're working with + * @property-read string $uri IRI in URI form, {@see \WpOrg\Requests\Iri::to_uri()} + * @property string $scheme Scheme part of the IRI + * @property string $authority Authority part, formatted for a URI (userinfo + host + port) + * @property string $iauthority Authority part of the IRI (userinfo + host + port) + * @property string $userinfo Userinfo part, formatted for a URI (after '://' and before '@') + * @property string $iuserinfo Userinfo part of the IRI (after '://' and before '@') + * @property string $host Host part, formatted for a URI + * @property string $ihost Host part of the IRI + * @property string $port Port part of the IRI (after ':') + * @property string $path Path part, formatted for a URI (after first '/') + * @property string $ipath Path part of the IRI (after first '/') + * @property string $query Query part, formatted for a URI (after '?') + * @property string $iquery Query part of the IRI (after '?') + * @property string $fragment Fragment, formatted for a URI (after '#') + * @property string $ifragment Fragment part of the IRI (after '#') + */ + class Iri + { + /** + * Scheme + * + * @var string|null + */ + protected $scheme = null; + /** + * User Information + * + * @var string|null + */ + protected $iuserinfo = null; + /** + * ihost + * + * @var string|null + */ + protected $ihost = null; + /** + * Port + * + * @var string|null + */ + protected $port = null; + /** + * ipath + * + * @var string + */ + protected $ipath = ''; + /** + * iquery + * + * @var string|null + */ + protected $iquery = null; + /** + * ifragment|null + * + * @var string + */ + protected $ifragment = null; + /** + * Normalization database + * + * Each key is the scheme, each value is an array with each key as the IRI + * part and value as the default value for that part. + * + * @var array + */ + protected $normalization = array('acap' => array('port' => \WpOrg\Requests\Port::ACAP), 'dict' => array('port' => \WpOrg\Requests\Port::DICT), 'file' => array('ihost' => 'localhost'), 'http' => array('port' => \WpOrg\Requests\Port::HTTP), 'https' => array('port' => \WpOrg\Requests\Port::HTTPS)); + /** + * Return the entire IRI when you try and read the object as a string + * + * @return string + */ + public function __toString() + { + } + /** + * Overload __set() to provide access via properties + * + * @param string $name Property name + * @param mixed $value Property value + */ + public function __set($name, $value) + { + } + /** + * Overload __get() to provide access via properties + * + * @param string $name Property name + * @return mixed + */ + public function __get($name) + { + } + /** + * Overload __isset() to provide access via properties + * + * @param string $name Property name + * @return bool + */ + public function __isset($name) + { + } + /** + * Overload __unset() to provide access via properties + * + * @param string $name Property name + */ + public function __unset($name) + { + } + /** + * Create a new IRI object, from a specified string + * + * @param string|Stringable|null $iri + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $iri argument is not a string, Stringable or null. + */ + public function __construct($iri = null) + { + } + /** + * Create a new IRI object by resolving a relative IRI + * + * Returns false if $base is not absolute, otherwise an IRI. + * + * @param \WpOrg\Requests\Iri|string $base (Absolute) Base IRI + * @param \WpOrg\Requests\Iri|string $relative Relative IRI + * @return \WpOrg\Requests\Iri|false + */ + public static function absolutize($base, $relative) + { + } + /** + * Parse an IRI into scheme/authority/path/query/fragment segments + * + * @param string $iri + * @return array + */ + protected function parse_iri($iri) + { + } + /** + * Remove dot segments from a path + * + * @param string $input + * @return string + */ + protected function remove_dot_segments($input) + { + } + /** + * Replace invalid character with percent encoding + * + * @param string $text Input string + * @param string $extra_chars Valid characters not in iunreserved or + * iprivate (this is ASCII-only) + * @param bool $iprivate Allow iprivate + * @return string + */ + protected function replace_invalid_with_pct_encoding($text, $extra_chars, $iprivate = false) + { + } + /** + * Callback function for preg_replace_callback. + * + * Removes sequences of percent encoded bytes that represent UTF-8 + * encoded characters in iunreserved + * + * @param array $regex_match PCRE match + * @return string Replacement + */ + protected function remove_iunreserved_percent_encoded($regex_match) + { + } + protected function scheme_normalization() + { + } + /** + * Check if the object represents a valid IRI. This needs to be done on each + * call as some things change depending on another part of the IRI. + * + * @return bool + */ + public function is_valid() + { + } + public function __wakeup() + { + } + /** + * Set the entire IRI. Returns true on success, false on failure (if there + * are any invalid characters). + * + * @param string $iri + * @return bool + */ + protected function set_iri($iri) + { + } + /** + * Set the scheme. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @param string $scheme + * @return bool + */ + protected function set_scheme($scheme) + { + } + /** + * Set the authority. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @param string $authority + * @return bool + */ + protected function set_authority($authority) + { + } + /** + * Set the iuserinfo. + * + * @param string $iuserinfo + * @return bool + */ + protected function set_userinfo($iuserinfo) + { + } + /** + * Set the ihost. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @param string $ihost + * @return bool + */ + protected function set_host($ihost) + { + } + /** + * Set the port. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @param string $port + * @return bool + */ + protected function set_port($port) + { + } + /** + * Set the ipath. + * + * @param string $ipath + * @return bool + */ + protected function set_path($ipath) + { + } + /** + * Set the iquery. + * + * @param string $iquery + * @return bool + */ + protected function set_query($iquery) + { + } + /** + * Set the ifragment. + * + * @param string $ifragment + * @return bool + */ + protected function set_fragment($ifragment) + { + } + /** + * Convert an IRI to a URI (or parts thereof) + * + * @param string|bool $iri IRI to convert (or false from {@see \WpOrg\Requests\Iri::get_iri()}) + * @return string|false URI if IRI is valid, false otherwise. + */ + protected function to_uri($iri) + { + } + /** + * Get the complete IRI + * + * @return string|false + */ + protected function get_iri() + { + } + /** + * Get the complete URI + * + * @return string + */ + protected function get_uri() + { + } + /** + * Get the complete iauthority + * + * @return string|null + */ + protected function get_iauthority() + { + } + /** + * Get the complete authority + * + * @return string + */ + protected function get_authority() + { + } + } + /** + * Find the correct port depending on the Request type. + * + * @package Requests\Utilities + * @since 2.0.0 + */ + final class Port + { + /** + * Port to use with Acap requests. + * + * @var int + */ + const ACAP = 674; + /** + * Port to use with Dictionary requests. + * + * @var int + */ + const DICT = 2628; + /** + * Port to use with HTTP requests. + * + * @var int + */ + const HTTP = 80; + /** + * Port to use with HTTP over SSL requests. + * + * @var int + */ + const HTTPS = 443; + /** + * Retrieve the port number to use. + * + * @param string $type Request type. + * The following requests types are supported: + * 'acap', 'dict', 'http' and 'https'. + * + * @return int + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When a non-string input has been passed. + * @throws \WpOrg\Requests\Exception When a non-supported port is requested ('portnotsupported'). + * @phpstan-param 'acap'|'dict'|'http'|'https' $type + */ + public static function get($type) + { + } + } + /** + * Proxy connection interface + * + * Implement this interface to handle proxy settings and authentication + * + * Parameters should be passed via the constructor where possible, as this + * makes it much easier for users to use your provider. + * + * @see \WpOrg\Requests\Hooks + * + * @package Requests\Proxy + * @since 1.6 + */ + interface Proxy + { + /** + * Register hooks as needed + * + * This method is called in {@see \WpOrg\Requests\Requests::request()} when the user + * has set an instance as the 'auth' option. Use this callback to register all the + * hooks you'll need. + * + * @see \WpOrg\Requests\Hooks::register() + * @param \WpOrg\Requests\Hooks $hooks Hook system + */ + public function register(\WpOrg\Requests\Hooks $hooks); + } +} +namespace WpOrg\Requests\Proxy { + /** + * HTTP Proxy connection interface + * + * Provides a handler for connection via an HTTP proxy + * + * @package Requests\Proxy + * @since 1.6 + */ + final class Http implements \WpOrg\Requests\Proxy + { + /** + * Proxy host and port + * + * Notation: "host:port" (eg 127.0.0.1:8080 or someproxy.com:3128) + * + * @var string + */ + public $proxy; + /** + * Username + * + * @var string + */ + public $user; + /** + * Password + * + * @var string + */ + public $pass; + /** + * Do we need to authenticate? (ie username & password have been provided) + * + * @var boolean + */ + public $use_authentication; + /** + * Constructor + * + * @since 1.6 + * + * @param array|string|null $args Proxy as a string or an array of proxy, user and password. + * When passed as an array, must have exactly one (proxy) + * or three elements (proxy, user, password). + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not an array, a string or null. + * @throws \WpOrg\Requests\Exception\ArgumentCount On incorrect number of arguments (`proxyhttpbadargs`) + */ + public function __construct($args = null) + { + } + /** + * Register the necessary callbacks + * + * @since 1.6 + * @see \WpOrg\Requests\Proxy\Http::curl_before_send() + * @see \WpOrg\Requests\Proxy\Http::fsockopen_remote_socket() + * @see \WpOrg\Requests\Proxy\Http::fsockopen_remote_host_path() + * @see \WpOrg\Requests\Proxy\Http::fsockopen_header() + * @param \WpOrg\Requests\Hooks $hooks Hook system + */ + public function register(\WpOrg\Requests\Hooks $hooks) + { + } + /** + * Set cURL parameters before the data is sent + * + * @since 1.6 + * @param resource|\CurlHandle $handle cURL handle + */ + public function curl_before_send(&$handle) + { + } + /** + * Alter remote socket information before opening socket connection + * + * @since 1.6 + * @param string $remote_socket Socket connection string + */ + public function fsockopen_remote_socket(&$remote_socket) + { + } + /** + * Alter remote path before getting stream data + * + * @since 1.6 + * @param string $path Path to send in HTTP request string ("GET ...") + * @param string $url Full URL we're requesting + */ + public function fsockopen_remote_host_path(&$path, $url) + { + } + /** + * Add extra headers to the request before sending + * + * @since 1.6 + * @param string $out HTTP header string + */ + public function fsockopen_header(&$out) + { + } + /** + * Get the authentication string (user:pass) + * + * @since 1.6 + * @return string + */ + public function get_auth_string() + { + } + } +} +namespace WpOrg\Requests { + /** + * Requests for PHP + * + * Inspired by Requests for Python. + * + * Based on concepts from SimplePie_File, RequestCore and WP_Http. + * + * @package Requests + */ + class Requests + { + /** + * POST method + * + * @var string + */ + const POST = 'POST'; + /** + * PUT method + * + * @var string + */ + const PUT = 'PUT'; + /** + * GET method + * + * @var string + */ + const GET = 'GET'; + /** + * HEAD method + * + * @var string + */ + const HEAD = 'HEAD'; + /** + * DELETE method + * + * @var string + */ + const DELETE = 'DELETE'; + /** + * OPTIONS method + * + * @var string + */ + const OPTIONS = 'OPTIONS'; + /** + * TRACE method + * + * @var string + */ + const TRACE = 'TRACE'; + /** + * PATCH method + * + * @link https://tools.ietf.org/html/rfc5789 + * @var string + */ + const PATCH = 'PATCH'; + /** + * Default size of buffer size to read streams + * + * @var integer + */ + const BUFFER_SIZE = 1160; + /** + * Option defaults. + * + * @see \WpOrg\Requests\Requests::get_default_options() + * @see \WpOrg\Requests\Requests::request() for values returned by this method + * + * @since 2.0.0 + * + * @var array + */ + const OPTION_DEFAULTS = ['timeout' => 10, 'connect_timeout' => 10, 'useragent' => 'php-requests/' . self::VERSION, 'protocol_version' => 1.1, 'redirected' => 0, 'redirects' => 10, 'follow_redirects' => true, 'blocking' => true, 'type' => self::GET, 'filename' => false, 'auth' => false, 'proxy' => false, 'cookies' => false, 'max_bytes' => false, 'idn' => true, 'hooks' => null, 'transport' => null, 'verify' => null, 'verifyname' => true]; + /** + * Default supported Transport classes. + * + * @since 2.0.0 + * + * @var array + */ + const DEFAULT_TRANSPORTS = [\WpOrg\Requests\Transport\Curl::class => \WpOrg\Requests\Transport\Curl::class, \WpOrg\Requests\Transport\Fsockopen::class => \WpOrg\Requests\Transport\Fsockopen::class]; + /** + * Current version of Requests + * + * @var string + */ + const VERSION = '2.0.11'; + /** + * Selected transport name + * + * Use {@see \WpOrg\Requests\Requests::get_transport()} instead + * + * @var array + */ + public static $transport = []; + /** + * Registered transport classes + * + * @var array + */ + protected static $transports = []; + /** + * Default certificate path. + * + * @see \WpOrg\Requests\Requests::get_certificate_path() + * @see \WpOrg\Requests\Requests::set_certificate_path() + * + * @var string + */ + protected static $certificate_path = __DIR__ . '/../certificates/cacert.pem'; + /** + * Register a transport + * + * @param string $transport Transport class to add, must support the \WpOrg\Requests\Transport interface + */ + public static function add_transport($transport) + { + } + /** + * Get the fully qualified class name (FQCN) for a working transport. + * + * @param array $capabilities Optional. Associative array of capabilities to test against, i.e. `['' => true]`. + * @return string FQCN of the transport to use, or an empty string if no transport was + * found which provided the requested capabilities. + */ + protected static function get_transport_class(array $capabilities = []) + { + } + /** + * Get a working transport. + * + * @param array $capabilities Optional. Associative array of capabilities to test against, i.e. `['' => true]`. + * @return \WpOrg\Requests\Transport + * @throws \WpOrg\Requests\Exception If no valid transport is found (`notransport`). + */ + protected static function get_transport(array $capabilities = []) + { + } + /** + * Checks to see if we have a transport for the capabilities requested. + * + * Supported capabilities can be found in the {@see \WpOrg\Requests\Capability} + * interface as constants. + * + * Example usage: + * `Requests::has_capabilities([Capability::SSL => true])`. + * + * @param array $capabilities Optional. Associative array of capabilities to test against, i.e. `['' => true]`. + * @return bool Whether the transport has the requested capabilities. + */ + public static function has_capabilities(array $capabilities = []) + { + } + /**#@+ + * @see \WpOrg\Requests\Requests::request() + * @param string $url + * @param array $headers + * @param array $options + * @return \WpOrg\Requests\Response + */ + /** + * Send a GET request + */ + public static function get($url, $headers = [], $options = []) + { + } + /** + * Send a HEAD request + */ + public static function head($url, $headers = [], $options = []) + { + } + /** + * Send a DELETE request + */ + public static function delete($url, $headers = [], $options = []) + { + } + /** + * Send a TRACE request + */ + public static function trace($url, $headers = [], $options = []) + { + } + /**#@-*/ + /**#@+ + * @see \WpOrg\Requests\Requests::request() + * @param string $url + * @param array $headers + * @param array $data + * @param array $options + * @return \WpOrg\Requests\Response + */ + /** + * Send a POST request + */ + public static function post($url, $headers = [], $data = [], $options = []) + { + } + /** + * Send a PUT request + */ + public static function put($url, $headers = [], $data = [], $options = []) + { + } + /** + * Send an OPTIONS request + */ + public static function options($url, $headers = [], $data = [], $options = []) + { + } + /** + * Send a PATCH request + * + * Note: Unlike {@see \WpOrg\Requests\Requests::post()} and {@see \WpOrg\Requests\Requests::put()}, + * `$headers` is required, as the specification recommends that should send an ETag + * + * @link https://tools.ietf.org/html/rfc5789 + */ + public static function patch($url, $headers, $data = [], $options = []) + { + } + /**#@-*/ + /** + * Main interface for HTTP requests + * + * This method initiates a request and sends it via a transport before + * parsing. + * + * The `$options` parameter takes an associative array with the following + * options: + * + * - `timeout`: How long should we wait for a response? + * Note: for cURL, a minimum of 1 second applies, as DNS resolution + * operates at second-resolution only. + * (float, seconds with a millisecond precision, default: 10, example: 0.01) + * - `connect_timeout`: How long should we wait while trying to connect? + * (float, seconds with a millisecond precision, default: 10, example: 0.01) + * - `useragent`: Useragent to send to the server + * (string, default: php-requests/$version) + * - `follow_redirects`: Should we follow 3xx redirects? + * (boolean, default: true) + * - `redirects`: How many times should we redirect before erroring? + * (integer, default: 10) + * - `blocking`: Should we block processing on this request? + * (boolean, default: true) + * - `filename`: File to stream the body to instead. + * (string|boolean, default: false) + * - `auth`: Authentication handler or array of user/password details to use + * for Basic authentication + * (\WpOrg\Requests\Auth|array|boolean, default: false) + * - `proxy`: Proxy details to use for proxy by-passing and authentication + * (\WpOrg\Requests\Proxy|array|string|boolean, default: false) + * - `max_bytes`: Limit for the response body size. + * (integer|boolean, default: false) + * - `idn`: Enable IDN parsing + * (boolean, default: true) + * - `transport`: Custom transport. Either a class name, or a + * transport object. Defaults to the first working transport from + * {@see \WpOrg\Requests\Requests::getTransport()} + * (string|\WpOrg\Requests\Transport, default: {@see \WpOrg\Requests\Requests::getTransport()}) + * - `hooks`: Hooks handler. + * (\WpOrg\Requests\HookManager, default: new WpOrg\Requests\Hooks()) + * - `verify`: Should we verify SSL certificates? Allows passing in a custom + * certificate file as a string. (Using true uses the system-wide root + * certificate store instead, but this may have different behaviour + * across transports.) + * (string|boolean, default: certificates/cacert.pem) + * - `verifyname`: Should we verify the common name in the SSL certificate? + * (boolean, default: true) + * - `data_format`: How should we send the `$data` parameter? + * (string, one of 'query' or 'body', default: 'query' for + * HEAD/GET/DELETE, 'body' for POST/PUT/OPTIONS/PATCH) + * + * @param string|Stringable $url URL to request + * @param array $headers Extra headers to send with the request + * @param array|null $data Data to send either as a query string for GET/HEAD requests, or in the body for POST requests + * @param string $type HTTP request type (use Requests constants) + * @param array $options Options for the request (see description for more information) + * @return \WpOrg\Requests\Response + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $url argument is not a string or Stringable. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $type argument is not a string. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $options argument is not an array. + * @throws \WpOrg\Requests\Exception On invalid URLs (`nonhttp`) + */ + public static function request($url, $headers = [], $data = [], $type = self::GET, $options = []) + { + } + /** + * Send multiple HTTP requests simultaneously + * + * The `$requests` parameter takes an associative or indexed array of + * request fields. The key of each request can be used to match up the + * request with the returned data, or with the request passed into your + * `multiple.request.complete` callback. + * + * The request fields value is an associative array with the following keys: + * + * - `url`: Request URL Same as the `$url` parameter to + * {@see \WpOrg\Requests\Requests::request()} + * (string, required) + * - `headers`: Associative array of header fields. Same as the `$headers` + * parameter to {@see \WpOrg\Requests\Requests::request()} + * (array, default: `array()`) + * - `data`: Associative array of data fields or a string. Same as the + * `$data` parameter to {@see \WpOrg\Requests\Requests::request()} + * (array|string, default: `array()`) + * - `type`: HTTP request type (use \WpOrg\Requests\Requests constants). Same as the `$type` + * parameter to {@see \WpOrg\Requests\Requests::request()} + * (string, default: `\WpOrg\Requests\Requests::GET`) + * - `cookies`: Associative array of cookie name to value, or cookie jar. + * (array|\WpOrg\Requests\Cookie\Jar) + * + * If the `$options` parameter is specified, individual requests will + * inherit options from it. This can be used to use a single hooking system, + * or set all the types to `\WpOrg\Requests\Requests::POST`, for example. + * + * In addition, the `$options` parameter takes the following global options: + * + * - `complete`: A callback for when a request is complete. Takes two + * parameters, a \WpOrg\Requests\Response/\WpOrg\Requests\Exception reference, and the + * ID from the request array (Note: this can also be overridden on a + * per-request basis, although that's a little silly) + * (callback) + * + * @param array $requests Requests data (see description for more information) + * @param array $options Global and default options (see {@see \WpOrg\Requests\Requests::request()}) + * @return array Responses (either \WpOrg\Requests\Response or a \WpOrg\Requests\Exception object) + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $requests argument is not an array or iterable object with array access. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $options argument is not an array. + */ + public static function request_multiple($requests, $options = []) + { + } + /** + * Get the default options + * + * @see \WpOrg\Requests\Requests::request() for values returned by this method + * @param boolean $multirequest Is this a multirequest? + * @return array Default option values + */ + protected static function get_default_options($multirequest = false) + { + } + /** + * Get default certificate path. + * + * @return string Default certificate path. + */ + public static function get_certificate_path() + { + } + /** + * Set default certificate path. + * + * @param string|Stringable|bool $path Certificate path, pointing to a PEM file. + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $url argument is not a string, Stringable or boolean. + */ + public static function set_certificate_path($path) + { + } + /** + * Set the default values + * + * The $options parameter is updated with the results. + * + * @param string $url URL to request + * @param array $headers Extra headers to send with the request + * @param array|null $data Data to send either as a query string for GET/HEAD requests, or in the body for POST requests + * @param string $type HTTP request type + * @param array $options Options for the request + * @return void + * + * @throws \WpOrg\Requests\Exception When the $url is not an http(s) URL. + */ + protected static function set_defaults(&$url, &$headers, &$data, &$type, &$options) + { + } + /** + * HTTP response parser + * + * @param string $headers Full response text including headers and body + * @param string $url Original request URL + * @param array $req_headers Original $headers array passed to {@link request()}, in case we need to follow redirects + * @param array $req_data Original $data array passed to {@link request()}, in case we need to follow redirects + * @param array $options Original $options array passed to {@link request()}, in case we need to follow redirects + * @return \WpOrg\Requests\Response + * + * @throws \WpOrg\Requests\Exception On missing head/body separator (`requests.no_crlf_separator`) + * @throws \WpOrg\Requests\Exception On missing head/body separator (`noversion`) + * @throws \WpOrg\Requests\Exception On missing head/body separator (`toomanyredirects`) + */ + protected static function parse_response($headers, $url, $req_headers, $req_data, $options) + { + } + /** + * Callback for `transport.internal.parse_response` + * + * Internal use only. Converts a raw HTTP response to a \WpOrg\Requests\Response + * while still executing a multiple request. + * + * `$response` is either set to a \WpOrg\Requests\Response instance, or a \WpOrg\Requests\Exception object + * + * @param string $response Full response text including headers and body (will be overwritten with Response instance) + * @param array $request Request data as passed into {@see \WpOrg\Requests\Requests::request_multiple()} + * @return void + */ + public static function parse_multiple(&$response, $request) + { + } + /** + * Decoded a chunked body as per RFC 2616 + * + * @link https://tools.ietf.org/html/rfc2616#section-3.6.1 + * @param string $data Chunked body + * @return string Decoded body + */ + protected static function decode_chunked($data) + { + } + /** + * Convert a key => value array to a 'key: value' array for headers + * + * @param iterable $dictionary Dictionary of header values + * @return array List of headers + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not iterable. + */ + public static function flatten($dictionary) + { + } + /** + * Decompress an encoded body + * + * Implements gzip, compress and deflate. Guesses which it is by attempting + * to decode. + * + * @param string $data Compressed data in one of the above formats + * @return string Decompressed string + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not a string. + */ + public static function decompress($data) + { + } + /** + * Decompression of deflated string while staying compatible with the majority of servers. + * + * Certain Servers will return deflated data with headers which PHP's gzinflate() + * function cannot handle out of the box. The following function has been created from + * various snippets on the gzinflate() PHP documentation. + * + * Warning: Magic numbers within. Due to the potential different formats that the compressed + * data may be returned in, some "magic offsets" are needed to ensure proper decompression + * takes place. For a simple progmatic way to determine the magic offset in use, see: + * https://core.trac.wordpress.org/ticket/18273 + * + * @since 1.6.0 + * @link https://core.trac.wordpress.org/ticket/18273 + * @link https://www.php.net/gzinflate#70875 + * @link https://www.php.net/gzinflate#77336 + * + * @param string $gz_data String to decompress. + * @return string|bool False on failure. + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not a string. + */ + public static function compatible_gzinflate($gz_data) + { + } + } + /** + * HTTP response class + * + * Contains a response from \WpOrg\Requests\Requests::request() + * + * @package Requests + */ + class Response + { + /** + * Response body + * + * @var string + */ + public $body = ''; + /** + * Raw HTTP data from the transport + * + * @var string + */ + public $raw = ''; + /** + * Headers, as an associative array + * + * @var \WpOrg\Requests\Response\Headers Array-like object representing headers + */ + public $headers = []; + /** + * Status code, false if non-blocking + * + * @var integer|boolean + */ + public $status_code = false; + /** + * Protocol version, false if non-blocking + * + * @var float|boolean + */ + public $protocol_version = false; + /** + * Whether the request succeeded or not + * + * @var boolean + */ + public $success = false; + /** + * Number of redirects the request used + * + * @var integer + */ + public $redirects = 0; + /** + * URL requested + * + * @var string + */ + public $url = ''; + /** + * Previous requests (from redirects) + * + * @var array Array of \WpOrg\Requests\Response objects + */ + public $history = []; + /** + * Cookies from the request + * + * @var \WpOrg\Requests\Cookie\Jar Array-like object representing a cookie jar + */ + public $cookies = []; + /** + * Constructor + */ + public function __construct() + { + } + /** + * Is the response a redirect? + * + * @return boolean True if redirect (3xx status), false if not. + */ + public function is_redirect() + { + } + /** + * Throws an exception if the request was not successful + * + * @param boolean $allow_redirects Set to false to throw on a 3xx as well + * + * @throws \WpOrg\Requests\Exception If `$allow_redirects` is false, and code is 3xx (`response.no_redirects`) + * @throws \WpOrg\Requests\Exception\Http On non-successful status code. Exception class corresponds to "Status" + code (e.g. {@see \WpOrg\Requests\Exception\Http\Status404}) + */ + public function throw_for_status($allow_redirects = true) + { + } + /** + * JSON decode the response body. + * + * The method parameters are the same as those for the PHP native `json_decode()` function. + * + * @link https://php.net/json-decode + * + * @param bool|null $associative Optional. When `true`, JSON objects will be returned as associative arrays; + * When `false`, JSON objects will be returned as objects. + * When `null`, JSON objects will be returned as associative arrays + * or objects depending on whether `JSON_OBJECT_AS_ARRAY` is set in the flags. + * Defaults to `true` (in contrast to the PHP native default of `null`). + * @param int $depth Optional. Maximum nesting depth of the structure being decoded. + * Defaults to `512`. + * @param int $options Optional. Bitmask of JSON_BIGINT_AS_STRING, JSON_INVALID_UTF8_IGNORE, + * JSON_INVALID_UTF8_SUBSTITUTE, JSON_OBJECT_AS_ARRAY, JSON_THROW_ON_ERROR. + * Defaults to `0` (no options set). + * + * @return array + * + * @throws \WpOrg\Requests\Exception If `$this->body` is not valid json. + */ + public function decode_body($associative = true, $depth = 512, $options = 0) + { + } + } +} +namespace WpOrg\Requests\Utility { + /** + * Case-insensitive dictionary, suitable for HTTP headers + * + * @package Requests\Utilities + */ + class CaseInsensitiveDictionary implements \ArrayAccess, \IteratorAggregate + { + /** + * Actual item data + * + * @var array + */ + protected $data = []; + /** + * Creates a case insensitive dictionary. + * + * @param array $data Dictionary/map to convert to case-insensitive + */ + public function __construct(array $data = []) + { + } + /** + * Check if the given item exists + * + * @param string $offset Item key + * @return boolean Does the item exist? + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + } + /** + * Get the value for the item + * + * @param string $offset Item key + * @return string|null Item value (null if the item key doesn't exist) + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + } + /** + * Set the given item + * + * @param string $offset Item name + * @param string $value Item value + * + * @throws \WpOrg\Requests\Exception On attempting to use dictionary as list (`invalidset`) + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + } + /** + * Unset the given header + * + * @param string $offset The key for the item to unset. + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + } + /** + * Get an iterator for the data + * + * @return \ArrayIterator + */ + #[\ReturnTypeWillChange] + public function getIterator() + { + } + /** + * Get the headers as an array + * + * @return array Header data + */ + public function getAll() + { + } + } +} +namespace WpOrg\Requests\Response { + /** + * Case-insensitive dictionary, suitable for HTTP headers + * + * @package Requests + */ + class Headers extends \WpOrg\Requests\Utility\CaseInsensitiveDictionary + { + /** + * Get the given header + * + * Unlike {@see \WpOrg\Requests\Response\Headers::getValues()}, this returns a string. If there are + * multiple values, it concatenates them with a comma as per RFC2616. + * + * Avoid using this where commas may be used unquoted in values, such as + * Set-Cookie headers. + * + * @param string $offset Name of the header to retrieve. + * @return string|null Header value + */ + public function offsetGet($offset) + { + } + /** + * Set the given item + * + * @param string $offset Item name + * @param string $value Item value + * + * @throws \WpOrg\Requests\Exception On attempting to use dictionary as list (`invalidset`) + */ + public function offsetSet($offset, $value) + { + } + /** + * Get all values for a given header + * + * @param string $offset Name of the header to retrieve. + * @return array|null Header values + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not valid as an array key. + */ + public function getValues($offset) + { + } + /** + * Flattens a value into a string + * + * Converts an array into a string by imploding values with a comma, as per + * RFC2616's rules for folding headers. + * + * @param string|array $value Value to flatten + * @return string Flattened value + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not a string or an array. + */ + public function flatten($value) + { + } + /** + * Get an iterator for the data + * + * Converts the internally stored values to a comma-separated string if there is more + * than one value for a key. + * + * @return \ArrayIterator + */ + public function getIterator() + { + } + } +} +namespace WpOrg\Requests { + /** + * Session handler for persistent requests and default parameters + * + * Allows various options to be set as default values, and merges both the + * options and URL properties together. A base URL can be set for all requests, + * with all subrequests resolved from this. Base options can be set (including + * a shared cookie jar), then overridden for individual requests. + * + * @package Requests\SessionHandler + */ + class Session + { + /** + * Base URL for requests + * + * URLs will be made absolute using this as the base + * + * @var string|null + */ + public $url = null; + /** + * Base headers for requests + * + * @var array + */ + public $headers = []; + /** + * Base data for requests + * + * If both the base data and the per-request data are arrays, the data will + * be merged before sending the request. + * + * @var array + */ + public $data = []; + /** + * Base options for requests + * + * The base options are merged with the per-request data for each request. + * The only default option is a shared cookie jar between requests. + * + * Values here can also be set directly via properties on the Session + * object, e.g. `$session->useragent = 'X';` + * + * @var array + */ + public $options = []; + /** + * Create a new session + * + * @param string|Stringable|null $url Base URL for requests + * @param array $headers Default headers for requests + * @param array $data Default data for requests + * @param array $options Default options for requests + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $url argument is not a string, Stringable or null. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $headers argument is not an array. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $data argument is not an array. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $options argument is not an array. + */ + public function __construct($url = null, $headers = [], $data = [], $options = []) + { + } + /** + * Get a property's value + * + * @param string $name Property name. + * @return mixed|null Property value, null if none found + */ + public function __get($name) + { + } + /** + * Set a property's value + * + * @param string $name Property name. + * @param mixed $value Property value + */ + public function __set($name, $value) + { + } + /** + * Remove a property's value + * + * @param string $name Property name. + */ + public function __isset($name) + { + } + /** + * Remove a property's value + * + * @param string $name Property name. + */ + public function __unset($name) + { + } + /**#@+ + * @see \WpOrg\Requests\Session::request() + * @param string $url + * @param array $headers + * @param array $options + * @return \WpOrg\Requests\Response + */ + /** + * Send a GET request + */ + public function get($url, $headers = [], $options = []) + { + } + /** + * Send a HEAD request + */ + public function head($url, $headers = [], $options = []) + { + } + /** + * Send a DELETE request + */ + public function delete($url, $headers = [], $options = []) + { + } + /**#@-*/ + /**#@+ + * @see \WpOrg\Requests\Session::request() + * @param string $url + * @param array $headers + * @param array $data + * @param array $options + * @return \WpOrg\Requests\Response + */ + /** + * Send a POST request + */ + public function post($url, $headers = [], $data = [], $options = []) + { + } + /** + * Send a PUT request + */ + public function put($url, $headers = [], $data = [], $options = []) + { + } + /** + * Send a PATCH request + * + * Note: Unlike {@see \WpOrg\Requests\Session::post()} and {@see \WpOrg\Requests\Session::put()}, + * `$headers` is required, as the specification recommends that should send an ETag + * + * @link https://tools.ietf.org/html/rfc5789 + */ + public function patch($url, $headers, $data = [], $options = []) + { + } + /**#@-*/ + /** + * Main interface for HTTP requests + * + * This method initiates a request and sends it via a transport before + * parsing. + * + * @see \WpOrg\Requests\Requests::request() + * + * @param string $url URL to request + * @param array $headers Extra headers to send with the request + * @param array|null $data Data to send either as a query string for GET/HEAD requests, or in the body for POST requests + * @param string $type HTTP request type (use \WpOrg\Requests\Requests constants) + * @param array $options Options for the request (see {@see \WpOrg\Requests\Requests::request()}) + * @return \WpOrg\Requests\Response + * + * @throws \WpOrg\Requests\Exception On invalid URLs (`nonhttp`) + */ + public function request($url, $headers = [], $data = [], $type = \WpOrg\Requests\Requests::GET, $options = []) + { + } + /** + * Send multiple HTTP requests simultaneously + * + * @see \WpOrg\Requests\Requests::request_multiple() + * + * @param array $requests Requests data (see {@see \WpOrg\Requests\Requests::request_multiple()}) + * @param array $options Global and default options (see {@see \WpOrg\Requests\Requests::request()}) + * @return array Responses (either \WpOrg\Requests\Response or a \WpOrg\Requests\Exception object) + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $requests argument is not an array or iterable object with array access. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $options argument is not an array. + */ + public function request_multiple($requests, $options = []) + { + } + public function __wakeup() + { + } + /** + * Merge a request's data with the default data + * + * @param array $request Request data (same form as {@see \WpOrg\Requests\Session::request_multiple()}) + * @param boolean $merge_options Should we merge options as well? + * @return array Request data + */ + protected function merge_request($request, $merge_options = true) + { + } + } + /** + * SSL utilities for Requests + * + * Collection of utilities for working with and verifying SSL certificates. + * + * @package Requests\Utilities + */ + final class Ssl + { + /** + * Verify the certificate against common name and subject alternative names + * + * Unfortunately, PHP doesn't check the certificate against the alternative + * names, leading things like 'https://www.github.com/' to be invalid. + * + * @link https://tools.ietf.org/html/rfc2818#section-3.1 RFC2818, Section 3.1 + * + * @param string|Stringable $host Host name to verify against + * @param array $cert Certificate data from openssl_x509_parse() + * @return bool + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $host argument is not a string or a stringable object. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $cert argument is not an array or array accessible. + */ + public static function verify_certificate($host, $cert) + { + } + /** + * Verify that a reference name is valid + * + * Verifies a dNSName for HTTPS usage, (almost) as per Firefox's rules: + * - Wildcards can only occur in a name with more than 3 components + * - Wildcards can only occur as the last character in the first + * component + * - Wildcards may be preceded by additional characters + * + * We modify these rules to be a bit stricter and only allow the wildcard + * character to be the full first component; that is, with the exclusion of + * the third rule. + * + * @param string|Stringable $reference Reference dNSName + * @return boolean Is the name valid? + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not a string or a stringable object. + */ + public static function verify_reference_name($reference) + { + } + /** + * Match a hostname against a dNSName reference + * + * @param string|Stringable $host Requested host + * @param string|Stringable $reference dNSName to match against + * @return boolean Does the domain match? + * @throws \WpOrg\Requests\Exception\InvalidArgument When either of the passed arguments is not a string or a stringable object. + */ + public static function match_domain($host, $reference) + { + } + } + /** + * Base HTTP transport + * + * @package Requests\Transport + */ + interface Transport + { + /** + * Perform a request + * + * @param string $url URL to request + * @param array $headers Associative array of request headers + * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD + * @param array $options Request options, see {@see \WpOrg\Requests\Requests::response()} for documentation + * @return string Raw HTTP result + */ + public function request($url, $headers = [], $data = [], $options = []); + /** + * Send multiple requests simultaneously + * + * @param array $requests Request data (array of 'url', 'headers', 'data', 'options') as per {@see \WpOrg\Requests\Transport::request()} + * @param array $options Global options, see {@see \WpOrg\Requests\Requests::response()} for documentation + * @return array Array of \WpOrg\Requests\Response objects (may contain \WpOrg\Requests\Exception or string responses as well) + */ + public function request_multiple($requests, $options); + /** + * Self-test whether the transport can be used. + * + * The available capabilities to test for can be found in {@see \WpOrg\Requests\Capability}. + * + * @param array $capabilities Optional. Associative array of capabilities to test against, i.e. `['' => true]`. + * @return bool Whether the transport can be used. + */ + public static function test($capabilities = []); + } +} +namespace WpOrg\Requests\Transport { + /** + * cURL HTTP transport + * + * @package Requests\Transport + */ + final class Curl implements \WpOrg\Requests\Transport + { + const CURL_7_10_5 = 0x70a05; + const CURL_7_16_2 = 0x71002; + /** + * Raw HTTP data + * + * @var string + */ + public $headers = ''; + /** + * Raw body data + * + * @var string + */ + public $response_data = ''; + /** + * Information on the current request + * + * @var array cURL information array, see {@link https://www.php.net/curl_getinfo} + */ + public $info; + /** + * cURL version number + * + * @var int + */ + public $version; + /** + * Constructor + */ + public function __construct() + { + } + /** + * Destructor + */ + public function __destruct() + { + } + /** + * Perform a request + * + * @param string|Stringable $url URL to request + * @param array $headers Associative array of request headers + * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD + * @param array $options Request options, see {@see \WpOrg\Requests\Requests::response()} for documentation + * @return string Raw HTTP result + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $url argument is not a string or Stringable. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $headers argument is not an array. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $data parameter is not an array or string. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $options argument is not an array. + * @throws \WpOrg\Requests\Exception On a cURL error (`curlerror`) + */ + public function request($url, $headers = [], $data = [], $options = []) + { + } + /** + * Send multiple requests simultaneously + * + * @param array $requests Request data + * @param array $options Global options + * @return array Array of \WpOrg\Requests\Response objects (may contain \WpOrg\Requests\Exception or string responses as well) + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $requests argument is not an array or iterable object with array access. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $options argument is not an array. + */ + public function request_multiple($requests, $options) + { + } + /** + * Get the cURL handle for use in a multi-request + * + * @param string $url URL to request + * @param array $headers Associative array of request headers + * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD + * @param array $options Request options, see {@see \WpOrg\Requests\Requests::response()} for documentation + * @return resource|\CurlHandle Subrequest's cURL handle + */ + public function &get_subrequest_handle($url, $headers, $data, $options) + { + } + /** + * Process a response + * + * @param string $response Response data from the body + * @param array $options Request options + * @return string|false HTTP response data including headers. False if non-blocking. + * @throws \WpOrg\Requests\Exception If the request resulted in a cURL error. + */ + public function process_response($response, $options) + { + } + /** + * Collect the headers as they are received + * + * @param resource|\CurlHandle $handle cURL handle + * @param string $headers Header string + * @return integer Length of provided header + */ + public function stream_headers($handle, $headers) + { + } + /** + * Collect data as it's received + * + * @since 1.6.1 + * + * @param resource|\CurlHandle $handle cURL handle + * @param string $data Body data + * @return integer Length of provided data + */ + public function stream_body($handle, $data) + { + } + /** + * Self-test whether the transport can be used. + * + * The available capabilities to test for can be found in {@see \WpOrg\Requests\Capability}. + * + * @codeCoverageIgnore + * @param array $capabilities Optional. Associative array of capabilities to test against, i.e. `['' => true]`. + * @return bool Whether the transport can be used. + */ + public static function test($capabilities = []) + { + } + } + /** + * fsockopen HTTP transport + * + * @package Requests\Transport + */ + final class Fsockopen implements \WpOrg\Requests\Transport + { + /** + * Second to microsecond conversion + * + * @var integer + */ + const SECOND_IN_MICROSECONDS = 1000000; + /** + * Raw HTTP data + * + * @var string + */ + public $headers = ''; + /** + * Stream metadata + * + * @var array Associative array of properties, see {@link https://www.php.net/stream_get_meta_data} + */ + public $info; + /** + * Perform a request + * + * @param string|Stringable $url URL to request + * @param array $headers Associative array of request headers + * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD + * @param array $options Request options, see {@see \WpOrg\Requests\Requests::response()} for documentation + * @return string Raw HTTP result + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $url argument is not a string or Stringable. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $headers argument is not an array. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $data parameter is not an array or string. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $options argument is not an array. + * @throws \WpOrg\Requests\Exception On failure to connect to socket (`fsockopenerror`) + * @throws \WpOrg\Requests\Exception On socket timeout (`timeout`) + */ + public function request($url, $headers = [], $data = [], $options = []) + { + } + /** + * Send multiple requests simultaneously + * + * @param array $requests Request data (array of 'url', 'headers', 'data', 'options') as per {@see \WpOrg\Requests\Transport::request()} + * @param array $options Global options, see {@see \WpOrg\Requests\Requests::response()} for documentation + * @return array Array of \WpOrg\Requests\Response objects (may contain \WpOrg\Requests\Exception or string responses as well) + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $requests argument is not an array or iterable object with array access. + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $options argument is not an array. + */ + public function request_multiple($requests, $options) + { + } + /** + * Error handler for stream_socket_client() + * + * @param int $errno Error number (e.g. E_WARNING) + * @param string $errstr Error message + */ + public function connect_error_handler($errno, $errstr) + { + } + /** + * Verify the certificate against common name and subject alternative names + * + * Unfortunately, PHP doesn't check the certificate against the alternative + * names, leading things like 'https://www.github.com/' to be invalid. + * Instead + * + * @link https://tools.ietf.org/html/rfc2818#section-3.1 RFC2818, Section 3.1 + * + * @param string $host Host name to verify against + * @param resource $context Stream context + * @return bool + * + * @throws \WpOrg\Requests\Exception On failure to connect via TLS (`fsockopen.ssl.connect_error`) + * @throws \WpOrg\Requests\Exception On not obtaining a match for the host (`fsockopen.ssl.no_match`) + */ + public function verify_certificate_from_context($host, $context) + { + } + /** + * Self-test whether the transport can be used. + * + * The available capabilities to test for can be found in {@see \WpOrg\Requests\Capability}. + * + * @codeCoverageIgnore + * @param array $capabilities Optional. Associative array of capabilities to test against, i.e. `['' => true]`. + * @return bool Whether the transport can be used. + */ + public static function test($capabilities = []) + { + } + } +} +namespace WpOrg\Requests\Utility { + /** + * Iterator for arrays requiring filtered values + * + * @package Requests\Utilities + */ + final class FilteredIterator extends \ArrayIterator + { + /** + * Create a new iterator + * + * @param array $data The array or object to be iterated on. + * @param callable $callback Callback to be called on each value + * + * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $data argument is not iterable. + */ + public function __construct($data, $callback) + { + } + /** + * Prevent unserialization of the object for security reasons. + * + * @phpcs:disable PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound + * + * @param array $data Restored array of data originally serialized. + * + * @return void + */ + #[\ReturnTypeWillChange] + public function __unserialize($data) + { + } + /** + * Perform reinitialization tasks. + * + * Prevents a callback from being injected during unserialization of an object. + * + * @return void + */ + public function __wakeup() + { + } + /** + * Get the current item's value after filtering + * + * @return string + */ + #[\ReturnTypeWillChange] + public function current() + { + } + /** + * Prevent creating a PHP value from a stored representation of the object for security reasons. + * + * @param string $data The serialized string. + * + * @return void + */ + #[\ReturnTypeWillChange] + public function unserialize($data) + { + } + } + /** + * Input validation utilities. + * + * @package Requests\Utilities + */ + final class InputValidator + { + /** + * Verify that a received input parameter is of type string or is "stringable". + * + * @param mixed $input Input parameter to verify. + * + * @return bool + */ + public static function is_string_or_stringable($input) + { + } + /** + * Verify whether a received input parameter is usable as an integer array key. + * + * @param mixed $input Input parameter to verify. + * + * @return bool + */ + public static function is_numeric_array_key($input) + { + } + /** + * Verify whether a received input parameter is "stringable". + * + * @param mixed $input Input parameter to verify. + * + * @return bool + */ + public static function is_stringable_object($input) + { + } + /** + * Verify whether a received input parameter is _accessible as if it were an array_. + * + * @param mixed $input Input parameter to verify. + * + * @return bool + */ + public static function has_array_access($input) + { + } + /** + * Verify whether a received input parameter is "iterable". + * + * @internal The PHP native `is_iterable()` function was only introduced in PHP 7.1 + * and this library still supports PHP 5.6. + * + * @param mixed $input Input parameter to verify. + * + * @return bool + */ + public static function is_iterable($input) + { + } + /** + * Verify whether a received input parameter is a Curl handle. + * + * The PHP Curl extension worked with resources prior to PHP 8.0 and with + * an instance of the `CurlHandle` class since PHP 8.0. + * {@link https://www.php.net/manual/en/migration80.incompatible.php#migration80.incompatible.resource2object} + * + * @param mixed $input Input parameter to verify. + * + * @return bool + */ + public static function is_curl_handle($input) + { + } + } +} +namespace { + /** + * Autoloader class + */ + class SimplePie_Autoloader + { + protected $path; + /** + * Constructor + */ + public function __construct() + { + } + /** + * Autoloader + * + * @param string $class The name of the class to attempt to load. + * @phpstan-return void + */ + public function autoload($class) + { + } + } +} +namespace SimplePie { + /** + * SimplePie + */ + class SimplePie + { + /** + * SimplePie Name + */ + public const NAME = 'SimplePie'; + /** + * SimplePie Version + */ + public const VERSION = '1.9.0'; + /** + * SimplePie Website URL + */ + public const URL = 'http://simplepie.org'; + /** + * SimplePie Linkback + */ + public const LINKBACK = '' . self::NAME . ''; + /** + * No Autodiscovery + * @see SimplePie::set_autodiscovery_level() + */ + public const LOCATOR_NONE = 0; + /** + * Feed Link Element Autodiscovery + * @see SimplePie::set_autodiscovery_level() + */ + public const LOCATOR_AUTODISCOVERY = 1; + /** + * Local Feed Extension Autodiscovery + * @see SimplePie::set_autodiscovery_level() + */ + public const LOCATOR_LOCAL_EXTENSION = 2; + /** + * Local Feed Body Autodiscovery + * @see SimplePie::set_autodiscovery_level() + */ + public const LOCATOR_LOCAL_BODY = 4; + /** + * Remote Feed Extension Autodiscovery + * @see SimplePie::set_autodiscovery_level() + */ + public const LOCATOR_REMOTE_EXTENSION = 8; + /** + * Remote Feed Body Autodiscovery + * @see SimplePie::set_autodiscovery_level() + */ + public const LOCATOR_REMOTE_BODY = 16; + /** + * All Feed Autodiscovery + * @see SimplePie::set_autodiscovery_level() + */ + public const LOCATOR_ALL = 31; + /** + * No known feed type + */ + public const TYPE_NONE = 0; + /** + * RSS 0.90 + */ + public const TYPE_RSS_090 = 1; + /** + * RSS 0.91 (Netscape) + */ + public const TYPE_RSS_091_NETSCAPE = 2; + /** + * RSS 0.91 (Userland) + */ + public const TYPE_RSS_091_USERLAND = 4; + /** + * RSS 0.91 (both Netscape and Userland) + */ + public const TYPE_RSS_091 = 6; + /** + * RSS 0.92 + */ + public const TYPE_RSS_092 = 8; + /** + * RSS 0.93 + */ + public const TYPE_RSS_093 = 16; + /** + * RSS 0.94 + */ + public const TYPE_RSS_094 = 32; + /** + * RSS 1.0 + */ + public const TYPE_RSS_10 = 64; + /** + * RSS 2.0 + */ + public const TYPE_RSS_20 = 128; + /** + * RDF-based RSS + */ + public const TYPE_RSS_RDF = 65; + /** + * Non-RDF-based RSS (truly intended as syndication format) + */ + public const TYPE_RSS_SYNDICATION = 190; + /** + * All RSS + */ + public const TYPE_RSS_ALL = 255; + /** + * Atom 0.3 + */ + public const TYPE_ATOM_03 = 256; + /** + * Atom 1.0 + */ + public const TYPE_ATOM_10 = 512; + /** + * All Atom + */ + public const TYPE_ATOM_ALL = 768; + /** + * All feed types + */ + public const TYPE_ALL = 1023; + /** + * No construct + */ + public const CONSTRUCT_NONE = 0; + /** + * Text construct + */ + public const CONSTRUCT_TEXT = 1; + /** + * HTML construct + */ + public const CONSTRUCT_HTML = 2; + /** + * XHTML construct + */ + public const CONSTRUCT_XHTML = 4; + /** + * base64-encoded construct + */ + public const CONSTRUCT_BASE64 = 8; + /** + * IRI construct + */ + public const CONSTRUCT_IRI = 16; + /** + * A construct that might be HTML + */ + public const CONSTRUCT_MAYBE_HTML = 32; + /** + * All constructs + */ + public const CONSTRUCT_ALL = 63; + /** + * Don't change case + */ + public const SAME_CASE = 1; + /** + * Change to lowercase + */ + public const LOWERCASE = 2; + /** + * Change to uppercase + */ + public const UPPERCASE = 4; + /** + * PCRE for HTML attributes + */ + public const PCRE_HTML_ATTRIBUTE = '((?:[\x09\x0A\x0B\x0C\x0D\x20]+[^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3D\x3E]*(?:[\x09\x0A\x0B\x0C\x0D\x20]*=[\x09\x0A\x0B\x0C\x0D\x20]*(?:"(?:[^"]*)"|\'(?:[^\']*)\'|(?:[^\x09\x0A\x0B\x0C\x0D\x20\x22\x27\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x3E]*)?))?)*)[\x09\x0A\x0B\x0C\x0D\x20]*'; + /** + * PCRE for XML attributes + */ + public const PCRE_XML_ATTRIBUTE = '((?:\s+(?:(?:[^\s:]+:)?[^\s:]+)\s*=\s*(?:"(?:[^"]*)"|\'(?:[^\']*)\'))*)\s*'; + /** + * XML Namespace + */ + public const NAMESPACE_XML = 'http://www.w3.org/XML/1998/namespace'; + /** + * Atom 1.0 Namespace + */ + public const NAMESPACE_ATOM_10 = 'http://www.w3.org/2005/Atom'; + /** + * Atom 0.3 Namespace + */ + public const NAMESPACE_ATOM_03 = 'http://purl.org/atom/ns#'; + /** + * RDF Namespace + */ + public const NAMESPACE_RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'; + /** + * RSS 0.90 Namespace + */ + public const NAMESPACE_RSS_090 = 'http://my.netscape.com/rdf/simple/0.9/'; + /** + * RSS 1.0 Namespace + */ + public const NAMESPACE_RSS_10 = 'http://purl.org/rss/1.0/'; + /** + * RSS 1.0 Content Module Namespace + */ + public const NAMESPACE_RSS_10_MODULES_CONTENT = 'http://purl.org/rss/1.0/modules/content/'; + /** + * RSS 2.0 Namespace + * (Stupid, I know, but I'm certain it will confuse people less with support.) + */ + public const NAMESPACE_RSS_20 = ''; + /** + * DC 1.0 Namespace + */ + public const NAMESPACE_DC_10 = 'http://purl.org/dc/elements/1.0/'; + /** + * DC 1.1 Namespace + */ + public const NAMESPACE_DC_11 = 'http://purl.org/dc/elements/1.1/'; + /** + * W3C Basic Geo (WGS84 lat/long) Vocabulary Namespace + */ + public const NAMESPACE_W3C_BASIC_GEO = 'http://www.w3.org/2003/01/geo/wgs84_pos#'; + /** + * GeoRSS Namespace + */ + public const NAMESPACE_GEORSS = 'http://www.georss.org/georss'; + /** + * Media RSS Namespace + */ + public const NAMESPACE_MEDIARSS = 'http://search.yahoo.com/mrss/'; + /** + * Wrong Media RSS Namespace. Caused by a long-standing typo in the spec. + */ + public const NAMESPACE_MEDIARSS_WRONG = 'http://search.yahoo.com/mrss'; + /** + * Wrong Media RSS Namespace #2. New namespace introduced in Media RSS 1.5. + */ + public const NAMESPACE_MEDIARSS_WRONG2 = 'http://video.search.yahoo.com/mrss'; + /** + * Wrong Media RSS Namespace #3. A possible typo of the Media RSS 1.5 namespace. + */ + public const NAMESPACE_MEDIARSS_WRONG3 = 'http://video.search.yahoo.com/mrss/'; + /** + * Wrong Media RSS Namespace #4. New spec location after the RSS Advisory Board takes it over, but not a valid namespace. + */ + public const NAMESPACE_MEDIARSS_WRONG4 = 'http://www.rssboard.org/media-rss'; + /** + * Wrong Media RSS Namespace #5. A possible typo of the RSS Advisory Board URL. + */ + public const NAMESPACE_MEDIARSS_WRONG5 = 'http://www.rssboard.org/media-rss/'; + /** + * iTunes RSS Namespace + */ + public const NAMESPACE_ITUNES = 'http://www.itunes.com/dtds/podcast-1.0.dtd'; + /** + * XHTML Namespace + */ + public const NAMESPACE_XHTML = 'http://www.w3.org/1999/xhtml'; + /** + * IANA Link Relations Registry + */ + public const IANA_LINK_RELATIONS_REGISTRY = 'http://www.iana.org/assignments/relation/'; + /** + * No file source + */ + public const FILE_SOURCE_NONE = 0; + /** + * Remote file source + */ + public const FILE_SOURCE_REMOTE = 1; + /** + * Local file source + */ + public const FILE_SOURCE_LOCAL = 2; + /** + * fsockopen() file source + */ + public const FILE_SOURCE_FSOCKOPEN = 4; + /** + * cURL file source + */ + public const FILE_SOURCE_CURL = 8; + /** + * file_get_contents() file source + */ + public const FILE_SOURCE_FILE_GET_CONTENTS = 16; + /** + * @internal Default value of the HTTP Accept header when fetching/locating feeds + */ + public const DEFAULT_HTTP_ACCEPT_HEADER = 'application/atom+xml, application/rss+xml, application/rdf+xml;q=0.9, application/xml;q=0.8, text/xml;q=0.8, text/html;q=0.7, unknown/unknown;q=0.1, application/unknown;q=0.1, */*;q=0.1'; + /** + * @var array Raw data + * @access private + */ + public $data = []; + /** + * @var string|string[]|null Error string (or array when multiple feeds are initialized) + * @access private + */ + public $error = null; + /** + * @var int HTTP status code + * @see SimplePie::status_code() + * @access private + */ + public $status_code = 0; + /** + * @var Sanitize instance of Sanitize class + * @see SimplePie::set_sanitize_class() + * @access private + */ + public $sanitize; + /** + * @var string SimplePie Useragent + * @see SimplePie::set_useragent() + * @access private + */ + public $useragent = ''; + /** + * @var string Feed URL + * @see SimplePie::set_feed_url() + * @access private + */ + public $feed_url; + /** + * @var ?string Original feed URL, or new feed URL iff HTTP 301 Moved Permanently + * @see SimplePie::subscribe_url() + * @access private + */ + public $permanent_url = null; + /** + * @var string|false Raw feed data + * @see SimplePie::set_raw_data() + * @access private + */ + public $raw_data; + /** + * @var int Timeout for fetching remote files + * @see SimplePie::set_timeout() + * @access private + */ + public $timeout = 10; + /** + * @var array Custom curl options + * @see SimplePie::set_curl_options() + * @access private + */ + public $curl_options = []; + /** + * @var bool Forces fsockopen() to be used for remote files instead + * of cURL, even if a new enough version is installed + * @see SimplePie::force_fsockopen() + * @access private + */ + public $force_fsockopen = false; + /** + * @var bool Force the given data/URL to be treated as a feed no matter what + * it appears like + * @see SimplePie::force_feed() + * @access private + */ + public $force_feed = false; + /** + * @var bool Force SimplePie to fallback to expired cache, if enabled, + * when feed is unavailable. + * @see SimplePie::force_cache_fallback() + * @access private + */ + public $force_cache_fallback = false; + /** + * @var int Cache duration (in seconds) + * @see SimplePie::set_cache_duration() + * @access private + */ + public $cache_duration = 3600; + /** + * @var int Auto-discovery cache duration (in seconds) + * @see SimplePie::set_autodiscovery_cache_duration() + * @access private + */ + public $autodiscovery_cache_duration = 604800; + /** + * @var string Cache location (relative to executing script) + * @see SimplePie::set_cache_location() + * @access private + */ + public $cache_location = './cache'; + /** + * @var string&(callable(string): string) Function that creates the cache filename + * @see SimplePie::set_cache_name_function() + * @access private + */ + public $cache_name_function = 'md5'; + /** + * @var bool Reorder feed by date descending + * @see SimplePie::enable_order_by_date() + * @access private + */ + public $order_by_date = true; + /** + * @var mixed Force input encoding to be set to the follow value + * (false, or anything type-cast to false, disables this feature) + * @see SimplePie::set_input_encoding() + * @access private + */ + public $input_encoding = false; + /** + * @var self::LOCATOR_* Feed Autodiscovery Level + * @see SimplePie::set_autodiscovery_level() + * @access private + */ + public $autodiscovery = self::LOCATOR_ALL; + /** + * Class registry object + * + * @var Registry + */ + public $registry; + /** + * @var int Maximum number of feeds to check with autodiscovery + * @see SimplePie::set_max_checked_feeds() + * @access private + */ + public $max_checked_feeds = 10; + /** + * @var array|null All the feeds found during the autodiscovery process + * @see SimplePie::get_all_discovered_feeds() + * @access private + */ + public $all_discovered_feeds = []; + /** + * @var string Web-accessible path to the handler_image.php file. + * @see SimplePie::set_image_handler() + * @access private + */ + public $image_handler = ''; + /** + * @var array Stores the URLs when multiple feeds are being initialized. + * @see SimplePie::set_feed_url() + * @access private + */ + public $multifeed_url = []; + /** + * @var array Stores SimplePie objects when multiple feeds initialized. + * @access private + */ + public $multifeed_objects = []; + /** + * @var array Stores the get_object_vars() array for use with multifeeds. + * @see SimplePie::set_feed_url() + * @access private + */ + public $config_settings = null; + /** + * @var int Stores the number of items to return per-feed with multifeeds. + * @see SimplePie::set_item_limit() + * @access private + */ + public $item_limit = 0; + /** + * @var bool Stores if last-modified and/or etag headers were sent with the + * request when checking a feed. + */ + public $check_modified = false; + /** + * @var array Stores the default attributes to be stripped by strip_attributes(). + * @see SimplePie::strip_attributes() + * @access private + */ + public $strip_attributes = ['bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc']; + /** + * @var array> Stores the default attributes to add to different tags by add_attributes(). + * @see SimplePie::add_attributes() + * @access private + */ + public $add_attributes = ['audio' => ['preload' => 'none'], 'iframe' => ['sandbox' => 'allow-scripts allow-same-origin'], 'video' => ['preload' => 'none']]; + /** + * @var array Stores the default tags to be stripped by strip_htmltags(). + * @see SimplePie::strip_htmltags() + * @access private + */ + public $strip_htmltags = ['base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style']; + /** + * @var string[]|string Stores the default attributes to be renamed by rename_attributes(). + * @see SimplePie::rename_attributes() + * @access private + */ + public $rename_attributes = []; + /** + * @var bool Should we throw exceptions, or use the old-style error property? + * @access private + */ + public $enable_exceptions = false; + /** + * The SimplePie class contains feed level data and options + * + * To use SimplePie, create the SimplePie object with no parameters. You can + * then set configuration options using the provided methods. After setting + * them, you must initialise the feed using $feed->init(). At that point the + * object's methods and properties will be available to you. + * + * Previously, it was possible to pass in the feed URL along with cache + * options directly into the constructor. This has been removed as of 1.3 as + * it caused a lot of confusion. + * + * @since 1.0 Preview Release + */ + public function __construct() + { + } + /** + * Used for converting object to a string + * @return string + */ + public function __toString() + { + } + /** + * Remove items that link back to this before destroying this object + * @return void + */ + public function __destruct() + { + } + /** + * Force the given data/URL to be treated as a feed + * + * This tells SimplePie to ignore the content-type provided by the server. + * Be careful when using this option, as it will also disable autodiscovery. + * + * @since 1.1 + * @param bool $enable Force the given data/URL to be treated as a feed + * @return void + */ + public function force_feed(bool $enable = false) + { + } + /** + * Set the URL of the feed you want to parse + * + * This allows you to enter the URL of the feed you want to parse, or the + * website you want to try to use auto-discovery on. This takes priority + * over any set raw data. + * + * Deprecated since 1.9.0: You can set multiple feeds to mash together by passing an array instead + * of a string for the $url. Remember that with each additional feed comes + * additional processing and resources. + * + * @since 1.0 Preview Release + * @see set_raw_data() + * @param string|string[] $url This is the URL (or (deprecated) array of URLs) that you want to parse. + * @return void + */ + public function set_feed_url($url) + { + } + /** + * Set an instance of {@see File} to use as a feed + * + * @deprecated since SimplePie 1.9.0, use \SimplePie\SimplePie::set_http_client() or \SimplePie\SimplePie::set_raw_data() instead. + * + * @param File &$file + * @return bool True on success, false on failure + */ + public function set_file(\SimplePie\File &$file) + { + } + /** + * Set the raw XML data to parse + * + * Allows you to use a string of RSS/Atom data instead of a remote feed. + * + * If you have a feed available as a string in PHP, you can tell SimplePie + * to parse that data string instead of a remote feed. Any set feed URL + * takes precedence. + * + * @since 1.0 Beta 3 + * @param string $data RSS or Atom data as a string. + * @see set_feed_url() + * @return void + */ + public function set_raw_data(string $data) + { + } + /** + * Set a PSR-18 client and PSR-17 factories + * + * Allows you to use your own HTTP client implementations. + * This will become required with SimplePie 2.0.0. + */ + final public function set_http_client(\Psr\Http\Client\ClientInterface $http_client, \Psr\Http\Message\RequestFactoryInterface $request_factory, \Psr\Http\Message\UriFactoryInterface $uri_factory): void + { + } + /** + * Set the default timeout for fetching remote feeds + * + * This allows you to change the maximum time the feed's server to respond + * and send the feed back. + * + * @since 1.0 Beta 3 + * @param int $timeout The maximum number of seconds to spend waiting to retrieve a feed. + * @return void + */ + public function set_timeout(int $timeout = 10) + { + } + /** + * Set custom curl options + * + * This allows you to change default curl options + * + * @since 1.0 Beta 3 + * @param array $curl_options Curl options to add to default settings + * @return void + */ + public function set_curl_options(array $curl_options = []) + { + } + /** + * Force SimplePie to use fsockopen() instead of cURL + * + * @since 1.0 Beta 3 + * @param bool $enable Force fsockopen() to be used + * @return void + */ + public function force_fsockopen(bool $enable = false) + { + } + /** + * Enable/disable caching in SimplePie. + * + * This option allows you to disable caching all-together in SimplePie. + * However, disabling the cache can lead to longer load times. + * + * @since 1.0 Preview Release + * @param bool $enable Enable caching + * @return void + */ + public function enable_cache(bool $enable = true) + { + } + /** + * Set a PSR-16 implementation as cache + * + * @param CacheInterface $cache The PSR-16 cache implementation + * + * @return void + */ + public function set_cache(\Psr\SimpleCache\CacheInterface $cache) + { + } + /** + * SimplePie to continue to fall back to expired cache, if enabled, when + * feed is unavailable. + * + * This tells SimplePie to ignore any file errors and fall back to cache + * instead. This only works if caching is enabled and cached content + * still exists. + * + * @deprecated since SimplePie 1.8.0, expired cache will not be used anymore. + * + * @param bool $enable Force use of cache on fail. + * @return void + */ + public function force_cache_fallback(bool $enable = false) + { + } + /** + * Set the length of time (in seconds) that the contents of a feed will be + * cached + * + * @param int $seconds The feed content cache duration + * @return void + */ + public function set_cache_duration(int $seconds = 3600) + { + } + /** + * Set the length of time (in seconds) that the autodiscovered feed URL will + * be cached + * + * @param int $seconds The autodiscovered feed URL cache duration. + * @return void + */ + public function set_autodiscovery_cache_duration(int $seconds = 604800) + { + } + /** + * Set the file system location where the cached files should be stored + * + * @deprecated since SimplePie 1.8.0, use SimplePie::set_cache() instead. + * + * @param string $location The file system location. + * @return void + */ + public function set_cache_location(string $location = './cache') + { + } + /** + * Return the filename (i.e. hash, without path and without extension) of the file to cache a given URL. + * + * @param string $url The URL of the feed to be cached. + * @return string A filename (i.e. hash, without path and without extension). + */ + public function get_cache_filename(string $url) + { + } + /** + * Set whether feed items should be sorted into reverse chronological order + * + * @param bool $enable Sort as reverse chronological order. + * @return void + */ + public function enable_order_by_date(bool $enable = true) + { + } + /** + * Set the character encoding used to parse the feed + * + * This overrides the encoding reported by the feed, however it will fall + * back to the normal encoding detection if the override fails + * + * @param string|false $encoding Character encoding + * @return void + */ + public function set_input_encoding($encoding = false) + { + } + /** + * Set how much feed autodiscovery to do + * + * @see self::LOCATOR_NONE + * @see self::LOCATOR_AUTODISCOVERY + * @see self::LOCATOR_LOCAL_EXTENSION + * @see self::LOCATOR_LOCAL_BODY + * @see self::LOCATOR_REMOTE_EXTENSION + * @see self::LOCATOR_REMOTE_BODY + * @see self::LOCATOR_ALL + * @param self::LOCATOR_* $level Feed Autodiscovery Level (level can be a combination of the above constants, see bitwise OR operator) + * @return void + */ + public function set_autodiscovery_level(int $level = self::LOCATOR_ALL) + { + } + /** + * Get the class registry + * + * Use this to override SimplePie's default classes + * + * @return Registry + */ + public function &get_registry() + { + } + /** + * Set which class SimplePie uses for caching + * + * @deprecated since SimplePie 1.3, use {@see set_cache()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_cache_class(string $class = \SimplePie\Cache::class) + { + } + /** + * Set which class SimplePie uses for auto-discovery + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_locator_class(string $class = \SimplePie\Locator::class) + { + } + /** + * Set which class SimplePie uses for XML parsing + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_parser_class(string $class = \SimplePie\Parser::class) + { + } + /** + * Set which class SimplePie uses for remote file fetching + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_file_class(string $class = \SimplePie\File::class) + { + } + /** + * Set which class SimplePie uses for data sanitization + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_sanitize_class(string $class = \SimplePie\Sanitize::class) + { + } + /** + * Set which class SimplePie uses for handling feed items + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_item_class(string $class = \SimplePie\Item::class) + { + } + /** + * Set which class SimplePie uses for handling author data + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_author_class(string $class = \SimplePie\Author::class) + { + } + /** + * Set which class SimplePie uses for handling category data + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_category_class(string $class = \SimplePie\Category::class) + { + } + /** + * Set which class SimplePie uses for feed enclosures + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_enclosure_class(string $class = \SimplePie\Enclosure::class) + { + } + /** + * Set which class SimplePie uses for `` captions + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_caption_class(string $class = \SimplePie\Caption::class) + { + } + /** + * Set which class SimplePie uses for `` + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_copyright_class(string $class = \SimplePie\Copyright::class) + { + } + /** + * Set which class SimplePie uses for `` + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_credit_class(string $class = \SimplePie\Credit::class) + { + } + /** + * Set which class SimplePie uses for `` + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_rating_class(string $class = \SimplePie\Rating::class) + { + } + /** + * Set which class SimplePie uses for `` + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_restriction_class(string $class = \SimplePie\Restriction::class) + { + } + /** + * Set which class SimplePie uses for content-type sniffing + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_content_type_sniffer_class(string $class = \SimplePie\Content\Type\Sniffer::class) + { + } + /** + * Set which class SimplePie uses item sources + * + * @deprecated since SimplePie 1.3, use {@see get_registry()} instead + * + * @param class-string $class Name of custom class + * + * @return bool True on success, false otherwise + */ + public function set_source_class(string $class = \SimplePie\Source::class) + { + } + /** + * Set the user agent string + * + * @param string $ua New user agent string. + * @return void + */ + public function set_useragent(?string $ua = null) + { + } + /** + * Set a namefilter to modify the cache filename with + * + * @param NameFilter $filter + * + * @return void + */ + public function set_cache_namefilter(\SimplePie\Cache\NameFilter $filter): void + { + } + /** + * Set callback function to create cache filename with + * + * @deprecated since SimplePie 1.8.0, use {@see set_cache_namefilter()} instead + * + * @param (string&(callable(string): string))|null $function Callback function + * @return void + */ + public function set_cache_name_function(?string $function = null) + { + } + /** + * Set options to make SP as fast as possible + * + * Forgoes a substantial amount of data sanitization in favor of speed. This + * turns SimplePie into a dumb parser of feeds. + * + * @param bool $set Whether to set them or not + * @return void + */ + public function set_stupidly_fast(bool $set = false) + { + } + /** + * Set maximum number of feeds to check with autodiscovery + * + * @param int $max Maximum number of feeds to check + * @return void + */ + public function set_max_checked_feeds(int $max = 10) + { + } + /** + * @return void + */ + public function remove_div(bool $enable = true) + { + } + /** + * @param string[]|string|false $tags Set a list of tags to strip, or set empty string to use default tags, or false to strip nothing. + * @return void + */ + public function strip_htmltags($tags = '', ?bool $encode = null) + { + } + /** + * @return void + */ + public function encode_instead_of_strip(bool $enable = true) + { + } + /** + * @param string[]|string $attribs + * @return void + */ + public function rename_attributes($attribs = '') + { + } + /** + * @param string[]|string $attribs + * @return void + */ + public function strip_attributes($attribs = '') + { + } + /** + * @param array>|'' $attribs + * @return void + */ + public function add_attributes($attribs = '') + { + } + /** + * Set the output encoding + * + * Allows you to override SimplePie's output to match that of your webpage. + * This is useful for times when your webpages are not being served as + * UTF-8. This setting will be obeyed by {@see handle_content_type()}, and + * is similar to {@see set_input_encoding()}. + * + * It should be noted, however, that not all character encodings can support + * all characters. If your page is being served as ISO-8859-1 and you try + * to display a Japanese feed, you'll likely see garbled characters. + * Because of this, it is highly recommended to ensure that your webpages + * are served as UTF-8. + * + * The number of supported character encodings depends on whether your web + * host supports {@link http://php.net/mbstring mbstring}, + * {@link http://php.net/iconv iconv}, or both. See + * {@link http://simplepie.org/wiki/faq/Supported_Character_Encodings} for + * more information. + * + * @param string $encoding + * @return void + */ + public function set_output_encoding(string $encoding = 'UTF-8') + { + } + /** + * @return void + */ + public function strip_comments(bool $strip = false) + { + } + /** + * Set element/attribute key/value pairs of HTML attributes + * containing URLs that need to be resolved relative to the feed + * + * Defaults to |a|@href, |area|@href, |blockquote|@cite, |del|@cite, + * |form|@action, |img|@longdesc, |img|@src, |input|@src, |ins|@cite, + * |q|@cite + * + * @since 1.0 + * @param array|null $element_attribute Element/attribute key/value pairs, null for default + * @return void + */ + public function set_url_replacements(?array $element_attribute = null) + { + } + /** + * Set the list of domains for which to force HTTPS. + * @see Sanitize::set_https_domains() + * @param array $domains List of HTTPS domains. Example array('biz', 'example.com', 'example.org', 'www.example.net'). + * @return void + */ + public function set_https_domains(array $domains = []) + { + } + /** + * Set the handler to enable the display of cached images. + * + * @param string|false $page Web-accessible path to the handler_image.php file. + * @param string $qs The query string that the value should be passed to. + * @return void + */ + public function set_image_handler($page = false, string $qs = 'i') + { + } + /** + * Set the limit for items returned per-feed with multifeeds + * + * @param int $limit The maximum number of items to return. + * @return void + */ + public function set_item_limit(int $limit = 0) + { + } + /** + * Enable throwing exceptions + * + * @param bool $enable Should we throw exceptions, or use the old-style error property? + * @return void + */ + public function enable_exceptions(bool $enable = true) + { + } + /** + * Initialize the feed object + * + * This is what makes everything happen. Period. This is where all of the + * configuration options get processed, feeds are fetched, cached, and + * parsed, and all of that other good stuff. + * + * @return bool True if successful, false otherwise + */ + public function init() + { + } + /** + * Fetch the data + * + * If the data is already cached, attempt to fetch it from there instead + * + * @param Base|DataCache|false $cache Cache handler, or false to not load from the cache + * @return array{array, string}|bool Returns true if the data was loaded from the cache, or an array of HTTP headers and sniffed type + */ + protected function fetch_data(&$cache) + { + } + /** + * Get the error message for the occurred error + * + * @return string|string[]|null Error message, or array of messages for multifeeds + */ + public function error() + { + } + /** + * Get the last HTTP status code + * + * @return int Status code + */ + public function status_code() + { + } + /** + * Get the raw XML + * + * This is the same as the old `$feed->enable_xml_dump(true)`, but returns + * the data instead of printing it. + * + * @return string|false Raw XML data, false if the cache is used + */ + public function get_raw_data() + { + } + /** + * Get the character encoding used for output + * + * @since Preview Release + * @return string + */ + public function get_encoding() + { + } + /** + * Send the content-type header with correct encoding + * + * This method ensures that the SimplePie-enabled page is being served with + * the correct {@link http://www.iana.org/assignments/media-types/ mime-type} + * and character encoding HTTP headers (character encoding determined by the + * {@see set_output_encoding} config option). + * + * This won't work properly if any content or whitespace has already been + * sent to the browser, because it relies on PHP's + * {@link http://php.net/header header()} function, and these are the + * circumstances under which the function works. + * + * Because it's setting these settings for the entire page (as is the nature + * of HTTP headers), this should only be used once per page (again, at the + * top). + * + * @param string $mime MIME type to serve the page as + * @return void + */ + public function handle_content_type(string $mime = 'text/html') + { + } + /** + * Get the type of the feed + * + * This returns a self::TYPE_* constant, which can be tested against + * using {@link http://php.net/language.operators.bitwise bitwise operators} + * + * @since 0.8 (usage changed to using constants in 1.0) + * @see self::TYPE_NONE Unknown. + * @see self::TYPE_RSS_090 RSS 0.90. + * @see self::TYPE_RSS_091_NETSCAPE RSS 0.91 (Netscape). + * @see self::TYPE_RSS_091_USERLAND RSS 0.91 (Userland). + * @see self::TYPE_RSS_091 RSS 0.91. + * @see self::TYPE_RSS_092 RSS 0.92. + * @see self::TYPE_RSS_093 RSS 0.93. + * @see self::TYPE_RSS_094 RSS 0.94. + * @see self::TYPE_RSS_10 RSS 1.0. + * @see self::TYPE_RSS_20 RSS 2.0.x. + * @see self::TYPE_RSS_RDF RDF-based RSS. + * @see self::TYPE_RSS_SYNDICATION Non-RDF-based RSS (truly intended as syndication format). + * @see self::TYPE_RSS_ALL Any version of RSS. + * @see self::TYPE_ATOM_03 Atom 0.3. + * @see self::TYPE_ATOM_10 Atom 1.0. + * @see self::TYPE_ATOM_ALL Any version of Atom. + * @see self::TYPE_ALL Any known/supported feed type. + * @return int-mask-of constant + */ + public function get_type() + { + } + /** + * Get the URL for the feed + * + * When the 'permanent' mode is enabled, returns the original feed URL, + * except in the case of an `HTTP 301 Moved Permanently` status response, + * in which case the location of the first redirection is returned. + * + * When the 'permanent' mode is disabled (default), + * may or may not be different from the URL passed to {@see set_feed_url()}, + * depending on whether auto-discovery was used, and whether there were + * any redirects along the way. + * + * @since Preview Release (previously called `get_feed_url()` since SimplePie 0.8.) + * @todo Support + * @todo Also, |atom:link|@rel=self + * @param bool $permanent Permanent mode to return only the original URL or the first redirection + * iff it is a 301 redirection + * @return string|null + */ + public function subscribe_url(bool $permanent = false) + { + } + /** + * Get data for an feed-level element + * + * This method allows you to get access to ANY element/attribute that is a + * sub-element of the opening feed tag. + * + * The return value is an indexed array of elements matching the given + * namespace and tag name. Each element has `attribs`, `data` and `child` + * subkeys. For `attribs` and `child`, these contain namespace subkeys. + * `attribs` then has one level of associative name => value data (where + * `value` is a string) after the namespace. `child` has tag-indexed keys + * after the namespace, each member of which is an indexed array matching + * this same format. + * + * For example: + *
+         * // This is probably a bad example because we already support
+         * //  natively, but it shows you how to parse through
+         * // the nodes.
+         * $group = $item->get_item_tags(\SimplePie\SimplePie::NAMESPACE_MEDIARSS, 'group');
+         * $content = $group[0]['child'][\SimplePie\SimplePie::NAMESPACE_MEDIARSS]['content'];
+         * $file = $content[0]['attribs']['']['url'];
+         * echo $file;
+         * 
+ * + * @since 1.0 + * @see http://simplepie.org/wiki/faq/supported_xml_namespaces + * @param string $namespace The URL of the XML namespace of the elements you're trying to access + * @param string $tag Tag name + * @return array>|null + */ + public function get_feed_tags(string $namespace, string $tag) + { + } + /** + * Get data for an channel-level element + * + * This method allows you to get access to ANY element/attribute in the + * channel/header section of the feed. + * + * See {@see SimplePie::get_feed_tags()} for a description of the return value + * + * @since 1.0 + * @see http://simplepie.org/wiki/faq/supported_xml_namespaces + * @param string $namespace The URL of the XML namespace of the elements you're trying to access + * @param string $tag Tag name + * @return array>|null + */ + public function get_channel_tags(string $namespace, string $tag) + { + } + /** + * Get data for an channel-level element + * + * This method allows you to get access to ANY element/attribute in the + * image/logo section of the feed. + * + * See {@see SimplePie::get_feed_tags()} for a description of the return value + * + * @since 1.0 + * @see http://simplepie.org/wiki/faq/supported_xml_namespaces + * @param string $namespace The URL of the XML namespace of the elements you're trying to access + * @param string $tag Tag name + * @return array>|null + */ + public function get_image_tags(string $namespace, string $tag) + { + } + /** + * Get the base URL value from the feed + * + * Uses `` if available, + * otherwise uses the first 'self' link or the first 'alternate' link of the feed, + * or failing that, the URL of the feed itself. + * + * @see get_link + * @see subscribe_url + * + * @param array $element + * @return string + */ + public function get_base(array $element = []) + { + } + /** + * Sanitize feed data + * + * @access private + * @see Sanitize::sanitize() + * @param string $data Data to sanitize + * @param int-mask-of $type + * @param string $base Base URL to resolve URLs against + * @return string Sanitized data + */ + public function sanitize(string $data, int $type, string $base = '') + { + } + /** + * Get the title of the feed + * + * Uses ``, `` or `<dc:title>` + * + * @since 1.0 (previously called `get_feed_title` since 0.8) + * @return string|null + */ + public function get_title() + { + } + /** + * Get a category for the feed + * + * @since Unknown + * @param int $key The category that you want to return. Remember that arrays begin with 0, not 1 + * @return Category|null + */ + public function get_category(int $key = 0) + { + } + /** + * Get all categories for the feed + * + * Uses `<atom:category>`, `<category>` or `<dc:subject>` + * + * @since Unknown + * @return array<Category>|null List of {@see Category} objects + */ + public function get_categories() + { + } + /** + * Get an author for the feed + * + * @since 1.1 + * @param int $key The author that you want to return. Remember that arrays begin with 0, not 1 + * @return Author|null + */ + public function get_author(int $key = 0) + { + } + /** + * Get all authors for the feed + * + * Uses `<atom:author>`, `<author>`, `<dc:creator>` or `<itunes:author>` + * + * @since 1.1 + * @return array<Author>|null List of {@see Author} objects + */ + public function get_authors() + { + } + /** + * Get a contributor for the feed + * + * @since 1.1 + * @param int $key The contrbutor that you want to return. Remember that arrays begin with 0, not 1 + * @return Author|null + */ + public function get_contributor(int $key = 0) + { + } + /** + * Get all contributors for the feed + * + * Uses `<atom:contributor>` + * + * @since 1.1 + * @return array<Author>|null List of {@see Author} objects + */ + public function get_contributors() + { + } + /** + * Get a single link for the feed + * + * @since 1.0 (previously called `get_feed_link` since Preview Release, `get_feed_permalink()` since 0.8) + * @param int $key The link that you want to return. Remember that arrays begin with 0, not 1 + * @param string $rel The relationship of the link to return + * @return string|null Link URL + */ + public function get_link(int $key = 0, string $rel = 'alternate') + { + } + /** + * Get the permalink for the item + * + * Returns the first link available with a relationship of "alternate". + * Identical to {@see get_link()} with key 0 + * + * @see get_link + * @since 1.0 (previously called `get_feed_link` since Preview Release, `get_feed_permalink()` since 0.8) + * @internal Added for parity between the parent-level and the item/entry-level. + * @return string|null Link URL + */ + public function get_permalink() + { + } + /** + * Get all links for the feed + * + * Uses `<atom:link>` or `<link>` + * + * @since Beta 2 + * @param string $rel The relationship of links to return + * @return array<string>|null Links found for the feed (strings) + */ + public function get_links(string $rel = 'alternate') + { + } + /** + * @return ?array<Response> + */ + public function get_all_discovered_feeds() + { + } + /** + * Get the content for the item + * + * Uses `<atom:subtitle>`, `<atom:tagline>`, `<description>`, + * `<dc:description>`, `<itunes:summary>` or `<itunes:subtitle>` + * + * @since 1.0 (previously called `get_feed_description()` since 0.8) + * @return string|null + */ + public function get_description() + { + } + /** + * Get the copyright info for the feed + * + * Uses `<atom:rights>`, `<atom:copyright>` or `<dc:rights>` + * + * @since 1.0 (previously called `get_feed_copyright()` since 0.8) + * @return string|null + */ + public function get_copyright() + { + } + /** + * Get the language for the feed + * + * Uses `<language>`, `<dc:language>`, or @xml_lang + * + * @since 1.0 (previously called `get_feed_language()` since 0.8) + * @return string|null + */ + public function get_language() + { + } + /** + * Get the latitude coordinates for the item + * + * Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications + * + * Uses `<geo:lat>` or `<georss:point>` + * + * @since 1.0 + * @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo + * @link http://www.georss.org/ GeoRSS + * @return float|null + */ + public function get_latitude() + { + } + /** + * Get the longitude coordinates for the feed + * + * Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications + * + * Uses `<geo:long>`, `<geo:lon>` or `<georss:point>` + * + * @since 1.0 + * @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo + * @link http://www.georss.org/ GeoRSS + * @return float|null + */ + public function get_longitude() + { + } + /** + * Get the feed logo's title + * + * RSS 0.9.0, 1.0 and 2.0 feeds are allowed to have a "feed logo" title. + * + * Uses `<image><title>` or `<image><dc:title>` + * + * @return string|null + */ + public function get_image_title() + { + } + /** + * Get the feed logo's URL + * + * RSS 0.9.0, 2.0, Atom 1.0, and feeds with iTunes RSS tags are allowed to + * have a "feed logo" URL. This points directly to the image itself. + * + * Uses `<itunes:image>`, `<atom:logo>`, `<atom:icon>`, + * `<image><title>` or `<image><dc:title>` + * + * @return string|null + */ + public function get_image_url() + { + } + /** + * Get the feed logo's link + * + * RSS 0.9.0, 1.0 and 2.0 feeds are allowed to have a "feed logo" link. This + * points to a human-readable page that the image should link to. + * + * Uses `<itunes:image>`, `<atom:logo>`, `<atom:icon>`, + * `<image><title>` or `<image><dc:title>` + * + * @return string|null + */ + public function get_image_link() + { + } + /** + * Get the feed logo's link + * + * RSS 2.0 feeds are allowed to have a "feed logo" width. + * + * Uses `<image><width>` or defaults to 88 if no width is specified and + * the feed is an RSS 2.0 feed. + * + * @return int|null + */ + public function get_image_width() + { + } + /** + * Get the feed logo's height + * + * RSS 2.0 feeds are allowed to have a "feed logo" height. + * + * Uses `<image><height>` or defaults to 31 if no height is specified and + * the feed is an RSS 2.0 feed. + * + * @return int|null + */ + public function get_image_height() + { + } + /** + * Get the number of items in the feed + * + * This is well-suited for {@link http://php.net/for for()} loops with + * {@see get_item()} + * + * @param int $max Maximum value to return. 0 for no limit + * @return int Number of items in the feed + */ + public function get_item_quantity(int $max = 0) + { + } + /** + * Get a single item from the feed + * + * This is better suited for {@link http://php.net/for for()} loops, whereas + * {@see get_items()} is better suited for + * {@link http://php.net/foreach foreach()} loops. + * + * @see get_item_quantity() + * @since Beta 2 + * @param int $key The item that you want to return. Remember that arrays begin with 0, not 1 + * @return Item|null + */ + public function get_item(int $key = 0) + { + } + /** + * Get all items from the feed + * + * This is better suited for {@link http://php.net/for for()} loops, whereas + * {@see get_items()} is better suited for + * {@link http://php.net/foreach foreach()} loops. + * + * @see get_item_quantity + * @since Beta 2 + * @param int $start Index to start at + * @param int $end Number of items to return. 0 for all items after `$start` + * @return Item[] List of {@see Item} objects + */ + public function get_items(int $start = 0, int $end = 0) + { + } + /** + * Set the favicon handler + * + * @deprecated Use your own favicon handling instead + * @param string|false $page + * @return bool + */ + public function set_favicon_handler($page = false, string $qs = 'i') + { + } + /** + * Get the favicon for the current feed + * + * @deprecated Use your own favicon handling instead + * @return string|bool + */ + public function get_favicon() + { + } + /** + * Magic method handler + * + * @param string $method Method name + * @param array<mixed> $args Arguments to the method + * @return mixed + */ + public function __call(string $method, array $args) + { + } + /** + * Sorting callback for items + * + * @access private + * @param Item $a + * @param Item $b + * @return -1|0|1 + */ + public static function sort_items(\SimplePie\Item $a, \SimplePie\Item $b) + { + } + /** + * Merge items from several feeds into one + * + * If you're merging multiple feeds together, they need to all have dates + * for the items or else SimplePie will refuse to sort them. + * + * @link http://simplepie.org/wiki/tutorial/sort_multiple_feeds_by_time_and_date#if_feeds_require_separate_per-feed_settings + * @param array<SimplePie> $urls List of SimplePie feed objects to merge + * @param int $start Starting item + * @param int $end Number of items to return + * @param int $limit Maximum number of items per feed + * @return array<Item> + */ + public static function merge_items(array $urls, int $start = 0, int $end = 0, int $limit = 0) + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\SimplePie" instead */ + class SimplePie extends \SimplePie\SimplePie + { + } +} +namespace SimplePie { + /** + * Manages all author-related data + * + * Used by {@see Item::get_author()} and {@see SimplePie::get_authors()} + * + * This class can be overloaded with {@see SimplePie::set_author_class()} + */ + class Author + { + /** + * Author's name + * + * @var ?string + * @see get_name() + */ + public $name; + /** + * Author's link + * + * @var ?string + * @see get_link() + */ + public $link; + /** + * Author's email address + * + * @var ?string + * @see get_email() + */ + public $email; + /** + * Constructor, used to input the data + */ + public function __construct(?string $name = null, ?string $link = null, ?string $email = null) + { + } + /** + * String-ified version + * + * @return string + */ + public function __toString() + { + } + /** + * Author's name + * + * @return string|null + */ + public function get_name() + { + } + /** + * Author's link + * + * @return string|null + */ + public function get_link() + { + } + /** + * Author's email address + * + * @return string|null + */ + public function get_email() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Author" instead */ + class SimplePie_Author extends \SimplePie\Author + { + } +} +namespace SimplePie { + /** + * Used to create cache objects + * + * This class can be overloaded with {@see SimplePie::set_cache_class()}, + * although the preferred way is to create your own handler + * via {@see register()} + * + * @deprecated since SimplePie 1.8.0, use "SimplePie\SimplePie::set_cache()" instead + */ + class Cache + { + /** + * Cache handler classes + * + * These receive 3 parameters to their constructor, as documented in + * {@see register()} + * @var array<string, class-string<Base>> + */ + protected static $handlers = ['mysql' => \SimplePie\Cache\MySQL::class, 'memcache' => \SimplePie\Cache\Memcache::class, 'memcached' => \SimplePie\Cache\Memcached::class, 'redis' => \SimplePie\Cache\Redis::class]; + /** + * Create a new SimplePie\Cache object + * + * @param string $location URL location (scheme is used to determine handler) + * @param string $filename Unique identifier for cache object + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $extension 'spi' or 'spc' + * @return Base Type of object depends on scheme of `$location` + */ + public static function get_handler(string $location, string $filename, $extension) + { + } + /** + * Create a new SimplePie\Cache object + * + * @deprecated since SimplePie 1.3.1, use {@see get_handler()} instead + * @param string $location + * @param string $filename + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $extension + * @return Base + */ + public function create(string $location, string $filename, $extension) + { + } + /** + * Register a handler + * + * @param string $type DSN type to register for + * @param class-string<Base> $class Name of handler class. Must implement Base + * @return void + */ + public static function register(string $type, $class) + { + } + /** + * Parse a URL into an array + * + * @param string $url + * @return array<string, mixed> + */ + public static function parse_URL(string $url) + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache" instead */ + class SimplePie_Cache extends \SimplePie\Cache + { + } +} +namespace SimplePie\Cache { + /** + * Base for cache objects + * + * Classes to be used with {@see \SimplePie\Cache::register()} are expected + * to implement this interface. + * + * @deprecated since SimplePie 1.8.0, use "Psr\SimpleCache\CacheInterface" instead + */ + interface Base + { + /** + * Feed cache type + * + * @var string + */ + public const TYPE_FEED = 'spc'; + /** + * Image cache type + * + * @var string + */ + public const TYPE_IMAGE = 'spi'; + /** + * Create a new cache object + * + * @param string $location Location string (from SimplePie::$cache_location) + * @param string $name Unique ID for the cache + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data + */ + public function __construct(string $location, string $name, $type); + /** + * Save data to the cache + * + * @param array<mixed>|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property + * @return bool Successfulness + */ + public function save($data); + /** + * Retrieve the data saved to the cache + * + * @return array<mixed> Data for SimplePie::$data + */ + public function load(); + /** + * Retrieve the last modified time for the cache + * + * @return int Timestamp + */ + public function mtime(); + /** + * Set the last modified time to the current time + * + * @return bool Success status + */ + public function touch(); + /** + * Remove the cache + * + * @return bool Success status + */ + public function unlink(); + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Base" instead */ + interface SimplePie_Cache_Base extends \SimplePie\Cache\Base + { + } +} +namespace SimplePie\Cache { + /** + * Base class for database-based caches + * + * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead + */ + abstract class DB implements \SimplePie\Cache\Base + { + /** + * Helper for database conversion + * + * Converts a given {@see SimplePie} object into data to be stored + * + * @param \SimplePie\SimplePie $data + * @return array{string, array<string, Item>} First item is the serialized data for storage, second item is the unique ID for this item + */ + protected static function prepare_simplepie_object_for_cache(\SimplePie\SimplePie $data) + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\DB" instead */ + abstract class SimplePie_Cache_DB extends \SimplePie\Cache\DB + { + } +} +namespace SimplePie\Cache { + /** + * Caches data to the filesystem + * + * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead + */ + class File implements \SimplePie\Cache\Base + { + /** + * Location string + * + * @see SimplePie::$cache_location + * @var string + */ + protected $location; + /** + * Filename + * + * @var string + */ + protected $filename; + /** + * File extension + * + * @var string + */ + protected $extension; + /** + * File path + * + * @var string + */ + protected $name; + /** + * Create a new cache object + * + * @param string $location Location string (from SimplePie::$cache_location) + * @param string $name Unique ID for the cache + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data + * @phpstan-return void + */ + public function __construct(string $location, string $name, $type) + { + } + /** + * Save data to the cache + * + * @param array<mixed>|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property + * @return bool Successfulness + */ + public function save($data) + { + } + /** + * Retrieve the data saved to the cache + * + * @return array<mixed>|false Data for SimplePie::$data + */ + public function load() + { + } + /** + * Retrieve the last modified time for the cache + * + * @return int|false Timestamp + */ + public function mtime() + { + } + /** + * Set the last modified time to the current time + * + * @return bool Success status + */ + public function touch() + { + } + /** + * Remove the cache + * + * @return bool Success status + */ + public function unlink() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\File" instead */ + class SimplePie_Cache_File extends \SimplePie\Cache\File + { + } +} +namespace SimplePie\Cache { + /** + * Caches data to memcache + * + * Registered for URLs with the "memcache" protocol + * + * For example, `memcache://localhost:11211/?timeout=3600&prefix=sp_` will + * connect to memcache on `localhost` on port 11211. All tables will be + * prefixed with `sp_` and data will expire after 3600 seconds + * + * @uses Memcache + * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead + */ + class Memcache implements \SimplePie\Cache\Base + { + /** + * Memcache instance + * + * @var NativeMemcache + */ + protected $cache; + /** + * Options + * + * @var array<string, mixed> + */ + protected $options; + /** + * Cache name + * + * @var string + */ + protected $name; + /** + * Create a new cache object + * + * @param string $location Location string (from SimplePie::$cache_location) + * @param string $name Unique ID for the cache + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data + */ + public function __construct(string $location, string $name, $type) + { + } + /** + * Save data to the cache + * + * @param array<mixed>|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property + * @return bool Successfulness + */ + public function save($data) + { + } + /** + * Retrieve the data saved to the cache + * + * @return array<mixed>|false Data for SimplePie::$data + */ + public function load() + { + } + /** + * Retrieve the last modified time for the cache + * + * @return int|false Timestamp + */ + public function mtime() + { + } + /** + * Set the last modified time to the current time + * + * @return bool Success status + */ + public function touch() + { + } + /** + * Remove the cache + * + * @return bool Success status + */ + public function unlink() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Memcache" instead */ + class SimplePie_Cache_Memcache extends \SimplePie\Cache\Memcache + { + } +} +namespace SimplePie\Cache { + /** + * Caches data to memcached + * + * Registered for URLs with the "memcached" protocol + * + * For example, `memcached://localhost:11211/?timeout=3600&prefix=sp_` will + * connect to memcached on `localhost` on port 11211. All tables will be + * prefixed with `sp_` and data will expire after 3600 seconds + * + * @uses Memcached + * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead + */ + class Memcached implements \SimplePie\Cache\Base + { + /** + * NativeMemcached instance + * @var NativeMemcached + */ + protected $cache; + /** + * Options + * @var array<string, mixed> + */ + protected $options; + /** + * Cache name + * @var string + */ + protected $name; + /** + * Create a new cache object + * @param string $location Location string (from SimplePie::$cache_location) + * @param string $name Unique ID for the cache + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data + */ + public function __construct(string $location, string $name, $type) + { + } + /** + * Save data to the cache + * @param array<mixed>|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property + * @return bool Successfulness + */ + public function save($data) + { + } + /** + * Retrieve the data saved to the cache + * @return array<mixed>|false Data for SimplePie::$data + */ + public function load() + { + } + /** + * Retrieve the last modified time for the cache + * @return int Timestamp + */ + public function mtime() + { + } + /** + * Set the last modified time to the current time + * @return bool Success status + */ + public function touch() + { + } + /** + * Remove the cache + * @return bool Success status + */ + public function unlink() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Memcached" instead */ + class SimplePie_Cache_Memcached extends \SimplePie\Cache\Memcached + { + } +} +namespace SimplePie\Cache { + /** + * Caches data to a MySQL database + * + * Registered for URLs with the "mysql" protocol + * + * For example, `mysql://root:password@localhost:3306/mydb?prefix=sp_` will + * connect to the `mydb` database on `localhost` on port 3306, with the user + * `root` and the password `password`. All tables will be prefixed with `sp_` + * + * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead + */ + class MySQL extends \SimplePie\Cache\DB + { + /** + * PDO instance + * + * @var \PDO|null + */ + protected $mysql; + /** + * Options + * + * @var array<string, mixed> + */ + protected $options; + /** + * Cache ID + * + * @var string + */ + protected $id; + /** + * Create a new cache object + * + * @param string $location Location string (from SimplePie::$cache_location) + * @param string $name Unique ID for the cache + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data + * @phpstan-return void + */ + public function __construct(string $location, string $name, $type) + { + } + /** + * Save data to the cache + * + * @param array<string>|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property + * @return bool Successfulness + */ + public function save($data) + { + } + /** + * Retrieve the data saved to the cache + * + * @return array<string>|false Data for SimplePie::$data + */ + public function load() + { + } + /** + * Retrieve the last modified time for the cache + * + * @return int|false Timestamp + */ + public function mtime() + { + } + /** + * Set the last modified time to the current time + * + * @return bool Success status + */ + public function touch() + { + } + /** + * Remove the cache + * + * @return bool Success status + */ + public function unlink() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\MySQL" instead */ + class SimplePie_Cache_MySQL extends \SimplePie\Cache\MySQL + { + } +} +namespace SimplePie\Cache { + /** + * Caches data to redis + * + * Registered for URLs with the "redis" protocol + * + * For example, `redis://localhost:6379/?timeout=3600&prefix=sp_&dbIndex=0` will + * connect to redis on `localhost` on port 6379. All tables will be + * prefixed with `simple_primary-` and data will expire after 3600 seconds + * + * @uses Redis + * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead + */ + class Redis implements \SimplePie\Cache\Base + { + /** + * Redis instance + * + * @var NativeRedis + */ + protected $cache; + /** + * Options + * + * @var array<string, mixed> + */ + protected $options; + /** + * Cache name + * + * @var string + */ + protected $name; + /** + * Create a new cache object + * + * @param string $location Location string (from SimplePie::$cache_location) + * @param string $name Unique ID for the cache + * @param Base::TYPE_FEED|Base::TYPE_IMAGE|array<string, mixed>|null $options Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data + */ + public function __construct(string $location, string $name, $options = null) + { + } + /** + * @param NativeRedis $cache + * @return void + */ + public function setRedisClient(\Redis $cache) + { + } + /** + * Save data to the cache + * + * @param array<mixed>|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property + * @return bool Successfulness + */ + public function save($data) + { + } + /** + * Retrieve the data saved to the cache + * + * @return array<mixed>|false Data for SimplePie::$data + */ + public function load() + { + } + /** + * Retrieve the last modified time for the cache + * + * @return int|false Timestamp + */ + public function mtime() + { + } + /** + * Set the last modified time to the current time + * + * @return bool Success status + */ + public function touch() + { + } + /** + * Remove the cache + * + * @return bool Success status + */ + public function unlink() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Cache\Redis" instead */ + class SimplePie_Cache_Redis extends \SimplePie\Cache\Redis + { + } +} +namespace SimplePie { + /** + * Handles `<media:text>` captions as defined in Media RSS. + * + * Used by {@see \SimplePie\Enclosure::get_caption()} and {@see \SimplePie\Enclosure::get_captions()} + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_caption_class()} + */ + class Caption + { + /** + * Content type + * + * @var ?string + * @see get_type() + */ + public $type; + /** + * Language + * + * @var ?string + * @see get_language() + */ + public $lang; + /** + * Start time + * + * @var ?string + * @see get_starttime() + */ + public $startTime; + /** + * End time + * + * @var ?string + * @see get_endtime() + */ + public $endTime; + /** + * Caption text + * + * @var ?string + * @see get_text() + */ + public $text; + /** + * Constructor, used to input the data + * + * For documentation on all the parameters, see the corresponding + * properties and their accessors + */ + public function __construct(?string $type = null, ?string $lang = null, ?string $startTime = null, ?string $endTime = null, ?string $text = null) + { + } + /** + * String-ified version + * + * @return string + */ + public function __toString() + { + } + /** + * Get the end time + * + * @return string|null Time in the format 'hh:mm:ss.SSS' + */ + public function get_endtime() + { + } + /** + * Get the language + * + * @link http://tools.ietf.org/html/rfc3066 + * @return string|null Language code as per RFC 3066 + */ + public function get_language() + { + } + /** + * Get the start time + * + * @return string|null Time in the format 'hh:mm:ss.SSS' + */ + public function get_starttime() + { + } + /** + * Get the text of the caption + * + * @return string|null + */ + public function get_text() + { + } + /** + * Get the content type (not MIME type) + * + * @return string|null Either 'text' or 'html' + */ + public function get_type() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Caption" instead */ + class SimplePie_Caption extends \SimplePie\Caption + { + } +} +namespace SimplePie { + /** + * Manages all category-related data + * + * Used by {@see \SimplePie\Item::get_category()} and {@see \SimplePie\Item::get_categories()} + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_category_class()} + */ + class Category + { + /** + * Category identifier + * + * @var string|null + * @see get_term + */ + public $term; + /** + * Categorization scheme identifier + * + * @var string|null + * @see get_scheme() + */ + public $scheme; + /** + * Human readable label + * + * @var string|null + * @see get_label() + */ + public $label; + /** + * Category type + * + * category for <category> + * subject for <dc:subject> + * + * @var string|null + * @see get_type() + */ + public $type; + /** + * Constructor, used to input the data + * + * @param string|null $term + * @param string|null $scheme + * @param string|null $label + * @param string|null $type + */ + public function __construct(?string $term = null, ?string $scheme = null, ?string $label = null, ?string $type = null) + { + } + /** + * String-ified version + * + * @return string + */ + public function __toString() + { + } + /** + * Get the category identifier + * + * @return string|null + */ + public function get_term() + { + } + /** + * Get the categorization scheme identifier + * + * @return string|null + */ + public function get_scheme() + { + } + /** + * Get the human readable label + * + * @param bool $strict + * @return string|null + */ + public function get_label(bool $strict = false) + { + } + /** + * Get the category type + * + * @return string|null + */ + public function get_type() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Category" instead */ + class SimplePie_Category extends \SimplePie\Category + { + } +} +namespace SimplePie\Content\Type { + /** + * Content-type sniffing + * + * Based on the rules in http://tools.ietf.org/html/draft-abarth-mime-sniff-06 + * + * This is used since we can't always trust Content-Type headers, and is based + * upon the HTML5 parsing rules. + * + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_content_type_sniffer_class()} + */ + class Sniffer + { + /** + * File object + * + * @var File|Response + */ + public $file; + /** + * Create an instance of the class with the input file + * + * @param File|Response $file Input file + */ + public function __construct( + /* File */ + $file + ) + { + } + /** + * Get the Content-Type of the specified file + * + * @return string Actual Content-Type + */ + public function get_type() + { + } + /** + * Sniff text or binary + * + * @return string Actual Content-Type + */ + public function text_or_binary() + { + } + /** + * Sniff unknown + * + * @return string Actual Content-Type + */ + public function unknown() + { + } + /** + * Sniff images + * + * @return string|false Actual Content-Type + */ + public function image() + { + } + /** + * Sniff HTML + * + * @return string Actual Content-Type + */ + public function feed_or_html() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Content\Type\Sniffer" instead */ + class SimplePie_Content_Type_Sniffer extends \SimplePie\Content\Type\Sniffer + { + } +} +namespace SimplePie { + /** + * Manages `<media:copyright>` copyright tags as defined in Media RSS + * + * Used by {@see \SimplePie\Enclosure::get_copyright()} + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_copyright_class()} + */ + class Copyright + { + /** + * Copyright URL + * + * @var ?string + * @see get_url() + */ + public $url; + /** + * Attribution + * + * @var ?string + * @see get_attribution() + */ + public $label; + /** + * Constructor, used to input the data + * + * For documentation on all the parameters, see the corresponding + * properties and their accessors + */ + public function __construct(?string $url = null, ?string $label = null) + { + } + /** + * String-ified version + * + * @return string + */ + public function __toString() + { + } + /** + * Get the copyright URL + * + * @return string|null URL to copyright information + */ + public function get_url() + { + } + /** + * Get the attribution text + * + * @return string|null + */ + public function get_attribution() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Copyright" instead */ + class SimplePie_Copyright extends \SimplePie\Copyright + { + } + /** + * SimplePie class. + * + * Class for backward compatibility. + * + * @deprecated Use {@see SimplePie} directly + */ + class SimplePie_Core extends \SimplePie + { + } +} +namespace SimplePie { + /** + * Handles `<media:credit>` as defined in Media RSS + * + * Used by {@see \SimplePie\Enclosure::get_credit()} and {@see \SimplePie\Enclosure::get_credits()} + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_credit_class()} + */ + class Credit + { + /** + * Credited role + * + * @var ?string + * @see get_role() + */ + public $role; + /** + * Organizational scheme + * + * @var ?string + * @see get_scheme() + */ + public $scheme; + /** + * Credited name + * + * @var ?string + * @see get_name() + */ + public $name; + /** + * Constructor, used to input the data + * + * For documentation on all the parameters, see the corresponding + * properties and their accessors + */ + public function __construct(?string $role = null, ?string $scheme = null, ?string $name = null) + { + } + /** + * String-ified version + * + * @return string + */ + public function __toString() + { + } + /** + * Get the role of the person receiving credit + * + * @return string|null + */ + public function get_role() + { + } + /** + * Get the organizational scheme + * + * @return string|null + */ + public function get_scheme() + { + } + /** + * Get the credited person/entity's name + * + * @return string|null + */ + public function get_name() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Credit" instead */ + class SimplePie_Credit extends \SimplePie\Credit + { + } + /** + * Decode HTML Entities + * + * This implements HTML5 as of revision 967 (2007-06-28) + * + * @deprecated Use DOMDocument instead! + */ + class SimplePie_Decode_HTML_Entities + { + /** + * Data to be parsed + * + * @access private + * @var string + */ + public $data = ''; + /** + * Currently consumed bytes + * + * @access private + * @var string + */ + public $consumed = ''; + /** + * Position of the current byte being parsed + * + * @access private + * @var int + */ + public $position = 0; + /** + * Create an instance of the class with the input data + * + * @access public + * @param string $data Input data + */ + public function __construct(string $data) + { + } + /** + * Parse the input data + * + * @access public + * @return string Output data + */ + public function parse() + { + } + /** + * Consume the next byte + * + * @access private + * @return string|false The next byte, or false, if there is no more data + */ + public function consume() + { + } + /** + * Consume a range of characters + * + * @access private + * @param string $chars Characters to consume + * @return string|false A series of characters that match the range, or false + */ + public function consume_range(string $chars) + { + } + /** + * Unconsume one byte + * + * @access private + * @return void + */ + public function unconsume() + { + } + /** + * Decode an entity + * + * @access private + * @return void + */ + public function entity() + { + } + } +} +namespace SimplePie { + /** + * Handles everything related to enclosures (including Media RSS and iTunes RSS) + * + * Used by {@see \SimplePie\Item::get_enclosure()} and {@see \SimplePie\Item::get_enclosures()} + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_enclosure_class()} + */ + class Enclosure + { + /** + * @var ?string + * @see get_bitrate() + */ + public $bitrate; + /** + * @var Caption[]|null + * @see get_captions() + */ + public $captions; + /** + * @var Category[]|null + * @see get_categories() + */ + public $categories; + /** + * @var ?int + * @see get_channels() + */ + public $channels; + /** + * @var ?Copyright + * @see get_copyright() + */ + public $copyright; + /** + * @var Credit[]|null + * @see get_credits() + */ + public $credits; + /** + * @var ?string + * @see get_description() + */ + public $description; + /** + * @var ?int + * @see get_duration() + */ + public $duration; + /** + * @var ?string + * @see get_expression() + */ + public $expression; + /** + * @var ?string + * @see get_framerate() + */ + public $framerate; + /** + * @var ?string + * @see get_handler() + */ + public $handler; + /** + * @var string[]|null + * @see get_hashes() + */ + public $hashes; + /** + * @var ?string + * @see get_height() + */ + public $height; + /** + * @deprecated + * @var null + */ + public $javascript; + /** + * @var string[]|null + * @see get_keywords() + */ + public $keywords; + /** + * @var ?string + * @see get_language() + */ + public $lang; + /** + * @var ?int + * @see get_length() + */ + public $length; + /** + * @var ?string + * @see get_link() + */ + public $link; + /** + * @var ?string + * @see get_medium() + */ + public $medium; + /** + * @var ?string + * @see get_player() + */ + public $player; + /** + * @var Rating[]|null + * @see get_ratings() + */ + public $ratings; + /** + * @var ?Restriction[] + * @see get_restrictions() + */ + public $restrictions; + /** + * @var ?string + * @see get_sampling_rate() + */ + public $samplingrate; + /** + * @var string[]|null + * @see get_thumbnails() + */ + public $thumbnails; + /** + * @var ?string + * @see get_title() + */ + public $title; + /** + * @var ?string + * @see get_type() + */ + public $type; + /** + * @var ?string + * @see get_width() + */ + public $width; + /** + * Constructor, used to input the data + * + * For documentation on all the parameters, see the corresponding + * properties and their accessors + * + * @uses idn_to_ascii If available, this will convert an IDN + * + * @param null $javascript + * @param Caption[]|null $captions + * @param Category[]|null $categories + * @param Credit[]|null $credits + * @param string[]|null $hashes + * @param string[]|null $keywords + * @param Rating[]|null $ratings + * @param Restriction[]|null $restrictions + * @param string[]|null $thumbnails + */ + public function __construct(?string $link = null, ?string $type = null, ?int $length = null, $javascript = null, ?string $bitrate = null, ?array $captions = null, ?array $categories = null, ?int $channels = null, ?\SimplePie\Copyright $copyright = null, ?array $credits = null, ?string $description = null, ?int $duration = null, ?string $expression = null, ?string $framerate = null, ?array $hashes = null, ?string $height = null, ?array $keywords = null, ?string $lang = null, ?string $medium = null, ?string $player = null, ?array $ratings = null, ?array $restrictions = null, ?string $samplingrate = null, ?array $thumbnails = null, ?string $title = null, ?string $width = null) + { + } + /** + * String-ified version + * + * @return string + */ + public function __toString() + { + } + /** + * Get the bitrate + * + * @return string|null + */ + public function get_bitrate() + { + } + /** + * Get a single caption + * + * @param int $key + * @return \SimplePie\Caption|null + */ + public function get_caption(int $key = 0) + { + } + /** + * Get all captions + * + * @return Caption[]|null + */ + public function get_captions() + { + } + /** + * Get a single category + * + * @param int $key + * @return \SimplePie\Category|null + */ + public function get_category(int $key = 0) + { + } + /** + * Get all categories + * + * @return \SimplePie\Category[]|null + */ + public function get_categories() + { + } + /** + * Get the number of audio channels + * + * @return int|null + */ + public function get_channels() + { + } + /** + * Get the copyright information + * + * @return \SimplePie\Copyright|null + */ + public function get_copyright() + { + } + /** + * Get a single credit + * + * @param int $key + * @return \SimplePie\Credit|null + */ + public function get_credit(int $key = 0) + { + } + /** + * Get all credits + * + * @return Credit[]|null + */ + public function get_credits() + { + } + /** + * Get the description of the enclosure + * + * @return string|null + */ + public function get_description() + { + } + /** + * Get the duration of the enclosure + * + * @param bool $convert Convert seconds into hh:mm:ss + * @return string|int|null 'hh:mm:ss' string if `$convert` was specified, otherwise integer (or null if none found) + */ + public function get_duration(bool $convert = false) + { + } + /** + * Get the expression + * + * @return string Probably one of 'sample', 'full', 'nonstop', 'clip'. Defaults to 'full' + */ + public function get_expression() + { + } + /** + * Get the file extension + * + * @return string|null + */ + public function get_extension() + { + } + /** + * Get the framerate (in frames-per-second) + * + * @return string|null + */ + public function get_framerate() + { + } + /** + * Get the preferred handler + * + * @return string|null One of 'flash', 'fmedia', 'quicktime', 'wmedia', 'mp3' + */ + public function get_handler() + { + } + /** + * Get a single hash + * + * @link http://www.rssboard.org/media-rss#media-hash + * @param int $key + * @return string|null Hash as per `media:hash`, prefixed with "$algo:" + */ + public function get_hash(int $key = 0) + { + } + /** + * Get all credits + * + * @return string[]|null Array of strings, see {@see get_hash()} + */ + public function get_hashes() + { + } + /** + * Get the height + * + * @return string|null + */ + public function get_height() + { + } + /** + * Get the language + * + * @link http://tools.ietf.org/html/rfc3066 + * @return string|null Language code as per RFC 3066 + */ + public function get_language() + { + } + /** + * Get a single keyword + * + * @param int $key + * @return string|null + */ + public function get_keyword(int $key = 0) + { + } + /** + * Get all keywords + * + * @return string[]|null + */ + public function get_keywords() + { + } + /** + * Get length + * + * @return ?int Length in bytes + */ + public function get_length() + { + } + /** + * Get the URL + * + * @return string|null + */ + public function get_link() + { + } + /** + * Get the medium + * + * @link http://www.rssboard.org/media-rss#media-content + * @return string|null Should be one of 'image', 'audio', 'video', 'document', 'executable' + */ + public function get_medium() + { + } + /** + * Get the player URL + * + * Typically the same as {@see get_permalink()} + * @return string|null Player URL + */ + public function get_player() + { + } + /** + * Get a single rating + * + * @param int $key + * @return \SimplePie\Rating|null + */ + public function get_rating(int $key = 0) + { + } + /** + * Get all ratings + * + * @return Rating[]|null + */ + public function get_ratings() + { + } + /** + * Get a single restriction + * + * @param int $key + * @return \SimplePie\Restriction|null + */ + public function get_restriction(int $key = 0) + { + } + /** + * Get all restrictions + * + * @return Restriction[]|null + */ + public function get_restrictions() + { + } + /** + * Get the sampling rate (in kHz) + * + * @return string|null + */ + public function get_sampling_rate() + { + } + /** + * Get the file size (in MiB) + * + * @return float|null File size in mebibytes (1048 bytes) + */ + public function get_size() + { + } + /** + * Get a single thumbnail + * + * @param int $key + * @return string|null Thumbnail URL + */ + public function get_thumbnail(int $key = 0) + { + } + /** + * Get all thumbnails + * + * @return string[]|null Array of thumbnail URLs + */ + public function get_thumbnails() + { + } + /** + * Get the title + * + * @return string|null + */ + public function get_title() + { + } + /** + * Get mimetype of the enclosure + * + * @see get_real_type() + * @return string|null MIME type + */ + public function get_type() + { + } + /** + * Get the width + * + * @return string|null + */ + public function get_width() + { + } + /** + * Embed the enclosure using `<embed>` + * + * @deprecated Use the second parameter to {@see embed} instead + * + * @param array<string, mixed>|string $options See first parameter to {@see embed} + * @return string HTML string to output + */ + public function native_embed($options = '') + { + } + /** + * Embed the enclosure using Javascript + * + * `$options` is an array or comma-separated key:value string, with the + * following properties: + * + * - `alt` (string): Alternate content for when an end-user does not have + * the appropriate handler installed or when a file type is + * unsupported. Can be any text or HTML. Defaults to blank. + * - `altclass` (string): If a file type is unsupported, the end-user will + * see the alt text (above) linked directly to the content. That link + * will have this value as its class name. Defaults to blank. + * - `audio` (string): This is an image that should be used as a + * placeholder for audio files before they're loaded (QuickTime-only). + * Can be any relative or absolute URL. Defaults to blank. + * - `bgcolor` (string): The background color for the media, if not + * already transparent. Defaults to `#ffffff`. + * - `height` (integer): The height of the embedded media. Accepts any + * numeric pixel value (such as `360`) or `auto`. Defaults to `auto`, + * and it is recommended that you use this default. + * - `loop` (boolean): Do you want the media to loop when it's done? + * Defaults to `false`. + * - `mediaplayer` (string): The location of the included + * `mediaplayer.swf` file. This allows for the playback of Flash Video + * (`.flv`) files, and is the default handler for non-Odeo MP3's. + * Defaults to blank. + * - `video` (string): This is an image that should be used as a + * placeholder for video files before they're loaded (QuickTime-only). + * Can be any relative or absolute URL. Defaults to blank. + * - `width` (integer): The width of the embedded media. Accepts any + * numeric pixel value (such as `480`) or `auto`. Defaults to `auto`, + * and it is recommended that you use this default. + * - `widescreen` (boolean): Is the enclosure widescreen or standard? + * This applies only to video enclosures, and will automatically resize + * the content appropriately. Defaults to `false`, implying 4:3 mode. + * + * Note: Non-widescreen (4:3) mode with `width` and `height` set to `auto` + * will default to 480x360 video resolution. Widescreen (16:9) mode with + * `width` and `height` set to `auto` will default to 480x270 video resolution. + * + * @todo If the dimensions for media:content are defined, use them when width/height are set to 'auto'. + * @param array<string, mixed>|string $options Comma-separated key:value list, or array + * @param bool $native Use `<embed>` + * @return string HTML string to output + */ + public function embed($options = '', bool $native = false) + { + } + /** + * Get the real media type + * + * Often, feeds lie to us, necessitating a bit of deeper inspection. This + * converts types to their canonical representations based on the file + * extension + * + * @see get_type() + * @param bool $find_handler Internal use only, use {@see get_handler()} instead + * @return string|null MIME type + */ + public function get_real_type(bool $find_handler = false) + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Enclosure" instead */ + class SimplePie_Enclosure extends \SimplePie\Enclosure + { + } +} +namespace SimplePie { + /** + * General SimplePie exception class + */ + class Exception extends \Exception + { + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Exception" instead */ + class SimplePie_Exception extends \SimplePie\Exception + { + } +} +namespace SimplePie\HTTP { + /** + * HTTP Response interface + * + * This interface must be interoperable with Psr\Http\Message\ResponseInterface + * @see https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface + * + * @internal + */ + interface Response + { + /** + * Return the string representation of the permanent URI of the requested resource + * (the first location after a prefix of (only) permanent redirects). + * + * Depending on which components of the URI are present, the resulting + * string is either a full URI or relative reference according to RFC 3986, + * Section 4.1. The method concatenates the various components of the URI, + * using the appropriate delimiters: + * + * - If a scheme is present, it MUST be suffixed by ":". + * - If an authority is present, it MUST be prefixed by "//". + * - The path can be concatenated without delimiters. But there are two + * cases where the path has to be adjusted to make the URI reference + * valid as PHP does not allow to throw an exception in __toString(): + * - If the path is rootless and an authority is present, the path MUST + * be prefixed by "/". + * - If the path is starting with more than one "/" and no authority is + * present, the starting slashes MUST be reduced to one. + * - If a query is present, it MUST be prefixed by "?". + * - If a fragment is present, it MUST be prefixed by "#". + * + * @see http://tools.ietf.org/html/rfc3986#section-4.1 + */ + public function get_permanent_uri(): string; + /** + * Return the string representation of the final requested URL after following all redirects. + * + * Depending on which components of the URI are present, the resulting + * string is either a full URI or relative reference according to RFC 3986, + * Section 4.1. The method concatenates the various components of the URI, + * using the appropriate delimiters: + * + * - If a scheme is present, it MUST be suffixed by ":". + * - If an authority is present, it MUST be prefixed by "//". + * - The path can be concatenated without delimiters. But there are two + * cases where the path has to be adjusted to make the URI reference + * valid as PHP does not allow to throw an exception in __toString(): + * - If the path is rootless and an authority is present, the path MUST + * be prefixed by "/". + * - If the path is starting with more than one "/" and no authority is + * present, the starting slashes MUST be reduced to one. + * - If a query is present, it MUST be prefixed by "?". + * - If a fragment is present, it MUST be prefixed by "#". + * + * @see http://tools.ietf.org/html/rfc3986#section-4.1 + */ + public function get_final_requested_uri(): string; + /** + * Gets the response status code. + * + * The status code is a 3-digit integer result code of the server's attempt + * to understand and satisfy the request. + * + * @return int Status code. + */ + public function get_status_code(): int; + /** + * Retrieves all message header values. + * + * The keys represent the header name as it will be sent over the wire, and + * each value is an array of strings associated with the header. + * + * // Represent the headers as a string + * foreach ($message->get_headers() as $name => $values) { + * echo $name . ': ' . implode(', ', $values); + * } + * + * // Emit headers iteratively: + * foreach ($message->get_headers() as $name => $values) { + * foreach ($values as $value) { + * header(sprintf('%s: %s', $name, $value), false); + * } + * } + * + * @return array<non-empty-array<string>> Returns an associative array of the message's headers. + * Each key MUST be a header name, and each value MUST be an array of + * strings for that header. + */ + public function get_headers(): array; + /** + * Checks if a header exists by the given case-insensitive name. + * + * @param string $name Case-insensitive header field name. + * @return bool Returns true if any header names match the given header + * name using a case-insensitive string comparison. Returns false if + * no matching header name is found in the message. + */ + public function has_header(string $name): bool; + /** + * Retrieves a message header value by the given case-insensitive name. + * + * This method returns an array of all the header values of the given + * case-insensitive header name. + * + * If the header does not appear in the message, this method MUST return an + * empty array. + * + * @param string $name Case-insensitive header field name. + * @return string[] An array of string values as provided for the given + * header. If the header does not appear in the message, this method MUST + * return an empty array. + */ + public function get_header(string $name): array; + /** + * Return an instance with the provided value replacing the specified header. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new and/or updated header and value. + * + * @param string $name Case-insensitive header field name. + * @param string|non-empty-array<string> $value Header value(s). + * @return static + * @throws \InvalidArgumentException for invalid header names or values. + */ + public function with_header(string $name, $value); + /** + * Retrieves a comma-separated string of the values for a single header. + * + * This method returns all of the header values of the given + * case-insensitive header name as a string concatenated together using + * a comma. + * + * NOTE: Not all header values may be appropriately represented using + * comma concatenation. For such headers, use getHeader() instead + * and supply your own delimiter when concatenating. + * + * If the header does not appear in the message, this method MUST return + * an empty string. + * + * @param string $name Case-insensitive header field name. + * @return string A string of values as provided for the given header + * concatenated together using a comma. If the header does not appear in + * the message, this method MUST return an empty string. + */ + public function get_header_line(string $name): string; + /** + * get the body as string + * + * @return string + */ + public function get_body_content(): string; + } +} +namespace SimplePie { + /** + * Used for fetching remote files and reading local files + * + * Supports HTTP 1.0 via cURL or fsockopen, with spotty HTTP 1.1 support + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_file_class()} + * + * @todo Move to properly supporting RFC2616 (HTTP/1.1) + */ + class File implements \SimplePie\HTTP\Response + { + /** + * @var string The final URL after following all redirects + * @deprecated Use `get_final_requested_uri()` method. + */ + public $url; + /** + * @var ?string User agent to use in requests + * @deprecated Set the user agent in constructor. + */ + public $useragent; + /** @var bool */ + public $success = true; + /** + * @var array<string, string> Headers as string for BC + * @deprecated Use `get_headers()` method. + */ + public $headers = []; + /** + * @var ?string Body of the HTTP response + * @deprecated Use `get_body_content()` method. + */ + public $body; + /** + * @var int Status code of the HTTP response + * @deprecated Use `get_status_code()` method. + */ + public $status_code = 0; + /** @var non-negative-int Number of redirect that were already performed during this request sequence. */ + public $redirects = 0; + /** @var ?string */ + public $error; + /** + * @var int-mask-of<SimplePie::FILE_SOURCE_*> Bit mask representing the method used to fetch the file and whether it is a local file or remote file obtained over HTTP. + * @deprecated Backend is implementation detail which you should not care about; to see if the file was retrieved over HTTP, check if `get_final_requested_uri()` with `Misc::is_remote_uri()`. + */ + public $method = \SimplePie\SimplePie::FILE_SOURCE_NONE; + /** + * @var string The permanent URL or the resource (first URL after the prefix of (only) permanent redirects) + * @deprecated Use `get_permanent_uri()` method. + */ + public $permanent_url; + /** + * @param string $url + * @param int $timeout + * @param int $redirects + * @param ?array<string, string> $headers + * @param ?string $useragent + * @param bool $force_fsockopen + * @param array<int, mixed> $curl_options + * @phpstan-return void + */ + public function __construct(string $url, int $timeout = 10, int $redirects = 5, ?array $headers = null, ?string $useragent = null, bool $force_fsockopen = false, array $curl_options = []) + { + } + public function get_permanent_uri(): string + { + } + public function get_final_requested_uri(): string + { + } + public function get_status_code(): int + { + } + public function get_headers(): array + { + } + public function has_header(string $name): bool + { + } + public function get_header(string $name): array + { + } + public function with_header(string $name, $value) + { + } + public function get_header_line(string $name): string + { + } + public function get_body_content(): string + { + } + /** + * Create a File instance from another Response + * + * For BC reasons in some places there MUST be a `File` instance + * instead of a `Response` implementation + * + * @see Locator::__construct() + * @internal + */ + final public static function fromResponse(\SimplePie\HTTP\Response $response): self + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\File" instead */ + class SimplePie_File extends \SimplePie\File + { + } +} +namespace SimplePie\HTTP { + /** + * HTTP Response Parser + * @template Psr7Compatible of bool + */ + class Parser + { + /** + * HTTP Version + * + * @var float + */ + public $http_version = 0.0; + /** + * Status code + * + * @var int + */ + public $status_code = 0; + /** + * Reason phrase + * + * @var string + */ + public $reason = ''; + /** + * Key/value pairs of the headers + * + * @var (Psr7Compatible is true ? array<string, non-empty-array<string>> : array<string, string>) + */ + public $headers = []; + /** + * Body of the response + * + * @var string + */ + public $body = ''; + /** + * Current state of the state machine + * + * @var self::STATE_* + */ + protected $state = self::STATE_HTTP_VERSION; + /** + * Input data + * + * @var string + */ + protected $data = ''; + /** + * Input data length (to avoid calling strlen() everytime this is needed) + * + * @var int + */ + protected $data_length = 0; + /** + * Current position of the pointer + * + * @var int + */ + protected $position = 0; + /** + * Name of the header currently being parsed + * + * @var string + */ + protected $name = ''; + /** + * Value of the header currently being parsed + * + * @var string + */ + protected $value = ''; + /** + * Create an instance of the class with the input data + * + * @param string $data Input data + * @param Psr7Compatible $psr7Compatible Whether the data types are in format compatible with PSR-7. + */ + public function __construct(string $data, bool $psr7Compatible = false) + { + } + /** + * Parse the input data + * + * @return bool true on success, false on failure + */ + public function parse() + { + } + /** + * Check whether there is data beyond the pointer + * + * @return bool true if there is further data, false if not + */ + protected function has_data() + { + } + /** + * See if the next character is LWS + * + * @return bool true if the next character is LWS, false if not + */ + protected function is_linear_whitespace() + { + } + /** + * Parse the HTTP version + * @return void + */ + protected function http_version() + { + } + /** + * Parse the status code + * @return void + */ + protected function status() + { + } + /** + * Parse the reason phrase + * @return void + */ + protected function reason() + { + } + /** + * Deal with a new line, shifting data around as needed + * @return void + */ + protected function new_line() + { + } + /** + * Parse a header name + * @return void + */ + protected function name() + { + } + /** + * Parse LWS, replacing consecutive LWS characters with a single space + * @return void + */ + protected function linear_whitespace() + { + } + /** + * See what state to move to while within non-quoted header values + * @return void + */ + protected function value() + { + } + /** + * Parse a header value while outside quotes + * @return void + */ + protected function value_char() + { + } + /** + * See what state to move to while within quoted header values + * @return void + */ + protected function quote() + { + } + /** + * Parse a header value while within quotes + * @return void + */ + protected function quote_char() + { + } + /** + * Parse an escaped character within quotes + * @return void + */ + protected function quote_escaped() + { + } + /** + * Parse the body + * @return void + */ + protected function body() + { + } + /** + * Parsed a "Transfer-Encoding: chunked" body + * @return void + * @phpstan-return void + */ + protected function chunked() + { + } + /** + * Prepare headers (take care of proxies headers) + * + * @param string $headers Raw headers + * @param non-negative-int $count Redirection count. Default to 1. + * + * @return string + */ + public static function prepareHeaders(string $headers, int $count = 1) + { + } + } +} +namespace { + /** + * @deprecated since SimplePie 1.7.0, use "SimplePie\HTTP\Parser" instead + * @template Psr7Compatible of bool + * @extends Parser<Psr7Compatible> + */ + class SimplePie_HTTP_Parser extends \SimplePie\HTTP\Parser + { + } +} +namespace SimplePie { + /** + * IRI parser/serialiser/normaliser + * + * @property ?string $scheme + * @property ?string $userinfo + * @property ?string $host + * @property ?int $port + * @property-write int|string|null $port + * @property ?string $authority + * @property string $path + * @property ?string $query + * @property ?string $fragment + */ + class IRI + { + /** + * Scheme + * + * @var ?string + */ + protected $scheme = null; + /** + * User Information + * + * @var ?string + */ + protected $iuserinfo = null; + /** + * ihost + * + * @var ?string + */ + protected $ihost = null; + /** + * Port + * + * @var ?int + */ + protected $port = null; + /** + * ipath + * + * @var string + */ + protected $ipath = ''; + /** + * iquery + * + * @var ?string + */ + protected $iquery = null; + /** + * ifragment + * + * @var ?string + */ + protected $ifragment = null; + /** + * Normalization database + * + * Each key is the scheme, each value is an array with each key as the IRI + * part and value as the default value for that part. + * + * @var array<string, array<string, mixed>> + */ + protected $normalization = ['acap' => ['port' => 674], 'dict' => ['port' => 2628], 'file' => ['ihost' => 'localhost'], 'http' => ['port' => 80, 'ipath' => '/'], 'https' => ['port' => 443, 'ipath' => '/']]; + /** + * Return the entire IRI when you try and read the object as a string + * + * @return string + */ + public function __toString() + { + } + /** + * Overload __set() to provide access via properties + * + * @param string $name Property name + * @param mixed $value Property value + * @return void + */ + public function __set(string $name, $value) + { + } + /** + * Overload __get() to provide access via properties + * + * @param string $name Property name + * @return mixed + */ + public function __get(string $name) + { + } + /** + * Overload __isset() to provide access via properties + * + * @param string $name Property name + * @return bool + */ + public function __isset(string $name) + { + } + /** + * Overload __unset() to provide access via properties + * + * @param string $name Property name + * @return void + */ + public function __unset(string $name) + { + } + /** + * Create a new IRI object, from a specified string + * + * @param string|null $iri + */ + public function __construct(?string $iri = null) + { + } + /** + * Clean up + * @return void + */ + public function __destruct() + { + } + /** + * Create a new IRI object by resolving a relative IRI + * + * Returns false if $base is not absolute, otherwise an IRI. + * + * @param IRI|string $base (Absolute) Base IRI + * @param IRI|string $relative Relative IRI + * @return IRI|false + */ + public static function absolutize($base, $relative) + { + } + /** + * Parse an IRI into scheme/authority/path/query/fragment segments + * + * @param string $iri + * @return array{ + * scheme: string|null, + * authority: string|null, + * path: string, + * query: string|null, + * fragment: string|null, + * }|false + */ + protected function parse_iri(string $iri) + { + } + /** + * Remove dot segments from a path + * + * @param string $input + * @return string + */ + protected function remove_dot_segments(string $input) + { + } + /** + * Replace invalid character with percent encoding + * + * @param string $string Input string + * @param string $extra_chars Valid characters not in iunreserved or + * iprivate (this is ASCII-only) + * @param bool $iprivate Allow iprivate + * @return string + */ + protected function replace_invalid_with_pct_encoding(string $string, string $extra_chars, bool $iprivate = false) + { + } + /** + * Callback function for preg_replace_callback. + * + * Removes sequences of percent encoded bytes that represent UTF-8 + * encoded characters in iunreserved + * + * @param array{string} $match PCRE match, a capture group #0 consisting of a sequence of valid percent-encoded bytes + * @return string Replacement + */ + protected function remove_iunreserved_percent_encoded(array $match) + { + } + /** + * @return void + * @phpstan-return void + */ + protected function scheme_normalization() + { + } + /** + * Check if the object represents a valid IRI. This needs to be done on each + * call as some things change depending on another part of the IRI. + * + * @return bool + */ + public function is_valid() + { + } + /** + * Set the entire IRI. Returns true on success, false on failure (if there + * are any invalid characters). + * + * @param string|null $iri + * @return bool + */ + public function set_iri(?string $iri, bool $clear_cache = false) + { + } + /** + * Set the scheme. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @param string|null $scheme + * @return bool + */ + public function set_scheme(?string $scheme) + { + } + /** + * Set the authority. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @param string|null $authority + * @return bool + */ + public function set_authority(?string $authority, bool $clear_cache = false) + { + } + /** + * Set the iuserinfo. + * + * @param string|null $iuserinfo + * @return bool + */ + public function set_userinfo(?string $iuserinfo) + { + } + /** + * Set the ihost. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @param string|null $ihost + * @return bool + */ + public function set_host(?string $ihost) + { + } + /** + * Set the port. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @param string|int|null $port + * @return bool + */ + public function set_port($port) + { + } + /** + * Set the ipath. + * + * @param string|null $ipath + * @return bool + */ + public function set_path(?string $ipath, bool $clear_cache = false) + { + } + /** + * Set the iquery. + * + * @param string|null $iquery + * @return bool + */ + public function set_query(?string $iquery) + { + } + /** + * Set the ifragment. + * + * @param string|null $ifragment + * @return bool + */ + public function set_fragment(?string $ifragment) + { + } + /** + * Convert an IRI to a URI (or parts thereof) + * + * @param string $string + * @return string + */ + public function to_uri(string $string) + { + } + /** + * Get the complete IRI + * + * @return string|false + */ + public function get_iri() + { + } + /** + * Get the complete URI + * + * @return string + */ + public function get_uri() + { + } + /** + * Get the complete iauthority + * + * @return ?string + */ + protected function get_iauthority() + { + } + /** + * Get the complete authority + * + * @return ?string + */ + protected function get_authority() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\IRI" instead */ + class SimplePie_IRI extends \SimplePie\IRI + { + } +} +namespace SimplePie { + /** + * Handles the injection of Registry into other class + * + * {@see \SimplePie\SimplePie::get_registry()} + */ + interface RegistryAware + { + /** + * Set the Registry into the class + * + * @return void + */ + public function set_registry(\SimplePie\Registry $registry); + } + /** + * Manages all item-related data + * + * Used by {@see \SimplePie\SimplePie::get_item()} and {@see \SimplePie\SimplePie::get_items()} + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_item_class()} + */ + class Item implements \SimplePie\RegistryAware + { + /** + * Parent feed + * + * @access private + * @var \SimplePie\SimplePie + */ + public $feed; + /** + * Raw data + * + * @access private + * @var array<string, mixed> + */ + public $data = []; + /** + * Registry object + * + * @see set_registry + * @var \SimplePie\Registry + */ + protected $registry; + /** + * Create a new item object + * + * This is usually used by {@see \SimplePie\SimplePie::get_items} and + * {@see \SimplePie\SimplePie::get_item}. Avoid creating this manually. + * + * @param \SimplePie\SimplePie $feed Parent feed + * @param array<string, mixed> $data Raw data + */ + public function __construct(\SimplePie\SimplePie $feed, array $data) + { + } + /** + * Set the registry handler + * + * This is usually used by {@see \SimplePie\Registry::create} + * + * @since 1.3 + * @param \SimplePie\Registry $registry + * @return void + */ + public function set_registry(\SimplePie\Registry $registry) + { + } + /** + * Get a string representation of the item + * + * @return string + */ + public function __toString() + { + } + /** + * Remove items that link back to this before destroying this object + */ + public function __destruct() + { + } + /** + * Get data for an item-level element + * + * This method allows you to get access to ANY element/attribute that is a + * sub-element of the item/entry tag. + * + * See {@see \SimplePie\SimplePie::get_feed_tags()} for a description of the return value + * + * @since 1.0 + * @see http://simplepie.org/wiki/faq/supported_xml_namespaces + * @param string $namespace The URL of the XML namespace of the elements you're trying to access + * @param string $tag Tag name + * @return array<array<string, mixed>>|null + */ + public function get_item_tags(string $namespace, string $tag) + { + } + /** + * Get the base URL value. + * Uses `<xml:base>`, or item link, or enclosure link, or feed base URL. + * + * @param array<string, mixed> $element + * @return string + */ + public function get_base(array $element = []) + { + } + /** + * Sanitize feed data + * + * @access private + * @see \SimplePie\SimplePie::sanitize() + * @param string $data Data to sanitize + * @param int-mask-of<SimplePie::CONSTRUCT_*> $type + * @param string $base Base URL to resolve URLs against + * @return string Sanitized data + */ + public function sanitize(string $data, int $type, string $base = '') + { + } + /** + * Get the parent feed + * + * Note: this may not work as you think for multifeeds! + * + * @link http://simplepie.org/faq/typical_multifeed_gotchas#missing_data_from_feed + * @since 1.0 + * @return \SimplePie\SimplePie + */ + public function get_feed() + { + } + /** + * Get the unique identifier for the item + * + * This is usually used when writing code to check for new items in a feed. + * + * Uses `<atom:id>`, `<guid>`, `<dc:identifier>` or the `about` attribute + * for RDF. If none of these are supplied (or `$hash` is true), creates an + * MD5 hash based on the permalink, title and content. + * + * @since Beta 2 + * @param bool $hash Should we force using a hash instead of the supplied ID? + * @param string|false $fn User-supplied function to generate an hash + * @return string|null + */ + public function get_id(bool $hash = false, $fn = 'md5') + { + } + /** + * Get the title of the item + * + * Uses `<atom:title>`, `<title>` or `<dc:title>` + * + * @since Beta 2 (previously called `get_item_title` since 0.8) + * @return string|null + */ + public function get_title() + { + } + /** + * Get the content for the item + * + * Prefers summaries over full content , but will return full content if a + * summary does not exist. + * + * To prefer full content instead, use {@see get_content} + * + * Uses `<atom:summary>`, `<description>`, `<dc:description>` or + * `<itunes:subtitle>` + * + * @since 0.8 + * @param bool $description_only Should we avoid falling back to the content? + * @return string|null + */ + public function get_description(bool $description_only = false) + { + } + /** + * Get the content for the item + * + * Prefers full content over summaries, but will return a summary if full + * content does not exist. + * + * To prefer summaries instead, use {@see get_description} + * + * Uses `<atom:content>` or `<content:encoded>` (RSS 1.0 Content Module) + * + * @since 1.0 + * @param bool $content_only Should we avoid falling back to the description? + * @return string|null + */ + public function get_content(bool $content_only = false) + { + } + /** + * Get the media:thumbnail of the item + * + * Uses `<media:thumbnail>` + * + * + * @return array{url: string, height?: string, width?: string, time?: string}|null + */ + public function get_thumbnail() + { + } + /** + * Get a category for the item + * + * @since Beta 3 (previously called `get_categories()` since Beta 2) + * @param int $key The category that you want to return. Remember that arrays begin with 0, not 1 + * @return \SimplePie\Category|null + */ + public function get_category(int $key = 0) + { + } + /** + * Get all categories for the item + * + * Uses `<atom:category>`, `<category>` or `<dc:subject>` + * + * @since Beta 3 + * @return \SimplePie\Category[]|null List of {@see \SimplePie\Category} objects + */ + public function get_categories() + { + } + /** + * Get an author for the item + * + * @since Beta 2 + * @param int $key The author that you want to return. Remember that arrays begin with 0, not 1 + * @return \SimplePie\Author|null + */ + public function get_author(int $key = 0) + { + } + /** + * Get a contributor for the item + * + * @since 1.1 + * @param int $key The contrbutor that you want to return. Remember that arrays begin with 0, not 1 + * @return \SimplePie\Author|null + */ + public function get_contributor(int $key = 0) + { + } + /** + * Get all contributors for the item + * + * Uses `<atom:contributor>` + * + * @since 1.1 + * @return \SimplePie\Author[]|null List of {@see \SimplePie\Author} objects + */ + public function get_contributors() + { + } + /** + * Get all authors for the item + * + * Uses `<atom:author>`, `<author>`, `<dc:creator>` or `<itunes:author>` + * + * @since Beta 2 + * @return \SimplePie\Author[]|null List of {@see \SimplePie\Author} objects + */ + public function get_authors() + { + } + /** + * Get the copyright info for the item + * + * Uses `<atom:rights>` or `<dc:rights>` + * + * @since 1.1 + * @return string|null + */ + public function get_copyright() + { + } + /** + * Get the posting date/time for the item + * + * Uses `<atom:published>`, `<atom:updated>`, `<atom:issued>`, + * `<atom:modified>`, `<pubDate>` or `<dc:date>` + * + * Note: obeys PHP's timezone setting. To get a UTC date/time, use + * {@see get_gmdate} + * + * @since Beta 2 (previously called `get_item_date` since 0.8) + * + * @param string $date_format Supports any PHP date format from {@see http://php.net/date} (empty for the raw data) + * @return ($date_format is 'U' ? ?int : ?string) + */ + public function get_date(string $date_format = 'j F Y, g:i a') + { + } + /** + * Get the update date/time for the item + * + * Uses `<atom:updated>` + * + * Note: obeys PHP's timezone setting. To get a UTC date/time, use + * {@see get_gmdate} + * + * @param string $date_format Supports any PHP date format from {@see http://php.net/date} (empty for the raw data) + * @return ($date_format is 'U' ? ?int : ?string) + */ + public function get_updated_date(string $date_format = 'j F Y, g:i a') + { + } + /** + * Get the localized posting date/time for the item + * + * Returns the date formatted in the localized language. To display in + * languages other than the server's default, you need to change the locale + * with {@link http://php.net/setlocale setlocale()}. The available + * localizations depend on which ones are installed on your web server. + * + * @since 1.0 + * + * @param string $date_format Supports any PHP date format from {@see http://php.net/strftime} (empty for the raw data) + * @return string|null|false see `strftime` for when this can return `false` + */ + public function get_local_date(string $date_format = '%c') + { + } + /** + * Get the posting date/time for the item (UTC time) + * + * @see get_date + * @param string $date_format Supports any PHP date format from {@see http://php.net/date} + * @return string|null + */ + public function get_gmdate(string $date_format = 'j F Y, g:i a') + { + } + /** + * Get the update date/time for the item (UTC time) + * + * @see get_updated_date + * @param string $date_format Supports any PHP date format from {@see http://php.net/date} + * @return string|null + */ + public function get_updated_gmdate(string $date_format = 'j F Y, g:i a') + { + } + /** + * Get the permalink for the item + * + * Returns the first link available with a relationship of "alternate". + * Identical to {@see get_link()} with key 0 + * + * @see get_link + * @since 0.8 + * @return string|null Permalink URL + */ + public function get_permalink() + { + } + /** + * Get a single link for the item + * + * @since Beta 3 + * @param int $key The link that you want to return. Remember that arrays begin with 0, not 1 + * @param string $rel The relationship of the link to return + * @return string|null Link URL + */ + public function get_link(int $key = 0, string $rel = 'alternate') + { + } + /** + * Get all links for the item + * + * Uses `<atom:link>`, `<link>` or `<guid>` + * + * @since Beta 2 + * @param string $rel The relationship of links to return + * @return array<string>|null Links found for the item (strings) + */ + public function get_links(string $rel = 'alternate') + { + } + /** + * Get an enclosure from the item + * + * Supports the <enclosure> RSS tag, as well as Media RSS and iTunes RSS. + * + * @since Beta 2 + * @todo Add ability to prefer one type of content over another (in a media group). + * @param int $key The enclosure that you want to return. Remember that arrays begin with 0, not 1 + * @return \SimplePie\Enclosure|null + */ + public function get_enclosure(int $key = 0) + { + } + /** + * Get all available enclosures (podcasts, etc.) + * + * Supports the <enclosure> RSS tag, as well as Media RSS and iTunes RSS. + * + * At this point, we're pretty much assuming that all enclosures for an item + * are the same content. Anything else is too complicated to + * properly support. + * + * @since Beta 2 + * @todo Add support for end-user defined sorting of enclosures by type/handler (so we can prefer the faster-loading FLV over MP4). + * @todo If an element exists at a level, but its value is empty, we should fall back to the value from the parent (if it exists). + * @return \SimplePie\Enclosure[]|null List of \SimplePie\Enclosure items + */ + public function get_enclosures() + { + } + /** + * Get the latitude coordinates for the item + * + * Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications + * + * Uses `<geo:lat>` or `<georss:point>` + * + * @since 1.0 + * @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo + * @link http://www.georss.org/ GeoRSS + * @return float|null + */ + public function get_latitude() + { + } + /** + * Get the longitude coordinates for the item + * + * Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications + * + * Uses `<geo:long>`, `<geo:lon>` or `<georss:point>` + * + * @since 1.0 + * @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo + * @link http://www.georss.org/ GeoRSS + * @return float|null + */ + public function get_longitude() + { + } + /** + * Get the `<atom:source>` for the item + * + * @since 1.1 + * @return \SimplePie\Source|null + */ + public function get_source() + { + } + public function set_sanitize(\SimplePie\Sanitize $sanitize): void + { + } + protected function get_sanitize(): \SimplePie\Sanitize + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Item" instead */ + class SimplePie_Item extends \SimplePie\Item + { + } +} +namespace SimplePie { + /** + * Used for feed auto-discovery + * + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_locator_class()} + */ + class Locator implements \SimplePie\RegistryAware + { + /** @var ?string */ + public $useragent = null; + /** @var int */ + public $timeout = 10; + /** @var File */ + public $file; + /** @var string[] */ + public $local = []; + /** @var string[] */ + public $elsewhere = []; + /** @var array<mixed> */ + public $cached_entities = []; + /** @var string */ + public $http_base; + /** @var string */ + public $base; + /** @var int */ + public $base_location = 0; + /** @var int */ + public $checked_feeds = 0; + /** @var int */ + public $max_checked_feeds = 10; + /** @var bool */ + public $force_fsockopen = false; + /** @var array<int, mixed> */ + public $curl_options = []; + /** @var ?\DomDocument */ + public $dom; + /** @var ?Registry */ + protected $registry; + /** + * @param array<int, mixed> $curl_options + */ + public function __construct(\SimplePie\File $file, int $timeout = 10, ?string $useragent = null, int $max_checked_feeds = 10, bool $force_fsockopen = false, array $curl_options = []) + { + } + /** + * Set a PSR-18 client and PSR-17 factories + * + * Allows you to use your own HTTP client implementations. + */ + final public function set_http_client(\Psr\Http\Client\ClientInterface $http_client, \Psr\Http\Message\RequestFactoryInterface $request_factory, \Psr\Http\Message\UriFactoryInterface $uri_factory): void + { + } + /** + * @return void + */ + public function set_registry(\SimplePie\Registry $registry) + { + } + /** + * @param SimplePie::LOCATOR_* $type + * @param array<Response>|null $working + * @return Response|null + */ + public function find(int $type = \SimplePie\SimplePie::LOCATOR_ALL, ?array &$working = null) + { + } + /** + * @return bool + */ + public function is_feed(\SimplePie\HTTP\Response $file, bool $check_html = false) + { + } + /** + * @return void + */ + public function get_base() + { + } + /** + * @return array<Response>|null + */ + public function autodiscovery() + { + } + /** + * @param string[] $done + * @param array<string, Response> $feeds + * @return array<string, Response> + */ + protected function search_elements_by_tag(string $name, array &$done, array $feeds) + { + } + /** + * @return true|null + */ + public function get_links() + { + } + /** + * Extracts first `link` element with given `rel` attribute inside the `head` element. + * + * @return string|null + */ + public function get_rel_link(string $rel) + { + } + /** + * @param string[] $array + * @return array<Response>|null + */ + public function extension(array &$array) + { + } + /** + * @param string[] $array + * @return array<Response>|null + */ + public function body(array &$array) + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Locator" instead */ + class SimplePie_Locator extends \SimplePie\Locator + { + } +} +namespace SimplePie { + /** + * Miscellaneous utilities + */ + class Misc + { + /** + * @return string + */ + public static function time_hms(int $seconds) + { + } + /** + * @return string|false + */ + public static function absolutize_url(string $relative, string $base) + { + } + /** + * @internal + */ + public static function is_remote_uri(string $uri): bool + { + } + /** + * Get a HTML/XML element from a HTML string + * + * @deprecated since SimplePie 1.3, use DOMDocument instead (parsing HTML with regex is bad!) + * @param string $realname Element name (including namespace prefix if applicable) + * @param string $string HTML document + * @return array<array{tag: string, self_closing: bool, attribs: array<string, array{data: string}>, content?: string}> + */ + public static function get_element(string $realname, string $string) + { + } + /** + * @deprecated since SimplePie 1.9.0. If you need it, you can copy the function to your codebase. But you should consider using `DOMDocument` for any DOM wrangling. + * @param array{tag: string, self_closing: bool, attribs: array<string, array{data: string}>, content: string} $element + * @return string + */ + public static function element_implode(array $element) + { + } + /** + * @param string $message + * @param int $level + * @param string $file + * @param int $line + * @return string + */ + public static function error(string $message, int $level, string $file, int $line) + { + } + /** + * @return string + */ + public static function fix_protocol(string $url, int $http = 1) + { + } + /** + * @deprecated since SimplePie 1.8.0, use PHP native array_replace_recursive() instead. + * @param array<mixed> $array1 + * @param array<mixed> $array2 + * @return array<mixed> + */ + public static function array_merge_recursive(array $array1, array $array2) + { + } + /** + * @return array<string, string> + */ + public static function parse_url(string $url) + { + } + /** + * @return string + */ + public static function compress_parse_url(string $scheme = '', string $authority = '', string $path = '', string $query = '', ?string $fragment = '') + { + } + /** + * @return string + */ + public static function normalize_url(string $url) + { + } + /** + * @deprecated since SimplePie 1.9.0. This functionality is part of `IRI` – if you need it standalone, consider copying the function to your codebase. + * @param array<int, string> $match + * @return string + */ + public static function percent_encoding_normalization(array $match) + { + } + /** + * Converts a Windows-1252 encoded string to a UTF-8 encoded string + * + * @static + * @param string $string Windows-1252 encoded string + * @return string UTF-8 encoded string + */ + public static function windows_1252_to_utf8(string $string) + { + } + /** + * Change a string from one encoding to another + * + * @param string $data Raw data in $input encoding + * @param string $input Encoding of $data + * @param string $output Encoding you want + * @return string|false False if we can't convert it + */ + public static function change_encoding(string $data, string $input, string $output) + { + } + /** + * @return string|false + */ + protected static function change_encoding_mbstring(string $data, string $input, string $output) + { + } + /** + * @return string|false + */ + protected static function change_encoding_iconv(string $data, string $input, string $output) + { + } + /** + * @return string|false + */ + protected static function change_encoding_uconverter(string $data, string $input, string $output) + { + } + /** + * Normalize an encoding name + * + * This is automatically generated by create.php + * + * To generate it, run `php create.php` on the command line, and copy the + * output to replace this function. + * + * @param string $charset Character set to standardise + * @return string Standardised name + */ + public static function encoding(string $charset) + { + } + /** + * @return string + */ + public static function get_curl_version() + { + } + /** + * Strip HTML comments + * + * @deprecated since SimplePie 1.9.0. If you need it, you can copy the function to your codebase. But you should consider using `DOMDocument` for any DOM wrangling. + * @param string $data Data to strip comments from + * @return string Comment stripped string + */ + public static function strip_comments(string $data) + { + } + /** + * @return int|false + */ + public static function parse_date(string $dt) + { + } + /** + * Decode HTML entities + * + * @deprecated since SimplePie 1.3, use DOMDocument instead + * @param string $data Input data + * @return string Output data + */ + public static function entities_decode(string $data) + { + } + /** + * Remove RFC822 comments + * + * @deprecated since SimplePie 1.9.0. If you need it, consider copying the function to your codebase. + * @param string $string Data to strip comments from + * @return string Comment stripped string + */ + public static function uncomment_rfc822(string $string) + { + } + /** + * @return string + */ + public static function parse_mime(string $mime) + { + } + /** + * @param array<string, array<string, string>> $attribs + * @return int-mask-of<SimplePie::CONSTRUCT_*> + */ + public static function atom_03_construct_type(array $attribs) + { + } + /** + * @param array<string, array<string, string>> $attribs + * @return int-mask-of<SimplePie::CONSTRUCT_*> + */ + public static function atom_10_construct_type(array $attribs) + { + } + /** + * @param array<string, array<string, string>> $attribs + * @return int-mask-of<SimplePie::CONSTRUCT_*> + */ + public static function atom_10_content_construct_type(array $attribs) + { + } + /** + * @return bool + */ + public static function is_isegment_nz_nc(string $string) + { + } + /** + * @return string[] + */ + public static function space_separated_tokens(string $string) + { + } + /** + * Converts a unicode codepoint to a UTF-8 character + * + * @static + * @param int $codepoint Unicode codepoint + * @return string|false UTF-8 character + */ + public static function codepoint_to_utf8(int $codepoint) + { + } + /** + * Similar to parse_str() + * + * Returns an associative array of name/value pairs, where the value is an + * array of values that have used the same name + * + * @deprecated since SimplePie 1.9.0. If you need it, consider copying the function to your codebase. + * @static + * @param string $str The input string. + * @return array<string, array<string|null>> + */ + public static function parse_str(string $str) + { + } + /** + * Detect XML encoding, as per XML 1.0 Appendix F.1 + * + * @todo Add support for EBCDIC + * @param string $data XML data + * @param \SimplePie\Registry $registry Class registry + * @return array<string> Possible encodings + */ + public static function xml_encoding(string $data, \SimplePie\Registry $registry) + { + } + /** + * @return void + */ + public static function output_javascript() + { + } + /** + * Get the SimplePie build timestamp + * + * Uses the git index if it exists, otherwise uses the modification time + * of the newest file. + * + * @return int + */ + public static function get_build() + { + } + /** + * Get the default user agent string + * + * @return string + */ + public static function get_default_useragent() + { + } + /** + * Format debugging information + * + * @return string + */ + public static function debug(\SimplePie\SimplePie &$sp) + { + } + /** + * @return bool + */ + public static function silence_errors(int $num, string $str) + { + } + /** + * Sanitize a URL by removing HTTP credentials. + * @param string $url the URL to sanitize. + * @return string the same URL without HTTP credentials. + */ + public static function url_remove_credentials(string $url) + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Misc" instead */ + class SimplePie_Misc extends \SimplePie\Misc + { + } +} +namespace SimplePie\Net { + /** + * Class to validate and to work with IPv6 addresses. + * + * @copyright 2003-2005 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php + * @link http://pear.php.net/package/Net_IPv6 + * @author Alexander Merz <alexander.merz@web.de> + * @author elfrink at introweb dot nl + * @author Josh Peck <jmp at joshpeck dot org> + * @author Sam Sneddon <geoffers@gmail.com> + */ + class IPv6 + { + /** + * Uncompresses an IPv6 address + * + * RFC 4291 allows you to compress consecutive zero pieces in an address to + * '::'. This method expects a valid IPv6 address and expands the '::' to + * the required number of zero pieces. + * + * Example: FF01::101 -> FF01:0:0:0:0:0:0:101 + * ::1 -> 0:0:0:0:0:0:0:1 + * + * @author Alexander Merz <alexander.merz@web.de> + * @author elfrink at introweb dot nl + * @author Josh Peck <jmp at joshpeck dot org> + * @copyright 2003-2005 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php + * @param string $ip An IPv6 address + * @return string The uncompressed IPv6 address + */ + public static function uncompress(string $ip) + { + } + /** + * Compresses an IPv6 address + * + * RFC 4291 allows you to compress consecutive zero pieces in an address to + * '::'. This method expects a valid IPv6 address and compresses consecutive + * zero pieces to '::'. + * + * Example: FF01:0:0:0:0:0:0:101 -> FF01::101 + * 0:0:0:0:0:0:0:1 -> ::1 + * + * @see uncompress() + * @param string $ip An IPv6 address + * @return string The compressed IPv6 address + */ + public static function compress(string $ip) + { + } + /** + * Checks an IPv6 address + * + * Checks if the given IP is a valid IPv6 address + * + * @param string $ip An IPv6 address + * @return bool true if $ip is a valid IPv6 address + */ + public static function check_ipv6(string $ip) + { + } + /** + * Checks if the given IP is a valid IPv6 address + * + * @codeCoverageIgnore + * @deprecated Use {@see IPv6::check_ipv6()} instead + * @see check_ipv6 + * @param string $ip An IPv6 address + * @return bool true if $ip is a valid IPv6 address + */ + public static function checkIPv6(string $ip) + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Net\IPv6" instead */ + class SimplePie_Net_IPv6 extends \SimplePie\Net\IPv6 + { + } +} +namespace SimplePie\Parse { + /** + * Date Parser + */ + class Date + { + /** + * Input data + * + * @access protected + * @var string + */ + public $date; + /** + * List of days, calendar day name => ordinal day number in the week + * + * @access protected + * @var array<string, int<1,7>> + */ + public $day = [ + // English + 'mon' => 1, + 'monday' => 1, + 'tue' => 2, + 'tuesday' => 2, + 'wed' => 3, + 'wednesday' => 3, + 'thu' => 4, + 'thursday' => 4, + 'fri' => 5, + 'friday' => 5, + 'sat' => 6, + 'saturday' => 6, + 'sun' => 7, + 'sunday' => 7, + // Dutch + 'maandag' => 1, + 'dinsdag' => 2, + 'woensdag' => 3, + 'donderdag' => 4, + 'vrijdag' => 5, + 'zaterdag' => 6, + 'zondag' => 7, + // French + 'lundi' => 1, + 'mardi' => 2, + 'mercredi' => 3, + 'jeudi' => 4, + 'vendredi' => 5, + 'samedi' => 6, + 'dimanche' => 7, + // German + 'montag' => 1, + 'mo' => 1, + 'dienstag' => 2, + 'di' => 2, + 'mittwoch' => 3, + 'mi' => 3, + 'donnerstag' => 4, + 'do' => 4, + 'freitag' => 5, + 'fr' => 5, + 'samstag' => 6, + 'sa' => 6, + 'sonnabend' => 6, + // AFAIK no short form for sonnabend + 'so' => 7, + 'sonntag' => 7, + // Italian + 'lunedì' => 1, + 'martedì' => 2, + 'mercoledì' => 3, + 'giovedì' => 4, + 'venerdì' => 5, + 'sabato' => 6, + 'domenica' => 7, + // Spanish + 'lunes' => 1, + 'martes' => 2, + 'miércoles' => 3, + 'jueves' => 4, + 'viernes' => 5, + 'sábado' => 6, + 'domingo' => 7, + // Finnish + 'maanantai' => 1, + 'tiistai' => 2, + 'keskiviikko' => 3, + 'torstai' => 4, + 'perjantai' => 5, + 'lauantai' => 6, + 'sunnuntai' => 7, + // Hungarian + 'hétfő' => 1, + 'kedd' => 2, + 'szerda' => 3, + 'csütörtok' => 4, + 'péntek' => 5, + 'szombat' => 6, + 'vasárnap' => 7, + // Greek + 'Δευ' => 1, + 'Τρι' => 2, + 'Τετ' => 3, + 'Πεμ' => 4, + 'Παρ' => 5, + 'Σαβ' => 6, + 'Κυρ' => 7, + // Russian + 'Пн.' => 1, + 'Вт.' => 2, + 'Ср.' => 3, + 'Чт.' => 4, + 'Пт.' => 5, + 'Сб.' => 6, + 'Вс.' => 7, + ]; + /** + * List of months, calendar month name => calendar month number + * + * @access protected + * @var array<string, int<1,12>> + */ + public $month = [ + // English + 'jan' => 1, + 'january' => 1, + 'feb' => 2, + 'february' => 2, + 'mar' => 3, + 'march' => 3, + 'apr' => 4, + 'april' => 4, + 'may' => 5, + // No long form of May + 'jun' => 6, + 'june' => 6, + 'jul' => 7, + 'july' => 7, + 'aug' => 8, + 'august' => 8, + 'sep' => 9, + 'september' => 9, + 'oct' => 10, + 'october' => 10, + 'nov' => 11, + 'november' => 11, + 'dec' => 12, + 'december' => 12, + // Dutch + 'januari' => 1, + 'februari' => 2, + 'maart' => 3, + // 'april' => 4, + 'mei' => 5, + 'juni' => 6, + 'juli' => 7, + 'augustus' => 8, + // 'september' => 9, + 'oktober' => 10, + // 'november' => 11, + // 'december' => 12, + // French + 'janvier' => 1, + 'février' => 2, + 'mars' => 3, + 'avril' => 4, + 'mai' => 5, + 'juin' => 6, + 'juillet' => 7, + 'août' => 8, + 'septembre' => 9, + 'octobre' => 10, + 'novembre' => 11, + 'décembre' => 12, + // German + 'januar' => 1, + // 'jan' => 1, + 'februar' => 2, + // 'feb' => 2, + 'märz' => 3, + 'mär' => 3, + // 'april' => 4, + // 'apr' => 4, + // 'mai' => 5, // no short form for may + // 'juni' => 6, + // 'jun' => 6, + // 'juli' => 7, + // 'jul' => 7, + // 'august' => 8, + // 'aug' => 8, + // 'september' => 9, + // 'sep' => 9, + // 'oktober' => 10, + 'okt' => 10, + // 'november' => 11, + // 'nov' => 11, + 'dezember' => 12, + 'dez' => 12, + // Italian + 'gennaio' => 1, + 'febbraio' => 2, + 'marzo' => 3, + 'aprile' => 4, + 'maggio' => 5, + 'giugno' => 6, + 'luglio' => 7, + 'agosto' => 8, + 'settembre' => 9, + 'ottobre' => 10, + // 'novembre' => 11, + 'dicembre' => 12, + // Spanish + 'enero' => 1, + 'febrero' => 2, + // 'marzo' => 3, + 'abril' => 4, + 'mayo' => 5, + 'junio' => 6, + 'julio' => 7, + // 'agosto' => 8, + 'septiembre' => 9, + 'setiembre' => 9, + 'octubre' => 10, + 'noviembre' => 11, + 'diciembre' => 12, + // Finnish + 'tammikuu' => 1, + 'helmikuu' => 2, + 'maaliskuu' => 3, + 'huhtikuu' => 4, + 'toukokuu' => 5, + 'kesäkuu' => 6, + 'heinäkuu' => 7, + 'elokuu' => 8, + 'suuskuu' => 9, + 'lokakuu' => 10, + 'marras' => 11, + 'joulukuu' => 12, + // Hungarian + 'január' => 1, + 'február' => 2, + 'március' => 3, + 'április' => 4, + 'május' => 5, + 'június' => 6, + 'július' => 7, + 'augusztus' => 8, + 'szeptember' => 9, + 'október' => 10, + // 'november' => 11, + // 'december' => 12, + // Greek + 'Ιαν' => 1, + 'Φεβ' => 2, + 'Μάώ' => 3, + 'Μαώ' => 3, + 'Απρ' => 4, + 'Μάι' => 5, + 'Μαϊ' => 5, + 'Μαι' => 5, + 'Ιούν' => 6, + 'Ιον' => 6, + 'Ιούλ' => 7, + 'Ιολ' => 7, + 'Αύγ' => 8, + 'Αυγ' => 8, + 'Σεπ' => 9, + 'Οκτ' => 10, + 'Νοέ' => 11, + 'Δεκ' => 12, + // Russian + 'Янв' => 1, + 'января' => 1, + 'Фев' => 2, + 'февраля' => 2, + 'Мар' => 3, + 'марта' => 3, + 'Апр' => 4, + 'апреля' => 4, + 'Май' => 5, + 'мая' => 5, + 'Июн' => 6, + 'июня' => 6, + 'Июл' => 7, + 'июля' => 7, + 'Авг' => 8, + 'августа' => 8, + 'Сен' => 9, + 'сентября' => 9, + 'Окт' => 10, + 'октября' => 10, + 'Ноя' => 11, + 'ноября' => 11, + 'Дек' => 12, + 'декабря' => 12, + ]; + /** + * List of timezones, abbreviation => offset from UTC + * + * @access protected + * @var array<string, int> + */ + public $timezone = [ + 'ACDT' => 37800, + 'ACIT' => 28800, + 'ACST' => 34200, + 'ACT' => -18000, + 'ACWDT' => 35100, + 'ACWST' => 31500, + 'AEDT' => 39600, + 'AEST' => 36000, + 'AFT' => 16200, + 'AKDT' => -28800, + 'AKST' => -32400, + 'AMDT' => 18000, + 'AMT' => -14400, + 'ANAST' => 46800, + 'ANAT' => 43200, + 'ART' => -10800, + 'AZOST' => -3600, + 'AZST' => 18000, + 'AZT' => 14400, + 'BIOT' => 21600, + 'BIT' => -43200, + 'BOT' => -14400, + 'BRST' => -7200, + 'BRT' => -10800, + 'BST' => 3600, + 'BTT' => 21600, + 'CAST' => 18000, + 'CAT' => 7200, + 'CCT' => 23400, + 'CDT' => -18000, + 'CEDT' => 7200, + 'CEST' => 7200, + 'CET' => 3600, + 'CGST' => -7200, + 'CGT' => -10800, + 'CHADT' => 49500, + 'CHAST' => 45900, + 'CIST' => -28800, + 'CKT' => -36000, + 'CLDT' => -10800, + 'CLST' => -14400, + 'COT' => -18000, + 'CST' => -21600, + 'CVT' => -3600, + 'CXT' => 25200, + 'DAVT' => 25200, + 'DTAT' => 36000, + 'EADT' => -18000, + 'EAST' => -21600, + 'EAT' => 10800, + 'ECT' => -18000, + 'EDT' => -14400, + 'EEST' => 10800, + 'EET' => 7200, + 'EGT' => -3600, + 'EKST' => 21600, + 'EST' => -18000, + 'FJT' => 43200, + 'FKDT' => -10800, + 'FKST' => -14400, + 'FNT' => -7200, + 'GALT' => -21600, + 'GEDT' => 14400, + 'GEST' => 10800, + 'GFT' => -10800, + 'GILT' => 43200, + 'GIT' => -32400, + 'GST' => 14400, + // 'GST' => -7200, + 'GYT' => -14400, + 'HAA' => -10800, + 'HAC' => -18000, + 'HADT' => -32400, + 'HAE' => -14400, + 'HAP' => -25200, + 'HAR' => -21600, + 'HAST' => -36000, + 'HAT' => -9000, + 'HAY' => -28800, + 'HKST' => 28800, + 'HMT' => 18000, + 'HNA' => -14400, + 'HNC' => -21600, + 'HNE' => -18000, + 'HNP' => -28800, + 'HNR' => -25200, + 'HNT' => -12600, + 'HNY' => -32400, + 'IRDT' => 16200, + 'IRKST' => 32400, + 'IRKT' => 28800, + 'IRST' => 12600, + 'JFDT' => -10800, + 'JFST' => -14400, + 'JST' => 32400, + 'KGST' => 21600, + 'KGT' => 18000, + 'KOST' => 39600, + 'KOVST' => 28800, + 'KOVT' => 25200, + 'KRAST' => 28800, + 'KRAT' => 25200, + 'KST' => 32400, + 'LHDT' => 39600, + 'LHST' => 37800, + 'LINT' => 50400, + 'LKT' => 21600, + 'MAGST' => 43200, + 'MAGT' => 39600, + 'MAWT' => 21600, + 'MDT' => -21600, + 'MESZ' => 7200, + 'MEZ' => 3600, + 'MHT' => 43200, + 'MIT' => -34200, + 'MNST' => 32400, + 'MSDT' => 14400, + 'MSST' => 10800, + 'MST' => -25200, + 'MUT' => 14400, + 'MVT' => 18000, + 'MYT' => 28800, + 'NCT' => 39600, + 'NDT' => -9000, + 'NFT' => 41400, + 'NMIT' => 36000, + 'NOVST' => 25200, + 'NOVT' => 21600, + 'NPT' => 20700, + 'NRT' => 43200, + 'NST' => -12600, + 'NUT' => -39600, + 'NZDT' => 46800, + 'NZST' => 43200, + 'OMSST' => 25200, + 'OMST' => 21600, + 'PDT' => -25200, + 'PET' => -18000, + 'PETST' => 46800, + 'PETT' => 43200, + 'PGT' => 36000, + 'PHOT' => 46800, + 'PHT' => 28800, + 'PKT' => 18000, + 'PMDT' => -7200, + 'PMST' => -10800, + 'PONT' => 39600, + 'PST' => -28800, + 'PWT' => 32400, + 'PYST' => -10800, + 'PYT' => -14400, + 'RET' => 14400, + 'ROTT' => -10800, + 'SAMST' => 18000, + 'SAMT' => 14400, + 'SAST' => 7200, + 'SBT' => 39600, + 'SCDT' => 46800, + 'SCST' => 43200, + 'SCT' => 14400, + 'SEST' => 3600, + 'SGT' => 28800, + 'SIT' => 28800, + 'SRT' => -10800, + 'SST' => -39600, + 'SYST' => 10800, + 'SYT' => 7200, + 'TFT' => 18000, + 'THAT' => -36000, + 'TJT' => 18000, + 'TKT' => -36000, + 'TMT' => 18000, + 'TOT' => 46800, + 'TPT' => 32400, + 'TRUT' => 36000, + 'TVT' => 43200, + 'TWT' => 28800, + 'UYST' => -7200, + 'UYT' => -10800, + 'UZT' => 18000, + 'VET' => -14400, + 'VLAST' => 39600, + 'VLAT' => 36000, + 'VOST' => 21600, + 'VUT' => 39600, + 'WAST' => 7200, + 'WAT' => 3600, + 'WDT' => 32400, + 'WEST' => 3600, + 'WFT' => 43200, + 'WIB' => 25200, + 'WIT' => 32400, + 'WITA' => 28800, + 'WKST' => 18000, + 'WST' => 28800, + 'YAKST' => 36000, + 'YAKT' => 32400, + 'YAPT' => 36000, + 'YEKST' => 21600, + 'YEKT' => 18000, + ]; + /** + * Cached PCRE for Date::$day + * + * @access protected + * @var string + */ + public $day_pcre; + /** + * Cached PCRE for Date::$month + * + * @access protected + * @var string + */ + public $month_pcre; + /** + * Array of user-added callback methods + * + * @access private + * @var array<string> + */ + public $built_in = []; + /** + * Array of user-added callback methods + * + * @access private + * @var array<callable(string): (int|false)> + */ + public $user = []; + /** + * Create new Date object, and set self::day_pcre, + * self::month_pcre, and self::built_in + * + * @access private + */ + public function __construct() + { + } + /** + * Get the object + * + * @access public + * @return Date + */ + public static function get() + { + } + /** + * Parse a date + * + * @final + * @access public + * @param string $date Date to parse + * @return int|false Timestamp corresponding to date string, or false on failure + */ + public function parse(string $date) + { + } + /** + * Add a callback method to parse a date + * + * @final + * @access public + * @param callable $callback + * @return void + */ + public function add_callback(callable $callback) + { + } + /** + * Parse a superset of W3C-DTF (allows hyphens and colons to be omitted, as + * well as allowing any of upper or lower case "T", horizontal tabs, or + * spaces to be used as the time separator (including more than one)) + * + * @access protected + * @param string $date + * @return int|false Timestamp + */ + public function date_w3cdtf(string $date) + { + } + /** + * Remove RFC822 comments + * + * @access protected + * @param string $string Data to strip comments from + * @return string Comment stripped string + */ + public function remove_rfc2822_comments(string $string) + { + } + /** + * Parse RFC2822's date format + * + * @access protected + * @param string $date + * @return int|false Timestamp + */ + public function date_rfc2822(string $date) + { + } + /** + * Parse RFC850's date format + * + * @access protected + * @param string $date + * @return int|false Timestamp + */ + public function date_rfc850(string $date) + { + } + /** + * Parse C99's asctime()'s date format + * + * @access protected + * @param string $date + * @return int|false Timestamp + */ + public function date_asctime(string $date) + { + } + /** + * Parse dates using strtotime() + * + * @access protected + * @param string $date + * @return int|false Timestamp + */ + public function date_strtotime(string $date) + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Parse\Date" instead */ + class SimplePie_Parse_Date extends \SimplePie\Parse\Date + { + } +} +namespace SimplePie { + /** + * Parses XML into something sane + * + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_parser_class()} + */ + class Parser implements \SimplePie\RegistryAware + { + /** @var int */ + public $error_code; + /** @var string */ + public $error_string; + /** @var int */ + public $current_line; + /** @var int */ + public $current_column; + /** @var int */ + public $current_byte; + /** @var string */ + public $separator = ' '; + /** @var string[] */ + public $namespace = ['']; + /** @var string[] */ + public $element = ['']; + /** @var string[] */ + public $xml_base = ['']; + /** @var bool[] */ + public $xml_base_explicit = [false]; + /** @var string[] */ + public $xml_lang = ['']; + /** @var array<string, mixed> */ + public $data = []; + /** @var array<array<string, mixed>> */ + public $datas = [[]]; + /** @var int */ + public $current_xhtml_construct = -1; + /** @var string */ + public $encoding; + /** @var Registry */ + protected $registry; + /** + * @return void + */ + public function set_registry(\SimplePie\Registry $registry) + { + } + /** + * @return bool + */ + public function parse(string &$data, string $encoding, string $url = '') + { + } + /** + * @return int + */ + public function get_error_code() + { + } + /** + * @return string + */ + public function get_error_string() + { + } + /** + * @return int + */ + public function get_current_line() + { + } + /** + * @return int + */ + public function get_current_column() + { + } + /** + * @return int + */ + public function get_current_byte() + { + } + /** + * @return array<string, mixed> + */ + public function get_data() + { + } + /** + * @param XMLParser|resource|null $parser + * @param array<string, string> $attributes + * @return void + */ + public function tag_open($parser, string $tag, array $attributes) + { + } + /** + * @param XMLParser|resource|null $parser + * @return void + */ + public function cdata($parser, string $cdata) + { + } + /** + * @param XMLParser|resource|null $parser + * @return void + */ + public function tag_close($parser, string $tag) + { + } + /** + * @return array{string, string} + */ + public function split_ns(string $string) + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Parser" instead */ + class SimplePie_Parser extends \SimplePie\Parser + { + } +} +namespace SimplePie { + /** + * Handles `<media:rating>` or `<itunes:explicit>` tags as defined in Media RSS and iTunes RSS respectively + * + * Used by {@see \SimplePie\Enclosure::get_rating()} and {@see \SimplePie\Enclosure::get_ratings()} + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_rating_class()} + */ + class Rating + { + /** + * Rating scheme + * + * @var ?string + * @see get_scheme() + */ + public $scheme; + /** + * Rating value + * + * @var ?string + * @see get_value() + */ + public $value; + /** + * Constructor, used to input the data + * + * For documentation on all the parameters, see the corresponding + * properties and their accessors + */ + public function __construct(?string $scheme = null, ?string $value = null) + { + } + /** + * String-ified version + * + * @return string + */ + public function __toString() + { + } + /** + * Get the organizational scheme for the rating + * + * @return string|null + */ + public function get_scheme() + { + } + /** + * Get the value of the rating + * + * @return string|null + */ + public function get_value() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Rating" instead */ + class SimplePie_Rating extends \SimplePie\Rating + { + } +} +namespace SimplePie { + /** + * Handles creating objects and calling methods + * + * Access this via {@see \SimplePie\SimplePie::get_registry()} + */ + class Registry + { + /** + * Default class mapping + * + * Overriding classes *must* subclass these. + * + * @var array<class-string, class-string> + */ + protected $default = [\SimplePie\Cache::class => \SimplePie\Cache::class, \SimplePie\Locator::class => \SimplePie\Locator::class, \SimplePie\Parser::class => \SimplePie\Parser::class, \SimplePie\File::class => \SimplePie\File::class, \SimplePie\Sanitize::class => \SimplePie\Sanitize::class, \SimplePie\Item::class => \SimplePie\Item::class, \SimplePie\Author::class => \SimplePie\Author::class, \SimplePie\Category::class => \SimplePie\Category::class, \SimplePie\Enclosure::class => \SimplePie\Enclosure::class, \SimplePie\Caption::class => \SimplePie\Caption::class, \SimplePie\Copyright::class => \SimplePie\Copyright::class, \SimplePie\Credit::class => \SimplePie\Credit::class, \SimplePie\Rating::class => \SimplePie\Rating::class, \SimplePie\Restriction::class => \SimplePie\Restriction::class, \SimplePie\Content\Type\Sniffer::class => \SimplePie\Content\Type\Sniffer::class, \SimplePie\Source::class => \SimplePie\Source::class, \SimplePie\Misc::class => \SimplePie\Misc::class, \SimplePie\XML\Declaration\Parser::class => \SimplePie\XML\Declaration\Parser::class, \SimplePie\Parse\Date::class => \SimplePie\Parse\Date::class]; + /** + * Class mapping + * + * @see register() + * @var array<string, class-string> + */ + protected $classes = []; + /** + * Legacy classes + * + * @see register() + * @var array<class-string> + */ + protected $legacy = []; + /** + * Constructor + * + * No-op + */ + public function __construct() + { + } + /** + * Register a class + * + * @param string $type See {@see $default} for names + * @param class-string $class Class name, must subclass the corresponding default + * @param bool $legacy Whether to enable legacy support for this class + * @return bool Successfulness + */ + public function register(string $type, $class, bool $legacy = false) + { + } + /** + * Get the class registered for a type + * + * Where possible, use {@see create()} or {@see call()} instead + * + * @template T + * @param class-string<T> $type + * @return class-string<T>|null + */ + public function get_class($type) + { + } + /** + * Create a new instance of a given type + * + * @template T class-string $type + * @param class-string<T> $type + * @param array<mixed> $parameters Parameters to pass to the constructor + * @return T Instance of class + */ + public function &create($type, array $parameters = []) + { + } + /** + * Call a static method for a type + * + * @param class-string $type + * @param string $method + * @param array<mixed> $parameters + * @return mixed + */ + public function &call($type, string $method, array $parameters = []) + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Registry" instead */ + class SimplePie_Registry extends \SimplePie\Registry + { + } +} +namespace SimplePie { + /** + * Handles `<media:restriction>` as defined in Media RSS + * + * Used by {@see \SimplePie\Enclosure::get_restriction()} and {@see \SimplePie\Enclosure::get_restrictions()} + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_restriction_class()} + */ + class Restriction + { + public const RELATIONSHIP_ALLOW = 'allow'; + public const RELATIONSHIP_DENY = 'deny'; + /** + * Relationship ('allow'/'deny') + * + * @var self::RELATIONSHIP_*|null + * @see get_relationship() + */ + public $relationship; + /** + * Type of restriction + * + * @var string|null + * @see get_type() + */ + public $type; + /** + * Restricted values + * + * @var string|null + * @see get_value() + */ + public $value; + /** + * Constructor, used to input the data + * + * For documentation on all the parameters, see the corresponding + * properties and their accessors + * + * @param ?self::RELATIONSHIP_* $relationship + */ + public function __construct(?string $relationship = null, ?string $type = null, ?string $value = null) + { + } + /** + * String-ified version + * + * @return string + */ + public function __toString() + { + } + /** + * Get the relationship + * + * @return ?self::RELATIONSHIP_* + */ + public function get_relationship() + { + } + /** + * Get the type + * + * @return string|null + */ + public function get_type() + { + } + /** + * Get the list of restricted things + * + * @return string|null + */ + public function get_value() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Restriction" instead */ + class SimplePie_Restriction extends \SimplePie\Restriction + { + } +} +namespace SimplePie { + /** + * Used for data cleanup and post-processing + * + * + * This class can be overloaded with {@see \SimplePie\SimplePie::set_sanitize_class()} + * + * @todo Move to using an actual HTML parser (this will allow tags to be properly stripped, and to switch between HTML and XHTML), this will also make it easier to shorten a string while preserving HTML tags + */ + class Sanitize implements \SimplePie\RegistryAware + { + /** @var string */ + public $base = ''; + /** @var bool */ + public $remove_div = true; + /** @var string */ + public $image_handler = ''; + /** @var string[] */ + public $strip_htmltags = ['base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style']; + /** @var bool */ + public $encode_instead_of_strip = false; + /** @var string[] */ + public $strip_attributes = ['bgsound', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc']; + /** @var string[] */ + public $rename_attributes = []; + /** @var array<string, array<string, string>> */ + public $add_attributes = ['audio' => ['preload' => 'none'], 'iframe' => ['sandbox' => 'allow-scripts allow-same-origin'], 'video' => ['preload' => 'none']]; + /** @var bool */ + public $strip_comments = false; + /** @var string */ + public $output_encoding = 'UTF-8'; + /** @var bool */ + public $enable_cache = true; + /** @var string */ + public $cache_location = './cache'; + /** @var string&(callable(string): string) */ + public $cache_name_function = 'md5'; + /** @var int */ + public $timeout = 10; + /** @var string */ + public $useragent = ''; + /** @var bool */ + public $force_fsockopen = false; + /** @var array<string, string|string[]> */ + public $replace_url_attributes = []; + /** @var Registry */ + public $registry; + /** + * List of domains for which to force HTTPS. + * @see \SimplePie\Sanitize::set_https_domains() + * Array is a tree split at DNS levels. Example: + * array('biz' => true, 'com' => array('example' => true), 'net' => array('example' => array('www' => true))) + * @var true|array<string, true|array<string, true|array<string, array<string, true|array<string, true|array<string, true>>>>>> + */ + public $https_domains = []; + public function __construct() + { + } + /** + * @return void + */ + public function remove_div(bool $enable = true) + { + } + /** + * @param string|false $page + * @return void + */ + public function set_image_handler($page = false) + { + } + /** + * @return void + */ + public function set_registry(\SimplePie\Registry $registry) + { + } + /** + * @param (string&(callable(string): string))|NameFilter $cache_name_function + * @param class-string<Cache> $cache_class + * @return void + */ + public function pass_cache_data(bool $enable_cache = true, string $cache_location = './cache', $cache_name_function = 'md5', string $cache_class = \SimplePie\Cache::class, ?\SimplePie\Cache\DataCache $cache = null) + { + } + /** + * Set a PSR-18 client and PSR-17 factories + * + * Allows you to use your own HTTP client implementations. + */ + final public function set_http_client(\Psr\Http\Client\ClientInterface $http_client, \Psr\Http\Message\RequestFactoryInterface $request_factory, \Psr\Http\Message\UriFactoryInterface $uri_factory): void + { + } + /** + * @deprecated since SimplePie 1.9.0, use \SimplePie\Sanitize::set_http_client() instead. + * @param class-string<File> $file_class + * @param array<int, mixed> $curl_options + * @return void + */ + public function pass_file_data(string $file_class = \SimplePie\File::class, int $timeout = 10, string $useragent = '', bool $force_fsockopen = false, array $curl_options = []) + { + } + /** + * @param string[]|string|false $tags Set a list of tags to strip, or set empty string to use default tags, or false to strip nothing. + * @return void + */ + public function strip_htmltags($tags = ['base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style']) + { + } + /** + * @return void + */ + public function encode_instead_of_strip(bool $encode = false) + { + } + /** + * @param string[]|string $attribs + * @return void + */ + public function rename_attributes($attribs = []) + { + } + /** + * @param string[]|string $attribs + * @return void + */ + public function strip_attributes($attribs = ['bgsound', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc']) + { + } + /** + * @param array<string, array<string, string>> $attribs + * @return void + */ + public function add_attributes(array $attribs = ['audio' => ['preload' => 'none'], 'iframe' => ['sandbox' => 'allow-scripts allow-same-origin'], 'video' => ['preload' => 'none']]) + { + } + /** + * @return void + */ + public function strip_comments(bool $strip = false) + { + } + /** + * @return void + */ + public function set_output_encoding(string $encoding = 'UTF-8') + { + } + /** + * Set element/attribute key/value pairs of HTML attributes + * containing URLs that need to be resolved relative to the feed + * + * Defaults to |a|@href, |area|@href, |audio|@src, |blockquote|@cite, + * |del|@cite, |form|@action, |img|@longdesc, |img|@src, |input|@src, + * |ins|@cite, |q|@cite, |source|@src, |video|@src + * + * @since 1.0 + * @param array<string, string|string[]>|null $element_attribute Element/attribute key/value pairs, null for default + * @return void + */ + public function set_url_replacements(?array $element_attribute = null) + { + } + /** + * Set the list of domains for which to force HTTPS. + * @see \SimplePie\Misc::https_url() + * Example array('biz', 'example.com', 'example.org', 'www.example.net'); + * + * @param string[] $domains list of domain names ['biz', 'example.com', 'example.org', 'www.example.net'] + * + * @return void + */ + public function set_https_domains(array $domains) + { + } + /** + * Check if the domain is in the list of forced HTTPS. + * + * @return bool + */ + protected function is_https_domain(string $domain) + { + } + /** + * Force HTTPS for selected Web sites. + * + * @return string + */ + public function https_url(string $url) + { + } + /** + * @param int-mask-of<SimplePie::CONSTRUCT_*> $type + * @param string $base + * @return string Sanitized data; false if output encoding is changed to something other than UTF-8 and conversion fails + */ + public function sanitize(string $data, int $type, string $base = '') + { + } + /** + * @param int-mask-of<SimplePie::CONSTRUCT_*> $type + * @return string + */ + protected function preprocess(string $html, int $type) + { + } + /** + * @param array<string>|string $attributes + * @return void + */ + public function replace_urls(\DOMDocument $document, string $tag, $attributes) + { + } + /** + * @param array<int, string> $match + * @return string + */ + public function do_strip_htmltags(array $match) + { + } + /** + * @param int-mask-of<SimplePie::CONSTRUCT_*> $type + * @return void + * @phpstan-return void + */ + protected function strip_tag(string $tag, \DOMDocument $document, \DOMXPath $xpath, int $type) + { + } + /** + * @return void + */ + protected function strip_attr(string $attrib, \DOMXPath $xpath) + { + } + /** + * @return void + */ + protected function rename_attr(string $attrib, \DOMXPath $xpath) + { + } + /** + * @param array<string, string> $valuePairs + * @return void + */ + protected function add_attr(string $tag, array $valuePairs, \DOMDocument $document) + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Sanitize" instead */ + class SimplePie_Sanitize extends \SimplePie\Sanitize + { + } +} +namespace SimplePie { + /** + * Handles `<atom:source>` + * + * Used by {@see \SimplePie\Item::get_source()} + * + * This class can be overloaded with {@see \SimplePie::set_source_class()} + */ + class Source implements \SimplePie\RegistryAware + { + /** @var Item */ + public $item; + /** @var array<string, mixed> */ + public $data = []; + /** @var Registry */ + protected $registry; + /** + * @param array<string, mixed> $data + */ + public function __construct(\SimplePie\Item $item, array $data) + { + } + /** + * @return void + */ + public function set_registry(\SimplePie\Registry $registry) + { + } + /** + * @return string + */ + public function __toString() + { + } + /** + * @param string $namespace + * @param string $tag + * @return array<array<string, mixed>>|null + */ + public function get_source_tags(string $namespace, string $tag) + { + } + /** + * @param array<string, mixed> $element + * @return string + */ + public function get_base(array $element = []) + { + } + /** + * @param string $data + * @param int-mask-of<SimplePie::CONSTRUCT_*> $type + * @param string $base + * @return string + */ + public function sanitize(string $data, $type, string $base = '') + { + } + /** + * @return Item + */ + public function get_item() + { + } + /** + * @return string|null + */ + public function get_title() + { + } + /** + * @param int $key + * @return Category|null + */ + public function get_category(int $key = 0) + { + } + /** + * @return array<Category>|null + */ + public function get_categories() + { + } + /** + * @param int $key + * @return Author|null + */ + public function get_author(int $key = 0) + { + } + /** + * @return array<Author>|null + */ + public function get_authors() + { + } + /** + * @param int $key + * @return Author|null + */ + public function get_contributor(int $key = 0) + { + } + /** + * @return array<Author>|null + */ + public function get_contributors() + { + } + /** + * @param int $key + * @param string $rel + * @return string|null + */ + public function get_link(int $key = 0, string $rel = 'alternate') + { + } + /** + * Added for parity between the parent-level and the item/entry-level. + * + * @return string|null + */ + public function get_permalink() + { + } + /** + * @param string $rel + * @return array<string>|null + */ + public function get_links(string $rel = 'alternate') + { + } + /** + * @return string|null + */ + public function get_description() + { + } + /** + * @return string|null + */ + public function get_copyright() + { + } + /** + * @return string|null + */ + public function get_language() + { + } + /** + * @return float|null + */ + public function get_latitude() + { + } + /** + * @return float|null + */ + public function get_longitude() + { + } + /** + * @return string|null + */ + public function get_image_url() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Source" instead */ + class SimplePie_Source extends \SimplePie\Source + { + } +} +namespace SimplePie\XML\Declaration { + /** + * Parses the XML Declaration + */ + class Parser + { + /** + * XML Version + * + * @access public + * @var string + */ + public $version = '1.0'; + /** + * Encoding + * + * @access public + * @var string + */ + public $encoding = 'UTF-8'; + /** + * Standalone + * + * @access public + * @var bool + */ + public $standalone = false; + /** + * Current state of the state machine + * + * @access private + * @var self::STATE_* + */ + public $state = self::STATE_BEFORE_VERSION_NAME; + /** + * Input data + * + * @access private + * @var string + */ + public $data = ''; + /** + * Input data length (to avoid calling strlen() everytime this is needed) + * + * @access private + * @var int + */ + public $data_length = 0; + /** + * Current position of the pointer + * + * @var int + * @access private + */ + public $position = 0; + /** + * Create an instance of the class with the input data + * + * @access public + * @param string $data Input data + */ + public function __construct(string $data) + { + } + /** + * Parse the input data + * + * @access public + * @return bool true on success, false on failure + */ + public function parse(): bool + { + } + /** + * Check whether there is data beyond the pointer + * + * @access private + * @return bool true if there is further data, false if not + */ + public function has_data(): bool + { + } + /** + * Advance past any whitespace + * + * @return int Number of whitespace characters passed + */ + public function skip_whitespace() + { + } + /** + * Read value + * + * @return string|false + */ + public function get_value() + { + } + public function before_version_name(): void + { + } + public function version_name(): void + { + } + public function version_equals(): void + { + } + public function version_value(): void + { + } + public function encoding_name(): void + { + } + public function encoding_equals(): void + { + } + public function encoding_value(): void + { + } + public function standalone_name(): void + { + } + public function standalone_equals(): void + { + } + public function standalone_value(): void + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\XML\Declaration\Parser" instead */ + class SimplePie_XML_Declaration_Parser extends \SimplePie\XML\Declaration\Parser + { + } +} +namespace SimplePie { + /** + * Decode 'gzip' encoded HTTP data + * + * @link http://www.gzip.org/format.txt + * @link https://www.php.net/manual/en/function.gzdecode.php + * @deprecated since SimplePie 1.9.0, use `gzdecode` function instead. + */ + class Gzdecode + { + /** + * Compressed data + * + * @access private + * @var string + * @see gzdecode::$data + */ + public $compressed_data; + /** + * Size of compressed data + * + * @access private + * @var int + */ + public $compressed_size; + /** + * Minimum size of a valid gzip string + * + * @access private + * @var int + */ + public $min_compressed_size = 18; + /** + * Current position of pointer + * + * @access private + * @var int + */ + public $position = 0; + /** + * Flags (FLG) + * + * @access private + * @var int + */ + public $flags; + /** + * Uncompressed data + * + * @access public + * @see gzdecode::$compressed_data + * @var string + */ + public $data; + /** + * Modified time + * + * @access public + * @var int + */ + public $MTIME; + /** + * Extra Flags + * + * @access public + * @var int + */ + public $XFL; + /** + * Operating System + * + * @access public + * @var int + */ + public $OS; + /** + * Subfield ID 1 + * + * @access public + * @see gzdecode::$extra_field + * @see gzdecode::$SI2 + * @var string + */ + public $SI1; + /** + * Subfield ID 2 + * + * @access public + * @see gzdecode::$extra_field + * @see gzdecode::$SI1 + * @var string + */ + public $SI2; + /** + * Extra field content + * + * @access public + * @see gzdecode::$SI1 + * @see gzdecode::$SI2 + * @var string + */ + public $extra_field; + /** + * Original filename + * + * @access public + * @var string + */ + public $filename; + /** + * Human readable comment + * + * @access public + * @var string + */ + public $comment; + /** + * Don't allow anything to be set + * + * @param string $name + * @param mixed $value + */ + public function __set(string $name, $value) + { + } + /** + * Set the compressed string and related properties + * + * @param string $data + */ + public function __construct(string $data) + { + } + /** + * Decode the GZIP stream + * + * @return bool Successfulness + */ + public function parse() + { + } + } +} +namespace { + /** @deprecated since SimplePie 1.7.0, use "SimplePie\Gzdecode" instead */ + class SimplePie_gzdecode extends \SimplePie\Gzdecode + { + } +} +namespace SimplePie\Cache { + /** + * Subset of PSR-16 Cache client for caching data arrays + * + * Only get(), set() and delete() methods are used, + * but not has(), getMultiple(), setMultiple() or deleteMultiple(). + * + * The methods names must be different, but should be compatible to the + * methods of \Psr\SimpleCache\CacheInterface. + * + * @internal + */ + interface DataCache + { + /** + * Fetches a value from the cache. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::get() + * <code> + * public function get(string $key, mixed $default = null): mixed; + * </code> + * + * @param string $key The unique key of this item in the cache. + * @param mixed $default Default value to return if the key does not exist. + * + * @return array|mixed The value of the item from the cache, or $default in case of cache miss. + * + * @throws InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function get_data(string $key, $default = null); + /** + * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::set() + * <code> + * public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool; + * </code> + * + * @param string $key The key of the item to store. + * @param array<mixed> $value The value of the item to store, must be serializable. + * @param null|int $ttl Optional. The TTL value of this item. If no value is sent and + * the driver supports TTL then the library may set a default value + * for it or let the driver take care of that. + * + * @return bool True on success and false on failure. + * + * @throws InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function set_data(string $key, array $value, ?int $ttl = null): bool; + /** + * Delete an item from the cache by its unique key. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::delete() + * <code> + * public function delete(string $key): bool; + * </code> + * + * @param string $key The unique cache key of the item to delete. + * + * @return bool True if the item was successfully removed. False if there was an error. + * + * @throws InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function delete_data(string $key): bool; + } + /** + * Adapter for deprecated \SimplePie\Cache\Base implementations + * + * @internal + */ + final class BaseDataCache implements \SimplePie\Cache\DataCache + { + public function __construct(\SimplePie\Cache\Base $cache) + { + } + /** + * Fetches a value from the cache. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::get() + * <code> + * public function get(string $key, mixed $default = null): mixed; + * </code> + * + * @param string $key The unique key of this item in the cache. + * @param mixed $default Default value to return if the key does not exist. + * + * @return array|mixed The value of the item from the cache, or $default in case of cache miss. + * + * @throws InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function get_data(string $key, $default = null) + { + } + /** + * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::set() + * <code> + * public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool; + * </code> + * + * @param string $key The key of the item to store. + * @param array<mixed> $value The value of the item to store, must be serializable. + * @param null|int $ttl Optional. The TTL value of this item. If no value is sent and + * the driver supports TTL then the library may set a default value + * for it or let the driver take care of that. + * + * @return bool True on success and false on failure. + * + * @throws InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function set_data(string $key, array $value, ?int $ttl = null): bool + { + } + /** + * Delete an item from the cache by its unique key. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::delete() + * <code> + * public function delete(string $key): bool; + * </code> + * + * @param string $key The unique cache key of the item to delete. + * + * @return bool True if the item was successfully removed. False if there was an error. + * + * @throws InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function delete_data(string $key): bool + { + } + } + /** + * Interface for creating a cache filename + */ + interface NameFilter + { + /** + * Method to create cache filename with. + * + * The returning name MUST follow the rules for keys in PSR-16. + * + * @link https://www.php-fig.org/psr/psr-16/ + * + * The returning name MUST be a string of at least one character + * that uniquely identifies a cached item, MUST only contain the + * characters A-Z, a-z, 0-9, _, and . in any order in UTF-8 encoding + * and MUST not longer then 64 characters. The following characters + * are reserved for future extensions and MUST NOT be used: {}()/\@: + * + * A provided implementing library MAY support additional characters + * and encodings or longer lengths, but MUST support at least that + * minimum. + * + * @param string $name The name for the cache will be most likely an url with query string + * + * @return string the new cache name + */ + public function filter(string $name): string; + } + /** + * Creating a cache filename with callables + */ + final class CallableNameFilter implements \SimplePie\Cache\NameFilter + { + /** + * @param callable(string): string $callable + */ + public function __construct(callable $callable) + { + } + /** + * Method to create cache filename with. + * + * The returning name MUST follow the rules for keys in PSR-16. + * + * @link https://www.php-fig.org/psr/psr-16/ + * + * The returning name MUST be a string of at least one character + * that uniquely identifies a cached item, MUST only contain the + * characters A-Z, a-z, 0-9, _, and . in any order in UTF-8 encoding + * and MUST not longer then 64 characters. The following characters + * are reserved for future extensions and MUST NOT be used: {}()/\@: + * + * A provided implementing library MAY support additional characters + * and encodings or longer lengths, but MUST support at least that + * minimum. + * + * @param string $name The name for the cache will be most likely an url with query string + * + * @return string the new cache name + */ + public function filter(string $name): string + { + } + } + /** + * Caches data into a PSR-16 cache implementation + * + * @internal + */ + final class Psr16 implements \SimplePie\Cache\DataCache + { + /** + * PSR-16 cache implementation + * + * @param CacheInterface $cache + */ + public function __construct(\Psr\SimpleCache\CacheInterface $cache) + { + } + /** + * Fetches a value from the cache. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::get() + * <code> + * public function get(string $key, mixed $default = null): mixed; + * </code> + * + * @param string $key The unique key of this item in the cache. + * @param mixed $default Default value to return if the key does not exist. + * + * @return array|mixed The value of the item from the cache, or $default in case of cache miss. + * + * @throws InvalidArgumentException&Throwable + * MUST be thrown if the $key string is not a legal value. + */ + public function get_data(string $key, $default = null) + { + } + /** + * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::set() + * <code> + * public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool; + * </code> + * + * @param string $key The key of the item to store. + * @param array<mixed> $value The value of the item to store, must be serializable. + * @param null|int $ttl Optional. The TTL value of this item. If no value is sent and + * the driver supports TTL then the library may set a default value + * for it or let the driver take care of that. + * + * @return bool True on success and false on failure. + * + * @throws InvalidArgumentException&Throwable + * MUST be thrown if the $key string is not a legal value. + */ + public function set_data(string $key, array $value, ?int $ttl = null): bool + { + } + /** + * Delete an item from the cache by its unique key. + * + * Equivalent to \Psr\SimpleCache\CacheInterface::delete() + * <code> + * public function delete(string $key): bool; + * </code> + * + * @param string $key The unique cache key of the item to delete. + * + * @return bool True if the item was successfully removed. False if there was an error. + * + * @throws InvalidArgumentException&Throwable + * MUST be thrown if the $key string is not a legal value. + */ + public function delete_data(string $key): bool + { + } + } +} +namespace SimplePie\HTTP { + /** + * HTTP Client interface + * + * @internal + */ + interface Client + { + public const METHOD_GET = 'GET'; + /** + * send a request and return the response + * + * @param Client::METHOD_* $method + * @param array<string, string> $headers + * + * @throws ClientException if anything goes wrong requesting the data + */ + public function request(string $method, string $url, array $headers = []): \SimplePie\HTTP\Response; + } + /** + * Client exception class + * + * @internal + */ + final class ClientException extends \SimplePie\Exception + { + } + /** + * HTTP Client based on \SimplePie\File + * + * @internal + */ + final class FileClient implements \SimplePie\HTTP\Client + { + /** + * @param array{timeout?: int, redirects?: int, useragent?: string, force_fsockopen?: bool, curl_options?: array<mixed>} $options + */ + public function __construct(\SimplePie\Registry $registry, array $options = []) + { + } + /** + * send a request and return the response + * + * @param Client::METHOD_* $method + * @param array<string, string> $headers + * + * @throws ClientException if anything goes wrong requesting the data + */ + public function request(string $method, string $url, array $headers = []): \SimplePie\HTTP\Response + { + } + } + /** + * HTTP Client based on PSR-18 and PSR-17 implementations + * + * @internal + */ + final class Psr18Client implements \SimplePie\HTTP\Client + { + public function __construct(\Psr\Http\Client\ClientInterface $httpClient, \Psr\Http\Message\RequestFactoryInterface $requestFactory, \Psr\Http\Message\UriFactoryInterface $uriFactory) + { + } + public function getHttpClient(): \Psr\Http\Client\ClientInterface + { + } + public function getRequestFactory(): \Psr\Http\Message\RequestFactoryInterface + { + } + public function getUriFactory(): \Psr\Http\Message\UriFactoryInterface + { + } + /** + * send a request and return the response + * + * @param Client::METHOD_* $method + * @param string $url + * @param array<string,string|string[]> $headers + * + * @throws ClientException if anything goes wrong requesting the data + */ + public function request(string $method, string $url, array $headers = []): \SimplePie\HTTP\Response + { + } + } + /** + * HTTP Response based on a PSR-7 response + * + * This interface must be interoperable with Psr\Http\Message\ResponseInterface + * @see https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface + * + * @internal + */ + final class Psr7Response implements \SimplePie\HTTP\Response + { + public function __construct(\Psr\Http\Message\ResponseInterface $response, string $permanent_url, string $requested_url) + { + } + public function get_permanent_uri(): string + { + } + public function get_final_requested_uri(): string + { + } + public function get_status_code(): int + { + } + public function get_headers(): array + { + } + public function has_header(string $name): bool + { + } + public function with_header(string $name, $value) + { + } + public function get_header(string $name): array + { + } + public function get_header_line(string $name): string + { + } + public function get_body_content(): string + { + } + } + /** + * HTTP Response for rax text + * + * This interface must be interoperable with Psr\Http\Message\ResponseInterface + * @see https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface + * + * @internal + */ + final class RawTextResponse implements \SimplePie\HTTP\Response + { + public function __construct(string $raw_text, string $filepath) + { + } + public function get_permanent_uri(): string + { + } + public function get_final_requested_uri(): string + { + } + public function get_status_code(): int + { + } + public function get_headers(): array + { + } + public function has_header(string $name): bool + { + } + public function get_header(string $name): array + { + } + public function with_header(string $name, $value) + { + } + public function get_header_line(string $name): string + { + } + public function get_body_content(): string + { + } + } +} +namespace { + /** + * General API for generating and formatting diffs - the differences between + * two sequences of strings. + * + * The original PHP version of this code was written by Geoffrey T. Dairiki + * <dairiki@dairiki.org>, and is used/adapted with his permission. + * + * Copyright 2004 Geoffrey T. Dairiki <dairiki@dairiki.org> + * Copyright 2004-2010 The Horde Project (http://www.horde.org/) + * + * See the enclosed file COPYING for license information (LGPL). If you did + * not receive this file, see https://opensource.org/license/lgpl-2-1/. + * + * @package Text_Diff + * @author Geoffrey T. Dairiki <dairiki@dairiki.org> + */ + class Text_Diff + { + /** + * Array of changes. + * + * @var array + */ + var $_edits; + /** + * Computes diffs between sequences of strings. + * + * @param string $engine Name of the diffing engine to use. 'auto' + * will automatically select the best. + * @param array $params Parameters to pass to the diffing engine. + * Normally an array of two arrays, each + * containing the lines from a file. + */ + function __construct($engine, $params) + { + } + /** + * PHP4 constructor. + */ + public function Text_Diff($engine, $params) + { + } + /** + * Returns the array of differences. + */ + function getDiff() + { + } + /** + * returns the number of new (added) lines in a given diff. + * + * @since Text_Diff 1.1.0 + * + * @return int The number of new lines + */ + function countAddedLines() + { + } + /** + * Returns the number of deleted (removed) lines in a given diff. + * + * @since Text_Diff 1.1.0 + * + * @return int The number of deleted lines + */ + function countDeletedLines() + { + } + /** + * Computes a reversed diff. + * + * Example: + * <code> + * $diff = new Text_Diff($lines1, $lines2); + * $rev = $diff->reverse(); + * </code> + * + * @return Text_Diff A Diff object representing the inverse of the + * original diff. Note that we purposely don't return a + * reference here, since this essentially is a clone() + * method. + */ + function reverse() + { + } + /** + * Checks for an empty diff. + * + * @return bool True if two sequences were identical. + */ + function isEmpty() + { + } + /** + * Computes the length of the Longest Common Subsequence (LCS). + * + * This is mostly for diagnostic purposes. + * + * @return int The length of the LCS. + */ + function lcs() + { + } + /** + * Gets the original set of lines. + * + * This reconstructs the $from_lines parameter passed to the constructor. + * + * @return array The original sequence of strings. + */ + function getOriginal() + { + } + /** + * Gets the final set of lines. + * + * This reconstructs the $to_lines parameter passed to the constructor. + * + * @return array The sequence of strings. + */ + function getFinal() + { + } + /** + * Removes trailing newlines from a line of text. This is meant to be used + * with array_walk(). + * + * @param string $line The line to trim. + * @param int $key The index of the line in the array. Not used. + */ + static function trimNewlines(&$line, $key) + { + } + /** + * Determines the location of the system temporary directory. + * + * @access protected + * + * @return string A directory name which can be used for temp files. + */ + static function _getTempDir() + { + } + /** + * Checks a diff for validity. + * + * This is here only for debugging purposes. + */ + function _check($from_lines, $to_lines) + { + } + } + /** + * @package Text_Diff + * @author Geoffrey T. Dairiki <dairiki@dairiki.org> + */ + class Text_MappedDiff extends \Text_Diff + { + /** + * Computes a diff between sequences of strings. + * + * This can be used to compute things like case-insensitive diffs, or diffs + * which ignore changes in white-space. + * + * @param array $from_lines An array of strings. + * @param array $to_lines An array of strings. + * @param array $mapped_from_lines This array should have the same size + * number of elements as $from_lines. The + * elements in $mapped_from_lines and + * $mapped_to_lines are what is actually + * compared when computing the diff. + * @param array $mapped_to_lines This array should have the same number + * of elements as $to_lines. + */ + function __construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) + { + } + /** + * PHP4 constructor. + */ + public function Text_MappedDiff($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) + { + } + } + /** + * @package Text_Diff + * @author Geoffrey T. Dairiki <dairiki@dairiki.org> + * + * @access private + */ + abstract class Text_Diff_Op + { + var $orig; + var $final; + abstract function &reverse(); + function norig() + { + } + function nfinal() + { + } + } + /** + * @package Text_Diff + * @author Geoffrey T. Dairiki <dairiki@dairiki.org> + * + * @access private + */ + class Text_Diff_Op_copy extends \Text_Diff_Op + { + /** + * PHP5 constructor. + */ + function __construct($orig, $final = \false) + { + } + /** + * PHP4 constructor. + */ + public function Text_Diff_Op_copy($orig, $final = \false) + { + } + function &reverse() + { + } + } + /** + * @package Text_Diff + * @author Geoffrey T. Dairiki <dairiki@dairiki.org> + * + * @access private + */ + class Text_Diff_Op_delete extends \Text_Diff_Op + { + /** + * PHP5 constructor. + */ + function __construct($lines) + { + } + /** + * PHP4 constructor. + */ + public function Text_Diff_Op_delete($lines) + { + } + function &reverse() + { + } + } + /** + * @package Text_Diff + * @author Geoffrey T. Dairiki <dairiki@dairiki.org> + * + * @access private + */ + class Text_Diff_Op_add extends \Text_Diff_Op + { + /** + * PHP5 constructor. + */ + function __construct($lines) + { + } + /** + * PHP4 constructor. + */ + public function Text_Diff_Op_add($lines) + { + } + function &reverse() + { + } + } + /** + * @package Text_Diff + * @author Geoffrey T. Dairiki <dairiki@dairiki.org> + * + * @access private + */ + class Text_Diff_Op_change extends \Text_Diff_Op + { + /** + * PHP5 constructor. + */ + function __construct($orig, $final) + { + } + /** + * PHP4 constructor. + */ + public function Text_Diff_Op_change($orig, $final) + { + } + function &reverse() + { + } + } + /** + * Class used internally by Text_Diff to actually compute the diffs. + * + * This class is implemented using native PHP code. + * + * The algorithm used here is mostly lifted from the perl module + * Algorithm::Diff (version 1.06) by Ned Konz, which is available at: + * https://cpan.metacpan.org/authors/id/N/NE/NEDKONZ/Algorithm-Diff-1.06.zip + * + * More ideas are taken from: http://www.ics.uci.edu/~eppstein/161/960229.html + * + * Some ideas (and a bit of code) are taken from analyze.c, of GNU + * diffutils-2.7, which can be found at: + * ftp://gnudist.gnu.org/pub/gnu/diffutils/diffutils-2.7.tar.gz + * + * Some ideas (subdivision by NCHUNKS > 2, and some optimizations) are from + * Geoffrey T. Dairiki <dairiki@dairiki.org>. The original PHP version of this + * code was written by him, and is used/adapted with his permission. + * + * Copyright 2004-2010 The Horde Project (http://www.horde.org/) + * + * See the enclosed file COPYING for license information (LGPL). If you did + * not receive this file, see https://opensource.org/license/lgpl-2-1/. + * + * @author Geoffrey T. Dairiki <dairiki@dairiki.org> + * @package Text_Diff + */ + class Text_Diff_Engine_native + { + public $xchanged; + public $ychanged; + public $xv; + public $yv; + public $xind; + public $yind; + public $seq; + public $in_seq; + public $lcs; + function diff($from_lines, $to_lines) + { + } + /** + * Divides the Largest Common Subsequence (LCS) of the sequences (XOFF, + * XLIM) and (YOFF, YLIM) into NCHUNKS approximately equally sized + * segments. + * + * Returns (LCS, PTS). LCS is the length of the LCS. PTS is an array of + * NCHUNKS+1 (X, Y) indexes giving the diving points between sub + * sequences. The first sub-sequence is contained in (X0, X1), (Y0, Y1), + * the second in (X1, X2), (Y1, Y2) and so on. Note that (X0, Y0) == + * (XOFF, YOFF) and (X[NCHUNKS], Y[NCHUNKS]) == (XLIM, YLIM). + * + * This function assumes that the first lines of the specified portions of + * the two files do not match, and likewise that the last lines do not + * match. The caller must trim matching lines from the beginning and end + * of the portions it is going to specify. + */ + function _diag($xoff, $xlim, $yoff, $ylim, $nchunks) + { + } + function _lcsPos($ypos) + { + } + /** + * Finds LCS of two sequences. + * + * The results are recorded in the vectors $this->{x,y}changed[], by + * storing a 1 in the element for each line that is an insertion or + * deletion (ie. is not in the LCS). + * + * The subsequence of file 0 is (XOFF, XLIM) and likewise for file 1. + * + * Note that XLIM, YLIM are exclusive bounds. All line numbers are + * origin-0 and discarded lines are not counted. + */ + function _compareseq($xoff, $xlim, $yoff, $ylim) + { + } + /** + * Adjusts inserts/deletes of identical lines to join changes as much as + * possible. + * + * We do something when a run of changed lines include a line at one end + * and has an excluded, identical line at the other. We are free to + * choose which identical line is included. `compareseq' usually chooses + * the one at the beginning, but usually it is cleaner to consider the + * following identical line to be the "change". + * + * This is extracted verbatim from analyze.c (GNU diffutils-2.7). + */ + function _shiftBoundaries($lines, &$changed, $other_changed) + { + } + } + /** + * Class used internally by Diff to actually compute the diffs. + * + * This class uses the Unix `diff` program via shell_exec to compute the + * differences between the two input arrays. + * + * Copyright 2007-2010 The Horde Project (http://www.horde.org/) + * + * See the enclosed file COPYING for license information (LGPL). If you did + * not receive this file, see https://opensource.org/license/lgpl-2-1/. + * + * @author Milian Wolff <mail@milianw.de> + * @package Text_Diff + * @since 0.3.0 + */ + class Text_Diff_Engine_shell + { + /** + * Path to the diff executable + * + * @var string + */ + var $_diffCommand = 'diff'; + /** + * Returns the array of differences. + * + * @param array $from_lines lines of text from old file + * @param array $to_lines lines of text from new file + * + * @return array all changes made (array with Text_Diff_Op_* objects) + */ + function diff($from_lines, $to_lines) + { + } + /** + * Get lines from either the old or new text + * + * @access private + * + * @param array $text_lines Either $from_lines or $to_lines (passed by reference). + * @param int $line_no Current line number (passed by reference). + * @param int $end Optional end line, when we want to chop more + * than one line. + * + * @return array The chopped lines + */ + function _getLines(&$text_lines, &$line_no, $end = \false) + { + } + } + /** + * Parses unified or context diffs output from eg. the diff utility. + * + * Example: + * <code> + * $patch = file_get_contents('example.patch'); + * $diff = new Text_Diff('string', array($patch)); + * $renderer = new Text_Diff_Renderer_inline(); + * echo $renderer->render($diff); + * </code> + * + * Copyright 2005 Örjan Persson <o@42mm.org> + * Copyright 2005-2010 The Horde Project (http://www.horde.org/) + * + * See the enclosed file COPYING for license information (LGPL). If you did + * not receive this file, see https://opensource.org/license/lgpl-2-1/. + * + * @author Örjan Persson <o@42mm.org> + * @package Text_Diff + * @since 0.2.0 + */ + class Text_Diff_Engine_string + { + /** + * Parses a unified or context diff. + * + * First param contains the whole diff and the second can be used to force + * a specific diff type. If the second parameter is 'autodetect', the + * diff will be examined to find out which type of diff this is. + * + * @param string $diff The diff content. + * @param string $mode The diff mode of the content in $diff. One of + * 'context', 'unified', or 'autodetect'. + * + * @return array List of all diff operations. + * @phpstan-param 'context'|'unified'|'autodetect' $mode + */ + function diff($diff, $mode = 'autodetect') + { + } + /** + * Parses an array containing the unified diff. + * + * @param array $diff Array of lines. + * + * @return array List of all diff operations. + */ + function parseUnifiedDiff($diff) + { + } + /** + * Parses an array containing the context diff. + * + * @param array $diff Array of lines. + * + * @return array List of all diff operations. + */ + function parseContextDiff(&$diff) + { + } + } + /** + * Class used internally by Diff to actually compute the diffs. + * + * This class uses the xdiff PECL package (http://pecl.php.net/package/xdiff) + * to compute the differences between the two input arrays. + * + * Copyright 2004-2010 The Horde Project (http://www.horde.org/) + * + * See the enclosed file COPYING for license information (LGPL). If you did + * not receive this file, see https://opensource.org/license/lgpl-2-1/. + * + * @author Jon Parise <jon@horde.org> + * @package Text_Diff + */ + class Text_Diff_Engine_xdiff + { + /** + */ + function diff($from_lines, $to_lines) + { + } + } + /** + * A class to render Diffs in different formats. + * + * This class renders the diff in classic diff format. It is intended that + * this class be customized via inheritance, to obtain fancier outputs. + * + * Copyright 2004-2010 The Horde Project (http://www.horde.org/) + * + * See the enclosed file COPYING for license information (LGPL). If you did + * not receive this file, see https://opensource.org/license/lgpl-2-1/. + * + * @package Text_Diff + */ + class Text_Diff_Renderer + { + /** + * Number of leading context "lines" to preserve. + * + * This should be left at zero for this class, but subclasses may want to + * set this to other values. + */ + var $_leading_context_lines = 0; + /** + * Number of trailing context "lines" to preserve. + * + * This should be left at zero for this class, but subclasses may want to + * set this to other values. + */ + var $_trailing_context_lines = 0; + /** + * Constructor. + */ + function __construct($params = array()) + { + } + /** + * PHP4 constructor. + */ + public function Text_Diff_Renderer($params = array()) + { + } + /** + * Get any renderer parameters. + * + * @return array All parameters of this renderer object. + */ + function getParams() + { + } + /** + * Renders a diff. + * + * @param Text_Diff $diff A Text_Diff object. + * + * @return string The formatted output. + */ + function render($diff) + { + } + function _block($xbeg, $xlen, $ybeg, $ylen, &$edits) + { + } + function _startDiff() + { + } + function _endDiff() + { + } + function _blockHeader($xbeg, $xlen, $ybeg, $ylen) + { + } + function _startBlock($header) + { + } + function _endBlock() + { + } + function _lines($lines, $prefix = ' ') + { + } + function _context($lines) + { + } + function _added($lines) + { + } + function _deleted($lines) + { + } + function _changed($orig, $final) + { + } + } + /** + * "Inline" diff renderer. + * + * This class renders diffs in the Wiki-style "inline" format. + * + * @author Ciprian Popovici + * @package Text_Diff + */ + class Text_Diff_Renderer_inline extends \Text_Diff_Renderer + { + /** + * Number of leading context "lines" to preserve. + * + * @var integer + */ + var $_leading_context_lines = 10000; + /** + * Number of trailing context "lines" to preserve. + * + * @var integer + */ + var $_trailing_context_lines = 10000; + /** + * Prefix for inserted text. + * + * @var string + */ + var $_ins_prefix = '<ins>'; + /** + * Suffix for inserted text. + * + * @var string + */ + var $_ins_suffix = '</ins>'; + /** + * Prefix for deleted text. + * + * @var string + */ + var $_del_prefix = '<del>'; + /** + * Suffix for deleted text. + * + * @var string + */ + var $_del_suffix = '</del>'; + /** + * Header for each change block. + * + * @var string + */ + var $_block_header = ''; + /** + * Whether to split down to character-level. + * + * @var boolean + */ + var $_split_characters = \false; + /** + * What are we currently splitting on? Used to recurse to show word-level + * or character-level changes. + * + * @var string + */ + var $_split_level = 'lines'; + function _blockHeader($xbeg, $xlen, $ybeg, $ylen) + { + } + function _startBlock($header) + { + } + function _lines($lines, $prefix = ' ', $encode = \true) + { + } + function _added($lines) + { + } + function _deleted($lines, $words = \false) + { + } + function _changed($orig, $final) + { + } + function _splitOnWords($string, $newlineEscape = "\n") + { + } + function _encode(&$string) + { + } + } + /** + * Exception for errors from the Text_Diff package. + * + * {@internal This is a WP native addition to the external Text_Diff package.} + * + * @package WordPress + * @subpackage Text_Diff + */ + class Text_Exception extends \Exception + { + } + /** + * Manages the registration and lookup of abilities. + * + * @since 6.9.0 + * @access private + */ + final class WP_Abilities_Registry + { + /** + * Registers a new ability. + * + * Do not use this method directly. Instead, use the `wp_register_ability()` function. + * + * @since 6.9.0 + * + * @see wp_register_ability() + * + * @param string $name The name of the ability. The name must be a string containing a namespace + * prefix, i.e. `my-plugin/my-ability`. It can only contain lowercase + * alphanumeric characters, dashes and the forward slash. + * @param array<string, mixed> $args { + * An associative array of arguments for the ability. + * + * @type string $label The human-readable label for the ability. + * @type string $description A detailed description of what the ability does. + * @type string $category The ability category slug this ability belongs to. + * @type callable $execute_callback A callback function to execute when the ability is invoked. + * Receives optional mixed input and returns mixed result or WP_Error. + * @type callable $permission_callback A callback function to check permissions before execution. + * Receives optional mixed input and returns bool or WP_Error. + * @type array<string, mixed> $input_schema Optional. JSON Schema definition for the ability's input. + * @type array<string, mixed> $output_schema Optional. JSON Schema definition for the ability's output. + * @type array<string, mixed> $meta { + * Optional. Additional metadata for the ability. + * + * @type array<string, bool|null> $annotations { + * Optional. Semantic annotations describing the ability's behavioral characteristics. + * These annotations are hints for tooling and documentation. + * + * @type bool|null $readonly Optional. If true, the ability does not modify its environment. + * @type bool|null $destructive Optional. If true, the ability may perform destructive updates to its environment. + * If false, the ability performs only additive updates. + * @type bool|null $idempotent Optional. If true, calling the ability repeatedly with the same arguments + * will have no additional effect on its environment. + * } + * @type bool $show_in_rest Optional. Whether to expose this ability in the REST API. Default false. + * } + * @type string $ability_class Optional. Custom class to instantiate instead of WP_Ability. + * } + * @return WP_Ability|null The registered ability instance on success, null on failure. + */ + public function register(string $name, array $args): ?\WP_Ability + { + } + /** + * Unregisters an ability. + * + * Do not use this method directly. Instead, use the `wp_unregister_ability()` function. + * + * @since 6.9.0 + * + * @see wp_unregister_ability() + * + * @param string $name The name of the registered ability, with its namespace. + * @return WP_Ability|null The unregistered ability instance on success, null on failure. + */ + public function unregister(string $name): ?\WP_Ability + { + } + /** + * Retrieves the list of all registered abilities. + * + * Do not use this method directly. Instead, use the `wp_get_abilities()` function. + * + * @since 6.9.0 + * + * @see wp_get_abilities() + * + * @return WP_Ability[] The array of registered abilities. + */ + public function get_all_registered(): array + { + } + /** + * Checks if an ability is registered. + * + * Do not use this method directly. Instead, use the `wp_has_ability()` function. + * + * @since 6.9.0 + * + * @see wp_has_ability() + * + * @param string $name The name of the registered ability, with its namespace. + * @return bool True if the ability is registered, false otherwise. + */ + public function is_registered(string $name): bool + { + } + /** + * Retrieves a registered ability. + * + * Do not use this method directly. Instead, use the `wp_get_ability()` function. + * + * @since 6.9.0 + * + * @see wp_get_ability() + * + * @param string $name The name of the registered ability, with its namespace. + * @return WP_Ability|null The registered ability instance, or null if it is not registered. + */ + public function get_registered(string $name): ?\WP_Ability + { + } + /** + * Utility method to retrieve the main instance of the registry class. + * + * The instance will be created if it does not exist yet. + * + * @since 6.9.0 + * + * @return WP_Abilities_Registry|null The main registry instance, or null when `init` action has not fired. + */ + public static function get_instance(): ?self + { + } + /** + * Wakeup magic method. + * + * @since 6.9.0 + * @throws LogicException If the registry object is unserialized. + * This is a security hardening measure to prevent unserialization of the registry. + */ + public function __wakeup(): void + { + } + /** + * Sleep magic method. + * + * @since 6.9.0 + * @throws LogicException If the registry object is serialized. + * This is a security hardening measure to prevent serialization of the registry. + */ + public function __sleep(): array + { + } + } + /** + * Manages the registration and lookup of ability categories. + * + * @since 6.9.0 + * @access private + */ + final class WP_Ability_Categories_Registry + { + /** + * Registers a new ability category. + * + * Do not use this method directly. Instead, use the `wp_register_ability_category()` function. + * + * @since 6.9.0 + * + * @see wp_register_ability_category() + * + * @param string $slug The unique slug for the ability category. Must contain only lowercase + * alphanumeric characters and dashes. + * @param array<string, mixed> $args { + * An associative array of arguments for the ability category. + * + * @type string $label The human-readable label for the ability category. + * @type string $description A description of the ability category. + * @type array<string, mixed> $meta Optional. Additional metadata for the ability category. + * } + * @return WP_Ability_Category|null The registered ability category instance on success, null on failure. + */ + public function register(string $slug, array $args): ?\WP_Ability_Category + { + } + /** + * Unregisters an ability category. + * + * Do not use this method directly. Instead, use the `wp_unregister_ability_category()` function. + * + * @since 6.9.0 + * + * @see wp_unregister_ability_category() + * + * @param string $slug The slug of the registered ability category. + * @return WP_Ability_Category|null The unregistered ability category instance on success, null on failure. + */ + public function unregister(string $slug): ?\WP_Ability_Category + { + } + /** + * Retrieves the list of all registered ability categories. + * + * Do not use this method directly. Instead, use the `wp_get_ability_categories()` function. + * + * @since 6.9.0 + * + * @see wp_get_ability_categories() + * + * @return array<string, WP_Ability_Category> The array of registered ability categories. + */ + public function get_all_registered(): array + { + } + /** + * Checks if an ability category is registered. + * + * Do not use this method directly. Instead, use the `wp_has_ability_category()` function. + * + * @since 6.9.0 + * + * @see wp_has_ability_category() + * + * @param string $slug The slug of the ability category. + * @return bool True if the ability category is registered, false otherwise. + */ + public function is_registered(string $slug): bool + { + } + /** + * Retrieves a registered ability category. + * + * Do not use this method directly. Instead, use the `wp_get_ability_category()` function. + * + * @since 6.9.0 + * + * @see wp_get_ability_category() + * + * @param string $slug The slug of the registered ability category. + * @return WP_Ability_Category|null The registered ability category instance, or null if it is not registered. + */ + public function get_registered(string $slug): ?\WP_Ability_Category + { + } + /** + * Utility method to retrieve the main instance of the registry class. + * + * The instance will be created if it does not exist yet. + * + * @since 6.9.0 + * + * @return WP_Ability_Categories_Registry|null The main registry instance, or null when `init` action has not fired. + */ + public static function get_instance(): ?self + { + } + /** + * Wakeup magic method. + * + * @since 6.9.0 + * @throws LogicException If the registry object is unserialized. + * This is a security hardening measure to prevent unserialization of the registry. + */ + public function __wakeup(): void + { + } + /** + * Sleep magic method. + * + * @since 6.9.0 + * @throws LogicException If the registry object is serialized. + * This is a security hardening measure to prevent serialization of the registry. + */ + public function __sleep(): array + { + } + } + /** + * Encapsulates the properties and methods related to a specific ability category. + * + * @since 6.9.0 + * + * @see WP_Ability_Categories_Registry + */ + final class WP_Ability_Category + { + /** + * Constructor. + * + * Do not use this constructor directly. Instead, use the `wp_register_ability_category()` function. + * + * @access private + * + * @since 6.9.0 + * + * @see wp_register_ability_category() + * + * @param string $slug The unique slug for the ability category. + * @param array<string, mixed> $args { + * An associative array of arguments for the ability category. + * + * @type string $label The human-readable label for the ability category. + * @type string $description A description of the ability category. + * @type array<string, mixed> $meta Optional. Additional metadata for the ability category. + * } + */ + public function __construct(string $slug, array $args) + { + } + /** + * Retrieves the slug of the ability category. + * + * @since 6.9.0 + * + * @return string The ability category slug. + */ + public function get_slug(): string + { + } + /** + * Retrieves the human-readable label for the ability category. + * + * @since 6.9.0 + * + * @return string The human-readable ability category label. + */ + public function get_label(): string + { + } + /** + * Retrieves the detailed description for the ability category. + * + * @since 6.9.0 + * + * @return string The detailed description for the ability category. + */ + public function get_description(): string + { + } + /** + * Retrieves the metadata for the ability category. + * + * @since 6.9.0 + * + * @return array<string,mixed> The metadata for the ability category. + */ + public function get_meta(): array + { + } + /** + * Wakeup magic method. + * + * @since 6.9.0 + * @throws LogicException If the ability category object is unserialized. + * This is a security hardening measure to prevent unserialization of the ability category. + */ + public function __wakeup(): void + { + } + /** + * Sleep magic method. + * + * @since 6.9.0 + * @throws LogicException If the ability category object is serialized. + * This is a security hardening measure to prevent serialization of the ability category. + */ + public function __sleep(): array + { + } + } + /** + * Encapsulates the properties and methods related to a specific ability in the registry. + * + * @since 6.9.0 + * + * @see WP_Abilities_Registry + */ + class WP_Ability + { + /** + * The default value for the `show_in_rest` meta. + * + * @since 6.9.0 + * @var bool + */ + protected const DEFAULT_SHOW_IN_REST = \false; + /** + * The default ability annotations. + * They are not guaranteed to provide a faithful description of ability behavior. + * + * @since 6.9.0 + * @var array<string, bool|null> + */ + protected static $default_annotations = array( + // If true, the ability does not modify its environment. + 'readonly' => \null, + /* + * If true, the ability may perform destructive updates to its environment. + * If false, the ability performs only additive updates. + */ + 'destructive' => \null, + /* + * If true, calling the ability repeatedly with the same arguments will have no additional effect + * on its environment. + */ + 'idempotent' => \null, + ); + /** + * The name of the ability, with its namespace. + * Example: `my-plugin/my-ability`. + * + * @since 6.9.0 + * @var string + */ + protected $name; + /** + * The human-readable ability label. + * + * @since 6.9.0 + * @var string + */ + protected $label; + /** + * The detailed ability description. + * + * @since 6.9.0 + * @var string + */ + protected $description; + /** + * The ability category. + * + * @since 6.9.0 + * @var string + */ + protected $category; + /** + * The optional ability input schema. + * + * @since 6.9.0 + * @var array<string, mixed> + */ + protected $input_schema = array(); + /** + * The optional ability output schema. + * + * @since 6.9.0 + * @var array<string, mixed> + */ + protected $output_schema = array(); + /** + * The ability execute callback. + * + * @since 6.9.0 + * @var callable(mixed=): (mixed|WP_Error) + */ + protected $execute_callback; + /** + * The optional ability permission callback. + * + * @since 6.9.0 + * @var callable(mixed=): (bool|WP_Error) + */ + protected $permission_callback; + /** + * The optional ability metadata. + * + * @since 6.9.0 + * @var array<string, mixed> + */ + protected $meta; + /** + * Constructor. + * + * Do not use this constructor directly. Instead, use the `wp_register_ability()` function. + * + * @access private + * + * @since 6.9.0 + * + * @see wp_register_ability() + * + * @param string $name The name of the ability, with its namespace. + * @param array<string, mixed> $args { + * An associative array of arguments for the ability. + * + * @type string $label The human-readable label for the ability. + * @type string $description A detailed description of what the ability does. + * @type string $category The ability category slug this ability belongs to. + * @type callable $execute_callback A callback function to execute when the ability is invoked. + * Receives optional mixed input and returns mixed result or WP_Error. + * @type callable $permission_callback A callback function to check permissions before execution. + * Receives optional mixed input and returns bool or WP_Error. + * @type array<string, mixed> $input_schema Optional. JSON Schema definition for the ability's input. + * @type array<string, mixed> $output_schema Optional. JSON Schema definition for the ability's output. + * @type array<string, mixed> $meta { + * Optional. Additional metadata for the ability. + * + * @type array<string, bool|null> $annotations { + * Optional. Semantic annotations describing the ability's behavioral characteristics. + * These annotations are hints for tooling and documentation. + * + * @type bool|null $readonly Optional. If true, the ability does not modify its environment. + * @type bool|null $destructive Optional. If true, the ability may perform destructive updates to its environment. + * If false, the ability performs only additive updates. + * @type bool|null $idempotent Optional. If true, calling the ability repeatedly with the same arguments + * will have no additional effect on its environment. + * } + * @type bool $show_in_rest Optional. Whether to expose this ability in the REST API. Default false. + * } + * } + */ + public function __construct(string $name, array $args) + { + } + /** + * Prepares and validates the properties used to instantiate the ability. + * + * Errors are thrown as exceptions instead of WP_Errors to allow for simpler handling and overloading. They are then + * caught and converted to a WP_Error when by WP_Abilities_Registry::register(). + * + * @since 6.9.0 + * + * @see WP_Abilities_Registry::register() + * + * @param array<string, mixed> $args { + * An associative array of arguments used to instantiate the ability class. + * + * @type string $label The human-readable label for the ability. + * @type string $description A detailed description of what the ability does. + * @type string $category The ability category slug this ability belongs to. + * @type callable $execute_callback A callback function to execute when the ability is invoked. + * Receives optional mixed input and returns mixed result or WP_Error. + * @type callable $permission_callback A callback function to check permissions before execution. + * Receives optional mixed input and returns bool or WP_Error. + * @type array<string, mixed> $input_schema Optional. JSON Schema definition for the ability's input. Required if ability accepts an input. + * @type array<string, mixed> $output_schema Optional. JSON Schema definition for the ability's output. + * @type array<string, mixed> $meta { + * Optional. Additional metadata for the ability. + * + * @type array<string, bool|null> $annotations { + * Optional. Semantic annotations describing the ability's behavioral characteristics. + * These annotations are hints for tooling and documentation. + * + * @type bool|null $readonly Optional. If true, the ability does not modify its environment. + * @type bool|null $destructive Optional. If true, the ability may perform destructive updates to its environment. + * If false, the ability performs only additive updates. + * @type bool|null $idempotent Optional. If true, calling the ability repeatedly with the same arguments + * will have no additional effect on its environment. + * } + * @type bool $show_in_rest Optional. Whether to expose this ability in the REST API. Default false. + * } + * } + * @return array<string, mixed> { + * An associative array of arguments with validated and prepared properties for the ability class. + * + * @type string $label The human-readable label for the ability. + * @type string $description A detailed description of what the ability does. + * @type string $category The ability category slug this ability belongs to. + * @type callable $execute_callback A callback function to execute when the ability is invoked. + * Receives optional mixed input and returns mixed result or WP_Error. + * @type callable $permission_callback A callback function to check permissions before execution. + * Receives optional mixed input and returns bool or WP_Error. + * @type array<string, mixed> $input_schema Optional. JSON Schema definition for the ability's input. + * @type array<string, mixed> $output_schema Optional. JSON Schema definition for the ability's output. + * @type array<string, mixed> $meta { + * Additional metadata for the ability. + * + * @type array<string, bool|null> $annotations { + * Semantic annotations describing the ability's behavioral characteristics. + * These annotations are hints for tooling and documentation. + * + * @type bool|null $readonly If true, the ability does not modify its environment. + * @type bool|null $destructive If true, the ability may perform destructive updates to its environment. + * If false, the ability performs only additive updates. + * @type bool|null $idempotent If true, calling the ability repeatedly with the same arguments + * will have no additional effect on its environment. + * } + * @type bool $show_in_rest Whether to expose this ability in the REST API. Default false. + * } + * } + * @throws InvalidArgumentException if an argument is invalid. + */ + protected function prepare_properties(array $args): array + { + } + /** + * Retrieves the name of the ability, with its namespace. + * Example: `my-plugin/my-ability`. + * + * @since 6.9.0 + * + * @return string The ability name, with its namespace. + */ + public function get_name(): string + { + } + /** + * Retrieves the human-readable label for the ability. + * + * @since 6.9.0 + * + * @return string The human-readable ability label. + */ + public function get_label(): string + { + } + /** + * Retrieves the detailed description for the ability. + * + * @since 6.9.0 + * + * @return string The detailed description for the ability. + */ + public function get_description(): string + { + } + /** + * Retrieves the ability category for the ability. + * + * @since 6.9.0 + * + * @return string The ability category for the ability. + */ + public function get_category(): string + { + } + /** + * Retrieves the input schema for the ability. + * + * @since 6.9.0 + * + * @return array<string, mixed> The input schema for the ability. + */ + public function get_input_schema(): array + { + } + /** + * Retrieves the output schema for the ability. + * + * @since 6.9.0 + * + * @return array<string, mixed> The output schema for the ability. + */ + public function get_output_schema(): array + { + } + /** + * Retrieves the metadata for the ability. + * + * @since 6.9.0 + * + * @return array<string, mixed> The metadata for the ability. + */ + public function get_meta(): array + { + } + /** + * Retrieves a specific metadata item for the ability. + * + * @since 6.9.0 + * + * @param string $key The metadata key to retrieve. + * @param mixed $default_value Optional. The default value to return if the metadata item is not found. Default `null`. + * @return mixed The value of the metadata item, or the default value if not found. + */ + public function get_meta_item(string $key, $default_value = \null) + { + } + /** + * Normalizes the input for the ability, applying the default value from the input schema when needed. + * + * When no input is provided and the input schema is defined with a top-level `default` key, this method returns + * the value of that key. If the input schema does not define a `default`, or if the input schema is empty, + * this method returns null. If input is provided, it is returned as-is. + * + * @since 6.9.0 + * + * @param mixed $input Optional. The raw input provided for the ability. Default `null`. + * @return mixed The same input, or the default from schema, or `null` if default not set. + */ + public function normalize_input($input = \null) + { + } + /** + * Validates input data against the input schema. + * + * @since 6.9.0 + * + * @param mixed $input Optional. The input data to validate. Default `null`. + * @return true|WP_Error Returns true if valid or the WP_Error object if validation fails. + */ + public function validate_input($input = \null) + { + } + /** + * Invokes a callable, ensuring the input is passed through only if the input schema is defined. + * + * @since 6.9.0 + * + * @param callable $callback The callable to invoke. + * @param mixed $input Optional. The input data for the ability. Default `null`. + * @return mixed The result of the callable execution. + */ + protected function invoke_callback(callable $callback, $input = \null) + { + } + /** + * Checks whether the ability has the necessary permissions. + * + * Please note that input is not automatically validated against the input schema. + * Use `validate_input()` method to validate input before calling this method if needed. + * + * @since 6.9.0 + * + * @see validate_input() + * + * @param mixed $input Optional. The valid input data for permission checking. Default `null`. + * @return bool|WP_Error Whether the ability has the necessary permission. + */ + public function check_permissions($input = \null) + { + } + /** + * Executes the ability callback. + * + * @since 6.9.0 + * + * @param mixed $input Optional. The input data for the ability. Default `null`. + * @return mixed|WP_Error The result of the ability execution, or WP_Error on failure. + */ + protected function do_execute($input = \null) + { + } + /** + * Validates output data against the output schema. + * + * @since 6.9.0 + * + * @param mixed $output The output data to validate. + * @return true|WP_Error Returns true if valid, or a WP_Error object if validation fails. + */ + protected function validate_output($output) + { + } + /** + * Executes the ability after input validation and running a permission check. + * Before returning the return value, it also validates the output. + * + * @since 6.9.0 + * + * @param mixed $input Optional. The input data for the ability. Default `null`. + * @return mixed|WP_Error The result of the ability execution, or WP_Error on failure. + */ + public function execute($input = \null) + { + } + /** + * Wakeup magic method. + * + * @since 6.9.0 + * @throws LogicException If the ability object is unserialized. + * This is a security hardening measure to prevent unserialization of the ability. + */ + public function __wakeup(): void + { + } + /** + * Sleep magic method. + * + * @since 6.9.0 + * @throws LogicException If the ability object is serialized. + * This is a security hardening measure to prevent serialization of the ability. + */ + public function __sleep(): array + { + } + } + /** + * Structure that store common Atom Feed Properties + * + * @package AtomLib + */ + class AtomFeed + { + /** + * Stores Links + * @var array + * @access public + */ + var $links = array(); + /** + * Stores Categories + * @var array + * @access public + */ + var $categories = array(); + /** + * Stores Entries + * + * @var array + * @access public + */ + var $entries = array(); + } + /** + * Structure that store Atom Entry Properties + * + * @package AtomLib + */ + class AtomEntry + { + /** + * Stores Links + * @var array + * @access public + */ + var $links = array(); + /** + * Stores Categories + * @var array + * @access public + */ + var $categories = array(); + } + /** + * AtomLib Atom Parser API + * + * @package AtomLib + */ + class AtomParser + { + var $NS = 'http://www.w3.org/2005/Atom'; + var $ATOM_CONTENT_ELEMENTS = array('content', 'summary', 'title', 'subtitle', 'rights'); + var $ATOM_SIMPLE_ELEMENTS = array('id', 'updated', 'published', 'draft'); + var $debug = \false; + var $depth = 0; + var $indent = 2; + var $in_content; + var $ns_contexts = array(); + var $ns_decls = array(); + var $content_ns_decls = array(); + var $content_ns_contexts = array(); + var $is_xhtml = \false; + var $is_html = \false; + var $is_text = \true; + var $skipped_div = \false; + var $FILE = "php://input"; + var $feed; + var $current; + var $map_attrs_func; + var $map_xmlns_func; + var $error; + var $content; + /** + * PHP5 constructor. + */ + function __construct() + { + } + /** + * PHP4 constructor. + */ + public function AtomParser() + { + } + /** + * Map attributes to key="val" + * + * @param string $k Key + * @param string $v Value + * @return string + */ + public static function map_attrs($k, $v) + { + } + /** + * Map XML namespace to string. + * + * @param indexish $p XML Namespace element index + * @param array $n Two-element array pair. [ 0 => {namespace}, 1 => {url} ] + * @return string 'xmlns="{url}"' or 'xmlns:{namespace}="{url}"' + */ + public static function map_xmlns($p, $n) + { + } + function _p($msg) + { + } + function error_handler($log_level, $log_text, $error_file, $error_line) + { + } + function parse() + { + } + function start_element($parser, $name, $attrs) + { + } + function end_element($parser, $name) + { + } + function start_ns($parser, $prefix, $uri) + { + } + function end_ns($parser, $prefix) + { + } + function cdata($parser, $data) + { + } + function _default($parser, $data) + { + } + function ns_to_prefix($qname, $attr = \false) + { + } + function is_declared_content_ns($new_mapping) + { + } + function xml_escape($content) + { + } + } + /** + * Helper functions used to render the navigation block. + * + * @since 6.5.0 + */ + class WP_Navigation_Block_Renderer + { + /** + * Renders the navigation block. + * + * @since 6.5.0 + * + * @param array $attributes The block attributes. + * @param string $content The saved content. + * @param WP_Block $block The parsed block. + * @return string Returns the navigation block markup. + */ + public static function render($attributes, $content, $block) + { + } + } +} +namespace Avifinfo { + class Tile + { + public $tile_item_id; + public $parent_item_id; + } + class Prop + { + public $property_index; + public $item_id; + } + class Dim_Prop + { + public $property_index; + public $width; + public $height; + } + class Chan_Prop + { + public $property_index; + public $bit_depth; + public $num_channels; + } + class Features + { + public $has_primary_item = false; + public $has_alpha = false; + public $primary_item_id; + public $primary_item_features = array( + // Deduced from the data below. + 'width' => UNDEFINED, + // In number of pixels. + 'height' => UNDEFINED, + // Ignores mirror and rotation. + 'bit_depth' => UNDEFINED, + // Likely 8, 10 or 12 bits per channel per pixel. + 'num_channels' => UNDEFINED, + ); + public $tiles = array(); + public $props = array(); + public $dim_props = array(); + public $chan_props = array(); + /** + * Finds the width, height, bit depth and number of channels of the primary item. + * + * @return Status FOUND on success or NOT_FOUND on failure. + */ + public function get_primary_item_features() + { + } + } + class Box + { + public $size; + public $type; + public $version; + public $flags; + public $content_size; + /** + * Reads the box header. + * + * @param stream $handle The resource the header will be parsed from. + * @param int $num_parsed_boxes The total number of parsed boxes. Prevents timeouts. + * @param int $num_remaining_bytes The number of bytes that should be available from the resource. + * @return Status FOUND on success or an error on failure. + */ + public function parse($handle, &$num_parsed_boxes, $num_remaining_bytes = MAX_SIZE) + { + } + } + class Parser + { + public $features; + function __construct($handle) + { + } + /** + * Parses a file stream. + * + * The file type is checked through the "ftyp" box. + * + * @return bool True if the input stream is an AVIF bitstream or false. + */ + public function parse_ftyp() + { + } + /** + * Parses a file stream. + * + * Features are extracted from the "meta" box. + * + * @return bool True if the main features of the primary item were parsed or false. + */ + public function parse_file() + { + } + } +} +namespace { + /** + * Portable PHP password hashing framework. + * + * @package phpass + * @version 0.5 / WordPress + * @link https://www.openwall.com/phpass/ + * @since 2.5.0 + */ + class PasswordHash + { + var $itoa64; + var $iteration_count_log2; + var $portable_hashes; + var $random_state; + function __construct($iteration_count_log2, $portable_hashes) + { + } + function PasswordHash($iteration_count_log2, $portable_hashes) + { + } + function get_random_bytes($count) + { + } + function encode64($input, $count) + { + } + function gensalt_private($input) + { + } + function crypt_private($password, $setting) + { + } + function gensalt_blowfish($input) + { + } + function HashPassword($password) + { + } + function CheckPassword($password, $stored_hash) + { + } + } + /** + * mail_fetch/setup.php + * + * Copyright (c) 1999-2011 CDI (cdi@thewebmasters.net) All Rights Reserved + * Modified by Philippe Mingo 2001-2009 mingo@rotedic.com + * An RFC 1939 compliant wrapper class for the POP3 protocol. + * + * Licensed under the GNU GPL. For full terms see the file COPYING. + * + * POP3 class + * + * @copyright 1999-2011 The SquirrelMail Project Team + * @license https://opensource.org/licenses/gpl-license.php GNU Public License + * @package plugins + * @subpackage mail_fetch + */ + class POP3 + { + var $ERROR = ''; + var $TIMEOUT = 60; + var $COUNT = -1; + var $BUFFER = 512; + var $FP = ''; + var $MAILSERVER = ''; + var $DEBUG = \FALSE; + var $BANNER = ''; + var $ALLOWAPOP = \FALSE; + /** + * PHP5 constructor. + */ + function __construct($server = '', $timeout = '') + { + } + /** + * PHP4 constructor. + */ + public function POP3($server = '', $timeout = '') + { + } + function update_timer() + { + } + function connect($server, $port = 110) + { + } + function user($user = "") + { + } + function pass($pass = "") + { + } + function apop($login, $pass) + { + } + function login($login = "", $pass = "") + { + } + function top($msgNum, $numLines = "0") + { + } + function pop_list($msgNum = "") + { + } + function get($msgNum) + { + } + function last($type = "count") + { + } + function reset() + { + } + function send_cmd($cmd = "") + { + } + function quit() + { + } + function popstat() + { + } + function uidl($msgNum = "") + { + } + function delete($msgNum = "") + { + } + function is_ok($cmd = "") + { + } + function strip_clf($text = "") + { + } + function parse_banner($server_text) + { + } + } + /** + * Requests for PHP + * + * Inspired by Requests for Python. + * + * Based on concepts from SimplePie_File, RequestCore and WP_Http. + * + * @package Requests + * + * @deprecated 6.2.0 Use `WpOrg\Requests\Requests` instead for the actual functionality and + * use `WpOrg\Requests\Autoload` for the autoloading. + */ + class Requests extends \WpOrg\Requests\Requests + { + /** + * Deprecated autoloader for Requests. + * + * @deprecated 6.2.0 Use the `WpOrg\Requests\Autoload::load()` method instead. + * + * @codeCoverageIgnore + * + * @param string $class Class name to load + */ + public static function autoloader($class) + { + } + /** + * Register the built-in autoloader + * + * @deprecated 6.2.0 Include the `WpOrg\Requests\Autoload` class and + * call `WpOrg\Requests\Autoload::register()` instead. + * + * @codeCoverageIgnore + */ + public static function register_autoloader() + { + } + } + /** + * Core class used to create an HTML dropdown list of Categories. + * + * @since 2.1.0 + * + * @see Walker + */ + class Walker_CategoryDropdown extends \Walker + { + /** + * What the class handles. + * + * @since 2.1.0 + * @var string + * + * @see Walker::$tree_type + */ + public $tree_type = 'category'; + /** + * Database fields to use. + * + * @since 2.1.0 + * @todo Decouple this + * @var string[] + * + * @see Walker::$db_fields + */ + public $db_fields = array('parent' => 'parent', 'id' => 'term_id'); + /** + * Starts the element output. + * + * @since 2.1.0 + * @since 5.9.0 Renamed `$category` to `$data_object` and `$id` to `$current_object_id` + * to match parent class for PHP 8 named parameter support. + * + * @see Walker::start_el() + * + * @param string $output Used to append additional content (passed by reference). + * @param WP_Term $data_object Category data object. + * @param int $depth Depth of category. Used for padding. + * @param array $args Uses 'selected', 'show_count', and 'value_field' keys, if they exist. + * See wp_dropdown_categories(). + * @param int $current_object_id Optional. ID of the current category. Default 0. + * @phpstan-param array{ + * show_option_all?: string, + * show_option_none?: string, + * option_none_value?: string, + * orderby?: string, + * pad_counts?: bool, + * show_count?: bool|int, + * echo?: bool|int, + * hierarchical?: bool|int, + * depth?: int, + * tab_index?: int, + * name?: string, + * id?: string, + * class?: string, + * selected?: int|string, + * value_field?: string, + * taxonomy?: string|array, + * hide_if_empty?: bool, + * required?: bool, + * walker?: Walker, + * aria_describedby?: string, + * } $args See wp_dropdown_categories() + */ + public function start_el(&$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0) + { + } + } + /** + * Core class used to create an HTML list of categories. + * + * @since 2.1.0 + * + * @see Walker + */ + class Walker_Category extends \Walker + { + /** + * What the class handles. + * + * @since 2.1.0 + * @var string + * + * @see Walker::$tree_type + */ + public $tree_type = 'category'; + /** + * Database fields to use. + * + * @since 2.1.0 + * @var string[] + * + * @see Walker::$db_fields + * @todo Decouple this + */ + public $db_fields = array('parent' => 'parent', 'id' => 'term_id'); + /** + * Starts the list before the elements are added. + * + * @since 2.1.0 + * + * @see Walker::start_lvl() + * + * @param string $output Used to append additional content. Passed by reference. + * @param int $depth Optional. Depth of category. Used for tab indentation. Default 0. + * @param array $args Optional. An array of arguments. Will only append content if style argument + * value is 'list'. See wp_list_categories(). Default empty array. + * @phpstan-param array{ + * current_category?: int|int[], + * depth?: int, + * echo?: bool|int, + * exclude?: int[]|string, + * exclude_tree?: int[]|string, + * feed?: string, + * feed_image?: string, + * feed_type?: string, + * hide_title_if_empty?: bool, + * separator?: string, + * show_count?: bool|int, + * show_option_all?: string, + * show_option_none?: string, + * style?: string, + * taxonomy?: string, + * title_li?: string, + * use_desc_for_title?: bool|int, + * walker?: Walker, + * } $args See wp_list_categories() + * @phpstan-return void + */ + public function start_lvl(&$output, $depth = 0, $args = array()) + { + } + /** + * Ends the list of after the elements are added. + * + * @since 2.1.0 + * + * @see Walker::end_lvl() + * + * @param string $output Used to append additional content. Passed by reference. + * @param int $depth Optional. Depth of category. Used for tab indentation. Default 0. + * @param array $args Optional. An array of arguments. Will only append content if style argument + * value is 'list'. See wp_list_categories(). Default empty array. + * @phpstan-param array{ + * current_category?: int|int[], + * depth?: int, + * echo?: bool|int, + * exclude?: int[]|string, + * exclude_tree?: int[]|string, + * feed?: string, + * feed_image?: string, + * feed_type?: string, + * hide_title_if_empty?: bool, + * separator?: string, + * show_count?: bool|int, + * show_option_all?: string, + * show_option_none?: string, + * style?: string, + * taxonomy?: string, + * title_li?: string, + * use_desc_for_title?: bool|int, + * walker?: Walker, + * } $args See wp_list_categories() + * @phpstan-return void + */ + public function end_lvl(&$output, $depth = 0, $args = array()) + { + } + /** + * Starts the element output. + * + * @since 2.1.0 + * @since 5.9.0 Renamed `$category` to `$data_object` and `$id` to `$current_object_id` + * to match parent class for PHP 8 named parameter support. + * + * @see Walker::start_el() + * + * @param string $output Used to append additional content (passed by reference). + * @param WP_Term $data_object Category data object. + * @param int $depth Optional. Depth of category in reference to parents. Default 0. + * @param array $args Optional. An array of arguments. See wp_list_categories(). + * Default empty array. + * @param int $current_object_id Optional. ID of the current category. Default 0. + * @phpstan-param array{ + * current_category?: int|int[], + * depth?: int, + * echo?: bool|int, + * exclude?: int[]|string, + * exclude_tree?: int[]|string, + * feed?: string, + * feed_image?: string, + * feed_type?: string, + * hide_title_if_empty?: bool, + * separator?: string, + * show_count?: bool|int, + * show_option_all?: string, + * show_option_none?: string, + * style?: string, + * taxonomy?: string, + * title_li?: string, + * use_desc_for_title?: bool|int, + * walker?: Walker, + * } $args See wp_list_categories() + * @phpstan-return void + */ + public function start_el(&$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0) + { + } + /** + * Ends the element output, if needed. + * + * @since 2.1.0 + * @since 5.9.0 Renamed `$page` to `$data_object` to match parent class for PHP 8 named parameter support. + * + * @see Walker::end_el() + * + * @param string $output Used to append additional content (passed by reference). + * @param object $data_object Category data object. Not used. + * @param int $depth Optional. Depth of category. Not used. + * @param array $args Optional. An array of arguments. Only uses 'list' for whether should + * append to output. See wp_list_categories(). Default empty array. + * @phpstan-param array{ + * current_category?: int|int[], + * depth?: int, + * echo?: bool|int, + * exclude?: int[]|string, + * exclude_tree?: int[]|string, + * feed?: string, + * feed_image?: string, + * feed_type?: string, + * hide_title_if_empty?: bool, + * separator?: string, + * show_count?: bool|int, + * show_option_all?: string, + * show_option_none?: string, + * style?: string, + * taxonomy?: string, + * title_li?: string, + * use_desc_for_title?: bool|int, + * walker?: Walker, + * } $args See wp_list_categories() + * @phpstan-return void + */ + public function end_el(&$output, $data_object, $depth = 0, $args = array()) + { + } + } + /** + * Core walker class used to create an HTML list of comments. + * + * @since 2.7.0 + * + * @see Walker + */ + class Walker_Comment extends \Walker + { + /** + * What the class handles. + * + * @since 2.7.0 + * @var string + * + * @see Walker::$tree_type + */ + public $tree_type = 'comment'; + /** + * Database fields to use. + * + * @since 2.7.0 + * @var string[] + * + * @see Walker::$db_fields + * @todo Decouple this + */ + public $db_fields = array('parent' => 'comment_parent', 'id' => 'comment_ID'); + /** + * Starts the list before the elements are added. + * + * @since 2.7.0 + * + * @see Walker::start_lvl() + * @global int $comment_depth + * + * @param string $output Used to append additional content (passed by reference). + * @param int $depth Optional. Depth of the current comment. Default 0. + * @param array $args Optional. Uses 'style' argument for type of HTML list. Default empty array. + */ + public function start_lvl(&$output, $depth = 0, $args = array()) + { + } + /** + * Ends the list of items after the elements are added. + * + * @since 2.7.0 + * + * @see Walker::end_lvl() + * @global int $comment_depth + * + * @param string $output Used to append additional content (passed by reference). + * @param int $depth Optional. Depth of the current comment. Default 0. + * @param array $args Optional. Will only append content if style argument value is 'ol' or 'ul'. + * Default empty array. + */ + public function end_lvl(&$output, $depth = 0, $args = array()) + { + } + /** + * Traverses elements to create list from elements. + * + * This function is designed to enhance Walker::display_element() to + * display children of higher nesting levels than selected inline on + * the highest depth level displayed. This prevents them being orphaned + * at the end of the comment list. + * + * Example: max_depth = 2, with 5 levels of nested content. + * 1 + * 1.1 + * 1.1.1 + * 1.1.1.1 + * 1.1.1.1.1 + * 1.1.2 + * 1.1.2.1 + * 2 + * 2.2 + * + * @since 2.7.0 + * + * @see Walker::display_element() + * @see wp_list_comments() + * + * @param WP_Comment $element Comment data object. + * @param array $children_elements List of elements to continue traversing. Passed by reference. + * @param int $max_depth Max depth to traverse. + * @param int $depth Depth of the current element. + * @param array $args An array of arguments. + * @param string $output Used to append additional content. Passed by reference. + * @phpstan-return void + */ + public function display_element($element, &$children_elements, $max_depth, $depth, $args, &$output) + { + } + /** + * Starts the element output. + * + * @since 2.7.0 + * @since 5.9.0 Renamed `$comment` to `$data_object` and `$id` to `$current_object_id` + * to match parent class for PHP 8 named parameter support. + * + * @see Walker::start_el() + * @see wp_list_comments() + * @global int $comment_depth + * @global WP_Comment $comment Global comment object. + * + * @param string $output Used to append additional content. Passed by reference. + * @param WP_Comment $data_object Comment data object. + * @param int $depth Optional. Depth of the current comment in reference to parents. Default 0. + * @param array $args Optional. An array of arguments. Default empty array. + * @param int $current_object_id Optional. ID of the current comment. Default 0. + * @phpstan-return void + */ + public function start_el(&$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0) + { + } + /** + * Ends the element output, if needed. + * + * @since 2.7.0 + * @since 5.9.0 Renamed `$comment` to `$data_object` to match parent class for PHP 8 named parameter support. + * + * @see Walker::end_el() + * @see wp_list_comments() + * + * @param string $output Used to append additional content. Passed by reference. + * @param WP_Comment $data_object Comment data object. + * @param int $depth Optional. Depth of the current comment. Default 0. + * @param array $args Optional. An array of arguments. Default empty array. + * @phpstan-return void + */ + public function end_el(&$output, $data_object, $depth = 0, $args = array()) + { + } + /** + * Outputs a pingback comment. + * + * @since 3.6.0 + * + * @see wp_list_comments() + * + * @param WP_Comment $comment The comment object. + * @param int $depth Depth of the current comment. + * @param array $args An array of arguments. + */ + protected function ping($comment, $depth, $args) + { + } + /** + * Filters the comment text. + * + * Removes links from the pending comment's text if the commenter did not consent + * to the comment cookies. + * + * @since 5.4.2 + * + * @param string $comment_text Text of the current comment. + * @param WP_Comment|null $comment The comment object. Null if not found. + * @return string Filtered text of the current comment. + */ + public function filter_comment_text($comment_text, $comment) + { + } + /** + * Outputs a single comment. + * + * @since 3.6.0 + * + * @see wp_list_comments() + * + * @param WP_Comment $comment Comment to display. + * @param int $depth Depth of the current comment. + * @param array $args An array of arguments. + */ + protected function comment($comment, $depth, $args) + { + } + /** + * Outputs a comment in the HTML5 format. + * + * @since 3.6.0 + * + * @see wp_list_comments() + * + * @param WP_Comment $comment Comment to display. + * @param int $depth Depth of the current comment. + * @param array $args An array of arguments. + */ + protected function html5_comment($comment, $depth, $args) + { + } + } + /** + * Core class used to create an HTML drop-down list of pages. + * + * @since 2.1.0 + * + * @see Walker + */ + class Walker_PageDropdown extends \Walker + { + /** + * What the class handles. + * + * @since 2.1.0 + * @var string + * + * @see Walker::$tree_type + */ + public $tree_type = 'page'; + /** + * Database fields to use. + * + * @since 2.1.0 + * @var string[] + * + * @see Walker::$db_fields + * @todo Decouple this + */ + public $db_fields = array('parent' => 'post_parent', 'id' => 'ID'); + /** + * Starts the element output. + * + * @since 2.1.0 + * @since 5.9.0 Renamed `$page` to `$data_object` and `$id` to `$current_object_id` + * to match parent class for PHP 8 named parameter support. + * + * @see Walker::start_el() + * + * @param string $output Used to append additional content. Passed by reference. + * @param WP_Post $data_object Page data object. + * @param int $depth Optional. Depth of page in reference to parent pages. + * Used for padding. Default 0. + * @param array $args Optional. Uses 'selected' argument for selected page to + * set selected HTML attribute for option element. Uses + * 'value_field' argument to fill "value" attribute. + * See wp_dropdown_pages(). Default empty array. + * @param int $current_object_id Optional. ID of the current page. Default 0. + * @phpstan-param array{ + * depth?: int, + * child_of?: int, + * selected?: int|string, + * echo?: bool|int, + * name?: string, + * id?: string, + * class?: string, + * show_option_none?: string, + * show_option_no_change?: string, + * option_none_value?: string, + * value_field?: string, + * } $args See wp_dropdown_pages() + */ + public function start_el(&$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0) + { + } + } + /** + * Core walker class used to create an HTML list of pages. + * + * @since 2.1.0 + * + * @see Walker + */ + class Walker_Page extends \Walker + { + /** + * What the class handles. + * + * @since 2.1.0 + * @var string + * + * @see Walker::$tree_type + */ + public $tree_type = 'page'; + /** + * Database fields to use. + * + * @since 2.1.0 + * @var string[] + * + * @see Walker::$db_fields + * @todo Decouple this. + */ + public $db_fields = array('parent' => 'post_parent', 'id' => 'ID'); + /** + * Outputs the beginning of the current level in the tree before elements are output. + * + * @since 2.1.0 + * + * @see Walker::start_lvl() + * + * @param string $output Used to append additional content (passed by reference). + * @param int $depth Optional. Depth of page. Used for padding. Default 0. + * @param array $args Optional. Arguments for outputting the next level. + * Default empty array. + */ + public function start_lvl(&$output, $depth = 0, $args = array()) + { + } + /** + * Outputs the end of the current level in the tree after elements are output. + * + * @since 2.1.0 + * + * @see Walker::end_lvl() + * + * @param string $output Used to append additional content (passed by reference). + * @param int $depth Optional. Depth of page. Used for padding. Default 0. + * @param array $args Optional. Arguments for outputting the end of the current level. + * Default empty array. + */ + public function end_lvl(&$output, $depth = 0, $args = array()) + { + } + /** + * Outputs the beginning of the current element in the tree. + * + * @see Walker::start_el() + * @since 2.1.0 + * @since 5.9.0 Renamed `$page` to `$data_object` and `$current_page` to `$current_object_id` + * to match parent class for PHP 8 named parameter support. + * + * @param string $output Used to append additional content. Passed by reference. + * @param WP_Post $data_object Page data object. + * @param int $depth Optional. Depth of page. Used for padding. Default 0. + * @param array $args Optional. Array of arguments. Default empty array. + * @param int $current_object_id Optional. ID of the current page. Default 0. + */ + public function start_el(&$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0) + { + } + /** + * Outputs the end of the current element in the tree. + * + * @since 2.1.0 + * @since 5.9.0 Renamed `$page` to `$data_object` to match parent class for PHP 8 named parameter support. + * + * @see Walker::end_el() + * + * @param string $output Used to append additional content. Passed by reference. + * @param WP_Post $data_object Page data object. Not used. + * @param int $depth Optional. Depth of page. Default 0 (unused). + * @param array $args Optional. Array of arguments. Default empty array. + */ + public function end_el(&$output, $data_object, $depth = 0, $args = array()) + { + } + } + /** + * Core class used to implement the Toolbar API. + * + * @since 3.1.0 + */ + #[\AllowDynamicProperties] + class WP_Admin_Bar + { + public $user; + /** + * Deprecated menu property. + * + * @since 3.1.0 + * @deprecated 3.3.0 Modify admin bar nodes with WP_Admin_Bar::get_node(), + * WP_Admin_Bar::add_node(), and WP_Admin_Bar::remove_node(). + * @var array + */ + public $menu = array(); + /** + * Initializes the admin bar. + * + * @since 3.1.0 + */ + public function initialize() + { + } + /** + * Adds a node (menu item) to the admin bar menu. + * + * @since 3.3.0 + * + * @param array $node The attributes that define the node. + */ + public function add_menu($node) + { + } + /** + * Removes a node from the admin bar. + * + * @since 3.1.0 + * + * @param string $id The menu slug to remove. + */ + public function remove_menu($id) + { + } + /** + * Adds a node to the menu. + * + * @since 3.1.0 + * @since 4.5.0 Added the ability to pass 'lang' and 'dir' meta data. + * @since 6.5.0 Added the ability to pass 'menu_title' for an ARIA menu name. + * + * @param array $args { + * Arguments for adding a node. + * + * @type string $id ID of the item. + * @type string $title Title of the node. + * @type string $parent Optional. ID of the parent node. + * @type string $href Optional. Link for the item. + * @type bool $group Optional. Whether or not the node is a group. Default false. + * @type array $meta Meta data including the following keys: 'html', 'class', 'rel', 'lang', 'dir', + * 'onclick', 'target', 'title', 'tabindex', 'menu_title'. Default empty. + * } + * @phpstan-param array{ + * id?: string, + * title?: string, + * parent?: string, + * href?: string, + * group?: bool, + * meta?: array, + * } $args + * @phpstan-return void + */ + public function add_node($args) + { + } + /** + * @since 3.3.0 + * + * @param array $args + */ + final protected function _set_node($args) + { + } + /** + * Gets a node. + * + * @since 3.3.0 + * + * @param string $id + * @return object|void Node. + */ + final public function get_node($id) + { + } + /** + * @since 3.3.0 + * + * @param string $id + * @return object|void + */ + final protected function _get_node($id) + { + } + /** + * @since 3.3.0 + * + * @return array|void + */ + final public function get_nodes() + { + } + /** + * @since 3.3.0 + * + * @return array|void + */ + final protected function _get_nodes() + { + } + /** + * Adds a group to a toolbar menu node. + * + * Groups can be used to organize toolbar items into distinct sections of a toolbar menu. + * + * @since 3.3.0 + * + * @param array $args { + * Array of arguments for adding a group. + * + * @type string $id ID of the item. + * @type string $parent Optional. ID of the parent node. Default 'root'. + * @type array $meta Meta data for the group including the following keys: + * 'class', 'onclick', 'target', and 'title'. + * } + * @phpstan-param array{ + * id?: string, + * parent?: string, + * meta?: array, + * } $args + */ + final public function add_group($args) + { + } + /** + * Remove a node. + * + * @since 3.1.0 + * + * @param string $id The ID of the item. + */ + public function remove_node($id) + { + } + /** + * @since 3.3.0 + * + * @param string $id + */ + final protected function _unset_node($id) + { + } + /** + * @since 3.1.0 + */ + public function render() + { + } + /** + * @since 3.3.0 + * + * @return object|void + */ + final protected function _bind() + { + } + /** + * @since 3.3.0 + * + * @param object $root + */ + final protected function _render($root) + { + } + /** + * @since 3.3.0 + * + * @param object $node + * @phpstan-return void + */ + final protected function _render_container($node) + { + } + /** + * @since 3.3.0 + * @since 6.5.0 Added `$menu_title` parameter to allow an ARIA menu name. + * + * @param object $node + * @param string|bool $menu_title The accessible name of this ARIA menu or false if not provided. + * @phpstan-return void + */ + final protected function _render_group($node, $menu_title = \false) + { + } + /** + * @since 3.3.0 + * + * @param object $node + * @phpstan-return void + */ + final protected function _render_item($node) + { + } + /** + * Renders toolbar items recursively. + * + * @since 3.1.0 + * @deprecated 3.3.0 Use WP_Admin_Bar::_render_item() or WP_Admin_bar::render() instead. + * @see WP_Admin_Bar::_render_item() + * @see WP_Admin_Bar::render() + * + * @param string $id Unused. + * @param object $node + */ + public function recursive_render($id, $node) + { + } + /** + * Adds menus to the admin bar. + * + * @since 3.1.0 + */ + public function add_menus() + { + } + } + /** + * Send XML response back to Ajax request. + * + * @package WordPress + * @since 2.1.0 + */ + #[\AllowDynamicProperties] + class WP_Ajax_Response + { + /** + * Store XML responses to send. + * + * @since 2.1.0 + * @var array + */ + public $responses = array(); + /** + * Constructor - Passes args to WP_Ajax_Response::add(). + * + * @since 2.1.0 + * + * @see WP_Ajax_Response::add() + * + * @param string|array $args Optional. Will be passed to add() method. + */ + public function __construct($args = '') + { + } + /** + * Appends data to an XML response based on given arguments. + * + * With `$args` defaults, extra data output would be: + * + * <response action='{$action}_$id'> + * <$what id='$id' position='$position'> + * <response_data><![CDATA[$data]]></response_data> + * </$what> + * </response> + * + * @since 2.1.0 + * + * @param string|array $args { + * Optional. An array or string of XML response arguments. + * + * @type string $what XML-RPC response type. Used as a child element of `<response>`. + * Default 'object' (`<object>`). + * @type string|false $action Value to use for the `action` attribute in `<response>`. Will be + * appended with `_$id` on output. If false, `$action` will default to + * the value of `$_POST['action']`. Default false. + * @type int|WP_Error $id The response ID, used as the response type `id` attribute. Also + * accepts a `WP_Error` object if the ID does not exist. Default 0. + * @type int|false $old_id The previous response ID. Used as the value for the response type + * `old_id` attribute. False hides the attribute. Default false. + * @type string $position Value of the response type `position` attribute. Accepts 1 (bottom), + * -1 (top), HTML ID (after), or -HTML ID (before). Default 1 (bottom). + * @type string|WP_Error $data The response content/message. Also accepts a WP_Error object if the + * ID does not exist. Default empty. + * @type array $supplemental An array of extra strings that will be output within a `<supplemental>` + * element as CDATA. Default empty array. + * } + * @return string XML response. + * @phpstan-param array{ + * what?: string, + * action?: string|false, + * id?: int|WP_Error, + * old_id?: int|false, + * position?: string, + * data?: string|WP_Error, + * supplemental?: array, + * } $args + */ + public function add($args = '') + { + } + /** + * Display XML formatted responses. + * + * Sets the content type header to text/xml. + * + * @since 2.1.0 + */ + public function send() + { + } + } + /** + * Class for displaying, modifying, and sanitizing application passwords. + * + * @package WordPress + */ + #[\AllowDynamicProperties] + class WP_Application_Passwords + { + /** + * The application passwords user meta key. + * + * @since 5.6.0 + * + * @var string + */ + const USERMETA_KEY_APPLICATION_PASSWORDS = '_application_passwords'; + /** + * The option name used to store whether application passwords are in use. + * + * @since 5.6.0 + * + * @var string + */ + const OPTION_KEY_IN_USE = 'using_application_passwords'; + /** + * The generated application password length. + * + * @since 5.6.0 + * + * @var int + */ + const PW_LENGTH = 24; + /** + * Checks if application passwords are being used by the site. + * + * This returns true if at least one application password has ever been created. + * + * @since 5.6.0 + * + * @return bool + */ + public static function is_in_use() + { + } + /** + * Creates a new application password. + * + * @since 5.6.0 + * @since 5.7.0 Returns WP_Error if application name already exists. + * @since 6.8.0 The hashed password value now uses wp_fast_hash() instead of phpass. + * + * @param int $user_id User ID. + * @param array $args { + * Arguments used to create the application password. + * + * @type string $name The name of the application password. + * @type string $app_id A UUID provided by the application to uniquely identify it. + * } + * @return array|WP_Error { + * Application password details, or a WP_Error instance if an error occurs. + * + * @type string $0 The generated application password in plain text. + * @type array $1 { + * The details about the created password. + * + * @type string $uuid The unique identifier for the application password. + * @type string $app_id A UUID provided by the application to uniquely identify it. + * @type string $name The name of the application password. + * @type string $password A one-way hash of the password. + * @type int $created Unix timestamp of when the password was created. + * @type null $last_used Null. + * @type null $last_ip Null. + * } + * } + * @phpstan-param array{ + * name?: string, + * app_id?: string, + * } $args + * @phpstan-return \WP_Error|array{ + * 0: string, + * 1: array{ + * uuid: string, + * app_id: string, + * name: string, + * password: string, + * created: int, + * last_used: null, + * last_ip: null, + * }, + * } + */ + public static function create_new_application_password($user_id, $args = array()) + { + } + /** + * Gets a user's application passwords. + * + * @since 5.6.0 + * + * @param int $user_id User ID. + * @return array { + * The list of application passwords. + * + * @type array ...$0 { + * @type string $uuid The unique identifier for the application password. + * @type string $app_id A UUID provided by the application to uniquely identify it. + * @type string $name The name of the application password. + * @type string $password A one-way hash of the password. + * @type int $created Unix timestamp of when the password was created. + * @type int|null $last_used The Unix timestamp of the GMT date the application password was last used. + * @type string|null $last_ip The IP address the application password was last used by. + * } + * } + * @phpstan-return array<int|string, array{ + * uuid: string, + * app_id: string, + * name: string, + * password: string, + * created: int, + * last_used: int|null, + * last_ip: string|null, + * }> + */ + public static function get_user_application_passwords($user_id) + { + } + /** + * Gets a user's application password with the given UUID. + * + * @since 5.6.0 + * + * @param int $user_id User ID. + * @param string $uuid The password's UUID. + * @return array|null { + * The application password if found, null otherwise. + * + * @type string $uuid The unique identifier for the application password. + * @type string $app_id A UUID provided by the application to uniquely identify it. + * @type string $name The name of the application password. + * @type string $password A one-way hash of the password. + * @type int $created Unix timestamp of when the password was created. + * @type int|null $last_used The Unix timestamp of the GMT date the application password was last used. + * @type string|null $last_ip The IP address the application password was last used by. + * } + * @phpstan-return null|array{ + * uuid: string, + * app_id: string, + * name: string, + * password: string, + * created: int, + * last_used: int|null, + * last_ip: string|null, + * } + */ + public static function get_user_application_password($user_id, $uuid) + { + } + /** + * Checks if an application password with the given name exists for this user. + * + * @since 5.7.0 + * + * @param int $user_id User ID. + * @param string $name Application name. + * @return bool Whether the provided application name exists. + */ + public static function application_name_exists_for_user($user_id, $name) + { + } + /** + * Updates an application password. + * + * @since 5.6.0 + * @since 6.8.0 The actual password should now be hashed using wp_fast_hash(). + * + * @param int $user_id User ID. + * @param string $uuid The password's UUID. + * @param array $update { + * Information about the application password to update. + * + * @type string $uuid The unique identifier for the application password. + * @type string $app_id A UUID provided by the application to uniquely identify it. + * @type string $name The name of the application password. + * @type string $password A one-way hash of the password. + * @type int $created Unix timestamp of when the password was created. + * @type int|null $last_used The Unix timestamp of the GMT date the application password was last used. + * @type string|null $last_ip The IP address the application password was last used by. + * } + * @return true|WP_Error True if successful, otherwise a WP_Error instance is returned on error. + * @phpstan-param array{ + * uuid?: string, + * app_id?: string, + * name?: string, + * password?: string, + * created?: int, + * last_used?: int|null, + * last_ip?: string|null, + * } $update + */ + public static function update_application_password($user_id, $uuid, $update = array()) + { + } + /** + * Records that an application password has been used. + * + * @since 5.6.0 + * + * @param int $user_id User ID. + * @param string $uuid The password's UUID. + * @return true|WP_Error True if the usage was recorded, a WP_Error if an error occurs. + */ + public static function record_application_password_usage($user_id, $uuid) + { + } + /** + * Deletes an application password. + * + * @since 5.6.0 + * + * @param int $user_id User ID. + * @param string $uuid The password's UUID. + * @return true|WP_Error Whether the password was successfully found and deleted, a WP_Error otherwise. + */ + public static function delete_application_password($user_id, $uuid) + { + } + /** + * Deletes all application passwords for the given user. + * + * @since 5.6.0 + * + * @param int $user_id User ID. + * @return int|WP_Error The number of passwords that were deleted or a WP_Error on failure. + */ + public static function delete_all_application_passwords($user_id) + { + } + /** + * Sets a user's application passwords. + * + * @since 5.6.0 + * + * @param int $user_id User ID. + * @param array $passwords { + * The list of application passwords. + * + * @type array ...$0 { + * @type string $uuid The unique identifier for the application password. + * @type string $app_id A UUID provided by the application to uniquely identify it. + * @type string $name The name of the application password. + * @type string $password A one-way hash of the password. + * @type int $created Unix timestamp of when the password was created. + * @type int|null $last_used The Unix timestamp of the GMT date the application password was last used. + * @type string|null $last_ip The IP address the application password was last used by. + * } + * } + * @return int|bool User meta ID if the key didn't exist (ie. this is the first time that an application password + * has been saved for the user), true on successful update, false on failure or if the value passed + * is the same as the one that is already in the database. + * @phpstan-param array<int|string, array{ + * uuid: string, + * app_id: string, + * name: string, + * password: string, + * created: int, + * last_used: int|null, + * last_ip: string|null, + * }> $passwords + */ + protected static function set_user_application_passwords($user_id, $passwords) + { + } + /** + * Sanitizes and then splits a password into smaller chunks. + * + * @since 5.6.0 + * + * @param string $raw_password The raw application password. + * @return string The chunked password. + */ + public static function chunk_password( + #[\SensitiveParameter] + $raw_password + ) + { + } + /** + * Hashes a plaintext application password. + * + * @since 6.8.0 + * + * @param string $password Plaintext password. + * @return string Hashed password. + */ + public static function hash_password( + #[\SensitiveParameter] + string $password + ): string + { + } + /** + * Checks a plaintext application password against a hashed password. + * + * @since 6.8.0 + * + * @param string $password Plaintext password. + * @param string $hash Hash of the password to check against. + * @return bool Whether the password matches the hashed password. + */ + public static function check_password( + #[\SensitiveParameter] + string $password, + string $hash + ): bool + { + } + } + /** + * Core class used for interacting with block bindings sources. + * + * @since 6.5.0 + */ + final class WP_Block_Bindings_Registry + { + /** + * Registers a new block bindings source. + * + * This is a low-level method. For most use cases, it is recommended to use + * the `register_block_bindings_source()` function instead. + * + * @see register_block_bindings_source() + * + * Sources are used to override block's original attributes with a value + * coming from the source. Once a source is registered, it can be used by a + * block by setting its `metadata.bindings` attribute to a value that refers + * to the source. + * + * @since 6.5.0 + * + * @param string $source_name The name of the source. It must be a string containing a namespace prefix, i.e. + * `my-plugin/my-custom-source`. It must only contain lowercase alphanumeric + * characters, the forward slash `/` and dashes. + * @param array $source_properties { + * The array of arguments that are used to register a source. + * + * @type string $label The label of the source. + * @type callable $get_value_callback A callback executed when the source is processed during block rendering. + * The callback should have the following signature: + * + * `function( $source_args, $block_instance, $attribute_name ): mixed` + * - @param array $source_args Array containing source arguments + * used to look up the override value, + * i.e. {"key": "foo"}. + * - @param WP_Block $block_instance The block instance. + * - @param string $attribute_name The name of the target attribute. + * The callback has a mixed return type; it may return a string to override + * the block's original value, null, false to remove an attribute, etc. + * @type string[] $uses_context Optional. Array of values to add to block `uses_context` needed by the source. + * } + * @return WP_Block_Bindings_Source|false Source when the registration was successful, or `false` on failure. + * @phpstan-param array{ + * label?: string, + * get_value_callback?: callable, + * uses_context?: string[], + * } $source_properties + */ + public function register(string $source_name, array $source_properties) + { + } + /** + * Unregisters a block bindings source. + * + * @since 6.5.0 + * + * @param string $source_name Block bindings source name including namespace. + * @return WP_Block_Bindings_Source|false The unregistered block bindings source on success and `false` otherwise. + */ + public function unregister(string $source_name) + { + } + /** + * Retrieves the list of all registered block bindings sources. + * + * @since 6.5.0 + * + * @return WP_Block_Bindings_Source[] The array of registered sources. + */ + public function get_all_registered() + { + } + /** + * Retrieves a registered block bindings source. + * + * @since 6.5.0 + * + * @param string $source_name The name of the source. + * @return WP_Block_Bindings_Source|null The registered block bindings source, or `null` if it is not registered. + */ + public function get_registered(string $source_name) + { + } + /** + * Checks if a block bindings source is registered. + * + * @since 6.5.0 + * + * @param string|null $source_name The name of the source. + * @return bool `true` if the block bindings source is registered, `false` otherwise. + */ + public function is_registered($source_name) + { + } + /** + * Wakeup magic method. + * + * @since 6.5.0 + * @phpstan-return void + */ + public function __wakeup() + { + } + /** + * Utility method to retrieve the main instance of the class. + * + * The instance will be created if it does not exist yet. + * + * @since 6.5.0 + * + * @return WP_Block_Bindings_Registry The main instance. + */ + public static function get_instance() + { + } + } + /** + * Class representing block bindings source. + * + * This class is designed for internal use by the Block Bindings registry. + * + * @since 6.5.0 + * @access private + * + * @see WP_Block_Bindings_Registry + */ + final class WP_Block_Bindings_Source + { + /** + * The name of the source. + * + * @since 6.5.0 + * @var string + */ + public $name; + /** + * The label of the source. + * + * @since 6.5.0 + * @var string + */ + public $label; + /** + * The context added to the blocks needed by the source. + * + * @since 6.5.0 + * @var string[]|null + */ + public $uses_context = \null; + /** + * Constructor. + * + * Do not use this constructor directly. Instead, use the + * `WP_Block_Bindings_Registry::register` method or the `register_block_bindings_source` function. + * + * @since 6.5.0 + * + * @param string $name The name of the source. + * @param array $source_properties The properties of the source. + */ + public function __construct(string $name, array $source_properties) + { + } + /** + * Calls the callback function specified in the `$get_value_callback` property + * with the given arguments and returns the result. It can be modified with + * `block_bindings_source_value` filter. + * + * @since 6.5.0 + * @since 6.7.0 `block_bindings_source_value` filter was added. + * + * @param array $source_args Array containing source arguments used to look up the override value, i.e. {"key": "foo"}. + * @param WP_Block $block_instance The block instance. + * @param string $attribute_name The name of the target attribute. + * @return mixed The value of the source. + */ + public function get_value(array $source_args, $block_instance, string $attribute_name) + { + } + /** + * Wakeup magic method. + * + * @since 6.5.0 + */ + public function __wakeup() + { + } + } + /** + * Contains information about a block editor being rendered. + * + * @since 5.8.0 + */ + #[\AllowDynamicProperties] + final class WP_Block_Editor_Context + { + /** + * String that identifies the block editor being rendered. Can be one of: + * + * - `'core/edit-post'` - The post editor at `/wp-admin/edit.php`. + * - `'core/edit-widgets'` - The widgets editor at `/wp-admin/widgets.php`. + * - `'core/customize-widgets'` - The widgets editor at `/wp-admin/customize.php`. + * - `'core/edit-site'` - The site editor at `/wp-admin/site-editor.php`. + * + * Defaults to 'core/edit-post'. + * + * @since 6.0.0 + * + * @var string + */ + public $name = 'core/edit-post'; + /** + * The post being edited by the block editor. Optional. + * + * @since 5.8.0 + * + * @var WP_Post|null + */ + public $post = \null; + /** + * Constructor. + * + * Populates optional properties for a given block editor context. + * + * @since 5.8.0 + * + * @param array $settings The list of optional settings to expose in a given context. + */ + public function __construct(array $settings = array()) + { + } + } + /** + * Class representing a list of block instances. + * + * @since 5.5.0 + * @phpstan-implements ArrayAccess<int, \WP_Block> + */ + #[\AllowDynamicProperties] + class WP_Block_List implements \Iterator, \ArrayAccess, \Countable + { + /** + * Original array of parsed block data, or block instances. + * + * @since 5.5.0 + * @var array[]|WP_Block[] + */ + protected $blocks; + /** + * All available context of the current hierarchy. + * + * @since 5.5.0 + * @var array + */ + protected $available_context; + /** + * Block type registry to use in constructing block instances. + * + * @since 5.5.0 + * @var WP_Block_Type_Registry + */ + protected $registry; + /** + * Constructor. + * + * Populates object properties from the provided block instance argument. + * + * @since 5.5.0 + * + * @param array[]|WP_Block[] $blocks Array of parsed block data, or block instances. + * @param array $available_context Optional array of ancestry context values. + * @param WP_Block_Type_Registry $registry Optional block type registry. + */ + public function __construct($blocks, $available_context = array(), $registry = \null) + { + } + /** + * Returns true if a block exists by the specified block offset, or false + * otherwise. + * + * @since 5.5.0 + * + * @link https://www.php.net/manual/en/arrayaccess.offsetexists.php + * + * @param int $offset Offset of block to check for. + * @return bool Whether block exists. + * @phpstan-param int $offset + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + } + /** + * Returns the value by the specified block offset. + * + * @since 5.5.0 + * + * @link https://www.php.net/manual/en/arrayaccess.offsetget.php + * + * @param int $offset Offset of block value to retrieve. + * @return WP_Block|null Block value if exists, or null. + * @phpstan-param int $offset + * @phpstan-return \WP_Block|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + } + /** + * Assign a block value by the specified block offset. + * + * @since 5.5.0 + * + * @link https://www.php.net/manual/en/arrayaccess.offsetset.php + * + * @param int $offset Offset of block value to set. + * @param array|WP_Block $value Block value. + * @phpstan-param int|null $offset + * @phpstan-return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + } + /** + * Unset a block. + * + * @since 5.5.0 + * + * @link https://www.php.net/manual/en/arrayaccess.offsetunset.php + * + * @param int $offset Offset of block value to unset. + * @phpstan-param int $offset + * @phpstan-return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + } + /** + * Rewinds back to the first element of the Iterator. + * + * @since 5.5.0 + * + * @link https://www.php.net/manual/en/iterator.rewind.php + */ + #[\ReturnTypeWillChange] + public function rewind() + { + } + /** + * Returns the current element of the block list. + * + * @since 5.5.0 + * + * @link https://www.php.net/manual/en/iterator.current.php + * + * @return WP_Block|null Current element. + */ + #[\ReturnTypeWillChange] + public function current() + { + } + /** + * Returns the key of the current element of the block list. + * + * @since 5.5.0 + * + * @link https://www.php.net/manual/en/iterator.key.php + * + * @return int|null Key of the current element. + */ + #[\ReturnTypeWillChange] + public function key() + { + } + /** + * Moves the current position of the block list to the next element. + * + * @since 5.5.0 + * + * @link https://www.php.net/manual/en/iterator.next.php + */ + #[\ReturnTypeWillChange] + public function next() + { + } + /** + * Checks if current position is valid. + * + * @since 5.5.0 + * + * @link https://www.php.net/manual/en/iterator.valid.php + */ + #[\ReturnTypeWillChange] + public function valid() + { + } + /** + * Returns the count of blocks in the list. + * + * @since 5.5.0 + * + * @link https://www.php.net/manual/en/countable.count.php + * + * @return int Block count. + */ + #[\ReturnTypeWillChange] + public function count() + { + } + } + /** + * Class used for managing block metadata collections. + * + * The WP_Block_Metadata_Registry allows plugins to register metadata for large + * collections of blocks (e.g., 50-100+) using a single PHP file. This approach + * reduces the need to read and decode multiple `block.json` files, enhancing + * performance through opcode caching. + * + * @since 6.7.0 + */ + class WP_Block_Metadata_Registry + { + /** + * Registers a block metadata collection. + * + * This method allows registering a collection of block metadata from a single + * manifest file, improving performance for large sets of blocks. + * + * The manifest file should be a PHP file that returns an associative array, where + * the keys are the block identifiers (without their namespace) and the values are + * the corresponding block metadata arrays. The block identifiers must match the + * parent directory name for the respective `block.json` file. + * + * Example manifest file structure: + * ``` + * return array( + * 'example-block' => array( + * 'title' => 'Example Block', + * 'category' => 'widgets', + * 'icon' => 'smiley', + * // ... other block metadata + * ), + * 'another-block' => array( + * 'title' => 'Another Block', + * 'category' => 'formatting', + * 'icon' => 'star-filled', + * // ... other block metadata + * ), + * // ... more block metadata entries + * ); + * ``` + * + * @since 6.7.0 + * + * @param string $path The absolute base path for the collection ( e.g., WP_PLUGIN_DIR . '/my-plugin/blocks/' ). + * @param string $manifest The absolute path to the manifest file containing the metadata collection. + * @return bool True if the collection was registered successfully, false otherwise. + */ + public static function register_collection($path, $manifest) + { + } + /** + * Retrieves block metadata for a given block within a specific collection. + * + * This method uses the registered collections to efficiently lookup + * block metadata without reading individual `block.json` files. + * + * @since 6.7.0 + * + * @param string $file_or_folder The path to the file or folder containing the block. + * @return array|null The block metadata for the block, or null if not found. + */ + public static function get_metadata($file_or_folder) + { + } + /** + * Gets the list of absolute paths to all block metadata files that are part of the given collection. + * + * For instance, if a block metadata collection is registered with path `WP_PLUGIN_DIR . '/my-plugin/blocks/'`, + * and the manifest file includes metadata for two blocks `'block-a'` and `'block-b'`, the result of this method + * will be an array containing: + * * `WP_PLUGIN_DIR . '/my-plugin/blocks/block-a/block.json'` + * * `WP_PLUGIN_DIR . '/my-plugin/blocks/block-b/block.json'` + * + * @since 6.8.0 + * + * @param string $path The absolute base path for a previously registered collection. + * @return string[] List of block metadata file paths, or an empty array if the given `$path` is invalid. + */ + public static function get_collection_block_metadata_files($path) + { + } + /** + * Checks if metadata exists for a given block name in a specific collection. + * + * @since 6.7.0 + * + * @param string $file_or_folder The path to the file or folder containing the block metadata. + * @return bool True if metadata exists for the block, false otherwise. + */ + public static function has_metadata($file_or_folder) + { + } + } + /** + * Class WP_Block_Parser_Block + * + * Holds the block structure in memory + * + * @since 5.0.0 + */ + class WP_Block_Parser_Block + { + /** + * Name of block + * + * @example "core/paragraph" + * + * @since 5.0.0 + * @var string + */ + public $blockName; + /** + * Optional set of attributes from block comment delimiters + * + * @example null + * @example array( 'columns' => 3 ) + * + * @since 5.0.0 + * @var array|null + */ + public $attrs; + /** + * List of inner blocks (of this same class) + * + * @since 5.0.0 + * @var WP_Block_Parser_Block[] + */ + public $innerBlocks; + /** + * Resultant HTML from inside block comment delimiters + * after removing inner blocks + * + * @example "...Just <!-- wp:test /--> testing..." -> "Just testing..." + * + * @since 5.0.0 + * @var string + */ + public $innerHTML; + /** + * List of string fragments and null markers where inner blocks were found + * + * @example array( + * 'innerHTML' => 'BeforeInnerAfter', + * 'innerBlocks' => array( block, block ), + * 'innerContent' => array( 'Before', null, 'Inner', null, 'After' ), + * ) + * + * @since 5.0.0 + * @var array + */ + public $innerContent; + /** + * Constructor. + * + * Will populate object properties from the provided arguments. + * + * @since 5.0.0 + * + * @param string $name Name of block. + * @param array $attrs Optional set of attributes from block comment delimiters. + * @param array $inner_blocks List of inner blocks (of this same class). + * @param string $inner_html Resultant HTML from inside block comment delimiters after removing inner blocks. + * @param array $inner_content List of string fragments and null markers where inner blocks were found. + */ + public function __construct($name, $attrs, $inner_blocks, $inner_html, $inner_content) + { + } + } + /** + * Class WP_Block_Parser_Frame + * + * Holds partial blocks in memory while parsing + * + * @internal + * @since 5.0.0 + */ + class WP_Block_Parser_Frame + { + /** + * Full or partial block + * + * @since 5.0.0 + * @var WP_Block_Parser_Block + */ + public $block; + /** + * Byte offset into document for start of parse token + * + * @since 5.0.0 + * @var int + */ + public $token_start; + /** + * Byte length of entire parse token string + * + * @since 5.0.0 + * @var int + */ + public $token_length; + /** + * Byte offset into document for after parse token ends + * (used during reconstruction of stack into parse production) + * + * @since 5.0.0 + * @var int + */ + public $prev_offset; + /** + * Byte offset into document where leading HTML before token starts + * + * @since 5.0.0 + * @var int + */ + public $leading_html_start; + /** + * Constructor + * + * Will populate object properties from the provided arguments. + * + * @since 5.0.0 + * + * @param WP_Block_Parser_Block $block Full or partial block. + * @param int $token_start Byte offset into document for start of parse token. + * @param int $token_length Byte length of entire parse token string. + * @param int|null $prev_offset Optional. Byte offset into document for after parse token ends. Default null. + * @param int|null $leading_html_start Optional. Byte offset into document where leading HTML before token starts. + * Default null. + */ + public function __construct($block, $token_start, $token_length, $prev_offset = \null, $leading_html_start = \null) + { + } + } + /** + * Class WP_Block_Parser + * + * Parses a document and constructs a list of parsed block objects + * + * @since 5.0.0 + * @since 4.0.0 returns arrays not objects, all attributes are arrays + */ + class WP_Block_Parser + { + /** + * Input document being parsed + * + * @example "Pre-text\n<!-- wp:paragraph -->This is inside a block!<!-- /wp:paragraph -->" + * + * @since 5.0.0 + * @var string + */ + public $document; + /** + * Tracks parsing progress through document + * + * @since 5.0.0 + * @var int + */ + public $offset; + /** + * List of parsed blocks + * + * @since 5.0.0 + * @var array[] + */ + public $output; + /** + * Stack of partially-parsed structures in memory during parse + * + * @since 5.0.0 + * @var WP_Block_Parser_Frame[] + */ + public $stack; + /** + * Parses a document and returns a list of block structures + * + * When encountering an invalid parse will return a best-effort + * parse. In contrast to the specification parser this does not + * return an error on invalid inputs. + * + * @since 5.0.0 + * + * @param string $document Input document being parsed. + * @return array[] + */ + public function parse($document) + { + } + /** + * Processes the next token from the input document + * and returns whether to proceed eating more tokens + * + * This is the "next step" function that essentially + * takes a token as its input and decides what to do + * with that token before descending deeper into a + * nested block tree or continuing along the document + * or breaking out of a level of nesting. + * + * @internal + * @since 5.0.0 + * @return bool + */ + public function proceed() + { + } + /** + * Scans the document from where we last left off + * and finds the next valid token to parse if it exists + * + * Returns the type of the find: kind of find, block information, attributes + * + * @internal + * @since 5.0.0 + * @since 4.6.1 fixed a bug in attribute parsing which caused catastrophic backtracking on invalid block comments + * @return array + */ + public function next_token() + { + } + /** + * Returns a new block object for freeform HTML + * + * @internal + * @since 5.0.0 + * + * @param string $inner_html HTML content of block. + * @return WP_Block_Parser_Block freeform block object. + */ + public function freeform($inner_html) + { + } + /** + * Pushes a length of text from the input document + * to the output list as a freeform block. + * + * @internal + * @since 5.0.0 + * @param null $length how many bytes of document text to output. + * @phpstan-return void + */ + public function add_freeform($length = \null) + { + } + /** + * Given a block structure from memory pushes + * a new block to the output list. + * + * @internal + * @since 5.0.0 + * @param WP_Block_Parser_Block $block The block to add to the output. + * @param int $token_start Byte offset into the document where the first token for the block starts. + * @param int $token_length Byte length of entire block from start of opening token to end of closing token. + * @param int|null $last_offset Last byte offset into document if continuing form earlier output. + */ + public function add_inner_block(\WP_Block_Parser_Block $block, $token_start, $token_length, $last_offset = \null) + { + } + /** + * Pushes the top block from the parsing stack to the output list. + * + * @internal + * @since 5.0.0 + * @param int|null $end_offset byte offset into document for where we should stop sending text output as HTML. + */ + public function add_block_from_stack($end_offset = \null) + { + } + } + /** + * Class used for interacting with block pattern categories. + */ + #[\AllowDynamicProperties] + final class WP_Block_Pattern_Categories_Registry + { + /** + * Registers a pattern category. + * + * @since 5.5.0 + * + * @param string $category_name Pattern category name including namespace. + * @param array $category_properties { + * List of properties for the block pattern category. + * + * @type string $label Required. A human-readable label for the pattern category. + * } + * @return bool True if the pattern was registered with success and false otherwise. + * @phpstan-param array{ + * label?: string, + * } $category_properties + */ + public function register($category_name, $category_properties) + { + } + /** + * Unregisters a pattern category. + * + * @since 5.5.0 + * + * @param string $category_name Pattern category name including namespace. + * @return bool True if the pattern was unregistered with success and false otherwise. + */ + public function unregister($category_name) + { + } + /** + * Retrieves an array containing the properties of a registered pattern category. + * + * @since 5.5.0 + * + * @param string $category_name Pattern category name including namespace. + * @return array|null Registered pattern properties, or `null` if the pattern category is not registered. + */ + public function get_registered($category_name) + { + } + /** + * Retrieves all registered pattern categories. + * + * @since 5.5.0 + * + * @param bool $outside_init_only Return only categories registered outside the `init` action. + * @return array[] Array of arrays containing the registered pattern categories properties. + */ + public function get_all_registered($outside_init_only = \false) + { + } + /** + * Checks if a pattern category is registered. + * + * @since 5.5.0 + * + * @param string|null $category_name Pattern category name including namespace. + * @return bool True if the pattern category is registered, false otherwise. + */ + public function is_registered($category_name) + { + } + /** + * Utility method to retrieve the main instance of the class. + * + * The instance will be created if it does not exist yet. + * + * @since 5.5.0 + * + * @return WP_Block_Pattern_Categories_Registry The main instance. + */ + public static function get_instance() + { + } + } + /** + * Class used for interacting with block patterns. + * + * @since 5.5.0 + */ + #[\AllowDynamicProperties] + final class WP_Block_Patterns_Registry + { + /** + * Registers a block pattern. + * + * @since 5.5.0 + * @since 5.8.0 Added support for the `blockTypes` property. + * @since 6.1.0 Added support for the `postTypes` property. + * @since 6.2.0 Added support for the `templateTypes` property. + * @since 6.5.0 Added support for the `filePath` property. + * + * @param string $pattern_name Block pattern name including namespace. + * @param array $pattern_properties { + * List of properties for the block pattern. + * + * @type string $title Required. A human-readable title for the pattern. + * @type string $content Optional. Block HTML markup for the pattern. + * If not provided, the content will be retrieved from the `filePath` if set. + * If both `content` and `filePath` are not set, the pattern will not be registered. + * @type string $description Optional. Visually hidden text used to describe the pattern + * in the inserter. A description is optional, but is strongly + * encouraged when the title does not fully describe what the + * pattern does. The description will help users discover the + * pattern while searching. + * @type int $viewportWidth Optional. The intended width of the pattern to allow for a scaled + * preview within the pattern inserter. + * @type bool $inserter Optional. Determines whether the pattern is visible in inserter. + * To hide a pattern so that it can only be inserted programmatically, + * set this to false. Default true. + * @type string[] $categories Optional. A list of registered pattern categories used to group + * block patterns. Block patterns can be shown on multiple categories. + * A category must be registered separately in order to be used here. + * @type string[] $keywords Optional. A list of aliases or keywords that help users discover + * the pattern while searching. + * @type string[] $blockTypes Optional. A list of block names including namespace that could use + * the block pattern in certain contexts (placeholder, transforms). + * The block pattern is available in the block editor inserter + * regardless of this list of block names. + * Certain blocks support further specificity besides the block name + * (e.g. for `core/template-part` you can specify areas + * like `core/template-part/header` or `core/template-part/footer`). + * @type string[] $postTypes Optional. An array of post types that the pattern is restricted + * to be used with. The pattern will only be available when editing one + * of the post types passed on the array. For all the other post types + * not part of the array the pattern is not available at all. + * @type string[] $templateTypes Optional. An array of template types where the pattern fits. + * @type string $filePath Optional. The full path to the file containing the block pattern content. + * } + * @return bool True if the pattern was registered with success and false otherwise. + * @phpstan-param array{ + * title?: string, + * content?: string, + * description?: string, + * viewportWidth?: int, + * inserter?: bool, + * categories?: string[], + * keywords?: string[], + * blockTypes?: string[], + * postTypes?: string[], + * templateTypes?: string[], + * filePath?: string, + * } $pattern_properties + */ + public function register($pattern_name, $pattern_properties) + { + } + /** + * Unregisters a block pattern. + * + * @since 5.5.0 + * + * @param string $pattern_name Block pattern name including namespace. + * @return bool True if the pattern was unregistered with success and false otherwise. + */ + public function unregister($pattern_name) + { + } + /** + * Retrieves an array containing the properties of a registered block pattern. + * + * @since 5.5.0 + * + * @param string $pattern_name Block pattern name including namespace. + * @return array|null Registered pattern properties or `null` if the pattern is not registered. + */ + public function get_registered($pattern_name) + { + } + /** + * Retrieves all registered block patterns. + * + * @since 5.5.0 + * + * @param bool $outside_init_only Return only patterns registered outside the `init` action. + * @return array[] Array of arrays containing the registered block patterns properties, + * and per style. + */ + public function get_all_registered($outside_init_only = \false) + { + } + /** + * Checks if a block pattern is registered. + * + * @since 5.5.0 + * + * @param string|null $pattern_name Block pattern name including namespace. + * @return bool True if the pattern is registered, false otherwise. + */ + public function is_registered($pattern_name) + { + } + public function __wakeup() + { + } + /** + * Utility method to retrieve the main instance of the class. + * + * The instance will be created if it does not exist yet. + * + * @since 5.5.0 + * + * @return WP_Block_Patterns_Registry The main instance. + */ + public static function get_instance() + { + } + } + /** + * Class for efficiently scanning through block structure in a document + * without parsing the entire block tree and JSON attributes into memory. + * + * ## Overview + * + * This class is designed to help analyze and modify block structure in a + * streaming fashion and to bridge the gap between parsed block trees and + * the text representing them. + * + * Use-cases for this class include but are not limited to: + * + * - Counting block types in a document. + * - Queuing stylesheets based on the presence of various block types. + * - Modifying blocks of a given type, i.e. migrations, updates, and styling. + * - Searching for content of specific kinds, e.g. checking for blocks + * with certain theme support attributes, or block bindings. + * - Adding CSS class names to the element wrapping a block’s inner blocks. + * + * > *Note!* If a fully-parsed block tree of a document is necessary, including + * > all the parsed JSON attributes, nested blocks, and HTML, consider + * > using {@see \parse_blocks()} instead which will parse the document + * > in one swift pass. + * + * For typical usage, jump first to the methods {@see self::next_block()}, + * {@see self::next_delimiter()}, or {@see self::next_token()}. + * + * ### Values + * + * As a lower-level interface than {@see parse_blocks()} this class follows + * different performance-focused values: + * + * - Minimize allocations so that documents of any size may be processed + * on a fixed or marginal amount of memory. + * - Make hidden costs explicit so that calling code only has to pay the + * performance penalty for features it needs. + * - Operate with a streaming and re-entrant design to make it possible + * to operate on chunks of a document and to resume after pausing. + * + * This means that some operations might appear more cumbersome than one + * might expect. This design tradeoff opens up opportunity to wrap this in + * a convenience class to add higher-level functionality. + * + * ## Concepts + * + * All text documents can be considered a block document containing a combination + * of “freeform HTML” and explicit block structure. Block structure forms through + * special HTML comments called _delimiters_ which include a block type and, + * optionally, block attributes encoded as a JSON object payload. + * + * This processor is designed to scan through a block document from delimiter to + * delimiter, tracking how the delimiters impact the structure of the document. + * Spans of HTML appear between delimiters. If these spans exist at the top level + * of the document, meaning there is no containing block around them, they are + * considered freeform HTML content. If, however, they appear _inside_ block + * structure they are interpreted as `innerHTML` for the containing block. + * + * ### Tokens and scanning + * + * As the processor scans through a document is reports information about the token + * on which is pauses. Tokens represent spans of text in the input comprising block + * delimiters and spans of HTML. + * + * - {@see self::next_token()} visits every contiguous subspan of text in the + * input document. This includes all explicit block comment delimiters and spans + * of HTML content (whether freeform or inner HTML). + * - {@see self::next_delimiter()} visits every explicit block comment delimiter + * unless passed a block type which covers freeform HTML content. In these cases + * it will stop at top-level spans of HTML and report a `null` block type. + * - {@see self::next_block()} visits every block delimiter which _opens_ a block. + * This includes opening block delimiters as well as void block delimiters. With + * the same exception as above for freeform HTML block types, this will visit + * top-level spans of HTML content. + * + * When matched on a particular token, the following methods provide structural + * and textual information about it: + * + * - {@see self::get_delimiter_type()} reports whether the delimiter is an opener, + * a closer, or if it represents a whole void block. + * - {@see self::get_block_type()} reports the fully-qualified block type which + * the delimiter represents. + * - {@see self::get_printable_block_type()} reports the fully-qualified block type, + * but returns `core/freeform` instead of `null` for top-level freeform HTML content. + * - {@see self::is_block_type()} indicates if the delimiter represents a block of + * the given block type, or wildcard or pseudo-block type described below. + * - {@see self::opens_block()} indicates if the delimiter opens a block of one + * of the provided block types. Opening, void, and top-level freeform HTML content + * all open blocks. + * - {@see static::get_attributes()} is currently reserved for a future streaming + * JSON parser class. + * - {@see self::allocate_and_return_parsed_attributes()} extracts the JSON attributes + * for delimiters which open blocks and return the fully-parsed attributes as an + * associative array. {@see static::get_last_json_error()} for when this fails. + * - {@see self::is_html()} indicates if the token is a span of HTML which might + * be top-level freeform content or a block’s inner HTML. + * - {@see self::get_html_content()} returns the span of HTML. + * - {@see self::get_span()} for the byte offset and length into the input document + * representing the token. + * + * It’s possible for the processor to fail to scan forward if the input document ends + * in a proper prefix of an explicit block comment delimiter. For example, if the input + * ends in `<!-- wp:` then it _might_ be the start of another delimiter. The parser + * cannot know, however, and therefore refuses to proceed. {@see static::get_last_error()} + * to distinguish between a failure to find the next token and an incomplete input. + * + * ### Block types + * + * A block’s “type” comprises an optional _namespace_ and _name_. If the namespace + * isn’t provided it will be interpreted as the implicit `core` namespace. For example, + * the type `gallery` is the name of the block in the `core` namespace, but the type + * `abc/gallery` is the _fully-qualified_ block type for the block whose name is still + * `gallery`, but in the `abc` namespace. + * + * Methods on this class are aware of this block naming semantic and anywhere a block + * type is an argument to a method it will be normalized to account for implicit namespaces. + * Passing `paragraph` is the same as passing `core/paragraph`. On the contrary, anywhere + * this class returns a block type, it will return the fully-qualified and normalized form. + * For example, for the `<!-- wp:group -->` delimiter it will return `core/group` as the + * block type. + * + * There are two special block types that change the behavior of the processor: + * + * - The wildcard `*` represents _any block_. In addition to matching all block types, + * it also represents top-level freeform HTML whose block type is reported as `null`. + * + * - The `core/freeform` block type is a pseudo-block type which explicitly matches + * top-level freeform HTML. + * + * These special block types can be passed into any method which searches for blocks. + * + * There is one additional special block type which may be returned from + * {@see self::get_printable_block_type()}. This is the `#innerHTML` type, which + * indicates that the HTML span on which the processor is paused is inner HTML for + * a containing block. + * + * ### Spans of HTML + * + * Non-block content plays a complicated role in processing block documents. This + * processor exposes tools to help work with these spans of HTML. + * + * - {@see self::is_html()} indicates if the processor is paused at a span of + * HTML but does not differentiate between top-level freeform content and inner HTML. + * - {@see self::is_non_whitespace_html()} indicates not only if the processor + * is paused at a span of HTML, but also whether that span incorporates more than + * whitespace characters. Because block serialization often inserts newlines between + * block comment delimiters, this is useful for distinguishing “real” freeform + * content from purely aesthetic syntax. + * - {@see self::is_block_type()} matches top-level freeform HTML content when + * provided one of the special block types described above. + * + * ### Block structure + * + * As the processor traverses block delimiters it maintains a stack of which blocks are + * open at the given place in the document where it’s paused. This stack represents the + * block structure of a document and is used to determine where blocks end, which blocks + * represent inner blocks, whether a span of HTML is top-level freeform content, and + * more. Investigate the stack with {@see self::get_breadcrumbs()}, which returns an + * array of block types starting at the outermost-open block and descending to the + * currently-visited block. + * + * Unlike {@parse_blocks()}, spans of HTML appear in this structure as the special + * reported block type `#html`. Such a span represents inner HTML for a block if the + * depth reported by {@see self::get_depth()} is greater than one. + * + * It will generally not be necessary to inspect the stack of open blocks, though + * depth may be important for finding where blocks end. When visiting a block opener, + * the depth will have been increased before pausing; in contrast the depth is + * decremented before visiting a closer. This makes the following an easy way to + * determine if a block is still open. + * + * Example: + * + * $depth = $processor->get_depth(); + * while ( $processor->next_token() && $processor->get_depth() > $depth ) { + * continue + * } + * // Processor is now paused at the token immediately following the closed block. + * + * #### Extracting blocks + * + * A unique feature of this processor is the ability to return the same output as + * {@see \parse_blocks()} would produce, but for a subset of the input document. + * For example, it’s possible to extract an image block, manipulate that parsed + * block, and re-serialize it into the original document. It’s possible to do so + * while skipping over the parse of the rest of the document. + * + * {@see self::extract_full_block_and_advance()} will scan forward from the current block opener + * and build the parsed block structure until the current block is closed. It will + * include all inner HTML and inner blocks, and parse all of the inner blocks. It + * can be used to extract a block at any depth in the document, helpful for operating + * on blocks within nested structure. + * + * Example: + * + * if ( ! $processor->next_block( 'gallery' ) ) { + * return $post_content; + * } + * + * $gallery_at = $processor->get_span()->start; + * $gallery_block = $processor->extract_full_block_and_advance(); + * $after_gallery = $processor->get_span()->start; + * return ( + * substr( $post_content, 0, $gallery_at ) . + * serialize_block( modify_gallery( $gallery_block ) . + * substr( $post_content, $after_gallery ) + * ); + * + * #### Handling of malformed structure + * + * There are situations where closing block delimiters appear for which no open block + * exists, or where a document ends before a block is closed, or where a closing block + * delimiter appears but references a different block type than the most-recently + * opened block does. In all of these cases, the stack of open blocks should mirror + * the behavior in {@see \parse_blocks()}. + * + * Unlike {@see \parse_blocks()}, however, this processor can still operate on the + * invalid block delimiters. It provides a few functions which can be used for building + * custom and non-spec-compliant error handling. + * + * - {@see self::has_closing_flag()} indicates if the block delimiter contains the + * closing flag at the end. Some invalid block delimiters might contain both the + * void and closing flag, in which case {@see self::get_delimiter_type()} will + * report that it’s a void block. + * - {@see static::get_last_error()} indicates if the processor reached an invalid + * block closing. Depending on the context, {@see \parse_blocks()} might instead + * ignore the token or treat it as freeform HTML content. + * + * ## Static helpers + * + * This class provides helpers for performing semantic block-related operations. + * + * - {@see self::normalize_block_type()} takes a block type with or without the + * implicit `core` namespace and returns a fully-qualified block type. + * - {@see self::are_equal_block_types()} indicates if two spans across one or + * more input texts represent the same fully-qualified block type. + * + * ## Subclassing + * + * This processor is designed to accurately parse a block document. Therefore, many + * of its methods are not meant for subclassing. However, overall this class supports + * building higher-level convenience classes which may choose to subclass it. For those + * classes, avoid re-implementing methods except for the list below. Instead, create + * new names representing the higher-level concepts being introduced. For example, instead + * of creating a new method named `next_block()` which only advances to blocks of a given + * kind, consider creating a new method named something like `next_layout_block()` which + * won’t interfere with the base class method. + * + * - {@see static::get_last_error()} may be reimplemented to report new errors in the subclass + * which aren’t intrinsic to block parsing. + * - {@see static::get_attributes()} may be reimplemented to provide a streaming interface + * to reading and modifying a block’s JSON attributes. It should be fast and memory efficient. + * - {@see static::get_last_json_error()} may be reimplemented to report new errors introduced + * with a reimplementation of {@see static::get_attributes()}. + * + * @since 6.9.0 + */ + class WP_Block_Processor + { + /** + * Source text provided to processor. + * + * @since 6.9.0 + * + * @var string + */ + protected $source_text; + /** + * Internal parser state, differentiating whether the instance is currently matched, + * on an implicit freeform node, in error, or ready to begin parsing. + * + * @see self::READY + * @see self::MATCHED + * @see self::HTML_SPAN + * @see self::INCOMPLETE_INPUT + * @see self::COMPLETE + * + * @since 6.9.0 + * + * @var string + */ + protected $state = self::READY; + /** + * Creates a new block processor. + * + * Example: + * + * $processor = new WP_Block_Processor( $post_content ); + * if ( $processor->next_block( 'core/image' ) ) { + * echo "Found an image!\n"; + * } + * + * @see self::next_block() to advance to the start of the next block (skips closers). + * @see self::next_delimiter() to advance to the next explicit block delimiter. + * @see self::next_token() to advance to the next block delimiter or HTML span. + * + * @since 6.9.0 + * + * @param string $source_text Input document potentially containing block content. + */ + public function __construct(string $source_text) + { + } + /** + * Advance to the next block delimiter which opens a block, indicating if one was found. + * + * Delimiters which open blocks include opening and void block delimiters. To visit + * freeform HTML content, pass the wildcard “*” as the block type. + * + * Use this function to walk through the blocks in a document, pausing where they open. + * + * Example blocks: + * + * // The first delimiter opens the paragraph block. + * <⃨!⃨-⃨-⃨ ⃨w⃨p⃨:⃨p⃨a⃨r⃨a⃨g⃨r⃨a⃨p⃨h⃨ ⃨-⃨-⃨>⃨<p>Content</p><!-- /wp:paragraph--> + * + * // The void block is the first opener in this sequence of closers. + * <!-- /wp:group --><⃨!⃨-⃨-⃨ ⃨w⃨p⃨:⃨s⃨p⃨a⃨c⃨e⃨r⃨ ⃨{⃨"⃨h⃨e⃨i⃨g⃨h⃨t⃨"⃨:⃨"⃨2⃨0⃨0⃨p⃨x⃨"⃨}⃨ ⃨/⃨-⃨-⃨>⃨<!-- /wp:group --> + * + * // If, however, `*` is provided as the block type, freeform content is matched. + * <⃨h⃨2⃨>⃨M⃨y⃨ ⃨s⃨y⃨n⃨o⃨p⃨s⃨i⃨s⃨<⃨/⃨h⃨2⃨>⃨\⃨n⃨<!-- wp:my/table-of-contents /--> + * + * // Inner HTML is never freeform content, and will not be matched even with the wildcard. + * <!-- /wp:list-item --></ul><!-- /wp:list --><⃨!⃨-⃨-⃨ ⃨w⃨p⃨:⃨p⃨a⃨r⃨a⃨g⃨r⃨a⃨p⃨h⃨ ⃨-⃨>⃨<p> + * + * Example: + * + * // Find all textual ranges of image block opening delimiters. + * $images = array(); + * $processor = new WP_Block_Processor( $html ); + * while ( $processor->next_block( 'core/image' ) ) { + * $images[] = $processor->get_span(); + * } + * + * In some cases it may be useful to conditionally visit the implicit freeform + * blocks, such as when determining if a post contains freeform content that + * isn’t purely whitespace. + * + * Example: + * + * $seen_block_types = []; + * $block_type = '*'; + * $processor = new WP_Block_Processor( $html ); + * while ( $processor->next_block( $block_type ) { + * // Stop wasting time visiting freeform blocks after one has been found. + * if ( + * '*' === $block_type && + * null === $processor->get_block_type() && + * $processor->is_non_whitespace_html() + * ) { + * $block_type = null; + * $seen_block_types['core/freeform'] = true; + * continue; + * } + * + * $seen_block_types[ $processor->get_block_type() ] = true; + * } + * + * @since 6.9.0 + * + * @see self::next_delimiter() to advance to the next explicit block delimiter. + * @see self::next_token() to advance to the next block delimiter or HTML span. + * + * @param string|null $block_type Optional. If provided, advance until a block of this type is found. + * Default is to stop at any block regardless of its type. + * @return bool Whether an opening delimiter for a block was found. + */ + public function next_block(?string $block_type = \null): bool + { + } + /** + * Advance to the next block delimiter in a document, indicating if one was found. + * + * Delimiters may include invalid JSON. This parser does not attempt to parse the + * JSON attributes until requested; when invalid, the attributes will be null. This + * matches the behavior of {@see \parse_blocks()}. To visit freeform HTML content, + * pass the wildcard “*” as the block type. + * + * Use this function to walk through the block delimiters in a document. + * + * Example delimiters: + * + * <!-- wp:paragraph {"dropCap": true} --> + * <!-- wp:separator /--> + * <!-- /wp:paragraph --> + * + * // If the wildcard `*` is provided as the block type, freeform content is matched. + * <⃨h⃨2⃨>⃨M⃨y⃨ ⃨s⃨y⃨n⃨o⃨p⃨s⃨i⃨s⃨<⃨/⃨h⃨2⃨>⃨\⃨n⃨<!-- wp:my/table-of-contents /--> + * + * // Inner HTML is never freeform content, and will not be matched even with the wildcard. + * ...</ul><⃨!⃨-⃨-⃨ ⃨/⃨w⃨p⃨:⃨l⃨i⃨s⃨t⃨ ⃨-⃨-⃨>⃨<!-- wp:paragraph --><p> + * + * Example: + * + * $html = '<!-- wp:void /-->\n<!-- wp:void /-->'; + * $processor = new WP_Block_Processor( $html ); + * while ( $processor->next_delimiter() { + * // Runs twice, seeing both void blocks of type “core/void.” + * } + * + * $processor = new WP_Block_Processor( $html ); + * while ( $processor->next_delimiter( '*' ) ) { + * // Runs thrice, seeing the void block, the newline span, and the void block. + * } + * + * @since 6.9.0 + * + * @param string|null $block_name Optional. Keep searching until a block of this name is found. + * Defaults to visit every block regardless of type. + * @return bool Whether a block delimiter was matched. + */ + public function next_delimiter(?string $block_name = \null): bool + { + } + /** + * Advance to the next block delimiter or HTML span in a document, indicating if one was found. + * + * This function steps through every syntactic chunk in a document. This includes explicit + * block comment delimiters, freeform non-block content, and inner HTML segments. + * + * Example tokens: + * + * <!-- wp:paragraph {"dropCap": true} --> + * <!-- wp:separator /--> + * <!-- /wp:paragraph --> + * <p>Normal HTML content</p> + * Plaintext content too! + * + * Example: + * + * // Find span containing wrapping HTML element surrounding inner blocks. + * $processor = new WP_Block_Processor( $html ); + * if ( ! $processor->next_block( 'gallery' ) ) { + * return null; + * } + * + * $containing_span = null; + * while ( $processor->next_token() && $processor->is_html() ) { + * $containing_span = $processor->get_span(); + * } + * + * This method will visit all HTML spans including those forming freeform non-block + * content as well as those which are part of a block’s inner HTML. + * + * @since 6.9.0 + * + * @return bool Whether a token was matched or the end of the document was reached without finding any. + */ + public function next_token(): bool + { + } + /** + * Returns an array containing the names of the currently-open blocks, in order + * from outermost to innermost, with HTML spans indicated as “#html”. + * + * Example: + * + * // Freeform HTML content is an HTML span. + * $processor = new WP_Block_Processor( 'Just text' ); + * $processor->next_token(); + * array( '#text' ) === $processor->get_breadcrumbs(); + * + * $processor = new WP_Block_Processor( '<!-- wp:a --><!-- wp:b --><!-- wp:c /--><!-- /wp:b --><!-- /wp:a -->' ); + * $processor->next_token(); + * array( 'core/a' ) === $processor->get_breadcrumbs(); + * $processor->next_token(); + * array( 'core/a', 'core/b' ) === $processor->get_breadcrumbs(); + * $processor->next_token(); + * // Void blocks are only open while visiting them. + * array( 'core/a', 'core/b', 'core/c' ) === $processor->get_breadcrumbs(); + * $processor->next_token(); + * // Blocks are closed before visiting their closing delimiter. + * array( 'core/a' ) === $processor->get_breadcrumbs(); + * $processor->next_token(); + * array() === $processor->get_breadcrumbs(); + * + * // Inner HTML is also an HTML span. + * $processor = new WP_Block_Processor( '<!-- wp:a -->Inner HTML<!-- /wp:a -->' ); + * $processor->next_token(); + * $processor->next_token(); + * array( 'core/a', '#html' ) === $processor->get_breadcrumbs(); + * + * @since 6.9.0 + * + * @return string[] + */ + public function get_breadcrumbs(): array + { + } + /** + * Returns the depth of the open blocks where the processor is currently matched. + * + * Depth increases before visiting openers and void blocks and decreases before + * visiting closers. HTML spans behave like void blocks. + * + * @since 6.9.0 + * + * @return int + */ + public function get_depth(): int + { + } + /** + * Extracts a block object, and all inner content, starting at a matched opening + * block delimiter, or at a matched top-level HTML span as freeform HTML content. + * + * Use this function to extract some blocks within a document, but not all. For example, + * one might want to find image galleries, parse them, modify them, and then reserialize + * them in place. + * + * Once this function returns, the parser will be matched on token following the close + * of the given block. + * + * The return type of this method is compatible with the return of {@see \parse_blocks()}. + * + * Example: + * + * $processor = new WP_Block_Processor( $post_content ); + * if ( ! $processor->next_block( 'gallery' ) ) { + * return $post_content; + * } + * + * $gallery_at = $processor->get_span()->start; + * $gallery = $processor->extract_full_block_and_advance(); + * $ends_before = $processor->get_span(); + * $ends_before = $ends_before->start ?? strlen( $post_content ); + * + * $new_gallery = update_gallery( $gallery ); + * $new_gallery = serialize_block( $new_gallery ); + * + * return ( + * substr( $post_content, 0, $gallery_at ) . + * $new_gallery . + * substr( $post_content, $ends_before ) + * ); + * + * @since 6.9.0 + * + * @return array[]|null { + * Array of block structures. + * + * @type array ...$0 { + * An associative array of a single parsed block object. See WP_Block_Parser_Block. + * + * @type string|null $blockName Name of block. + * @type array $attrs Attributes from block comment delimiters. + * @type array[] $innerBlocks List of inner blocks. An array of arrays that + * have the same structure as this one. + * @type string $innerHTML HTML from inside block comment delimiters. + * @type array $innerContent List of string fragments and null markers where + * inner blocks were found. + * } + * } + * @phpstan-return null|array<int|string, array{ + * blockName: string|null, + * attrs: array, + * innerBlocks: array[], + * innerHTML: string, + * innerContent: array, + * }> + */ + public function extract_full_block_and_advance(): ?array + { + } + /** + * Indicates if the last attempt to parse a block comment delimiter + * failed, if set, otherwise `null` if the last attempt succeeded. + * + * @since 6.9.0 + * + * @return string|null Error from last attempt at parsing next block delimiter, + * or `null` if last attempt succeeded. + */ + public function get_last_error(): ?string + { + } + /** + * Indicates if the last attempt to parse a block’s JSON attributes failed. + * + * @see \json_last_error() + * + * @since 6.9.0 + * + * @return int JSON_ERROR_ code from last attempt to parse block JSON attributes. + */ + public function get_last_json_error(): int + { + } + /** + * Returns the type of the block comment delimiter. + * + * One of: + * + * - {@see self::OPENER} + * - {@see self::CLOSER} + * - {@see self::VOID} + * - `null` + * + * @since 6.9.0 + * + * @return string|null type of the block comment delimiter, if currently matched. + */ + public function get_delimiter_type(): ?string + { + } + /** + * Returns whether the delimiter contains the closing flag. + * + * This should be avoided except in cases of custom error-handling + * with block closers containing the void flag. For normative use, + * {@see self::get_delimiter_type()}. + * + * @since 6.9.0 + * + * @return bool Whether the currently-matched block delimiter contains the closing flag. + */ + public function has_closing_flag(): bool + { + } + /** + * Indicates if the block delimiter represents a block of the given type. + * + * Since the “core” namespace may be implicit, it’s allowable to pass + * either the fully-qualified block type with namespace and block name + * as well as the shorthand version only containing the block name, if + * the desired block is in the “core” namespace. + * + * Since freeform HTML content is non-block content, it has no block type. + * Passing the wildcard “*” will, however, return true for all block types, + * even the implicit freeform content, though not for spans of inner HTML. + * + * Example: + * + * $is_core_paragraph = $processor->is_block_type( 'paragraph' ); + * $is_core_paragraph = $processor->is_block_type( 'core/paragraph' ); + * $is_formula = $processor->is_block_type( 'math-block/formula' ); + * + * @param string $block_type Block type name for the desired block. + * E.g. "paragraph", "core/paragraph", "math-blocks/formula". + * @return bool Whether this delimiter represents a block of the given type. + */ + public function is_block_type(string $block_type): bool + { + } + /** + * Given two spans of text, indicate if they represent identical block types. + * + * This function normalizes block types to account for implicit core namespacing. + * + * Note! This function only returns valid results when the complete block types are + * represented in the span offsets and lengths. This means that the full optional + * namespace and block name must be represented in the input arguments. + * + * Example: + * + * 0 5 10 15 20 25 30 35 40 + * $text = '<!-- wp:block --><!-- /wp:core/block -->'; + * + * true === WP_Block_Processor::are_equal_block_types( $text, 9, 5, $text, 27, 10 ); + * false === WP_Block_Processor::are_equal_block_types( $text, 9, 5, 'my/block', 0, 8 ); + * + * @since 6.9.0 + * + * @param string $a_text Text in which first block type appears. + * @param int $a_at Byte offset into text in which first block type starts. + * @param int $a_length Byte length of first block type. + * @param string $b_text Text in which second block type appears (may be the same as the first text). + * @param int $b_at Byte offset into text in which second block type starts. + * @param int $b_length Byte length of second block type. + * @return bool Whether the spans of text represent identical block types, normalized for namespacing. + */ + public static function are_equal_block_types(string $a_text, int $a_at, int $a_length, string $b_text, int $b_at, int $b_length): bool + { + } + /** + * Indicates if the matched delimiter is an opening or void delimiter of the given type, + * if a type is provided, otherwise if it opens any block or implicit freeform HTML content. + * + * This is a helper method to ease handling of code inspecting where blocks start, and for + * checking if the blocks are of a given type. The function is variadic to allow for + * checking if the delimiter opens one of many possible block types. + * + * To advance to the start of a block {@see self::next_block()}. + * + * Example: + * + * $processor = new WP_Block_Processor( $html ); + * while ( $processor->next_delimiter() ) { + * if ( $processor->opens_block( 'core/code', 'syntaxhighlighter/code' ) ) { + * echo "Found code!"; + * continue; + * } + * + * if ( $processor->opens_block( 'core/image' ) ) { + * echo "Found an image!"; + * continue; + * } + * + * if ( $processor->opens_block() ) { + * echo "Found a new block!"; + * } + * } + * + * @since 6.9.0 + * + * @see self::is_block_type() + * + * @param string[] $block_type Optional. Is the matched block type one of these? + * If none are provided, will not test block type. + * @return bool Whether the matched block delimiter opens a block, and whether it + * opens a block of one of the given block types, if provided. + */ + public function opens_block(string ...$block_type): bool + { + } + /** + * Indicates if the matched delimiter is an HTML span. + * + * @since 6.9.0 + * + * @see self::is_non_whitespace_html() + * + * @return bool Whether the processor is matched on an HTML span. + */ + public function is_html(): bool + { + } + /** + * Indicates if the matched delimiter is an HTML span and comprises more + * than whitespace characters, i.e. contains real content. + * + * Many block serializers introduce newlines between block delimiters, + * so the presence of top-level non-block content does not imply that + * there are “real” freeform HTML blocks. Checking if there is content + * beyond whitespace is a more certain check, such as for determining + * whether to load CSS for the freeform or fallback block type. + * + * @since 6.9.0 + * + * @see self::is_html() + * + * @return bool Whether the currently-matched delimiter is an HTML + * span containing non-whitespace text. + */ + public function is_non_whitespace_html(): bool + { + } + /** + * Returns the string content of a matched HTML span, or `null` otherwise. + * + * @since 6.9.0 + * + * @return string|null Raw HTML content, or `null` if not currently matched on HTML. + */ + public function get_html_content(): ?string + { + } + /** + * Allocates a substring for the block type and returns the fully-qualified + * name, including the namespace, if matched on a delimiter, otherwise `null`. + * + * This function is like {@see self::get_printable_block_type()} but when + * paused on a freeform HTML block, will return `null` instead of “core/freeform”. + * The `null` behavior matches what {@see \parse_blocks()} returns but may not + * be as useful as having a string value. + * + * This function allocates a substring for the given block type. This + * allocation will be small and likely fine in most cases, but it's + * preferable to call {@see self::is_block_type()} if only needing + * to know whether the delimiter is for a given block type, as that + * function is more efficient for this purpose and avoids the allocation. + * + * Example: + * + * // Avoid. + * 'core/paragraph' = $processor->get_block_type(); + * + * // Prefer. + * $processor->is_block_type( 'core/paragraph' ); + * $processor->is_block_type( 'paragraph' ); + * $processor->is_block_type( 'core/freeform' ); + * + * // Freeform HTML content has no block type. + * $processor = new WP_Block_Processor( 'non-block content' ); + * $processor->next_token(); + * null === $processor->get_block_type(); + * + * @since 6.9.0 + * + * @see self::are_equal_block_types() + * + * @return string|null Fully-qualified block namespace and type, e.g. "core/paragraph", + * if matched on an explicit delimiter, otherwise `null`. + */ + public function get_block_type(): ?string + { + } + /** + * Allocates a printable substring for the block type and returns the fully-qualified + * name, including the namespace, if matched on a delimiter or freeform block, otherwise `null`. + * + * This function is like {@see self::get_block_type()} but when paused on a freeform + * HTML block, will return “core/freeform” instead of `null`. The `null` behavior matches + * what {@see \parse_blocks()} returns but may not be as useful as having a string value. + * + * This function allocates a substring for the given block type. This + * allocation will be small and likely fine in most cases, but it's + * preferable to call {@see self::is_block_type()} if only needing + * to know whether the delimiter is for a given block type, as that + * function is more efficient for this purpose and avoids the allocation. + * + * Example: + * + * // Avoid. + * 'core/paragraph' = $processor->get_printable_block_type(); + * + * // Prefer. + * $processor->is_block_type( 'core/paragraph' ); + * $processor->is_block_type( 'paragraph' ); + * $processor->is_block_type( 'core/freeform' ); + * + * // Freeform HTML content is given an implicit type. + * $processor = new WP_Block_Processor( 'non-block content' ); + * $processor->next_token(); + * 'core/freeform' === $processor->get_printable_block_type(); + * + * @since 6.9.0 + * + * @see self::are_equal_block_types() + * + * @return string|null Fully-qualified block namespace and type, e.g. "core/paragraph", + * if matched on an explicit delimiter or freeform block, otherwise `null`. + */ + public function get_printable_block_type(): ?string + { + } + /** + * Normalizes a block name to ensure that missing implicit “core” namespaces are present. + * + * Example: + * + * 'core/paragraph' === WP_Block_Processor::normalize_block_byte( 'paragraph' ); + * 'core/paragraph' === WP_Block_Processor::normalize_block_byte( 'core/paragraph' ); + * 'my/paragraph' === WP_Block_Processor::normalize_block_byte( 'my/paragraph' ); + * + * @since 6.9.0 + * + * @param string $block_type Valid block name, potentially without a namespace. + * @return string Fully-qualified block type including namespace. + */ + public static function normalize_block_type(string $block_type): string + { + } + /** + * Returns a lazy wrapper around the block attributes, which can be used + * for efficiently interacting with the JSON attributes. + * + * This stub hints that there should be a lazy interface for parsing + * block attributes but doesn’t define it. It serves both as a placeholder + * for one to come as well as a guard against implementing an eager + * function in its place. + * + * @throws Exception This function is a stub for subclasses to implement + * when providing streaming attribute parsing. + * + * @since 6.9.0 + * + * @see self::allocate_and_return_parsed_attributes() + * + * @return never + */ + public function get_attributes() + { + } + /** + * Attempts to parse and return the entire JSON attributes from the delimiter, + * allocating memory and processing the JSON span in the process. + * + * This does not return any parsed attributes for a closing block delimiter + * even if there is a span of JSON content; this JSON is a parsing error. + * + * Consider calling {@see static::get_attributes()} instead if it's not + * necessary to read all the attributes at the same time, as that provides + * a more efficient mechanism for typical use cases. + * + * Since the JSON span inside the comment delimiter may not be valid JSON, + * this function will return `null` if it cannot parse the span and set the + * {@see static::get_last_json_error()} to the appropriate JSON_ERROR_ constant. + * + * If the delimiter contains no JSON span, it will also return `null`, + * but the last error will be set to {@see \JSON_ERROR_NONE}. + * + * Example: + * + * $processor = new WP_Block_Processor( '<!-- wp:image {"url": "https://wordpress.org/favicon.ico"} -->' ); + * $processor->next_delimiter(); + * $memory_hungry_and_slow_attributes = $processor->allocate_and_return_parsed_attributes(); + * $memory_hungry_and_slow_attributes === array( 'url' => 'https://wordpress.org/favicon.ico' ); + * + * $processor = new WP_Block_Processor( '<!-- /wp:image {"url": "https://wordpress.org/favicon.ico"} -->' ); + * $processor->next_delimiter(); + * null = $processor->allocate_and_return_parsed_attributes(); + * JSON_ERROR_NONE = $processor->get_last_json_error(); + * + * $processor = new WP_Block_Processor( '<!-- wp:separator {} /-->' ); + * $processor->next_delimiter(); + * array() === $processor->allocate_and_return_parsed_attributes(); + * + * $processor = new WP_Block_Processor( '<!-- wp:separator /-->' ); + * $processor->next_delimiter(); + * null = $processor->allocate_and_return_parsed_attributes(); + * + * $processor = new WP_Block_Processor( '<!-- wp:image {"url} -->' ); + * $processor->next_delimiter(); + * null = $processor->allocate_and_return_parsed_attributes(); + * JSON_ERROR_CTRL_CHAR = $processor->get_last_json_error(); + * + * @since 6.9.0 + * + * @return array|null Parsed JSON attributes, if present and valid, otherwise `null`. + */ + public function allocate_and_return_parsed_attributes(): ?array + { + } + /** + * Returns the span representing the currently-matched delimiter, if matched, otherwise `null`. + * + * Example: + * + * $processor = new WP_Block_Processor( '<!-- wp:void /-->' ); + * null === $processor->get_span(); + * + * $processor->next_delimiter(); + * WP_HTML_Span( 0, 17 ) === $processor->get_span(); + * + * @since 6.9.0 + * + * @return WP_HTML_Span|null Span of text in source text spanning matched delimiter. + */ + public function get_span(): ?\WP_HTML_Span + { + } + // + // Constant declarations that would otherwise pollute the top of the class. + // + /** + * Indicates that the block comment delimiter closes an open block. + * + * @see self::$type + * + * @since 6.9.0 + */ + const CLOSER = 'closer'; + /** + * Indicates that the block comment delimiter opens a block. + * + * @see self::$type + * + * @since 6.9.0 + */ + const OPENER = 'opener'; + /** + * Indicates that the block comment delimiter represents a void block + * with no inner content of any kind. + * + * @see self::$type + * + * @since 6.9.0 + */ + const VOID = 'void'; + /** + * Indicates that the processor is ready to start parsing but hasn’t yet begun. + * + * @see self::$state + * + * @since 6.9.0 + */ + const READY = 'processor-ready'; + /** + * Indicates that the processor is matched on an explicit block delimiter. + * + * @see self::$state + * + * @since 6.9.0 + */ + const MATCHED = 'processor-matched'; + /** + * Indicates that the processor is matched on the opening of an implicit freeform delimiter. + * + * @see self::$state + * + * @since 6.9.0 + */ + const HTML_SPAN = 'processor-html-span'; + /** + * Indicates that the parser started parsing a block comment delimiter, but + * the input document ended before it could finish. The document was likely truncated. + * + * @see self::$state + * + * @since 6.9.0 + */ + const INCOMPLETE_INPUT = 'incomplete-input'; + /** + * Indicates that the processor has finished parsing and has nothing left to scan. + * + * @see self::$state + * + * @since 6.9.0 + */ + const COMPLETE = 'processor-complete'; + } + /** + * Class used for interacting with block styles. + * + * @since 5.3.0 + */ + #[\AllowDynamicProperties] + final class WP_Block_Styles_Registry + { + /** + * Registers a block style for the given block type. + * + * If the block styles are present in a standalone stylesheet, register it and pass + * its handle as the `style_handle` argument. If the block styles should be inline, + * use the `inline_style` argument. Usually, one of them would be used to pass CSS + * styles. However, you could also skip them and provide CSS styles in any stylesheet + * or with an inline tag. + * + * @since 5.3.0 + * @since 6.6.0 Added ability to register style across multiple block types along with theme.json-like style data. + * + * @link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-styles/ + * + * @param string|string[] $block_name Block type name including namespace or array of namespaced block type names. + * @param array $style_properties { + * Array containing the properties of the style. + * + * @type string $name The identifier of the style used to compute a CSS class. + * @type string $label A human-readable label for the style. + * @type string $inline_style Inline CSS code that registers the CSS class required + * for the style. + * @type string $style_handle The handle to an already registered style that should be + * enqueued in places where block styles are needed. + * @type bool $is_default Whether this is the default style for the block type. + * @type array $style_data Theme.json-like object to generate CSS from. + * } + * @return bool True if the block style was registered with success and false otherwise. + * @phpstan-param array{ + * name?: string, + * label?: string, + * inline_style?: string, + * style_handle?: string, + * is_default?: bool, + * style_data?: array, + * } $style_properties + */ + public function register($block_name, $style_properties) + { + } + /** + * Unregisters a block style of the given block type. + * + * @since 5.3.0 + * + * @param string $block_name Block type name including namespace. + * @param string $block_style_name Block style name. + * @return bool True if the block style was unregistered with success and false otherwise. + */ + public function unregister($block_name, $block_style_name) + { + } + /** + * Retrieves the properties of a registered block style for the given block type. + * + * @since 5.3.0 + * + * @param string $block_name Block type name including namespace. + * @param string $block_style_name Block style name. + * @return array|null Registered block style properties or `null` if the block style is not registered. + */ + public function get_registered($block_name, $block_style_name) + { + } + /** + * Retrieves all registered block styles. + * + * @since 5.3.0 + * + * @return array[] Array of arrays containing the registered block styles properties grouped by block type. + */ + public function get_all_registered() + { + } + /** + * Retrieves registered block styles for a specific block type. + * + * @since 5.3.0 + * + * @param string $block_name Block type name including namespace. + * @return array[] Array whose keys are block style names and whose values are block style properties. + */ + public function get_registered_styles_for_block($block_name) + { + } + /** + * Checks if a block style is registered for the given block type. + * + * @since 5.3.0 + * + * @param string|null $block_name Block type name including namespace. + * @param string|null $block_style_name Block style name. + * @return bool True if the block style is registered, false otherwise. + */ + public function is_registered($block_name, $block_style_name) + { + } + /** + * Utility method to retrieve the main instance of the class. + * + * The instance will be created if it does not exist yet. + * + * @since 5.3.0 + * + * @return WP_Block_Styles_Registry The main instance. + */ + public static function get_instance() + { + } + } + /** + * Class encapsulating and implementing Block Supports. + * + * @since 5.6.0 + * + * @access private + */ + #[\AllowDynamicProperties] + class WP_Block_Supports + { + /** + * Tracks the current block to be rendered. + * + * @since 5.6.0 + * @var array + */ + public static $block_to_render = \null; + /** + * Utility method to retrieve the main instance of the class. + * + * The instance will be created if it does not exist yet. + * + * @since 5.6.0 + * + * @return WP_Block_Supports The main instance. + */ + public static function get_instance() + { + } + /** + * Initializes the block supports. It registers the block supports block attributes. + * + * @since 5.6.0 + */ + public static function init() + { + } + /** + * Registers a block support. + * + * @since 5.6.0 + * + * @link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/ + * + * @param string $block_support_name Block support name. + * @param array $block_support_config Array containing the properties of the block support. + */ + public function register($block_support_name, $block_support_config) + { + } + /** + * Generates an array of HTML attributes, such as classes, by applying to + * the given block all of the features that the block supports. + * + * @since 5.6.0 + * + * @return string[] Array of HTML attribute values keyed by their name. + */ + public function apply_block_supports() + { + } + } + /** + * Class representing a block template. + * + * @since 5.8.0 + */ + #[\AllowDynamicProperties] + class WP_Block_Template + { + /** + * Type: wp_template. + * + * @since 5.8.0 + * @var string + */ + public $type; + /** + * Theme. + * + * @since 5.8.0 + * @var string + */ + public $theme; + /** + * Template slug. + * + * @since 5.8.0 + * @var string + */ + public $slug; + /** + * ID. + * + * @since 5.8.0 + * @var string + */ + public $id; + /** + * Title. + * + * @since 5.8.0 + * @var string + */ + public $title = ''; + /** + * Content. + * + * @since 5.8.0 + * @var string + */ + public $content = ''; + /** + * Description. + * + * @since 5.8.0 + * @var string + */ + public $description = ''; + /** + * Source of the content. `theme` and `custom` is used for now. + * + * @since 5.8.0 + * @var string + */ + public $source = 'theme'; + /** + * Origin of the content when the content has been customized. + * When customized, origin takes on the value of source and source becomes + * 'custom'. + * + * @since 5.9.0 + * @var string|null + */ + public $origin; + /** + * Post ID. + * + * @since 5.8.0 + * @var int|null + */ + public $wp_id; + /** + * Template Status. + * + * @since 5.8.0 + * @var string + */ + public $status; + /** + * Whether a template is, or is based upon, an existing template file. + * + * @since 5.8.0 + * @var bool + */ + public $has_theme_file; + /** + * Whether a template is a custom template. + * + * @since 5.9.0 + * + * @var bool + */ + public $is_custom = \true; + /** + * Author. + * + * A value of 0 means no author. + * + * @since 5.9.0 + * @var int|null + */ + public $author; + /** + * Plugin. + * + * @since 6.7.0 + * @var string|null + */ + public $plugin; + /** + * Post types. + * + * @since 5.9.0 + * @var string[]|null + */ + public $post_types; + /** + * Area. + * + * @since 5.9.0 + * @var string|null + */ + public $area; + /** + * Modified. + * + * @since 6.3.0 + * @var string|null + */ + public $modified; + } + /** + * Core class used for interacting with templates. + * + * @since 6.7.0 + */ + final class WP_Block_Templates_Registry + { + /** + * Registers a template. + * + * @since 6.7.0 + * + * @param string $template_name Template name including namespace. + * @param array $args Optional. Array of template arguments. + * @return WP_Block_Template|WP_Error The registered template on success, or WP_Error on failure. + */ + public function register($template_name, $args = array()) + { + } + /** + * Retrieves all registered templates. + * + * @since 6.7.0 + * + * @return WP_Block_Template[] Associative array of `$template_name => $template` pairs. + */ + public function get_all_registered() + { + } + /** + * Retrieves a registered template by its name. + * + * @since 6.7.0 + * + * @param string $template_name Template name including namespace. + * @return WP_Block_Template|null The registered template, or null if it is not registered. + */ + public function get_registered($template_name) + { + } + /** + * Retrieves a registered template by its slug. + * + * @since 6.7.0 + * + * @param string $template_slug Slug of the template. + * @return WP_Block_Template|null The registered template, or null if it is not registered. + */ + public function get_by_slug($template_slug) + { + } + /** + * Retrieves registered templates matching a query. + * + * @since 6.7.0 + * + * @param array $query { + * Arguments to retrieve templates. Optional, empty by default. + * + * @type string[] $slug__in List of slugs to include. + * @type string[] $slug__not_in List of slugs to skip. + * @type string $post_type Post type to get the templates for. + * } + * @return WP_Block_Template[] Associative array of `$template_name => $template` pairs. + * @phpstan-param array{ + * slug__in?: string[], + * slug__not_in?: string[], + * post_type?: string, + * } $query + */ + public function get_by_query($query = array()) + { + } + /** + * Checks if a template is registered. + * + * @since 6.7.0 + * + * @param string|null $template_name Template name. + * @return bool True if the template is registered, false otherwise. + */ + public function is_registered($template_name) + { + } + /** + * Unregisters a template. + * + * @since 6.7.0 + * + * @param string $template_name Template name including namespace. + * @return WP_Block_Template|WP_Error The unregistered template on success, or WP_Error on failure. + */ + public function unregister($template_name) + { + } + /** + * Utility method to retrieve the main instance of the class. + * + * The instance will be created if it does not exist yet. + * + * @since 6.7.0 + * + * @return WP_Block_Templates_Registry The main instance. + */ + public static function get_instance() + { + } + } + /** + * Core class used for interacting with block types. + * + * @since 5.0.0 + */ + #[\AllowDynamicProperties] + final class WP_Block_Type_Registry + { + /** + * Registers a block type. + * + * @since 5.0.0 + * + * @see WP_Block_Type::__construct() + * + * @param string|WP_Block_Type $name Block type name including namespace, or alternatively + * a complete WP_Block_Type instance. In case a WP_Block_Type + * is provided, the $args parameter will be ignored. + * @param array $args Optional. Array of block type arguments. Accepts any public property + * of `WP_Block_Type`. See WP_Block_Type::__construct() for information + * on accepted arguments. Default empty array. + * @return WP_Block_Type|false The registered block type on success, or false on failure. + * @phpstan-param array{ + * api_version?: string, + * title?: string, + * category?: string|null, + * parent?: string[]|null, + * ancestor?: string[]|null, + * allowed_blocks?: string[]|null, + * icon?: string|null, + * description?: string, + * keywords?: string[], + * textdomain?: string|null, + * styles?: array[], + * variations?: array[], + * selectors?: array, + * supports?: array|null, + * example?: array|null, + * render_callback?: callable|null, + * variation_callback?: callable|null, + * attributes?: array|null, + * uses_context?: string[], + * provides_context?: string[]|null, + * block_hooks?: string[], + * editor_script_handles?: string[], + * script_handles?: string[], + * view_script_handles?: string[], + * editor_style_handles?: string[], + * style_handles?: string[], + * view_style_handles?: string[], + * } $args See WP_Block_Type::__construct() + */ + public function register($name, $args = array()) + { + } + /** + * Unregisters a block type. + * + * @since 5.0.0 + * + * @param string|WP_Block_Type $name Block type name including namespace, or alternatively + * a complete WP_Block_Type instance. + * @return WP_Block_Type|false The unregistered block type on success, or false on failure. + */ + public function unregister($name) + { + } + /** + * Retrieves a registered block type. + * + * @since 5.0.0 + * + * @param string|null $name Block type name including namespace. + * @return WP_Block_Type|null The registered block type, or null if it is not registered. + */ + public function get_registered($name) + { + } + /** + * Retrieves all registered block types. + * + * @since 5.0.0 + * + * @return WP_Block_Type[] Associative array of `$block_type_name => $block_type` pairs. + */ + public function get_all_registered() + { + } + /** + * Checks if a block type is registered. + * + * @since 5.0.0 + * + * @param string|null $name Block type name including namespace. + * @return bool True if the block type is registered, false otherwise. + */ + public function is_registered($name) + { + } + public function __wakeup() + { + } + /** + * Utility method to retrieve the main instance of the class. + * + * The instance will be created if it does not exist yet. + * + * @since 5.0.0 + * + * @return WP_Block_Type_Registry The main instance. + */ + public static function get_instance() + { + } + } + /** + * Core class representing a block type. + * + * @since 5.0.0 + * + * @see register_block_type() + */ + #[\AllowDynamicProperties] + class WP_Block_Type + { + /** + * Block API version. + * + * @since 5.6.0 + * @var int + */ + public $api_version = 1; + /** + * Block type key. + * + * @since 5.0.0 + * @var string + */ + public $name; + /** + * Human-readable block type label. + * + * @since 5.5.0 + * @var string + */ + public $title = ''; + /** + * Block type category classification, used in search interfaces + * to arrange block types by category. + * + * @since 5.5.0 + * @var string|null + */ + public $category = \null; + /** + * Setting parent lets a block require that it is only available + * when nested within the specified blocks. + * + * @since 5.5.0 + * @var string[]|null + */ + public $parent = \null; + /** + * Setting ancestor makes a block available only inside the specified + * block types at any position of the ancestor's block subtree. + * + * @since 6.0.0 + * @var string[]|null + */ + public $ancestor = \null; + /** + * Limits which block types can be inserted as children of this block type. + * + * @since 6.5.0 + * @var string[]|null + */ + public $allowed_blocks = \null; + /** + * Block type icon. + * + * @since 5.5.0 + * @var string|null + */ + public $icon = \null; + /** + * A detailed block type description. + * + * @since 5.5.0 + * @var string + */ + public $description = ''; + /** + * Additional keywords to produce block type as result + * in search interfaces. + * + * @since 5.5.0 + * @var string[] + */ + public $keywords = array(); + /** + * The translation textdomain. + * + * @since 5.5.0 + * @var string|null + */ + public $textdomain = \null; + /** + * Alternative block styles. + * + * @since 5.5.0 + * @var array + */ + public $styles = array(); + /** + * Block variations callback. + * + * @since 6.5.0 + * @var callable|null + */ + public $variation_callback = \null; + /** + * Custom CSS selectors for theme.json style generation. + * + * @since 6.3.0 + * @var array + */ + public $selectors = array(); + /** + * Supported features. + * + * @since 5.5.0 + * @var array|null + */ + public $supports = \null; + /** + * Structured data for the block preview. + * + * @since 5.5.0 + * @var array|null + */ + public $example = \null; + /** + * Block type render callback. + * + * @since 5.0.0 + * @var callable + */ + public $render_callback = \null; + /** + * Block type attributes property schemas. + * + * @since 5.0.0 + * @var array|null + */ + public $attributes = \null; + /** + * Context provided by blocks of this type. + * + * @since 5.5.0 + * @var string[]|null + */ + public $provides_context = \null; + /** + * Block hooks for this block type. + * + * A block hook is specified by a block type and a relative position. + * The hooked block will be automatically inserted in the given position + * next to the "anchor" block whenever the latter is encountered. + * + * @since 6.4.0 + * @var string[] + */ + public $block_hooks = array(); + /** + * Block type editor only script handles. + * + * @since 6.1.0 + * @var string[] + */ + public $editor_script_handles = array(); + /** + * Block type front end and editor script handles. + * + * @since 6.1.0 + * @var string[] + */ + public $script_handles = array(); + /** + * Block type front end only script handles. + * + * @since 6.1.0 + * @var string[] + */ + public $view_script_handles = array(); + /** + * Block type front end only script module IDs. + * + * @since 6.5.0 + * @var string[] + */ + public $view_script_module_ids = array(); + /** + * Block type editor only style handles. + * + * @since 6.1.0 + * @var string[] + */ + public $editor_style_handles = array(); + /** + * Block type front end and editor style handles. + * + * @since 6.1.0 + * @var string[] + */ + public $style_handles = array(); + /** + * Block type front end only style handles. + * + * @since 6.5.0 + * @var string[] + */ + public $view_style_handles = array(); + /** + * Attributes supported by every block. + * + * @since 6.0.0 Added `lock`. + * @since 6.5.0 Added `metadata`. + * @var array + */ + const GLOBAL_ATTRIBUTES = array('lock' => array('type' => 'object'), 'metadata' => array('type' => 'object')); + /** + * Constructor. + * + * Will populate object properties from the provided arguments. + * + * @since 5.0.0 + * @since 5.5.0 Added the `title`, `category`, `parent`, `icon`, `description`, + * `keywords`, `textdomain`, `styles`, `supports`, `example`, + * `uses_context`, and `provides_context` properties. + * @since 5.6.0 Added the `api_version` property. + * @since 5.8.0 Added the `variations` property. + * @since 5.9.0 Added the `view_script` property. + * @since 6.0.0 Added the `ancestor` property. + * @since 6.1.0 Added the `editor_script_handles`, `script_handles`, `view_script_handles`, + * `editor_style_handles`, and `style_handles` properties. + * Deprecated the `editor_script`, `script`, `view_script`, `editor_style`, and `style` properties. + * @since 6.3.0 Added the `selectors` property. + * @since 6.4.0 Added the `block_hooks` property. + * @since 6.5.0 Added the `allowed_blocks`, `variation_callback`, and `view_style_handles` properties. + * + * @see register_block_type() + * + * @param string $block_type Block type name including namespace. + * @param array|string $args { + * Optional. Array or string of arguments for registering a block type. Any arguments may be defined, + * however the ones described below are supported by default. Default empty array. + * + * @type string $api_version Block API version. + * @type string $title Human-readable block type label. + * @type string|null $category Block type category classification, used in + * search interfaces to arrange block types by category. + * @type string[]|null $parent Setting parent lets a block require that it is only + * available when nested within the specified blocks. + * @type string[]|null $ancestor Setting ancestor makes a block available only inside the specified + * block types at any position of the ancestor's block subtree. + * @type string[]|null $allowed_blocks Limits which block types can be inserted as children of this block type. + * @type string|null $icon Block type icon. + * @type string $description A detailed block type description. + * @type string[] $keywords Additional keywords to produce block type as + * result in search interfaces. + * @type string|null $textdomain The translation textdomain. + * @type array[] $styles Alternative block styles. + * @type array[] $variations Block variations. + * @type array $selectors Custom CSS selectors for theme.json style generation. + * @type array|null $supports Supported features. + * @type array|null $example Structured data for the block preview. + * @type callable|null $render_callback Block type render callback. + * @type callable|null $variation_callback Block type variations callback. + * @type array|null $attributes Block type attributes property schemas. + * @type string[] $uses_context Context values inherited by blocks of this type. + * @type string[]|null $provides_context Context provided by blocks of this type. + * @type string[] $block_hooks Block hooks. + * @type string[] $editor_script_handles Block type editor only script handles. + * @type string[] $script_handles Block type front end and editor script handles. + * @type string[] $view_script_handles Block type front end only script handles. + * @type string[] $editor_style_handles Block type editor only style handles. + * @type string[] $style_handles Block type front end and editor style handles. + * @type string[] $view_style_handles Block type front end only style handles. + * } + * @phpstan-param array{ + * api_version?: string, + * title?: string, + * category?: string|null, + * parent?: string[]|null, + * ancestor?: string[]|null, + * allowed_blocks?: string[]|null, + * icon?: string|null, + * description?: string, + * keywords?: string[], + * textdomain?: string|null, + * styles?: array[], + * variations?: array[], + * selectors?: array, + * supports?: array|null, + * example?: array|null, + * render_callback?: callable|null, + * variation_callback?: callable|null, + * attributes?: array|null, + * uses_context?: string[], + * provides_context?: string[]|null, + * block_hooks?: string[], + * editor_script_handles?: string[], + * script_handles?: string[], + * view_script_handles?: string[], + * editor_style_handles?: string[], + * style_handles?: string[], + * view_style_handles?: string[], + * } $args + */ + public function __construct($block_type, $args = array()) + { + } + /** + * Proxies getting values for deprecated properties for script and style handles for backward compatibility. + * Gets the value for the corresponding new property if the first item in the array provided. + * + * @since 6.1.0 + * + * @param string $name Deprecated property name. + * + * @return string|string[]|null|void The value read from the new property if the first item in the array provided, + * null when value not found, or void when unknown property name provided. + */ + public function __get($name) + { + } + /** + * Proxies checking for deprecated properties for script and style handles for backward compatibility. + * Checks whether the corresponding new property has the first item in the array provided. + * + * @since 6.1.0 + * + * @param string $name Deprecated property name. + * + * @return bool Returns true when for the new property the first item in the array exists, + * or false otherwise. + */ + public function __isset($name) + { + } + /** + * Proxies setting values for deprecated properties for script and style handles for backward compatibility. + * Sets the value for the corresponding new property as the first item in the array. + * It also allows setting custom properties for backward compatibility. + * + * @since 6.1.0 + * + * @param string $name Property name. + * @param mixed $value Property value. + * @phpstan-return void + */ + public function __set($name, $value) + { + } + /** + * Renders the block type output for given attributes. + * + * @since 5.0.0 + * + * @param array $attributes Optional. Block attributes. Default empty array. + * @param string $content Optional. Block content. Default empty string. + * @return string Rendered block type output. + */ + public function render($attributes = array(), $content = '') + { + } + /** + * Returns true if the block type is dynamic, or false otherwise. A dynamic + * block is one which defers its rendering to occur on-demand at runtime. + * + * @since 5.0.0 + * + * @return bool Whether block type is dynamic. + */ + public function is_dynamic() + { + } + /** + * Validates attributes against the current block schema, populating + * defaulted and missing values. + * + * @since 5.0.0 + * + * @param array $attributes Original block attributes. + * @return array Prepared block attributes. + */ + public function prepare_attributes_for_render($attributes) + { + } + /** + * Sets block type properties. + * + * @since 5.0.0 + * + * @param array|string $args Array or string of arguments for registering a block type. + * See WP_Block_Type::__construct() for information on accepted arguments. + * @phpstan-param array{ + * api_version?: string, + * title?: string, + * category?: string|null, + * parent?: string[]|null, + * ancestor?: string[]|null, + * allowed_blocks?: string[]|null, + * icon?: string|null, + * description?: string, + * keywords?: string[], + * textdomain?: string|null, + * styles?: array[], + * variations?: array[], + * selectors?: array, + * supports?: array|null, + * example?: array|null, + * render_callback?: callable|null, + * variation_callback?: callable|null, + * attributes?: array|null, + * uses_context?: string[], + * provides_context?: string[]|null, + * block_hooks?: string[], + * editor_script_handles?: string[], + * script_handles?: string[], + * view_script_handles?: string[], + * editor_style_handles?: string[], + * style_handles?: string[], + * view_style_handles?: string[], + * } $args See WP_Block_Type::__construct() + */ + public function set_props($args) + { + } + /** + * Get all available block attributes including possible layout attribute from Columns block. + * + * @since 5.0.0 + * + * @return array Array of attributes. + */ + public function get_attributes() + { + } + /** + * Get block variations. + * + * @since 6.5.0 + * + * @return array[] + */ + public function get_variations() + { + } + /** + * Get block uses context. + * + * @since 6.5.0 + * + * @return string[] + */ + public function get_uses_context() + { + } + } + /** + * Class representing a parsed instance of a block. + * + * @since 5.5.0 + * @property array $attributes + */ + #[\AllowDynamicProperties] + class WP_Block + { + /** + * Original parsed array representation of block. + * + * @since 5.5.0 + * @var array + */ + public $parsed_block; + /** + * Name of block. + * + * @example "core/paragraph" + * + * @since 5.5.0 + * @var string|null + */ + public $name; + /** + * Block type associated with the instance. + * + * @since 5.5.0 + * @var WP_Block_Type + */ + public $block_type; + /** + * Block context values. + * + * @since 5.5.0 + * @var array + */ + public $context = array(); + /** + * All available context of the current hierarchy. + * + * @since 5.5.0 + * @var array + */ + protected $available_context = array(); + /** + * Block type registry. + * + * @since 5.9.0 + * @var WP_Block_Type_Registry + */ + protected $registry; + /** + * List of inner blocks (of this same class) + * + * @since 5.5.0 + * @var WP_Block_List + */ + public $inner_blocks = array(); + /** + * Resultant HTML from inside block comment delimiters after removing inner + * blocks. + * + * @example "...Just <!-- wp:test /--> testing..." -> "Just testing..." + * + * @since 5.5.0 + * @var string + */ + public $inner_html = ''; + /** + * List of string fragments and null markers where inner blocks were found + * + * @example array( + * 'inner_html' => 'BeforeInnerAfter', + * 'inner_blocks' => array( block, block ), + * 'inner_content' => array( 'Before', null, 'Inner', null, 'After' ), + * ) + * + * @since 5.5.0 + * @var array + */ + public $inner_content = array(); + /** + * Constructor. + * + * Populates object properties from the provided block instance argument. + * + * The given array of context values will not necessarily be available on + * the instance itself, but is treated as the full set of values provided by + * the block's ancestry. This is assigned to the private `available_context` + * property. Only values which are configured to consumed by the block via + * its registered type will be assigned to the block's `context` property. + * + * @since 5.5.0 + * + * @param array $block { + * An associative array of a single parsed block object. See WP_Block_Parser_Block. + * + * @type string|null $blockName Name of block. + * @type array $attrs Attributes from block comment delimiters. + * @type array $innerBlocks List of inner blocks. An array of arrays that + * have the same structure as this one. + * @type string $innerHTML HTML from inside block comment delimiters. + * @type array $innerContent List of string fragments and null markers where inner blocks were found. + * } + * @param array $available_context Optional array of ancestry context values. + * @param WP_Block_Type_Registry $registry Optional block type registry. + * @phpstan-param array{ + * blockName?: string|null, + * attrs?: array, + * innerBlocks?: array, + * innerHTML?: string, + * innerContent?: array, + * } $block + */ + public function __construct($block, $available_context = array(), $registry = \null) + { + } + /** + * Updates the context for the current block and its inner blocks. + * + * The method updates the context of inner blocks, if any, by passing down + * any context values the block provides (`provides_context`). + * + * If the block has inner blocks, the method recursively processes them by creating new instances of `WP_Block` + * for each inner block and updating their context based on the block's `provides_context` property. + * + * @since 6.8.0 + */ + public function refresh_context_dependents() + { + } + /** + * Updates the parsed block content for the current block and its inner blocks. + * + * This method sets the `inner_html` and `inner_content` properties of the block based on the parsed + * block content provided during initialization. It ensures that the block instance reflects the + * most up-to-date content for both the inner HTML and any string fragments around inner blocks. + * + * If the block has inner blocks, this method initializes a new `WP_Block_List` for them, ensuring the + * correct content and context are updated for each nested block. + * + * @since 6.8.0 + */ + public function refresh_parsed_block_dependents() + { + } + /** + * Returns a value from an inaccessible property. + * + * This is used to lazily initialize the `attributes` property of a block, + * such that it is only prepared with default attributes at the time that + * the property is accessed. For all other inaccessible properties, a `null` + * value is returned. + * + * @since 5.5.0 + * + * @param string $name Property name. + * @return array|null Prepared attributes, or null. + */ + public function __get($name) + { + } + /** + * Generates the render output for the block. + * + * @since 5.5.0 + * @since 6.5.0 Added block bindings processing. + * + * @global WP_Post $post Global post object. + * + * @param array $options { + * Optional options object. + * + * @type bool $dynamic Defaults to 'true'. Optionally set to false to avoid using the block's render_callback. + * } + * @return string Rendered block output. + * @phpstan-param array{ + * dynamic?: bool, + * } $options + */ + public function render($options = array()) + { + } + } + /** + * Converts a Classic Menu to Block Menu blocks. + * + * @since 6.3.0 + */ + class WP_Classic_To_Block_Menu_Converter + { + /** + * Converts a Classic Menu to blocks. + * + * @since 6.3.0 + * + * @param WP_Term $menu The Menu term object of the menu to convert. + * @return string|WP_Error The serialized and normalized parsed blocks on success, + * an empty string when there are no menus to convert, + * or WP_Error on invalid menu. + */ + public static function convert($menu) + { + } + } + /** + * Core class used for querying comments. + * + * @since 3.1.0 + * + * @see WP_Comment_Query::__construct() for accepted arguments. + */ + #[\AllowDynamicProperties] + class WP_Comment_Query + { + /** + * SQL for database query. + * + * @since 4.0.1 + * @var string + */ + public $request; + /** + * Metadata query container + * + * @since 3.5.0 + * @var WP_Meta_Query A meta query instance. + */ + public $meta_query = \false; + /** + * Metadata query clauses. + * + * @since 4.4.0 + * @var array + */ + protected $meta_query_clauses; + /** + * SQL query clauses. + * + * @since 4.4.0 + * @var array + */ + protected $sql_clauses = array('select' => '', 'from' => '', 'where' => array(), 'groupby' => '', 'orderby' => '', 'limits' => ''); + /** + * SQL WHERE clause. + * + * Stored after the {@see 'comments_clauses'} filter is run on the compiled WHERE sub-clauses. + * + * @since 4.4.2 + * @var string + */ + protected $filtered_where_clause; + /** + * Date query container + * + * @since 3.7.0 + * @var WP_Date_Query A date query instance. + */ + public $date_query = \false; + /** + * Query vars set by the user. + * + * @since 3.1.0 + * @var array + */ + public $query_vars; + /** + * Default values for query vars. + * + * @since 4.2.0 + * @var array + */ + public $query_var_defaults; + /** + * List of comments located by the query. + * + * @since 4.0.0 + * @var int[]|WP_Comment[] + */ + public $comments; + /** + * The amount of found comments for the current query. + * + * @since 4.4.0 + * @var int + */ + public $found_comments = 0; + /** + * The number of pages. + * + * @since 4.4.0 + * @var int + */ + public $max_num_pages = 0; + /** + * Make private/protected methods readable for backward compatibility. + * + * @since 4.0.0 + * + * @param string $name Method to call. + * @param array $arguments Arguments to pass when calling. + * @return mixed|false Return value of the callback, false otherwise. + */ + public function __call($name, $arguments) + { + } + /** + * Constructor. + * + * Sets up the comment query, based on the query vars passed. + * + * @since 4.2.0 + * @since 4.4.0 `$parent__in` and `$parent__not_in` were added. + * @since 4.4.0 Order by `comment__in` was added. `$update_comment_meta_cache`, `$no_found_rows`, + * `$hierarchical`, and `$update_comment_post_cache` were added. + * @since 4.5.0 Introduced the `$author_url` argument. + * @since 4.6.0 Introduced the `$cache_domain` argument. + * @since 4.9.0 Introduced the `$paged` argument. + * @since 5.1.0 Introduced the `$meta_compare_key` argument. + * @since 5.3.0 Introduced the `$meta_type_key` argument. + * + * @param string|array $query { + * Optional. Array or query string of comment query parameters. Default empty. + * + * @type string $author_email Comment author email address. Default empty. + * @type string $author_url Comment author URL. Default empty. + * @type int[] $author__in Array of author IDs to include comments for. Default empty. + * @type int[] $author__not_in Array of author IDs to exclude comments for. Default empty. + * @type int[] $comment__in Array of comment IDs to include. Default empty. + * @type int[] $comment__not_in Array of comment IDs to exclude. Default empty. + * @type bool $count Whether to return a comment count (true) or array of + * comment objects (false). Default false. + * @type array $date_query Date query clauses to limit comments by. See WP_Date_Query. + * Default null. + * @type string $fields Comment fields to return. Accepts 'ids' for comment IDs + * only or empty for all fields. Default empty. + * @type array $include_unapproved Array of IDs or email addresses of users whose unapproved + * comments will be returned by the query regardless of + * `$status`. Default empty. + * @type int $karma Karma score to retrieve matching comments for. + * Default empty. + * @type string|string[] $meta_key Meta key or keys to filter by. + * @type string|string[] $meta_value Meta value or values to filter by. + * @type string $meta_compare MySQL operator used for comparing the meta value. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type string $meta_compare_key MySQL operator used for comparing the meta key. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type string $meta_type MySQL data type that the meta_value column will be CAST to for comparisons. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type string $meta_type_key MySQL data type that the meta_key column will be CAST to for comparisons. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type array $meta_query An associative array of WP_Meta_Query arguments. + * See WP_Meta_Query::__construct() for accepted values. + * @type int $number Maximum number of comments to retrieve. + * Default empty (no limit). + * @type int $paged When used with `$number`, defines the page of results to return. + * When used with `$offset`, `$offset` takes precedence. Default 1. + * @type int $offset Number of comments to offset the query. Used to build + * LIMIT clause. Default 0. + * @type bool $no_found_rows Whether to disable the `SQL_CALC_FOUND_ROWS` query. + * Default: true. + * @type string|array $orderby Comment status or array of statuses. To use 'meta_value' + * or 'meta_value_num', `$meta_key` must also be defined. + * To sort by a specific `$meta_query` clause, use that + * clause's array key. Accepts: + * - 'comment_agent' + * - 'comment_approved' + * - 'comment_author' + * - 'comment_author_email' + * - 'comment_author_IP' + * - 'comment_author_url' + * - 'comment_content' + * - 'comment_date' + * - 'comment_date_gmt' + * - 'comment_ID' + * - 'comment_karma' + * - 'comment_parent' + * - 'comment_post_ID' + * - 'comment_type' + * - 'user_id' + * - 'comment__in' + * - 'meta_value' + * - 'meta_value_num' + * - The value of `$meta_key` + * - The array keys of `$meta_query` + * - false, an empty array, or 'none' to disable `ORDER BY` clause. + * Default: 'comment_date_gmt'. + * @type string $order How to order retrieved comments. Accepts 'ASC', 'DESC'. + * Default: 'DESC'. + * @type int $parent Parent ID of comment to retrieve children of. + * Default empty. + * @type int[] $parent__in Array of parent IDs of comments to retrieve children for. + * Default empty. + * @type int[] $parent__not_in Array of parent IDs of comments *not* to retrieve + * children for. Default empty. + * @type int[] $post_author__in Array of author IDs to retrieve comments for. + * Default empty. + * @type int[] $post_author__not_in Array of author IDs *not* to retrieve comments for. + * Default empty. + * @type int $post_id Limit results to those affiliated with a given post ID. + * Default 0. + * @type int[] $post__in Array of post IDs to include affiliated comments for. + * Default empty. + * @type int[] $post__not_in Array of post IDs to exclude affiliated comments for. + * Default empty. + * @type int $post_author Post author ID to limit results by. Default empty. + * @type string|string[] $post_status Post status or array of post statuses to retrieve + * affiliated comments for. Pass 'any' to match any value. + * Default empty. + * @type string|string[] $post_type Post type or array of post types to retrieve affiliated + * comments for. Pass 'any' to match any value. Default empty. + * @type string $post_name Post name to retrieve affiliated comments for. + * Default empty. + * @type int $post_parent Post parent ID to retrieve affiliated comments for. + * Default empty. + * @type string $search Search term(s) to retrieve matching comments for. + * Default empty. + * @type string|array $status Comment statuses to limit results by. Accepts an array + * or space/comma-separated list of 'hold' (`comment_status=0`), + * 'approve' (`comment_status=1`), 'all', or a custom + * comment status. Default 'all'. + * @type string|string[] $type Include comments of a given type, or array of types. + * Accepts 'comment', 'pings' (includes 'pingback' and + * 'trackback'), or any custom type string. Default empty. + * @type string[] $type__in Include comments from a given array of comment types. + * Default empty. + * @type string[] $type__not_in Exclude comments from a given array of comment types. + * Default empty. + * @type int $user_id Include comments for a specific user ID. Default empty. + * @type bool|string $hierarchical Whether to include comment descendants in the results. + * - 'threaded' returns a tree, with each comment's children + * stored in a `children` property on the `WP_Comment` object. + * - 'flat' returns a flat array of found comments plus + * their children. + * - Boolean `false` leaves out descendants. + * The parameter is ignored (forced to `false`) when + * `$fields` is 'ids' or 'counts'. Accepts 'threaded', + * 'flat', or false. Default: false. + * @type string $cache_domain Unique cache key to be produced when this query is stored in + * an object cache. Default is 'core'. + * @type bool $update_comment_meta_cache Whether to prime the metadata cache for found comments. + * Default true. + * @type bool $update_comment_post_cache Whether to prime the cache for comment posts. + * Default false. + * } + * @phpstan-param array{ + * author_email?: string, + * author_url?: string, + * author__in?: int[], + * author__not_in?: int[], + * comment__in?: int[], + * comment__not_in?: int[], + * count?: bool, + * date_query?: array, + * fields?: string, + * include_unapproved?: array, + * karma?: int, + * meta_key?: string|string[], + * meta_value?: string|string[], + * meta_compare?: string, + * meta_compare_key?: string, + * meta_type?: string, + * meta_type_key?: string, + * meta_query?: array, + * number?: int, + * paged?: int, + * offset?: int, + * no_found_rows?: bool, + * orderby?: string|array, + * order?: string, + * parent?: int, + * parent__in?: int[], + * parent__not_in?: int[], + * post_author__in?: int[], + * post_author__not_in?: int[], + * post_id?: int, + * post__in?: int[], + * post__not_in?: int[], + * post_author?: int, + * post_status?: string|string[], + * post_type?: string|string[], + * post_name?: string, + * post_parent?: int, + * search?: string, + * status?: string|array, + * type?: string|string[], + * type__in?: string[], + * type__not_in?: string[], + * user_id?: int, + * hierarchical?: bool|string, + * cache_domain?: string, + * update_comment_meta_cache?: bool, + * update_comment_post_cache?: bool, + * } $query + */ + public function __construct($query = '') + { + } + /** + * Parse arguments passed to the comment query with default query parameters. + * + * @since 4.2.0 Extracted from WP_Comment_Query::query(). + * + * @param string|array $query WP_Comment_Query arguments. See WP_Comment_Query::__construct() for accepted arguments. + * @phpstan-param array{ + * author_email?: string, + * author_url?: string, + * author__in?: int[], + * author__not_in?: int[], + * comment__in?: int[], + * comment__not_in?: int[], + * count?: bool, + * date_query?: array, + * fields?: string, + * include_unapproved?: array, + * karma?: int, + * meta_key?: string|string[], + * meta_value?: string|string[], + * meta_compare?: string, + * meta_compare_key?: string, + * meta_type?: string, + * meta_type_key?: string, + * meta_query?: array, + * number?: int, + * paged?: int, + * offset?: int, + * no_found_rows?: bool, + * orderby?: string|array, + * order?: string, + * parent?: int, + * parent__in?: int[], + * parent__not_in?: int[], + * post_author__in?: int[], + * post_author__not_in?: int[], + * post_id?: int, + * post__in?: int[], + * post__not_in?: int[], + * post_author?: int, + * post_status?: string|string[], + * post_type?: string|string[], + * post_name?: string, + * post_parent?: int, + * search?: string, + * status?: string|array, + * type?: string|string[], + * type__in?: string[], + * type__not_in?: string[], + * user_id?: int, + * hierarchical?: bool|string, + * cache_domain?: string, + * update_comment_meta_cache?: bool, + * update_comment_post_cache?: bool, + * } $query See WP_Comment_Query::__construct() + */ + public function parse_query($query = '') + { + } + /** + * Sets up the WordPress query for retrieving comments. + * + * @since 3.1.0 + * @since 4.1.0 Introduced 'comment__in', 'comment__not_in', 'post_author__in', + * 'post_author__not_in', 'author__in', 'author__not_in', 'post__in', + * 'post__not_in', 'include_unapproved', 'type__in', and 'type__not_in' + * arguments to $query_vars. + * @since 4.2.0 Moved parsing to WP_Comment_Query::parse_query(). + * + * @param string|array $query Array or URL query string of parameters. + * @return array|int List of comments, or number of comments when 'count' is passed as a query var. + */ + public function query($query) + { + } + /** + * Get a list of comments matching the query vars. + * + * @since 4.2.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @return int|int[]|WP_Comment[] List of comments or number of found comments if `$count` argument is true. + */ + public function get_comments() + { + } + /** + * Used internally to get a list of comment IDs matching the query vars. + * + * @since 4.4.0 + * @since 6.9.0 Excludes the 'note' comment type, unless 'all' or the 'note' types are requested. + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @return int|array A single count of comment IDs if a count query. An array of comment IDs if a full query. + */ + protected function get_comment_ids() + { + } + /** + * Fetch descendants for located comments. + * + * Instead of calling `get_children()` separately on each child comment, we do a single set of queries to fetch + * the descendant trees for all matched top-level comments. + * + * @since 4.4.0 + * + * @param WP_Comment[] $comments Array of top-level comments whose descendants should be filled in. + * @return array + */ + protected function fill_descendants($comments) + { + } + /** + * Used internally to generate an SQL string for searching across multiple columns. + * + * @since 3.1.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $search Search string. + * @param string[] $columns Array of columns to search. + * @return string Search SQL. + */ + protected function get_search_sql($search, $columns) + { + } + /** + * Parse and sanitize 'orderby' keys passed to the comment query. + * + * @since 4.2.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $orderby Alias for the field to order by. + * @return string|false Value to used in the ORDER clause. False otherwise. + */ + protected function parse_orderby($orderby) + { + } + /** + * Parse an 'order' query variable and cast it to ASC or DESC as necessary. + * + * @since 4.2.0 + * + * @param string $order The 'order' query variable. + * @return string The sanitized 'order' query variable. + */ + protected function parse_order($order) + { + } + } + /** + * Core class used to organize comments as instantiated objects with defined members. + * + * @since 4.4.0 + */ + #[\AllowDynamicProperties] + final class WP_Comment + { + /** + * Comment ID. + * + * A numeric string, for compatibility reasons. + * + * @since 4.4.0 + * @var string + */ + public $comment_ID; + /** + * ID of the post the comment is associated with. + * + * A numeric string, for compatibility reasons. + * + * @since 4.4.0 + * @var string + */ + public $comment_post_ID = '0'; + /** + * Comment author name. + * + * @since 4.4.0 + * @var string + */ + public $comment_author = ''; + /** + * Comment author email address. + * + * @since 4.4.0 + * @var string + */ + public $comment_author_email = ''; + /** + * Comment author URL. + * + * @since 4.4.0 + * @var string + */ + public $comment_author_url = ''; + /** + * Comment author IP address (IPv4 format). + * + * @since 4.4.0 + * @var string + */ + public $comment_author_IP = ''; + /** + * Comment date in YYYY-MM-DD HH:MM:SS format. + * + * @since 4.4.0 + * @var string + */ + public $comment_date = '0000-00-00 00:00:00'; + /** + * Comment GMT date in YYYY-MM-DD HH::MM:SS format. + * + * @since 4.4.0 + * @var string + */ + public $comment_date_gmt = '0000-00-00 00:00:00'; + /** + * Comment content. + * + * @since 4.4.0 + * @var string + */ + public $comment_content; + /** + * Comment karma count. + * + * A numeric string, for compatibility reasons. + * + * @since 4.4.0 + * @var string + */ + public $comment_karma = '0'; + /** + * Comment approval status. + * + * @since 4.4.0 + * @var string + */ + public $comment_approved = '1'; + /** + * Comment author HTTP user agent. + * + * @since 4.4.0 + * @var string + */ + public $comment_agent = ''; + /** + * Comment type. + * + * @since 4.4.0 + * @since 5.5.0 Default value changed to `comment`. + * @var string + */ + public $comment_type = 'comment'; + /** + * Parent comment ID. + * + * A numeric string, for compatibility reasons. + * + * @since 4.4.0 + * @var string + */ + public $comment_parent = '0'; + /** + * Comment author ID. + * + * A numeric string, for compatibility reasons. + * + * @since 4.4.0 + * @var string + */ + public $user_id = '0'; + /** + * Retrieves a WP_Comment instance. + * + * @since 4.4.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param int $id Comment ID. + * @return WP_Comment|false Comment object, otherwise false. + */ + public static function get_instance($id) + { + } + /** + * Constructor. + * + * Populates properties with object vars. + * + * @since 4.4.0 + * + * @param WP_Comment $comment Comment object. + */ + public function __construct($comment) + { + } + /** + * Converts object to array. + * + * @since 4.4.0 + * + * @return array Object as array. + */ + public function to_array() + { + } + /** + * Gets the children of a comment. + * + * @since 4.4.0 + * + * @param array $args { + * Array of arguments used to pass to get_comments() and determine format. + * + * @type string $format Return value format. 'tree' for a hierarchical tree, 'flat' for a flattened array. + * Default 'tree'. + * @type string $status Comment status to limit results by. Accepts 'hold' (`comment_status=0`), + * 'approve' (`comment_status=1`), 'all', or a custom comment status. + * Default 'all'. + * @type string $hierarchical Whether to include comment descendants in the results. + * 'threaded' returns a tree, with each comment's children + * stored in a `children` property on the `WP_Comment` object. + * 'flat' returns a flat array of found comments plus their children. + * Pass `false` to leave out descendants. + * The parameter is ignored (forced to `false`) when `$fields` is 'ids' or 'counts'. + * Accepts 'threaded', 'flat', or false. Default: 'threaded'. + * @type string|array $orderby Comment status or array of statuses. To use 'meta_value' + * or 'meta_value_num', `$meta_key` must also be defined. + * To sort by a specific `$meta_query` clause, use that + * clause's array key. Accepts 'comment_agent', + * 'comment_approved', 'comment_author', + * 'comment_author_email', 'comment_author_IP', + * 'comment_author_url', 'comment_content', 'comment_date', + * 'comment_date_gmt', 'comment_ID', 'comment_karma', + * 'comment_parent', 'comment_post_ID', 'comment_type', + * 'user_id', 'comment__in', 'meta_value', 'meta_value_num', + * the value of $meta_key, and the array keys of + * `$meta_query`. Also accepts false, an empty array, or + * 'none' to disable `ORDER BY` clause. + * } + * @return WP_Comment[] Array of `WP_Comment` objects. + * @phpstan-param array{ + * format?: string, + * status?: string, + * hierarchical?: string, + * orderby?: string|array, + * } $args + */ + public function get_children($args = array()) + { + } + /** + * Adds a child to the comment. + * + * Used by `WP_Comment_Query` when bulk-filling descendants. + * + * @since 4.4.0 + * + * @param WP_Comment $child Child comment. + */ + public function add_child(\WP_Comment $child) + { + } + /** + * Gets a child comment by ID. + * + * @since 4.4.0 + * + * @param int $child_id ID of the child. + * @return WP_Comment|false Returns the comment object if found, otherwise false. + */ + public function get_child($child_id) + { + } + /** + * Sets the 'populated_children' flag. + * + * This flag is important for ensuring that calling `get_children()` on a childless comment will not trigger + * unneeded database queries. + * + * @since 4.4.0 + * + * @param bool $set Whether the comment's children have already been populated. + */ + public function populated_children($set) + { + } + /** + * Determines whether a non-public property is set. + * + * If `$name` matches a post field, the comment post will be loaded and the post's value checked. + * + * @since 4.4.0 + * + * @param string $name Property to check if set. + * @return bool Whether the property is set. + */ + public function __isset($name) + { + } + /** + * Magic getter. + * + * If `$name` matches a post field, the comment post will be loaded and the post's value returned. + * + * @since 4.4.0 + * + * @param string $name Property name. + * @return mixed + */ + public function __get($name) + { + } + } + /** + * Customize Control class. + * + * @since 3.4.0 + */ + #[\AllowDynamicProperties] + class WP_Customize_Control + { + /** + * Incremented with each new class instantiation, then stored in $instance_number. + * + * Used when sorting two instances whose priorities are equal. + * + * @since 4.1.0 + * @var int + */ + protected static $instance_count = 0; + /** + * Order in which this instance was created in relation to other instances. + * + * @since 4.1.0 + * @var int + */ + public $instance_number; + /** + * Customizer manager. + * + * @since 3.4.0 + * @var WP_Customize_Manager + */ + public $manager; + /** + * Control ID. + * + * @since 3.4.0 + * @var string + */ + public $id; + /** + * All settings tied to the control. + * + * @since 3.4.0 + * @var array + */ + public $settings; + /** + * The primary setting for the control (if there is one). + * + * @since 3.4.0 + * @var string|WP_Customize_Setting|null + */ + public $setting = 'default'; + /** + * Capability required to use this control. + * + * Normally this is empty and the capability is derived from the capabilities + * of the associated `$settings`. + * + * @since 4.5.0 + * @var string + */ + public $capability; + /** + * Order priority to load the control in Customizer. + * + * @since 3.4.0 + * @var int + */ + public $priority = 10; + /** + * Section the control belongs to. + * + * @since 3.4.0 + * @var string + */ + public $section = ''; + /** + * Label for the control. + * + * @since 3.4.0 + * @var string + */ + public $label = ''; + /** + * Description for the control. + * + * @since 4.0.0 + * @var string + */ + public $description = ''; + /** + * List of choices for 'radio' or 'select' type controls, where values are the keys, and labels are the values. + * + * @since 3.4.0 + * @var array + */ + public $choices = array(); + /** + * List of custom input attributes for control output, where attribute names are the keys and values are the values. + * + * Not used for 'checkbox', 'radio', 'select', or 'dropdown-pages' control types. + * + * @since 4.0.0 + * @var array + */ + public $input_attrs = array(); + /** + * Show UI for adding new content, currently only used for the dropdown-pages control. + * + * @since 4.7.0 + * @var bool + */ + public $allow_addition = \false; + /** + * @deprecated It is better to just call the json() method + * @since 3.4.0 + * @var array + */ + public $json = array(); + /** + * Control's Type. + * + * @since 3.4.0 + * @var string + */ + public $type = 'text'; + /** + * Callback. + * + * @since 4.0.0 + * + * @see WP_Customize_Control::active() + * + * @var callable Callback is called with one argument, the instance of + * WP_Customize_Control, and returns bool to indicate whether + * the control is active (such as it relates to the URL + * currently being previewed). + */ + public $active_callback = ''; + /** + * Constructor. + * + * Supplied `$args` override class property defaults. + * + * If `$args['settings']` is not defined, use the `$id` as the setting ID. + * + * @since 3.4.0 + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @param string $id Control ID. + * @param array $args { + * Optional. Array of properties for the new Control object. Default empty array. + * + * @type int $instance_number Order in which this instance was created in relation + * to other instances. + * @type WP_Customize_Manager $manager Customizer bootstrap instance. + * @type string $id Control ID. + * @type array $settings All settings tied to the control. If undefined, `$id` will + * be used. + * @type string $setting The primary setting for the control (if there is one). + * Default 'default'. + * @type string $capability Capability required to use this control. Normally this is empty + * and the capability is derived from `$settings`. + * @type int $priority Order priority to load the control. Default 10. + * @type string $section Section the control belongs to. Default empty. + * @type string $label Label for the control. Default empty. + * @type string $description Description for the control. Default empty. + * @type array $choices List of choices for 'radio' or 'select' type controls, where + * values are the keys, and labels are the values. + * Default empty array. + * @type array $input_attrs List of custom input attributes for control output, where + * attribute names are the keys and values are the values. Not + * used for 'checkbox', 'radio', 'select', or 'dropdown-pages' + * control types. Default empty array. + * @type bool $allow_addition Show UI for adding new content, currently only used for the + * dropdown-pages control. Default false. + * @type array $json Deprecated. Use WP_Customize_Control::json() instead. + * @type string $type Control type. Core controls include 'text', 'checkbox', + * 'textarea', 'radio', 'select', and 'dropdown-pages'. Additional + * input types such as 'email', 'url', 'number', 'hidden', and + * 'date' are supported implicitly. Default 'text'. + * @type callable $active_callback Active callback. + * } + * @phpstan-param array{ + * instance_number?: int, + * manager?: WP_Customize_Manager, + * id?: string, + * settings?: array, + * setting?: string, + * capability?: string, + * priority?: int, + * section?: string, + * label?: string, + * description?: string, + * choices?: array, + * input_attrs?: array, + * allow_addition?: bool, + * json?: array, + * type?: string, + * active_callback?: callable, + * } $args + */ + public function __construct($manager, $id, $args = array()) + { + } + /** + * Enqueues control related scripts/styles. + * + * @since 3.4.0 + */ + public function enqueue() + { + } + /** + * Checks whether control is active to current Customizer preview. + * + * @since 4.0.0 + * + * @return bool Whether the control is active to the current preview. + */ + final public function active() + { + } + /** + * Default callback used when invoking WP_Customize_Control::active(). + * + * Subclasses can override this with their specific logic, or they may + * provide an 'active_callback' argument to the constructor. + * + * @since 4.0.0 + * + * @return true Always true. + */ + public function active_callback() + { + } + /** + * Fetches a setting's value. + * Grabs the main setting by default. + * + * @since 3.4.0 + * + * @param string $setting_key + * @return mixed The requested setting's value, if the setting exists. + */ + final public function value($setting_key = 'default') + { + } + /** + * Refreshes the parameters passed to the JavaScript via JSON. + * + * @since 3.4.0 + */ + public function to_json() + { + } + /** + * Gets the data to export to the client via JSON. + * + * @since 4.1.0 + * + * @return array Array of parameters passed to the JavaScript. + */ + public function json() + { + } + /** + * Checks if the user can use this control. + * + * Returns false if the user cannot manipulate one of the associated settings, + * or if one of the associated settings does not exist. Also returns false if + * the associated section does not exist or if its capability check returns + * false. + * + * @since 3.4.0 + * + * @return bool False if theme doesn't support the control or user doesn't have the required permissions, otherwise true. + */ + final public function check_capabilities() + { + } + /** + * Gets the control's content for insertion into the Customizer pane. + * + * @since 4.1.0 + * + * @return string Contents of the control. + */ + final public function get_content() + { + } + /** + * Checks capabilities and render the control. + * + * @since 3.4.0 + * @uses WP_Customize_Control::render() + * @phpstan-return void + */ + final public function maybe_render() + { + } + /** + * Renders the control wrapper and calls $this->render_content() for the internals. + * + * @since 3.4.0 + */ + protected function render() + { + } + /** + * Gets the data link attribute for a setting. + * + * @since 3.4.0 + * @since 4.9.0 Return a `data-customize-setting-key-link` attribute if a setting is not registered for the supplied setting key. + * + * @param string $setting_key + * @return string Data link parameter, a `data-customize-setting-link` attribute if the `$setting_key` refers + * to a pre-registered setting, and a `data-customize-setting-key-link` attribute if the setting + * is not yet registered. + */ + public function get_link($setting_key = 'default') + { + } + /** + * Renders the data link attribute for the control's input element. + * + * @since 3.4.0 + * @uses WP_Customize_Control::get_link() + * + * @param string $setting_key Default 'default'. + */ + public function link($setting_key = 'default') + { + } + /** + * Renders the custom attributes for the control's input element. + * + * @since 4.0.0 + */ + public function input_attrs() + { + } + /** + * Renders the control's content. + * + * Allows the content to be overridden without having to rewrite the wrapper in `$this::render()`. + * + * Supports basic input types `text`, `checkbox`, `textarea`, `radio`, `select` and `dropdown-pages`. + * Additional input types such as `email`, `url`, `number`, `hidden` and `date` are supported implicitly. + * + * Control content can alternately be rendered in JS. See WP_Customize_Control::print_template(). + * + * @since 3.4.0 + * @phpstan-return void + */ + protected function render_content() + { + } + /** + * Renders the control's JS template. + * + * This function is only run for control types that have been registered with + * WP_Customize_Manager::register_control_type(). + * + * In the future, this will also print the template for the control's container + * element and be override-able. + * + * @since 4.1.0 + */ + final public function print_template() + { + } + /** + * An Underscore (JS) template for this control's content (but not its container). + * + * Class variables for this control class are available in the `data` JS object; + * export custom variables by overriding WP_Customize_Control::to_json(). + * + * @see WP_Customize_Control::print_template() + * + * @since 4.1.0 + */ + protected function content_template() + { + } + } + /** + * Customize Manager class. + * + * Bootstraps the Customize experience on the server-side. + * + * Sets up the theme-switching process if a theme other than the active one is + * being previewed and customized. + * + * Serves as a factory for Customize Controls and Settings, and + * instantiates default Customize Controls and Settings. + * + * @since 3.4.0 + */ + #[\AllowDynamicProperties] + final class WP_Customize_Manager + { + /** + * Methods and properties dealing with managing widgets in the Customizer. + * + * @since 3.9.0 + * @var WP_Customize_Widgets + */ + public $widgets; + /** + * Methods and properties dealing with managing nav menus in the Customizer. + * + * @since 4.3.0 + * @var WP_Customize_Nav_Menus + */ + public $nav_menus; + /** + * Methods and properties dealing with selective refresh in the Customizer preview. + * + * @since 4.5.0 + * @var WP_Customize_Selective_Refresh + */ + public $selective_refresh; + /** + * Constructor. + * + * @since 3.4.0 + * @since 4.7.0 Added `$args` parameter. + * + * @param array $args { + * Args. + * + * @type null|string|false $changeset_uuid Changeset UUID, the `post_name` for the customize_changeset post containing the customized state. + * Defaults to `null` resulting in a UUID to be immediately generated. If `false` is provided, then + * then the changeset UUID will be determined during `after_setup_theme`: when the + * `customize_changeset_branching` filter returns false, then the default UUID will be that + * of the most recent `customize_changeset` post that has a status other than 'auto-draft', + * 'publish', or 'trash'. Otherwise, if changeset branching is enabled, then a random UUID will be used. + * @type string $theme Theme to be previewed (for theme switch). Defaults to customize_theme or theme query params. + * @type string $messenger_channel Messenger channel. Defaults to customize_messenger_channel query param. + * @type bool $settings_previewed If settings should be previewed. Defaults to true. + * @type bool $branching If changeset branching is allowed; otherwise, changesets are linear. Defaults to true. + * @type bool $autosaved If data from a changeset's autosaved revision should be loaded if it exists. Defaults to false. + * } + * @phpstan-param array{ + * changeset_uuid?: null|string|false, + * theme?: string, + * messenger_channel?: string, + * settings_previewed?: bool, + * branching?: bool, + * autosaved?: bool, + * } $args + */ + public function __construct($args = array()) + { + } + /** + * Returns true if it's an Ajax request. + * + * @since 3.4.0 + * @since 4.2.0 Added `$action` param. + * + * @param string|null $action Whether the supplied Ajax action is being run. + * @return bool True if it's an Ajax request, false otherwise. + */ + public function doing_ajax($action = \null) + { + } + /** + * Returns the Ajax wp_die() handler if it's a customized request. + * + * @since 3.4.0 + * @deprecated 4.7.0 + * + * @return callable Die handler. + */ + public function wp_die_handler() + { + } + /** + * Starts preview and customize theme. + * + * Check if customize query variable exist. Init filters to filter the active theme. + * + * @since 3.4.0 + * + * @global string $pagenow The filename of the current screen. + * @phpstan-return void + */ + public function setup_theme() + { + } + /** + * Establishes the loaded changeset. + * + * This method runs right at after_setup_theme and applies the 'customize_changeset_branching' filter to determine + * whether concurrent changesets are allowed. Then if the Customizer is not initialized with a `changeset_uuid` param, + * this method will determine which UUID should be used. If changeset branching is disabled, then the most saved + * changeset will be loaded by default. Otherwise, if there are no existing saved changesets or if changeset branching is + * enabled, then a new UUID will be generated. + * + * @since 4.9.0 + * + * @global string $pagenow The filename of the current screen. + */ + public function establish_loaded_changeset() + { + } + /** + * Callback to validate a theme once it is loaded + * + * @since 3.4.0 + */ + public function after_setup_theme() + { + } + /** + * If the theme to be previewed isn't the active theme, add filter callbacks + * to swap it out at runtime. + * + * @since 3.4.0 + * @phpstan-return void + */ + public function start_previewing_theme() + { + } + /** + * Stops previewing the selected theme. + * + * Removes filters to change the active theme. + * + * @since 3.4.0 + * @phpstan-return void + */ + public function stop_previewing_theme() + { + } + /** + * Gets whether settings are or will be previewed. + * + * @since 4.9.0 + * + * @see WP_Customize_Setting::preview() + * + * @return bool + */ + public function settings_previewed() + { + } + /** + * Gets whether data from a changeset's autosaved revision should be loaded if it exists. + * + * @since 4.9.0 + * + * @see WP_Customize_Manager::changeset_data() + * + * @return bool Is using autosaved changeset revision. + */ + public function autosaved() + { + } + /** + * Whether the changeset branching is allowed. + * + * @since 4.9.0 + * + * @see WP_Customize_Manager::establish_loaded_changeset() + * + * @return bool Is changeset branching. + */ + public function branching() + { + } + /** + * Gets the changeset UUID. + * + * @since 4.7.0 + * + * @see WP_Customize_Manager::establish_loaded_changeset() + * + * @return string UUID. + */ + public function changeset_uuid() + { + } + /** + * Gets the theme being customized. + * + * @since 3.4.0 + * + * @return WP_Theme + */ + public function theme() + { + } + /** + * Gets the registered settings. + * + * @since 3.4.0 + * + * @return array + */ + public function settings() + { + } + /** + * Gets the registered controls. + * + * @since 3.4.0 + * + * @return array + */ + public function controls() + { + } + /** + * Gets the registered containers. + * + * @since 4.0.0 + * + * @return array + */ + public function containers() + { + } + /** + * Gets the registered sections. + * + * @since 3.4.0 + * + * @return array + */ + public function sections() + { + } + /** + * Gets the registered panels. + * + * @since 4.0.0 + * + * @return array Panels. + */ + public function panels() + { + } + /** + * Checks if the current theme is active. + * + * @since 3.4.0 + * + * @return bool + */ + public function is_theme_active() + { + } + /** + * Registers styles/scripts and initialize the preview of each setting + * + * @since 3.4.0 + */ + public function wp_loaded() + { + } + /** + * Prevents Ajax requests from following redirects when previewing a theme + * by issuing a 200 response instead of a 30x. + * + * Instead, the JS will sniff out the location header. + * + * @since 3.4.0 + * @deprecated 4.7.0 + * + * @param int $status Status. + * @return int + */ + public function wp_redirect_status($status) + { + } + /** + * Finds the changeset post ID for a given changeset UUID. + * + * @since 4.7.0 + * + * @param string $uuid Changeset UUID. + * @return int|null Returns post ID on success and null on failure. + */ + public function find_changeset_post_id($uuid) + { + } + /** + * Gets the changeset post ID for the loaded changeset. + * + * @since 4.7.0 + * + * @return int|null Post ID on success or null if there is no post yet saved. + */ + public function changeset_post_id() + { + } + /** + * Gets changeset data. + * + * @since 4.7.0 + * @since 4.9.0 This will return the changeset's data with a user's autosave revision merged on top, if one exists and $autosaved is true. + * + * @return array Changeset data. + */ + public function changeset_data() + { + } + /** + * Imports theme starter content into the customized state. + * + * @since 4.7.0 + * + * @param array $starter_content Starter content. Defaults to `get_theme_starter_content()`. + * @phpstan-return void + */ + public function import_theme_starter_content($starter_content = array()) + { + } + /** + * Saves starter content changeset. + * + * @since 4.7.0 + * @phpstan-return void + */ + public function _save_starter_content_changeset() + { + } + /** + * Gets dirty pre-sanitized setting values in the current customized state. + * + * The returned array consists of a merge of three sources: + * 1. If the theme is not currently active, then the base array is any stashed + * theme mods that were modified previously but never published. + * 2. The values from the current changeset, if it exists. + * 3. If the user can customize, the values parsed from the incoming + * `$_POST['customized']` JSON data. + * 4. Any programmatically-set post values via `WP_Customize_Manager::set_post_value()`. + * + * The name "unsanitized_post_values" is a carry-over from when the customized + * state was exclusively sourced from `$_POST['customized']`. Nevertheless, + * the value returned will come from the current changeset post and from the + * incoming post data. + * + * @since 4.1.1 + * @since 4.7.0 Added `$args` parameter and merging with changeset values and stashed theme mods. + * + * @param array $args { + * Args. + * + * @type bool $exclude_changeset Whether the changeset values should also be excluded. Defaults to false. + * @type bool $exclude_post_data Whether the post input values should also be excluded. Defaults to false when lacking the customize capability. + * } + * @return array + * @phpstan-param array{ + * exclude_changeset?: bool, + * exclude_post_data?: bool, + * } $args + */ + public function unsanitized_post_values($args = array()) + { + } + /** + * Returns the sanitized value for a given setting from the current customized state. + * + * The name "post_value" is a carry-over from when the customized state was exclusively + * sourced from `$_POST['customized']`. Nevertheless, the value returned will come + * from the current changeset post and from the incoming post data. + * + * @since 3.4.0 + * @since 4.1.1 Introduced the `$default_value` parameter. + * @since 4.6.0 `$default_value` is now returned early when the setting post value is invalid. + * + * @see WP_REST_Server::dispatch() + * @see WP_REST_Request::sanitize_params() + * @see WP_REST_Request::has_valid_params() + * + * @param WP_Customize_Setting $setting A WP_Customize_Setting derived object. + * @param mixed $default_value Value returned if `$setting` has no post value (added in 4.2.0) + * or the post value is invalid (added in 4.6.0). + * @return string|mixed Sanitized value or the `$default_value` provided. + */ + public function post_value($setting, $default_value = \null) + { + } + /** + * Overrides a setting's value in the current customized state. + * + * The name "post_value" is a carry-over from when the customized state was + * exclusively sourced from `$_POST['customized']`. + * + * @since 4.2.0 + * + * @param string $setting_id ID for the WP_Customize_Setting instance. + * @param mixed $value Post value. + */ + public function set_post_value($setting_id, $value) + { + } + /** + * Prints JavaScript settings. + * + * @since 3.4.0 + * @phpstan-return void + */ + public function customize_preview_init() + { + } + /** + * Filters the X-Frame-Options and Content-Security-Policy headers to ensure frontend can load in customizer. + * + * @since 4.7.0 + * + * @param array $headers Headers. + * @return array Headers. + */ + public function filter_iframe_security_headers($headers) + { + } + /** + * Adds customize state query params to a given URL if preview is allowed. + * + * @since 4.7.0 + * + * @see wp_redirect() + * @see WP_Customize_Manager::get_allowed_url() + * + * @param string $url URL. + * @return string URL. + */ + public function add_state_query_params($url) + { + } + /** + * Prevents sending a 404 status when returning the response for the customize + * preview, since it causes the jQuery Ajax to fail. Send 200 instead. + * + * @since 4.0.0 + * @deprecated 4.7.0 + */ + public function customize_preview_override_404_status() + { + } + /** + * Prints base element for preview frame. + * + * @since 3.4.0 + * @deprecated 4.7.0 + */ + public function customize_preview_base() + { + } + /** + * Prints a workaround to handle HTML5 tags in IE < 9. + * + * @since 3.4.0 + * @deprecated 4.7.0 Customizer no longer supports IE8, so all supported browsers recognize HTML5. + */ + public function customize_preview_html5() + { + } + /** + * Prints CSS for loading indicators for the Customizer preview. + * + * @since 4.2.0 + */ + public function customize_preview_loading_style() + { + } + /** + * Removes customize_messenger_channel query parameter from the preview window when it is not in an iframe. + * + * This ensures that the admin bar will be shown. It also ensures that link navigation will + * work as expected since the parent frame is not being sent the URL to navigate to. + * + * @since 4.7.0 + * @phpstan-return void + */ + public function remove_frameless_preview_messenger_channel() + { + } + /** + * Prints JavaScript settings for preview frame. + * + * @since 3.4.0 + */ + public function customize_preview_settings() + { + } + /** + * Prints a signature so we can ensure the Customizer was properly executed. + * + * @since 3.4.0 + * @deprecated 4.7.0 + */ + public function customize_preview_signature() + { + } + /** + * Removes the signature in case we experience a case where the Customizer was not properly executed. + * + * @since 3.4.0 + * @deprecated 4.7.0 + * + * @param callable|null $callback Optional. Value passed through for {@see 'wp_die_handler'} filter. + * Default null. + * @return callable|null Value passed through for {@see 'wp_die_handler'} filter. + */ + public function remove_preview_signature($callback = \null) + { + } + /** + * Determines whether it is a theme preview or not. + * + * @since 3.4.0 + * + * @return bool True if it's a preview, false if not. + */ + public function is_preview() + { + } + /** + * Retrieves the template name of the previewed theme. + * + * @since 3.4.0 + * + * @return string Template name. + */ + public function get_template() + { + } + /** + * Retrieves the stylesheet name of the previewed theme. + * + * @since 3.4.0 + * + * @return string Stylesheet name. + */ + public function get_stylesheet() + { + } + /** + * Retrieves the template root of the previewed theme. + * + * @since 3.4.0 + * + * @return string Theme root. + */ + public function get_template_root() + { + } + /** + * Retrieves the stylesheet root of the previewed theme. + * + * @since 3.4.0 + * + * @return string Theme root. + */ + public function get_stylesheet_root() + { + } + /** + * Filters the active theme and return the name of the previewed theme. + * + * @since 3.4.0 + * + * @param mixed $current_theme {@internal Parameter is not used} + * @return string Theme name. + */ + public function current_theme($current_theme) + { + } + /** + * Validates setting values. + * + * Validation is skipped for unregistered settings or for values that are + * already null since they will be skipped anyway. Sanitization is applied + * to values that pass validation, and values that become null or `WP_Error` + * after sanitizing are marked invalid. + * + * @since 4.6.0 + * + * @see WP_REST_Request::has_valid_params() + * @see WP_Customize_Setting::validate() + * + * @param array $setting_values Mapping of setting IDs to values to validate and sanitize. + * @param array $options { + * Options. + * + * @type bool $validate_existence Whether a setting's existence will be checked. + * @type bool $validate_capability Whether the setting capability will be checked. + * } + * @return array Mapping of setting IDs to return value of validate method calls, either `true` or `WP_Error`. + * @phpstan-param array{ + * validate_existence?: bool, + * validate_capability?: bool, + * } $options + */ + public function validate_setting_values($setting_values, $options = array()) + { + } + /** + * Prepares setting validity for exporting to the client (JS). + * + * Converts `WP_Error` instance into array suitable for passing into the + * `wp.customize.Notification` JS model. + * + * @since 4.6.0 + * + * @param true|WP_Error $validity Setting validity. + * @return true|array If `$validity` was a WP_Error, the error codes will be array-mapped + * to their respective `message` and `data` to pass into the + * `wp.customize.Notification` JS model. + */ + public function prepare_setting_validity_for_js($validity) + { + } + /** + * Handles customize_save WP Ajax request to save/update a changeset. + * + * @since 3.4.0 + * @since 4.7.0 The semantics of this method have changed to update a changeset, optionally to also change the status and other attributes. + */ + public function save() + { + } + /** + * Saves the post for the loaded changeset. + * + * @since 4.7.0 + * + * @param array $args { + * Args for changeset post. + * + * @type array $data Optional additional changeset data. Values will be merged on top of any existing post values. + * @type string $status Post status. Optional. If supplied, the save will be transactional and a post revision will be allowed. + * @type string $title Post title. Optional. + * @type string $date_gmt Date in GMT. Optional. + * @type int $user_id ID for user who is saving the changeset. Optional, defaults to the current user ID. + * @type bool $starter_content Whether the data is starter content. If false (default), then $starter_content will be cleared for any $data being saved. + * @type bool $autosave Whether this is a request to create an autosave revision. + * } + * + * @return array|WP_Error Returns array on success and WP_Error with array data on error. + * @phpstan-param array{ + * data?: array, + * status?: string, + * title?: string, + * date_gmt?: string, + * user_id?: int, + * starter_content?: bool, + * autosave?: bool, + * } $args + */ + public function save_changeset_post($args = array()) + { + } + /** + * Preserves the initial JSON post_content passed to save into the post. + * + * This is needed to prevent KSES and other {@see 'content_save_pre'} filters + * from corrupting JSON data. + * + * Note that WP_Customize_Manager::validate_setting_values() have already + * run on the setting values being serialized as JSON into the post content + * so it is pre-sanitized. + * + * Also, the sanitization logic is re-run through the respective + * WP_Customize_Setting::sanitize() method when being read out of the + * changeset, via WP_Customize_Manager::post_value(), and this sanitized + * value will also be sent into WP_Customize_Setting::update() for + * persisting to the DB. + * + * Multiple users can collaborate on a single changeset, where one user may + * have the unfiltered_html capability but another may not. A user with + * unfiltered_html may add a script tag to some field which needs to be kept + * intact even when another user updates the changeset to modify another field + * when they do not have unfiltered_html. + * + * @since 5.4.1 + * + * @param array $data An array of slashed and processed post data. + * @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data. + * @param array $unsanitized_postarr An array of slashed yet *unsanitized* and unprocessed post data as originally passed to wp_insert_post(). + * @return array Filtered post data. + */ + public function preserve_insert_changeset_post_content($data, $postarr, $unsanitized_postarr) + { + } + /** + * Trashes or deletes a changeset post. + * + * The following re-formulates the logic from `wp_trash_post()` as done in + * `wp_publish_post()`. The reason for bypassing `wp_trash_post()` is that it + * will mutate the the `post_content` and the `post_name` when they should be + * untouched. + * + * @since 4.9.0 + * + * @see wp_trash_post() + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param int|WP_Post $post The changeset post. + * @return mixed A WP_Post object for the trashed post or an empty value on failure. + */ + public function trash_changeset_post($post) + { + } + /** + * Handles request to trash a changeset. + * + * @since 4.9.0 + * @phpstan-return void + */ + public function handle_changeset_trash_request() + { + } + /** + * Re-maps 'edit_post' meta cap for a customize_changeset post to be the same as 'customize' maps. + * + * There is essentially a "meta meta" cap in play here, where 'edit_post' meta cap maps to + * the 'customize' meta cap which then maps to 'edit_theme_options'. This is currently + * required in core for `wp_create_post_autosave()` because it will call + * `_wp_translate_postdata()` which in turn will check if a user can 'edit_post', but the + * the caps for the customize_changeset post type are all mapping to the meta capability. + * This should be able to be removed once #40922 is addressed in core. + * + * @since 4.9.0 + * + * @link https://core.trac.wordpress.org/ticket/40922 + * @see WP_Customize_Manager::save_changeset_post() + * @see _wp_translate_postdata() + * + * @param string[] $caps Array of the user's capabilities. + * @param string $cap Capability name. + * @param int $user_id The user ID. + * @param array $args Adds the context to the cap. Typically the object ID. + * @return array Capabilities. + */ + public function grant_edit_post_capability_for_changeset($caps, $cap, $user_id, $args) + { + } + /** + * Marks the changeset post as being currently edited by the current user. + * + * @since 4.9.0 + * + * @param int $changeset_post_id Changeset post ID. + * @param bool $take_over Whether to take over the changeset. Default false. + */ + public function set_changeset_lock($changeset_post_id, $take_over = \false) + { + } + /** + * Refreshes changeset lock with the current time if current user edited the changeset before. + * + * @since 4.9.0 + * + * @param int $changeset_post_id Changeset post ID. + * @phpstan-return void + */ + public function refresh_changeset_lock($changeset_post_id) + { + } + /** + * Filters heartbeat settings for the Customizer. + * + * @since 4.9.0 + * + * @global string $pagenow The filename of the current screen. + * + * @param array $settings Current settings to filter. + * @return array Heartbeat settings. + */ + public function add_customize_screen_to_heartbeat_settings($settings) + { + } + /** + * Checks locked changeset with heartbeat API. + * + * @since 4.9.0 + * + * @param array $response The Heartbeat response. + * @param array $data The $_POST data sent. + * @param string $screen_id The screen id. + * @return array The Heartbeat response. + */ + public function check_changeset_lock_with_heartbeat($response, $data, $screen_id) + { + } + /** + * Removes changeset lock when take over request is sent via Ajax. + * + * @since 4.9.0 + * @phpstan-return never + */ + public function handle_override_changeset_lock_request() + { + } + /** + * Filters whether a changeset has changed to create a new revision. + * + * Note that this will not be called while a changeset post remains in auto-draft status. + * + * @since 4.7.0 + * + * @param bool $post_has_changed Whether the post has changed. + * @param WP_Post $latest_revision The latest revision post object. + * @param WP_Post $post The post object. + * @return bool Whether a revision should be made. + */ + public function _filter_revision_post_has_changed($post_has_changed, $latest_revision, $post) + { + } + /** + * Publishes the values of a changeset. + * + * This will publish the values contained in a changeset, even changesets that do not + * correspond to current manager instance. This is called by + * `_wp_customize_publish_changeset()` when a customize_changeset post is + * transitioned to the `publish` status. As such, this method should not be + * called directly and instead `wp_publish_post()` should be used. + * + * Please note that if the settings in the changeset are for a non-activated + * theme, the theme must first be switched to (via `switch_theme()`) before + * invoking this method. + * + * @since 4.7.0 + * + * @see _wp_customize_publish_changeset() + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param int $changeset_post_id ID for customize_changeset post. Defaults to the changeset for the current manager instance. + * @return true|WP_Error True or error info. + */ + public function _publish_changeset_values($changeset_post_id) + { + } + /** + * Refreshes nonces for the current preview. + * + * @since 4.2.0 + * @phpstan-return never + */ + public function refresh_nonces() + { + } + /** + * Deletes a given auto-draft changeset or the autosave revision for a given changeset or delete changeset lock. + * + * @since 4.9.0 + * @phpstan-return never + */ + public function handle_dismiss_autosave_or_lock_request() + { + } + /** + * Adds a customize setting. + * + * @since 3.4.0 + * @since 4.5.0 Return added WP_Customize_Setting instance. + * + * @see WP_Customize_Setting::__construct() + * @link https://developer.wordpress.org/themes/customize-api + * + * @param WP_Customize_Setting|string $id Customize Setting object, or ID. + * @param array $args Optional. Array of properties for the new Setting object. + * See WP_Customize_Setting::__construct() for information + * on accepted arguments. Default empty array. + * @return WP_Customize_Setting The instance of the setting that was added. + * @phpstan-param array{ + * type?: string, + * capability?: string, + * theme_supports?: string|string[], + * default?: string, + * transport?: string, + * validate_callback?: callable, + * sanitize_callback?: callable, + * sanitize_js_callback?: callable, + * dirty?: bool, + * } $args See WP_Customize_Setting::__construct() + */ + public function add_setting($id, $args = array()) + { + } + /** + * Registers any dynamically-created settings, such as those from $_POST['customized'] + * that have no corresponding setting created. + * + * This is a mechanism to "wake up" settings that have been dynamically created + * on the front end and have been sent to WordPress in `$_POST['customized']`. When WP + * loads, the dynamically-created settings then will get created and previewed + * even though they are not directly created statically with code. + * + * @since 4.2.0 + * + * @param array $setting_ids The setting IDs to add. + * @return array The WP_Customize_Setting objects added. + */ + public function add_dynamic_settings($setting_ids) + { + } + /** + * Retrieves a customize setting. + * + * @since 3.4.0 + * + * @param string $id Customize Setting ID. + * @return WP_Customize_Setting|void The setting, if set. + */ + public function get_setting($id) + { + } + /** + * Removes a customize setting. + * + * Note that removing the setting doesn't destroy the WP_Customize_Setting instance or remove its filters. + * + * @since 3.4.0 + * + * @param string $id Customize Setting ID. + */ + public function remove_setting($id) + { + } + /** + * Adds a customize panel. + * + * @since 4.0.0 + * @since 4.5.0 Return added WP_Customize_Panel instance. + * + * @see WP_Customize_Panel::__construct() + * + * @param WP_Customize_Panel|string $id Customize Panel object, or ID. + * @param array $args Optional. Array of properties for the new Panel object. + * See WP_Customize_Panel::__construct() for information + * on accepted arguments. Default empty array. + * @return WP_Customize_Panel The instance of the panel that was added. + * @phpstan-param array{ + * priority?: int, + * capability?: string, + * theme_supports?: mixed[], + * title?: string, + * description?: string, + * type?: string, + * active_callback?: callable, + * } $args See WP_Customize_Panel::__construct() + */ + public function add_panel($id, $args = array()) + { + } + /** + * Retrieves a customize panel. + * + * @since 4.0.0 + * + * @param string $id Panel ID to get. + * @return WP_Customize_Panel|void Requested panel instance, if set. + */ + public function get_panel($id) + { + } + /** + * Removes a customize panel. + * + * Note that removing the panel doesn't destroy the WP_Customize_Panel instance or remove its filters. + * + * @since 4.0.0 + * + * @param string $id Panel ID to remove. + */ + public function remove_panel($id) + { + } + /** + * Registers a customize panel type. + * + * Registered types are eligible to be rendered via JS and created dynamically. + * + * @since 4.3.0 + * + * @see WP_Customize_Panel + * + * @param string $panel Name of a custom panel which is a subclass of WP_Customize_Panel. + */ + public function register_panel_type($panel) + { + } + /** + * Renders JS templates for all registered panel types. + * + * @since 4.3.0 + */ + public function render_panel_templates() + { + } + /** + * Adds a customize section. + * + * @since 3.4.0 + * @since 4.5.0 Return added WP_Customize_Section instance. + * + * @see WP_Customize_Section::__construct() + * + * @param WP_Customize_Section|string $id Customize Section object, or ID. + * @param array $args Optional. Array of properties for the new Section object. + * See WP_Customize_Section::__construct() for information + * on accepted arguments. Default empty array. + * @return WP_Customize_Section The instance of the section that was added. + * @phpstan-param array{ + * priority?: int, + * panel?: string, + * capability?: string, + * theme_supports?: string|string[], + * title?: string, + * description?: string, + * type?: string, + * active_callback?: callable, + * description_hidden?: bool, + * } $args See WP_Customize_Section::__construct() + */ + public function add_section($id, $args = array()) + { + } + /** + * Retrieves a customize section. + * + * @since 3.4.0 + * + * @param string $id Section ID. + * @return WP_Customize_Section|void The section, if set. + */ + public function get_section($id) + { + } + /** + * Removes a customize section. + * + * Note that removing the section doesn't destroy the WP_Customize_Section instance or remove its filters. + * + * @since 3.4.0 + * + * @param string $id Section ID. + */ + public function remove_section($id) + { + } + /** + * Registers a customize section type. + * + * Registered types are eligible to be rendered via JS and created dynamically. + * + * @since 4.3.0 + * + * @see WP_Customize_Section + * + * @param string $section Name of a custom section which is a subclass of WP_Customize_Section. + */ + public function register_section_type($section) + { + } + /** + * Renders JS templates for all registered section types. + * + * @since 4.3.0 + */ + public function render_section_templates() + { + } + /** + * Adds a customize control. + * + * @since 3.4.0 + * @since 4.5.0 Return added WP_Customize_Control instance. + * + * @see WP_Customize_Control::__construct() + * + * @param WP_Customize_Control|string $id Customize Control object, or ID. + * @param array $args Optional. Array of properties for the new Control object. + * See WP_Customize_Control::__construct() for information + * on accepted arguments. Default empty array. + * @return WP_Customize_Control The instance of the control that was added. + * @phpstan-param array{ + * instance_number?: int, + * manager?: WP_Customize_Manager, + * id?: string, + * settings?: array, + * setting?: string, + * capability?: string, + * priority?: int, + * section?: string, + * label?: string, + * description?: string, + * choices?: array, + * input_attrs?: array, + * allow_addition?: bool, + * json?: array, + * type?: string, + * active_callback?: callable, + * } $args See WP_Customize_Control::__construct() + */ + public function add_control($id, $args = array()) + { + } + /** + * Retrieves a customize control. + * + * @since 3.4.0 + * + * @param string $id ID of the control. + * @return WP_Customize_Control|void The control object, if set. + */ + public function get_control($id) + { + } + /** + * Removes a customize control. + * + * Note that removing the control doesn't destroy the WP_Customize_Control instance or remove its filters. + * + * @since 3.4.0 + * + * @param string $id ID of the control. + */ + public function remove_control($id) + { + } + /** + * Registers a customize control type. + * + * Registered types are eligible to be rendered via JS and created dynamically. + * + * @since 4.1.0 + * + * @param string $control Name of a custom control which is a subclass of + * WP_Customize_Control. + */ + public function register_control_type($control) + { + } + /** + * Renders JS templates for all registered control types. + * + * @since 4.1.0 + */ + public function render_control_templates() + { + } + /** + * Prepares panels, sections, and controls. + * + * For each, check if required related components exist, + * whether the user has the necessary capabilities, + * and sort by priority. + * + * @since 3.4.0 + */ + public function prepare_controls() + { + } + /** + * Enqueues scripts for customize controls. + * + * @since 3.4.0 + */ + public function enqueue_control_scripts() + { + } + /** + * Determines whether the user agent is iOS. + * + * @since 4.4.0 + * + * @return bool Whether the user agent is iOS. + */ + public function is_ios() + { + } + /** + * Gets the template string for the Customizer pane document title. + * + * @since 4.4.0 + * + * @return string The template string for the document title. + */ + public function get_document_title_template() + { + } + /** + * Sets the initial URL to be previewed. + * + * URL is validated. + * + * @since 4.4.0 + * + * @param string $preview_url URL to be previewed. + */ + public function set_preview_url($preview_url) + { + } + /** + * Gets the initial URL to be previewed. + * + * @since 4.4.0 + * + * @return string URL being previewed. + */ + public function get_preview_url() + { + } + /** + * Determines whether the admin and the frontend are on different domains. + * + * @since 4.7.0 + * + * @return bool Whether cross-domain. + */ + public function is_cross_domain() + { + } + /** + * Gets URLs allowed to be previewed. + * + * If the front end and the admin are served from the same domain, load the + * preview over ssl if the Customizer is being loaded over ssl. This avoids + * insecure content warnings. This is not attempted if the admin and front end + * are on different domains to avoid the case where the front end doesn't have + * ssl certs. Domain mapping plugins can allow other urls in these conditions + * using the customize_allowed_urls filter. + * + * @since 4.7.0 + * + * @return array Allowed URLs. + */ + public function get_allowed_urls() + { + } + /** + * Gets messenger channel. + * + * @since 4.7.0 + * + * @return string Messenger channel. + */ + public function get_messenger_channel() + { + } + /** + * Sets URL to link the user to when closing the Customizer. + * + * URL is validated. + * + * @since 4.4.0 + * + * @param string $return_url URL for return link. + */ + public function set_return_url($return_url) + { + } + /** + * Gets URL to link the user to when closing the Customizer. + * + * @since 4.4.0 + * + * @global array $_registered_pages + * + * @return string URL for link to close Customizer. + */ + public function get_return_url() + { + } + /** + * Sets the autofocused constructs. + * + * @since 4.4.0 + * + * @param array $autofocus { + * Mapping of 'panel', 'section', 'control' to the ID which should be autofocused. + * + * @type string $control ID for control to be autofocused. + * @type string $section ID for section to be autofocused. + * @type string $panel ID for panel to be autofocused. + * } + * @phpstan-param array{ + * control?: string, + * section?: string, + * panel?: string, + * } $autofocus + */ + public function set_autofocus($autofocus) + { + } + /** + * Gets the autofocused constructs. + * + * @since 4.4.0 + * + * @return string[] { + * Mapping of 'panel', 'section', 'control' to the ID which should be autofocused. + * + * @type string $control ID for control to be autofocused. + * @type string $section ID for section to be autofocused. + * @type string $panel ID for panel to be autofocused. + * } + * @phpstan-return array{ + * control: string, + * section: string, + * panel: string, + * } + */ + public function get_autofocus() + { + } + /** + * Gets nonces for the Customizer. + * + * @since 4.5.0 + * + * @return array Nonces. + */ + public function get_nonces() + { + } + /** + * Prints JavaScript settings for parent window. + * + * @since 4.4.0 + */ + public function customize_pane_settings() + { + } + /** + * Returns a list of devices to allow previewing. + * + * @since 4.5.0 + * + * @return array List of devices with labels and default setting. + */ + public function get_previewable_devices() + { + } + /** + * Registers some default controls. + * + * @since 3.4.0 + */ + public function register_controls() + { + } + /** + * Returns whether there are published pages. + * + * Used as active callback for static front page section and controls. + * + * @since 4.7.0 + * + * @return bool Whether there are published (or to be published) pages. + */ + public function has_published_pages() + { + } + /** + * Adds settings from the POST data that were not added with code, e.g. dynamically-created settings for Widgets + * + * @since 4.2.0 + * + * @see add_dynamic_settings() + */ + public function register_dynamic_settings() + { + } + /** + * Loads themes into the theme browsing/installation UI. + * + * @since 4.9.0 + * @phpstan-return never + */ + public function handle_load_themes_request() + { + } + /** + * Callback for validating the header_textcolor value. + * + * Accepts 'blank', and otherwise uses sanitize_hex_color_no_hash(). + * Returns default text color if hex color is empty. + * + * @since 3.4.0 + * + * @param string $color + * @return mixed + */ + public function _sanitize_header_textcolor($color) + { + } + /** + * Callback for validating a background setting value. + * + * @since 4.7.0 + * + * @param string $value Repeat value. + * @param WP_Customize_Setting $setting Setting. + * @return string|WP_Error Background value or validation error. + */ + public function _sanitize_background_setting($value, $setting) + { + } + /** + * Exports header video settings to facilitate selective refresh. + * + * @since 4.7.0 + * + * @param array $response Response. + * @param WP_Customize_Selective_Refresh $selective_refresh Selective refresh component. + * @param array $partials Array of partials. + * @return array + */ + public function export_header_video_settings($response, $selective_refresh, $partials) + { + } + /** + * Callback for validating the header_video value. + * + * Ensures that the selected video is less than 8MB and provides an error message. + * + * @since 4.7.0 + * + * @param WP_Error $validity + * @param mixed $value + * @return mixed + */ + public function _validate_header_video($validity, $value) + { + } + /** + * Callback for validating the external_header_video value. + * + * Ensures that the provided URL is supported. + * + * @since 4.7.0 + * + * @param WP_Error $validity + * @param mixed $value + * @return mixed + */ + public function _validate_external_header_video($validity, $value) + { + } + /** + * Callback for sanitizing the external_header_video value. + * + * @since 4.7.1 + * + * @param string $value URL. + * @return string Sanitized URL. + */ + public function _sanitize_external_header_video($value) + { + } + /** + * Callback for rendering the custom logo, used in the custom_logo partial. + * + * This method exists because the partial object and context data are passed + * into a partial's render_callback so we cannot use get_custom_logo() as + * the render_callback directly since it expects a blog ID as the first + * argument. + * + * @see WP_Customize_Manager::register_controls() + * + * @since 4.5.0 + * + * @return string Custom logo. + */ + public function _render_custom_logo_partial() + { + } + } + /** + * Customize Nav Menus class. + * + * Implements menu management in the Customizer. + * + * @since 4.3.0 + * + * @see WP_Customize_Manager + */ + #[\AllowDynamicProperties] + final class WP_Customize_Nav_Menus + { + /** + * WP_Customize_Manager instance. + * + * @since 4.3.0 + * @var WP_Customize_Manager + */ + public $manager; + /** + * Constructor. + * + * @since 4.3.0 + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @phpstan-return void + */ + public function __construct($manager) + { + } + /** + * Adds a nonce for customizing menus. + * + * @since 4.5.0 + * + * @param string[] $nonces Array of nonces. + * @return string[] Modified array of nonces. + */ + public function filter_nonces($nonces) + { + } + /** + * Ajax handler for loading available menu items. + * + * @since 4.3.0 + * @phpstan-return never + */ + public function ajax_load_available_items() + { + } + /** + * Performs the post_type and taxonomy queries for loading available menu items. + * + * @since 4.3.0 + * + * @param string $object_type Optional. Accepts any custom object type and has built-in support for + * 'post_type' and 'taxonomy'. Default is 'post_type'. + * @param string $object_name Optional. Accepts any registered taxonomy or post type name. Default is 'page'. + * @param int $page Optional. The page number used to generate the query offset. Default is '0'. + * @return array|WP_Error An array of menu items on success, a WP_Error object on failure. + */ + public function load_available_items_query($object_type = 'post_type', $object_name = 'page', $page = 0) + { + } + /** + * Ajax handler for searching available menu items. + * + * @since 4.3.0 + */ + public function ajax_search_available_items() + { + } + /** + * Performs post queries for available-item searching. + * + * Based on WP_Editor::wp_link_query(). + * + * @since 4.3.0 + * + * @param array $args Optional. Accepts 'pagenum' and 's' (search) arguments. + * @return array Menu items. + */ + public function search_available_items_query($args = array()) + { + } + /** + * Enqueues scripts and styles for Customizer pane. + * + * @since 4.3.0 + */ + public function enqueue_scripts() + { + } + /** + * Filters a dynamic setting's constructor args. + * + * For a dynamic setting to be registered, this filter must be employed + * to override the default false value with an array of args to pass to + * the WP_Customize_Setting constructor. + * + * @since 4.3.0 + * + * @param false|array $setting_args The arguments to the WP_Customize_Setting constructor. + * @param string $setting_id ID for dynamic setting, usually coming from `$_POST['customized']`. + * @return array|false + */ + public function filter_dynamic_setting_args($setting_args, $setting_id) + { + } + /** + * Allows non-statically created settings to be constructed with custom WP_Customize_Setting subclass. + * + * @since 4.3.0 + * + * @param string $setting_class WP_Customize_Setting or a subclass. + * @param string $setting_id ID for dynamic setting, usually coming from `$_POST['customized']`. + * @param array $setting_args WP_Customize_Setting or a subclass. + * @return string + */ + public function filter_dynamic_setting_class($setting_class, $setting_id, $setting_args) + { + } + /** + * Adds the customizer settings and controls. + * + * @since 4.3.0 + */ + public function customize_register() + { + } + /** + * Gets the base10 intval. + * + * This is used as a setting's sanitize_callback; we can't use just plain + * intval because the second argument is not what intval() expects. + * + * @since 4.3.0 + * + * @param mixed $value Number to convert. + * @return int Integer. + */ + public function intval_base10($value) + { + } + /** + * Returns an array of all the available item types. + * + * @since 4.3.0 + * @since 4.7.0 Each array item now includes a `$type_label` in addition to `$title`, `$type`, and `$object`. + * + * @return array The available menu item types. + */ + public function available_item_types() + { + } + /** + * Adds a new `auto-draft` post. + * + * @since 4.7.0 + * + * @param array $postarr { + * Post array. Note that post_status is overridden to be `auto-draft`. + * + * @type string $post_title Post title. Required. + * @type string $post_type Post type. Required. + * @type string $post_name Post name. + * @type string $post_content Post content. + * } + * @return WP_Post|WP_Error Inserted auto-draft post object or error. + * @phpstan-param array{ + * post_title?: string, + * post_type?: string, + * post_name?: string, + * post_content?: string, + * } $postarr + */ + public function insert_auto_draft_post($postarr) + { + } + /** + * Ajax handler for adding a new auto-draft post. + * + * @since 4.7.0 + */ + public function ajax_insert_auto_draft_post() + { + } + /** + * Prints the JavaScript templates used to render Menu Customizer components. + * + * Templates are imported into the JS use wp.template. + * + * @since 4.3.0 + */ + public function print_templates() + { + } + /** + * Prints the HTML template used to render the add-menu-item frame. + * + * @since 4.3.0 + */ + public function available_items_template() + { + } + /** + * Nav menu args used for each instance, keyed by the args HMAC. + * + * @since 4.3.0 + * @var array + */ + public $preview_nav_menu_instance_args = array(); + /** + * Filters arguments for dynamic nav_menu selective refresh partials. + * + * @since 4.5.0 + * + * @param array|false $partial_args Partial args. + * @param string $partial_id Partial ID. + * @return array Partial args. + */ + public function customize_dynamic_partial_args($partial_args, $partial_id) + { + } + /** + * Adds hooks for the Customizer preview. + * + * @since 4.3.0 + */ + public function customize_preview_init() + { + } + /** + * Makes the auto-draft status protected so that it can be queried. + * + * @since 4.7.0 + * + * @global stdClass[] $wp_post_statuses List of post statuses. + */ + public function make_auto_draft_status_previewable() + { + } + /** + * Sanitizes post IDs for posts created for nav menu items to be published. + * + * @since 4.7.0 + * + * @param array $value Post IDs. + * @return array Post IDs. + */ + public function sanitize_nav_menus_created_posts($value) + { + } + /** + * Publishes the auto-draft posts that were created for nav menu items. + * + * The post IDs will have been sanitized by already by + * `WP_Customize_Nav_Menu_Items::sanitize_nav_menus_created_posts()` to + * remove any post IDs for which the user cannot publish or for which the + * post is not an auto-draft. + * + * @since 4.7.0 + * + * @param WP_Customize_Setting $setting Customizer setting object. + */ + public function save_nav_menus_created_posts($setting) + { + } + /** + * Keeps track of the arguments that are being passed to wp_nav_menu(). + * + * @since 4.3.0 + * + * @see wp_nav_menu() + * @see WP_Customize_Widgets::filter_dynamic_sidebar_params() + * + * @param array $args An array containing wp_nav_menu() arguments. + * @return array Arguments. + */ + public function filter_wp_nav_menu_args($args) + { + } + /** + * Prepares wp_nav_menu() calls for partial refresh. + * + * Injects attributes into container element. + * + * @since 4.3.0 + * + * @see wp_nav_menu() + * + * @param string $nav_menu_content The HTML content for the navigation menu. + * @param object $args An object containing wp_nav_menu() arguments. + * @return string Nav menu HTML with selective refresh attributes added if partial can be refreshed. + */ + public function filter_wp_nav_menu($nav_menu_content, $args) + { + } + /** + * Hashes (hmac) the nav menu arguments to ensure they are not tampered with when + * submitted in the Ajax request. + * + * Note that the array is expected to be pre-sorted. + * + * @since 4.3.0 + * + * @param array $args The arguments to hash. + * @return string Hashed nav menu arguments. + */ + public function hash_nav_menu_args($args) + { + } + /** + * Enqueues scripts for the Customizer preview. + * + * @since 4.3.0 + */ + public function customize_preview_enqueue_deps() + { + } + /** + * Exports data from PHP to JS. + * + * @since 4.3.0 + */ + public function export_preview_data() + { + } + /** + * Exports any wp_nav_menu() calls during the rendering of any partials. + * + * @since 4.5.0 + * + * @param array $response Response. + * @return array Response. + */ + public function export_partial_rendered_nav_menu_instances($response) + { + } + /** + * Renders a specific menu via wp_nav_menu() using the supplied arguments. + * + * @since 4.3.0 + * + * @see wp_nav_menu() + * + * @param WP_Customize_Partial $partial Partial. + * @param array $nav_menu_args Nav menu args supplied as container context. + * @return string|false + */ + public function render_nav_menu_partial($partial, $nav_menu_args) + { + } + } + /** + * Customize Panel class. + * + * A UI container for sections, managed by the WP_Customize_Manager. + * + * @since 4.0.0 + * + * @see WP_Customize_Manager + */ + #[\AllowDynamicProperties] + class WP_Customize_Panel + { + /** + * Incremented with each new class instantiation, then stored in $instance_number. + * + * Used when sorting two instances whose priorities are equal. + * + * @since 4.1.0 + * @var int + */ + protected static $instance_count = 0; + /** + * Order in which this instance was created in relation to other instances. + * + * @since 4.1.0 + * @var int + */ + public $instance_number; + /** + * WP_Customize_Manager instance. + * + * @since 4.0.0 + * @var WP_Customize_Manager + */ + public $manager; + /** + * Unique identifier. + * + * @since 4.0.0 + * @var string + */ + public $id; + /** + * Priority of the panel, defining the display order of panels and sections. + * + * @since 4.0.0 + * @var int + */ + public $priority = 160; + /** + * Capability required for the panel. + * + * @since 4.0.0 + * @var string + */ + public $capability = 'edit_theme_options'; + /** + * Theme features required to support the panel. + * + * @since 4.0.0 + * @var mixed[] + */ + public $theme_supports = ''; + /** + * Title of the panel to show in UI. + * + * @since 4.0.0 + * @var string + */ + public $title = ''; + /** + * Description to show in the UI. + * + * @since 4.0.0 + * @var string + */ + public $description = ''; + /** + * Auto-expand a section in a panel when the panel is expanded when the panel only has the one section. + * + * @since 4.7.4 + * @var bool + */ + public $auto_expand_sole_section = \false; + /** + * Customizer sections for this panel. + * + * @since 4.0.0 + * @var array + */ + public $sections; + /** + * Type of this panel. + * + * @since 4.1.0 + * @var string + */ + public $type = 'default'; + /** + * Active callback. + * + * @since 4.1.0 + * + * @see WP_Customize_Section::active() + * + * @var callable Callback is called with one argument, the instance of + * WP_Customize_Section, and returns bool to indicate whether + * the section is active (such as it relates to the URL currently + * being previewed). + */ + public $active_callback = ''; + /** + * Constructor. + * + * Any supplied $args override class property defaults. + * + * @since 4.0.0 + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @param string $id A specific ID for the panel. + * @param array $args { + * Optional. Array of properties for the new Panel object. Default empty array. + * + * @type int $priority Priority of the panel, defining the display order + * of panels and sections. Default 160. + * @type string $capability Capability required for the panel. + * Default `edit_theme_options`. + * @type mixed[] $theme_supports Theme features required to support the panel. + * @type string $title Title of the panel to show in UI. + * @type string $description Description to show in the UI. + * @type string $type Type of the panel. + * @type callable $active_callback Active callback. + * } + * @phpstan-param array{ + * priority?: int, + * capability?: string, + * theme_supports?: mixed[], + * title?: string, + * description?: string, + * type?: string, + * active_callback?: callable, + * } $args + */ + public function __construct($manager, $id, $args = array()) + { + } + /** + * Check whether panel is active to current Customizer preview. + * + * @since 4.1.0 + * + * @return bool Whether the panel is active to the current preview. + */ + final public function active() + { + } + /** + * Default callback used when invoking WP_Customize_Panel::active(). + * + * Subclasses can override this with their specific logic, or they may + * provide an 'active_callback' argument to the constructor. + * + * @since 4.1.0 + * + * @return bool Always true. + */ + public function active_callback() + { + } + /** + * Gather the parameters passed to client JavaScript via JSON. + * + * @since 4.1.0 + * + * @return array The array to be exported to the client as JSON. + */ + public function json() + { + } + /** + * Checks required user capabilities and whether the theme has the + * feature support required by the panel. + * + * @since 4.0.0 + * @since 5.9.0 Method was marked non-final. + * + * @return bool False if theme doesn't support the panel or the user doesn't have the capability. + */ + public function check_capabilities() + { + } + /** + * Get the panel's content template for insertion into the Customizer pane. + * + * @since 4.1.0 + * + * @return string Content for the panel. + */ + final public function get_content() + { + } + /** + * Check capabilities and render the panel. + * + * @since 4.0.0 + * @phpstan-return void + */ + final public function maybe_render() + { + } + /** + * Render the panel container, and then its contents (via `this->render_content()`) in a subclass. + * + * Panel containers are now rendered in JS by default, see WP_Customize_Panel::print_template(). + * + * @since 4.0.0 + */ + protected function render() + { + } + /** + * Render the panel UI in a subclass. + * + * Panel contents are now rendered in JS by default, see WP_Customize_Panel::print_template(). + * + * @since 4.1.0 + */ + protected function render_content() + { + } + /** + * Render the panel's JS templates. + * + * This function is only run for panel types that have been registered with + * WP_Customize_Manager::register_panel_type(). + * + * @since 4.3.0 + * + * @see WP_Customize_Manager::register_panel_type() + */ + public function print_template() + { + } + /** + * An Underscore (JS) template for rendering this panel's container. + * + * Class variables for this panel class are available in the `data` JS object; + * export custom variables by overriding WP_Customize_Panel::json(). + * + * @see WP_Customize_Panel::print_template() + * + * @since 4.3.0 + */ + protected function render_template() + { + } + /** + * An Underscore (JS) template for this panel's content (but not its container). + * + * Class variables for this panel class are available in the `data` JS object; + * export custom variables by overriding WP_Customize_Panel::json(). + * + * @see WP_Customize_Panel::print_template() + * + * @since 4.3.0 + */ + protected function content_template() + { + } + } + /** + * Customize Section class. + * + * A UI container for controls, managed by the WP_Customize_Manager class. + * + * @since 3.4.0 + * + * @see WP_Customize_Manager + */ + #[\AllowDynamicProperties] + class WP_Customize_Section + { + /** + * Incremented with each new class instantiation, then stored in $instance_number. + * + * Used when sorting two instances whose priorities are equal. + * + * @since 4.1.0 + * @var int + */ + protected static $instance_count = 0; + /** + * Order in which this instance was created in relation to other instances. + * + * @since 4.1.0 + * @var int + */ + public $instance_number; + /** + * WP_Customize_Manager instance. + * + * @since 3.4.0 + * @var WP_Customize_Manager + */ + public $manager; + /** + * Unique identifier. + * + * @since 3.4.0 + * @var string + */ + public $id; + /** + * Priority of the section which informs load order of sections. + * + * @since 3.4.0 + * @var int + */ + public $priority = 160; + /** + * Panel in which to show the section, making it a sub-section. + * + * @since 4.0.0 + * @var string + */ + public $panel = ''; + /** + * Capability required for the section. + * + * @since 3.4.0 + * @var string + */ + public $capability = 'edit_theme_options'; + /** + * Theme features required to support the section. + * + * @since 3.4.0 + * @var string|string[] + */ + public $theme_supports = ''; + /** + * Title of the section to show in UI. + * + * @since 3.4.0 + * @var string + */ + public $title = ''; + /** + * Description to show in the UI. + * + * @since 3.4.0 + * @var string + */ + public $description = ''; + /** + * Customizer controls for this section. + * + * @since 3.4.0 + * @var array + */ + public $controls; + /** + * Type of this section. + * + * @since 4.1.0 + * @var string + */ + public $type = 'default'; + /** + * Active callback. + * + * @since 4.1.0 + * + * @see WP_Customize_Section::active() + * + * @var callable Callback is called with one argument, the instance of + * WP_Customize_Section, and returns bool to indicate whether + * the section is active (such as it relates to the URL currently + * being previewed). + */ + public $active_callback = ''; + /** + * Show the description or hide it behind the help icon. + * + * @since 4.7.0 + * + * @var bool Indicates whether the Section's description should be + * hidden behind a help icon ("?") in the Section header, + * similar to how help icons are displayed on Panels. + */ + public $description_hidden = \false; + /** + * Constructor. + * + * Any supplied $args override class property defaults. + * + * @since 3.4.0 + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @param string $id A specific ID of the section. + * @param array $args { + * Optional. Array of properties for the new Section object. Default empty array. + * + * @type int $priority Priority of the section, defining the display order + * of panels and sections. Default 160. + * @type string $panel The panel this section belongs to (if any). + * Default empty. + * @type string $capability Capability required for the section. + * Default 'edit_theme_options' + * @type string|string[] $theme_supports Theme features required to support the section. + * @type string $title Title of the section to show in UI. + * @type string $description Description to show in the UI. + * @type string $type Type of the section. + * @type callable $active_callback Active callback. + * @type bool $description_hidden Hide the description behind a help icon, + * instead of inline above the first control. + * Default false. + * } + * @phpstan-param array{ + * priority?: int, + * panel?: string, + * capability?: string, + * theme_supports?: string|string[], + * title?: string, + * description?: string, + * type?: string, + * active_callback?: callable, + * description_hidden?: bool, + * } $args + */ + public function __construct($manager, $id, $args = array()) + { + } + /** + * Check whether section is active to current Customizer preview. + * + * @since 4.1.0 + * + * @return bool Whether the section is active to the current preview. + */ + final public function active() + { + } + /** + * Default callback used when invoking WP_Customize_Section::active(). + * + * Subclasses can override this with their specific logic, or they may provide + * an 'active_callback' argument to the constructor. + * + * @since 4.1.0 + * + * @return true Always true. + */ + public function active_callback() + { + } + /** + * Gather the parameters passed to client JavaScript via JSON. + * + * @since 4.1.0 + * + * @return array The array to be exported to the client as JSON. + */ + public function json() + { + } + /** + * Checks required user capabilities and whether the theme has the + * feature support required by the section. + * + * @since 3.4.0 + * + * @return bool False if theme doesn't support the section or user doesn't have the capability. + */ + final public function check_capabilities() + { + } + /** + * Get the section's content for insertion into the Customizer pane. + * + * @since 4.1.0 + * + * @return string Contents of the section. + */ + final public function get_content() + { + } + /** + * Check capabilities and render the section. + * + * @since 3.4.0 + * @phpstan-return void + */ + final public function maybe_render() + { + } + /** + * Render the section UI in a subclass. + * + * Sections are now rendered in JS by default, see WP_Customize_Section::print_template(). + * + * @since 3.4.0 + */ + protected function render() + { + } + /** + * Render the section's JS template. + * + * This function is only run for section types that have been registered with + * WP_Customize_Manager::register_section_type(). + * + * @since 4.3.0 + * + * @see WP_Customize_Manager::render_template() + */ + public function print_template() + { + } + /** + * An Underscore (JS) template for rendering this section. + * + * Class variables for this section class are available in the `data` JS object; + * export custom variables by overriding WP_Customize_Section::json(). + * + * @since 4.3.0 + * + * @see WP_Customize_Section::print_template() + */ + protected function render_template() + { + } + } + /** + * Customize Setting class. + * + * Handles saving and sanitizing of settings. + * + * @since 3.4.0 + * + * @see WP_Customize_Manager + * @link https://developer.wordpress.org/themes/customize-api + */ + #[\AllowDynamicProperties] + class WP_Customize_Setting + { + /** + * Customizer bootstrap instance. + * + * @since 3.4.0 + * @var WP_Customize_Manager + */ + public $manager; + /** + * Unique string identifier for the setting. + * + * @since 3.4.0 + * @var string + */ + public $id; + /** + * Type of customize settings. + * + * @since 3.4.0 + * @var string + */ + public $type = 'theme_mod'; + /** + * Capability required to edit this setting. + * + * @since 3.4.0 + * @var string|array + */ + public $capability = 'edit_theme_options'; + /** + * Theme features required to support the setting. + * + * @since 3.4.0 + * @var string|string[] + */ + public $theme_supports = ''; + /** + * The default value for the setting. + * + * @since 3.4.0 + * @var string + */ + public $default = ''; + /** + * Options for rendering the live preview of changes in Customizer. + * + * Set this value to 'postMessage' to enable a custom JavaScript handler to render changes to this setting + * as opposed to reloading the whole page. + * + * @since 3.4.0 + * @var string + */ + public $transport = 'refresh'; + /** + * Server-side validation callback for the setting's value. + * + * @since 4.6.0 + * @var callable + */ + public $validate_callback = ''; + /** + * Callback to filter a Customize setting value in un-slashed form. + * + * @since 3.4.0 + * @var callable + */ + public $sanitize_callback = ''; + /** + * Callback to convert a Customize PHP setting value to a value that is JSON serializable. + * + * @since 3.4.0 + * @var callable + */ + public $sanitize_js_callback = ''; + /** + * Whether or not the setting is initially dirty when created. + * + * This is used to ensure that a setting will be sent from the pane to the + * preview when loading the Customizer. Normally a setting only is synced to + * the preview if it has been changed. This allows the setting to be sent + * from the start. + * + * @since 4.2.0 + * @var bool + */ + public $dirty = \false; + /** + * ID Data. + * + * @since 3.4.0 + * @var array + */ + protected $id_data = array(); + /** + * Whether or not preview() was called. + * + * @since 4.4.0 + * @var bool + */ + protected $is_previewed = \false; + /** + * Cache of multidimensional values to improve performance. + * + * @since 4.4.0 + * @var array + */ + protected static $aggregated_multidimensionals = array(); + /** + * Whether the multidimensional setting is aggregated. + * + * @since 4.4.0 + * @var bool + */ + protected $is_multidimensional_aggregated = \false; + /** + * Constructor. + * + * Any supplied $args override class property defaults. + * + * @since 3.4.0 + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @param string $id A specific ID of the setting. + * Can be a theme mod or option name. + * @param array $args { + * Optional. Array of properties for the new Setting object. Default empty array. + * + * @type string $type Type of the setting. Default 'theme_mod'. + * @type string $capability Capability required for the setting. Default 'edit_theme_options' + * @type string|string[] $theme_supports Theme features required to support the panel. Default is none. + * @type string $default Default value for the setting. Default is empty string. + * @type string $transport Options for rendering the live preview of changes in Customizer. + * Using 'refresh' makes the change visible by reloading the whole preview. + * Using 'postMessage' allows a custom JavaScript to handle live changes. + * Default is 'refresh'. + * @type callable $validate_callback Server-side validation callback for the setting's value. + * @type callable $sanitize_callback Callback to filter a Customize setting value in un-slashed form. + * @type callable $sanitize_js_callback Callback to convert a Customize PHP setting value to a value that is + * JSON serializable. + * @type bool $dirty Whether or not the setting is initially dirty when created. + * } + * @phpstan-param array{ + * type?: string, + * capability?: string, + * theme_supports?: string|string[], + * default?: string, + * transport?: string, + * validate_callback?: callable, + * sanitize_callback?: callable, + * sanitize_js_callback?: callable, + * dirty?: bool, + * } $args + */ + public function __construct($manager, $id, $args = array()) + { + } + /** + * Get parsed ID data for multidimensional setting. + * + * @since 4.4.0 + * + * @return array { + * ID data for multidimensional setting. + * + * @type string $base ID base + * @type array $keys Keys for multidimensional array. + * } + * @phpstan-return array{ + * base: string, + * keys: array, + * } + */ + final public function id_data() + { + } + /** + * Set up the setting for aggregated multidimensional values. + * + * When a multidimensional setting gets aggregated, all of its preview and update + * calls get combined into one call, greatly improving performance. + * + * @since 4.4.0 + */ + protected function aggregate_multidimensional() + { + } + /** + * Reset `$aggregated_multidimensionals` static variable. + * + * This is intended only for use by unit tests. + * + * @since 4.5.0 + * @ignore + */ + public static function reset_aggregated_multidimensionals() + { + } + /** + * The ID for the current site when the preview() method was called. + * + * @since 4.2.0 + * @var int + */ + protected $_previewed_blog_id; + /** + * Return true if the current site is not the same as the previewed site. + * + * @since 4.2.0 + * + * @return bool If preview() has been called. + */ + public function is_current_blog_previewed() + { + } + /** + * Original non-previewed value stored by the preview method. + * + * @see WP_Customize_Setting::preview() + * @since 4.1.1 + * @var mixed + */ + protected $_original_value; + /** + * Add filters to supply the setting's value when accessed. + * + * If the setting already has a pre-existing value and there is no incoming + * post value for the setting, then this method will short-circuit since + * there is no change to preview. + * + * @since 3.4.0 + * @since 4.4.0 Added boolean return value. + * + * @return bool False when preview short-circuits due no change needing to be previewed. + */ + public function preview() + { + } + /** + * Clear out the previewed-applied flag for a multidimensional-aggregated value whenever its post value is updated. + * + * This ensures that the new value will get sanitized and used the next time + * that `WP_Customize_Setting::_multidimensional_preview_filter()` + * is called for this setting. + * + * @since 4.4.0 + * + * @see WP_Customize_Manager::set_post_value() + * @see WP_Customize_Setting::_multidimensional_preview_filter() + */ + final public function _clear_aggregated_multidimensional_preview_applied_flag() + { + } + /** + * Callback function to filter non-multidimensional theme mods and options. + * + * If switch_to_blog() was called after the preview() method, and the current + * site is now not the same site, then this method does a no-op and returns + * the original value. + * + * @since 3.4.0 + * + * @param mixed $original Old value. + * @return mixed New or old value. + */ + public function _preview_filter($original) + { + } + /** + * Callback function to filter multidimensional theme mods and options. + * + * For all multidimensional settings of a given type, the preview filter for + * the first setting previewed will be used to apply the values for the others. + * + * @since 4.4.0 + * + * @see WP_Customize_Setting::$aggregated_multidimensionals + * @param mixed $original Original root value. + * @return mixed New or old value. + */ + final public function _multidimensional_preview_filter($original) + { + } + /** + * Checks user capabilities and theme supports, and then saves + * the value of the setting. + * + * @since 3.4.0 + * + * @return void|false Void on success, false if cap check fails + * or value isn't set or is invalid. + */ + final public function save() + { + } + /** + * Fetch and sanitize the $_POST value for the setting. + * + * During a save request prior to save, post_value() provides the new value while value() does not. + * + * @since 3.4.0 + * + * @param mixed $default_value A default value which is used as a fallback. Default null. + * @return mixed The default value on failure, otherwise the sanitized and validated value. + */ + final public function post_value($default_value = \null) + { + } + /** + * Sanitize an input. + * + * @since 3.4.0 + * + * @param string|array $value The value to sanitize. + * @return string|array|null|WP_Error Sanitized value, or `null`/`WP_Error` if invalid. + */ + public function sanitize($value) + { + } + /** + * Validates an input. + * + * @since 4.6.0 + * + * @see WP_REST_Request::has_valid_params() + * + * @param mixed $value Value to validate. + * @return true|WP_Error True if the input was validated, otherwise WP_Error. + */ + public function validate($value) + { + } + /** + * Get the root value for a setting, especially for multidimensional ones. + * + * @since 4.4.0 + * + * @param mixed $default_value Value to return if root does not exist. + * @return mixed + */ + protected function get_root_value($default_value = \null) + { + } + /** + * Set the root value for a setting, especially for multidimensional ones. + * + * @since 4.4.0 + * + * @param mixed $value Value to set as root of multidimensional setting. + * @return bool Whether the multidimensional root was updated successfully. + */ + protected function set_root_value($value) + { + } + /** + * Save the value of the setting, using the related API. + * + * @since 3.4.0 + * + * @param mixed $value The value to update. + * @return bool The result of saving the value. + */ + protected function update($value) + { + } + /** + * Deprecated method. + * + * @since 3.4.0 + * @deprecated 4.4.0 Deprecated in favor of update() method. + */ + protected function _update_theme_mod() + { + } + /** + * Deprecated method. + * + * @since 3.4.0 + * @deprecated 4.4.0 Deprecated in favor of update() method. + */ + protected function _update_option() + { + } + /** + * Fetch the value of the setting. + * + * @since 3.4.0 + * + * @return mixed The value. + */ + public function value() + { + } + /** + * Sanitize the setting's value for use in JavaScript. + * + * @since 3.4.0 + * + * @return mixed The requested escaped value. + */ + public function js_value() + { + } + /** + * Retrieves the data to export to the client via JSON. + * + * @since 4.6.0 + * + * @return array Array of parameters passed to JavaScript. + */ + public function json() + { + } + /** + * Validate user capabilities whether the theme supports the setting. + * + * @since 3.4.0 + * + * @return bool False if theme doesn't support the setting or user can't change setting, otherwise true. + */ + final public function check_capabilities() + { + } + /** + * Multidimensional helper function. + * + * @since 3.4.0 + * + * @param array $root + * @param array $keys + * @param bool $create Default false. + * @return array|void Keys are 'root', 'node', and 'key'. + */ + final protected function multidimensional(&$root, $keys, $create = \false) + { + } + /** + * Will attempt to replace a specific value in a multidimensional array. + * + * @since 3.4.0 + * + * @param array $root + * @param array $keys + * @param mixed $value The value to update. + * @return mixed + */ + final protected function multidimensional_replace($root, $keys, $value) + { + } + /** + * Will attempt to fetch a specific value from a multidimensional array. + * + * @since 3.4.0 + * + * @param array $root + * @param array $keys + * @param mixed $default_value A default value which is used as a fallback. Default null. + * @return mixed The requested value or the default value. + */ + final protected function multidimensional_get($root, $keys, $default_value = \null) + { + } + /** + * Will attempt to check if a specific value in a multidimensional array is set. + * + * @since 3.4.0 + * + * @param array $root + * @param array $keys + * @return bool True if value is set, false if not. + */ + final protected function multidimensional_isset($root, $keys) + { + } + } + /** + * Customize Widgets class. + * + * Implements widget management in the Customizer. + * + * @since 3.9.0 + * + * @see WP_Customize_Manager + */ + #[\AllowDynamicProperties] + final class WP_Customize_Widgets + { + /** + * WP_Customize_Manager instance. + * + * @since 3.9.0 + * @var WP_Customize_Manager + */ + public $manager; + /** + * Initial loader. + * + * @since 3.9.0 + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @phpstan-return void + */ + public function __construct($manager) + { + } + /** + * List whether each registered widget can be use selective refresh. + * + * If the theme does not support the customize-selective-refresh-widgets feature, + * then this will always return an empty array. + * + * @since 4.5.0 + * + * @global WP_Widget_Factory $wp_widget_factory + * + * @return array Mapping of id_base to support. If theme doesn't support + * selective refresh, an empty array is returned. + */ + public function get_selective_refreshable_widgets() + { + } + /** + * Determines if a widget supports selective refresh. + * + * @since 4.5.0 + * + * @param string $id_base Widget ID Base. + * @return bool Whether the widget can be selective refreshed. + */ + public function is_widget_selective_refreshable($id_base) + { + } + /** + * Inspects the incoming customized data for any widget settings, and dynamically adds + * them up-front so widgets will be initialized properly. + * + * @since 4.2.0 + */ + public function register_settings() + { + } + /** + * Determines the arguments for a dynamically-created setting. + * + * @since 4.2.0 + * + * @param false|array $args The arguments to the WP_Customize_Setting constructor. + * @param string $setting_id ID for dynamic setting, usually coming from `$_POST['customized']`. + * @return array|false Setting arguments, false otherwise. + */ + public function filter_customize_dynamic_setting_args($args, $setting_id) + { + } + /** + * Override sidebars_widgets for theme switch. + * + * When switching a theme via the Customizer, supply any previously-configured + * sidebars_widgets from the target theme as the initial sidebars_widgets + * setting. Also store the old theme's existing settings so that they can + * be passed along for storing in the sidebars_widgets theme_mod when the + * theme gets switched. + * + * @since 3.9.0 + * + * @global array $sidebars_widgets + * @global array $_wp_sidebars_widgets + * @phpstan-return void + */ + public function override_sidebars_widgets_for_theme_switch() + { + } + /** + * Filters old_sidebars_widgets_data Customizer setting. + * + * When switching themes, filter the Customizer setting old_sidebars_widgets_data + * to supply initial $sidebars_widgets before they were overridden by retrieve_widgets(). + * The value for old_sidebars_widgets_data gets set in the old theme's sidebars_widgets + * theme_mod. + * + * @since 3.9.0 + * + * @see WP_Customize_Widgets::handle_theme_switch() + * + * @param array $old_sidebars_widgets + * @return array + */ + public function filter_customize_value_old_sidebars_widgets_data($old_sidebars_widgets) + { + } + /** + * Filters sidebars_widgets option for theme switch. + * + * When switching themes, the retrieve_widgets() function is run when the Customizer initializes, + * and then the new sidebars_widgets here get supplied as the default value for the sidebars_widgets + * option. + * + * @since 3.9.0 + * + * @see WP_Customize_Widgets::handle_theme_switch() + * @global array $sidebars_widgets + * + * @param array $sidebars_widgets + * @return array + */ + public function filter_option_sidebars_widgets_for_theme_switch($sidebars_widgets) + { + } + /** + * Ensures all widgets get loaded into the Customizer. + * + * Note: these actions are also fired in wp_ajax_update_widget(). + * + * @since 3.9.0 + */ + public function customize_controls_init() + { + } + /** + * Ensures widgets are available for all types of previews. + * + * When in preview, hook to {@see 'customize_register'} for settings after WordPress is loaded + * so that all filters have been initialized (e.g. Widget Visibility). + * + * @since 3.9.0 + */ + public function schedule_customize_register() + { + } + /** + * Registers Customizer settings and controls for all sidebars and widgets. + * + * @since 3.9.0 + * + * @global array $wp_registered_widgets + * @global array $wp_registered_widget_controls + * @global array $wp_registered_sidebars + */ + public function customize_register() + { + } + /** + * Determines whether the widgets panel is active, based on whether there are sidebars registered. + * + * @since 4.4.0 + * + * @see WP_Customize_Panel::$active_callback + * + * @global array $wp_registered_sidebars + * + * @return bool Active. + */ + public function is_panel_active() + { + } + /** + * Converts a widget_id into its corresponding Customizer setting ID (option name). + * + * @since 3.9.0 + * + * @param string $widget_id Widget ID. + * @return string Maybe-parsed widget ID. + */ + public function get_setting_id($widget_id) + { + } + /** + * Determines whether the widget is considered "wide". + * + * Core widgets which may have controls wider than 250, but can still be shown + * in the narrow Customizer panel. The RSS and Text widgets in Core, for example, + * have widths of 400 and yet they still render fine in the Customizer panel. + * + * This method will return all Core widgets as being not wide, but this can be + * overridden with the {@see 'is_wide_widget_in_customizer'} filter. + * + * @since 3.9.0 + * + * @global array $wp_registered_widget_controls + * + * @param string $widget_id Widget ID. + * @return bool Whether or not the widget is a "wide" widget. + */ + public function is_wide_widget($widget_id) + { + } + /** + * Converts a widget ID into its id_base and number components. + * + * @since 3.9.0 + * + * @param string $widget_id Widget ID. + * @return array Array containing a widget's id_base and number components. + */ + public function parse_widget_id($widget_id) + { + } + /** + * Converts a widget setting ID (option path) to its id_base and number components. + * + * @since 3.9.0 + * + * @param string $setting_id Widget setting ID. + * @return array|WP_Error Array containing a widget's id_base and number components, + * or a WP_Error object. + */ + public function parse_widget_setting_id($setting_id) + { + } + /** + * Calls admin_print_styles-widgets.php and admin_print_styles hooks to + * allow custom styles from plugins. + * + * @since 3.9.0 + */ + public function print_styles() + { + } + /** + * Calls admin_print_scripts-widgets.php and admin_print_scripts hooks to + * allow custom scripts from plugins. + * + * @since 3.9.0 + */ + public function print_scripts() + { + } + /** + * Enqueues scripts and styles for Customizer panel and export data to JavaScript. + * + * @since 3.9.0 + * + * @global WP_Scripts $wp_scripts + * @global array $wp_registered_sidebars + * @global array $wp_registered_widgets + */ + public function enqueue_scripts() + { + } + /** + * Renders the widget form control templates into the DOM. + * + * @since 3.9.0 + */ + public function output_widget_control_templates() + { + } + /** + * Calls admin_print_footer_scripts and admin_print_scripts hooks to + * allow custom scripts from plugins. + * + * @since 3.9.0 + */ + public function print_footer_scripts() + { + } + /** + * Retrieves common arguments to supply when constructing a Customizer setting. + * + * @since 3.9.0 + * + * @param string $id Widget setting ID. + * @param array $overrides Array of setting overrides. + * @return array Possibly modified setting arguments. + */ + public function get_setting_args($id, $overrides = array()) + { + } + /** + * Ensures sidebar widget arrays only ever contain widget IDS. + * + * Used as the 'sanitize_callback' for each $sidebars_widgets setting. + * + * @since 3.9.0 + * + * @param string[] $widget_ids Array of widget IDs. + * @return string[] Array of sanitized widget IDs. + */ + public function sanitize_sidebar_widgets($widget_ids) + { + } + /** + * Builds up an index of all available widgets for use in Backbone models. + * + * @since 3.9.0 + * + * @global array $wp_registered_widgets + * @global array $wp_registered_widget_controls + * + * @see wp_list_widgets() + * + * @return array List of available widgets. + */ + public function get_available_widgets() + { + } + /** + * Retrieves the widget control markup. + * + * @since 3.9.0 + * + * @param array $args Widget control arguments. + * @return string Widget control form HTML markup. + */ + public function get_widget_control($args) + { + } + /** + * Retrieves the widget control markup parts. + * + * @since 4.4.0 + * + * @param array $args Widget control arguments. + * @return array { + * @type string $control Markup for widget control wrapping form. + * @type string $content The contents of the widget form itself. + * } + * @phpstan-return array{ + * control: string, + * content: string, + * } + */ + public function get_widget_control_parts($args) + { + } + /** + * Adds hooks for the Customizer preview. + * + * @since 3.9.0 + */ + public function customize_preview_init() + { + } + /** + * Refreshes the nonce for widget updates. + * + * @since 4.2.0 + * + * @param array $nonces Array of nonces. + * @return array Array of nonces. + */ + public function refresh_nonces($nonces) + { + } + /** + * Tells the script loader to load the scripts and styles of custom blocks + * if the widgets block editor is enabled. + * + * @since 5.8.0 + * + * @param bool $is_block_editor_screen Current decision about loading block assets. + * @return bool Filtered decision about loading block assets. + */ + public function should_load_block_editor_scripts_and_styles($is_block_editor_screen) + { + } + /** + * When previewing, ensures the proper previewing widgets are used. + * + * Because wp_get_sidebars_widgets() gets called early at {@see 'init' } (via + * wp_convert_widget_settings()) and can set global variable `$_wp_sidebars_widgets` + * to the value of `get_option( 'sidebars_widgets' )` before the Customizer preview + * filter is added, it has to be reset after the filter has been added. + * + * @since 3.9.0 + * + * @param array $sidebars_widgets List of widgets for the current sidebar. + * @return array + */ + public function preview_sidebars_widgets($sidebars_widgets) + { + } + /** + * Enqueues scripts for the Customizer preview. + * + * @since 3.9.0 + */ + public function customize_preview_enqueue() + { + } + /** + * Inserts default style for highlighted widget at early point so theme + * stylesheet can override. + * + * @since 3.9.0 + */ + public function print_preview_css() + { + } + /** + * Communicates the sidebars that appeared on the page at the very end of the page, + * and at the very end of the wp_footer, + * + * @since 3.9.0 + * + * @global array $wp_registered_sidebars + * @global array $wp_registered_widgets + */ + public function export_preview_data() + { + } + /** + * Tracks the widgets that were rendered. + * + * @since 3.9.0 + * + * @param array $widget Rendered widget to tally. + */ + public function tally_rendered_widgets($widget) + { + } + /** + * Determine if a widget is rendered on the page. + * + * @since 4.0.0 + * + * @param string $widget_id Widget ID to check. + * @return bool Whether the widget is rendered. + */ + public function is_widget_rendered($widget_id) + { + } + /** + * Determines if a sidebar is rendered on the page. + * + * @since 4.0.0 + * + * @param string $sidebar_id Sidebar ID to check. + * @return bool Whether the sidebar is rendered. + */ + public function is_sidebar_rendered($sidebar_id) + { + } + /** + * Tallies the sidebars rendered via is_active_sidebar(). + * + * Keep track of the times that is_active_sidebar() is called in the template, + * and assume that this means that the sidebar would be rendered on the template + * if there were widgets populating it. + * + * @since 3.9.0 + * + * @param bool $is_active Whether the sidebar is active. + * @param string $sidebar_id Sidebar ID. + * @return bool Whether the sidebar is active. + */ + public function tally_sidebars_via_is_active_sidebar_calls($is_active, $sidebar_id) + { + } + /** + * Tallies the sidebars rendered via dynamic_sidebar(). + * + * Keep track of the times that dynamic_sidebar() is called in the template, + * and assume this means the sidebar would be rendered on the template if + * there were widgets populating it. + * + * @since 3.9.0 + * + * @param bool $has_widgets Whether the current sidebar has widgets. + * @param string $sidebar_id Sidebar ID. + * @return bool Whether the current sidebar has widgets. + */ + public function tally_sidebars_via_dynamic_sidebar_calls($has_widgets, $sidebar_id) + { + } + /** + * Sanitizes a widget instance. + * + * Unserialize the JS-instance for storing in the options. It's important that this filter + * only get applied to an instance *once*. + * + * @since 3.9.0 + * @since 5.8.0 Added the `$id_base` parameter. + * + * @global WP_Widget_Factory $wp_widget_factory + * + * @param array $value Widget instance to sanitize. + * @param string $id_base Optional. Base of the ID of the widget being sanitized. Default null. + * @return array|void Sanitized widget instance. + */ + public function sanitize_widget_instance($value, $id_base = \null) + { + } + /** + * Converts a widget instance into JSON-representable format. + * + * @since 3.9.0 + * @since 5.8.0 Added the `$id_base` parameter. + * + * @global WP_Widget_Factory $wp_widget_factory + * + * @param array $value Widget instance to convert to JSON. + * @param string $id_base Optional. Base of the ID of the widget being sanitized. Default null. + * @return array JSON-converted widget instance. + */ + public function sanitize_widget_js_instance($value, $id_base = \null) + { + } + /** + * Strips out widget IDs for widgets which are no longer registered. + * + * One example where this might happen is when a plugin orphans a widget + * in a sidebar upon deactivation. + * + * @since 3.9.0 + * + * @global array $wp_registered_widgets + * + * @param array $widget_ids List of widget IDs. + * @return array Parsed list of widget IDs. + */ + public function sanitize_sidebar_widgets_js_instance($widget_ids) + { + } + /** + * Finds and invokes the widget update and control callbacks. + * + * Requires that `$_POST` be populated with the instance data. + * + * @since 3.9.0 + * + * @global array $wp_registered_widget_updates + * @global array $wp_registered_widget_controls + * + * @param string $widget_id Widget ID. + * @return array|WP_Error Array containing the updated widget information. + * A WP_Error object, otherwise. + */ + public function call_widget_update($widget_id) + { + } + /** + * Updates widget settings asynchronously. + * + * Allows the Customizer to update a widget using its form, but return the new + * instance info via Ajax instead of saving it to the options table. + * + * Most code here copied from wp_ajax_save_widget(). + * + * @since 3.9.0 + * + * @see wp_ajax_save_widget() + * @phpstan-return never + */ + public function wp_ajax_update_widget() + { + } + /** + * Filters arguments for dynamic widget partials. + * + * @since 4.5.0 + * + * @param array|false $partial_args Partial arguments. + * @param string $partial_id Partial ID. + * @return array (Maybe) modified partial arguments. + */ + public function customize_dynamic_partial_args($partial_args, $partial_id) + { + } + /** + * Adds hooks for selective refresh. + * + * @since 4.5.0 + * @phpstan-return void + */ + public function selective_refresh_init() + { + } + /** + * Inject selective refresh data attributes into widget container elements. + * + * @since 4.5.0 + * + * @see WP_Customize_Nav_Menus::filter_wp_nav_menu_args() + * + * @param array $params { + * Dynamic sidebar params. + * + * @type array $args Sidebar args. + * @type array $widget_args Widget args. + * } + * @return array Params. + * @phpstan-param array{ + * args?: array, + * widget_args?: array, + * } $params + */ + public function filter_dynamic_sidebar_params($params) + { + } + /** + * Ensures the HTML data-* attributes for selective refresh are allowed by kses. + * + * This is needed in case the `$before_widget` is run through wp_kses() when printed. + * + * @since 4.5.0 + * + * @param array $allowed_html Allowed HTML. + * @return array (Maybe) modified allowed HTML. + */ + public function filter_wp_kses_allowed_data_attributes($allowed_html) + { + } + /** + * Begins keeping track of the current sidebar being rendered. + * + * Insert marker before widgets are rendered in a dynamic sidebar. + * + * @since 4.5.0 + * + * @param int|string $index Index, name, or ID of the dynamic sidebar. + */ + public function start_dynamic_sidebar($index) + { + } + /** + * Finishes keeping track of the current sidebar being rendered. + * + * Inserts a marker after widgets are rendered in a dynamic sidebar. + * + * @since 4.5.0 + * + * @param int|string $index Index, name, or ID of the dynamic sidebar. + */ + public function end_dynamic_sidebar($index) + { + } + /** + * Filters sidebars_widgets to ensure the currently-rendered widget is the only widget in the current sidebar. + * + * @since 4.5.0 + * + * @param array $sidebars_widgets Sidebars widgets. + * @return array Filtered sidebars widgets. + */ + public function filter_sidebars_widgets_for_rendering_widget($sidebars_widgets) + { + } + /** + * Renders a specific widget using the supplied sidebar arguments. + * + * @since 4.5.0 + * + * @see dynamic_sidebar() + * + * @param WP_Customize_Partial $partial Partial. + * @param array $context { + * Sidebar args supplied as container context. + * + * @type string $sidebar_id ID for sidebar for widget to render into. + * @type int $sidebar_instance_number Disambiguating instance number. + * } + * @return string|false + * @phpstan-param array{ + * sidebar_id?: string, + * sidebar_instance_number?: int, + * } $context + */ + public function render_widget_partial($partial, $context) + { + } + /** + * Pre-filters captured option values before updating. + * + * @since 3.9.0 + * + * @param mixed $new_value The new option value. + * @param string $option_name Name of the option. + * @param mixed $old_value The old option value. + * @return mixed Filtered option value. + */ + public function capture_filter_pre_update_option($new_value, $option_name, $old_value) + { + } + /** + * Pre-filters captured option values before retrieving. + * + * @since 3.9.0 + * + * @param mixed $value Value to return instead of the option value. + * @return mixed Filtered option value. + */ + public function capture_filter_pre_get_option($value) + { + } + /** + * {@internal Missing Summary} + * + * See the {@see 'customize_dynamic_setting_args'} filter. + * + * @since 3.9.0 + * @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter. + */ + public function setup_widget_addition_previews() + { + } + /** + * {@internal Missing Summary} + * + * See the {@see 'customize_dynamic_setting_args'} filter. + * + * @since 3.9.0 + * @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter. + */ + public function prepreview_added_sidebars_widgets() + { + } + /** + * {@internal Missing Summary} + * + * See the {@see 'customize_dynamic_setting_args'} filter. + * + * @since 3.9.0 + * @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter. + */ + public function prepreview_added_widget_instance() + { + } + /** + * {@internal Missing Summary} + * + * See the {@see 'customize_dynamic_setting_args'} filter. + * + * @since 3.9.0 + * @deprecated 4.2.0 Deprecated in favor of the {@see 'customize_dynamic_setting_args'} filter. + */ + public function remove_prepreview_filters() + { + } + } + /** + * Class for generating SQL clauses that filter a primary query according to date. + * + * WP_Date_Query is a helper that allows primary query classes, such as WP_Query, to filter + * their results by date columns, by generating `WHERE` subclauses to be attached to the + * primary SQL query string. + * + * Attempting to filter by an invalid date value (eg month=13) will generate SQL that will + * return no results. In these cases, a _doing_it_wrong() error notice is also thrown. + * See WP_Date_Query::validate_date_values(). + * + * @link https://developer.wordpress.org/reference/classes/wp_query/ + * + * @since 3.7.0 + */ + #[\AllowDynamicProperties] + class WP_Date_Query + { + /** + * Array of date queries. + * + * See WP_Date_Query::__construct() for information on date query arguments. + * + * @since 3.7.0 + * @var array + */ + public $queries = array(); + /** + * The default relation between top-level queries. Can be either 'AND' or 'OR'. + * + * @since 3.7.0 + * @var string + */ + public $relation = 'AND'; + /** + * The column to query against. Can be changed via the query arguments. + * + * @since 3.7.0 + * @var string + */ + public $column = 'post_date'; + /** + * The value comparison operator. Can be changed via the query arguments. + * + * @since 3.7.0 + * @var string + */ + public $compare = '='; + /** + * Supported time-related parameter keys. + * + * @since 4.1.0 + * @var string[] + */ + public $time_keys = array('after', 'before', 'year', 'month', 'monthnum', 'week', 'w', 'dayofyear', 'day', 'dayofweek', 'dayofweek_iso', 'hour', 'minute', 'second'); + /** + * Constructor. + * + * Time-related parameters that normally require integer values ('year', 'month', 'week', 'dayofyear', 'day', + * 'dayofweek', 'dayofweek_iso', 'hour', 'minute', 'second') accept arrays of integers for some values of + * 'compare'. When 'compare' is 'IN' or 'NOT IN', arrays are accepted; when 'compare' is 'BETWEEN' or 'NOT + * BETWEEN', arrays of two valid values are required. See individual argument descriptions for accepted values. + * + * @since 3.7.0 + * @since 4.0.0 The $inclusive logic was updated to include all times within the date range. + * @since 4.1.0 Introduced 'dayofweek_iso' time type parameter. + * + * @param array $date_query { + * Array of date query clauses. + * + * @type array ...$0 { + * @type string $column Optional. The column to query against. If undefined, inherits the value of + * the `$default_column` parameter. See WP_Date_Query::validate_column() and + * the {@see 'date_query_valid_columns'} filter for the list of accepted values. + * Default 'post_date'. + * @type string $compare Optional. The comparison operator. Accepts '=', '!=', '>', '>=', '<', '<=', + * 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. Default '='. + * @type string $relation Optional. The boolean relationship between the date queries. Accepts 'OR' or 'AND'. + * Default 'OR'. + * @type array ...$0 { + * Optional. An array of first-order clause parameters, or another fully-formed date query. + * + * @type string|array $before { + * Optional. Date to retrieve posts before. Accepts `strtotime()`-compatible string, + * or array of 'year', 'month', 'day' values. + * + * @type string $year The four-digit year. Default empty. Accepts any four-digit year. + * @type string $month Optional when passing array.The month of the year. + * Default (string:empty)|(array:1). Accepts numbers 1-12. + * @type string $day Optional when passing array.The day of the month. + * Default (string:empty)|(array:1). Accepts numbers 1-31. + * } + * @type string|array $after { + * Optional. Date to retrieve posts after. Accepts `strtotime()`-compatible string, + * or array of 'year', 'month', 'day' values. + * + * @type string $year The four-digit year. Accepts any four-digit year. Default empty. + * @type string $month Optional when passing array. The month of the year. Accepts numbers 1-12. + * Default (string:empty)|(array:12). + * @type string $day Optional when passing array.The day of the month. Accepts numbers 1-31. + * Default (string:empty)|(array:last day of month). + * } + * @type string $column Optional. Used to add a clause comparing a column other than + * the column specified in the top-level `$column` parameter. + * See WP_Date_Query::validate_column() and + * the {@see 'date_query_valid_columns'} filter for the list + * of accepted values. Default is the value of top-level `$column`. + * @type string $compare Optional. The comparison operator. Accepts '=', '!=', '>', '>=', + * '<', '<=', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'. 'IN', + * 'NOT IN', 'BETWEEN', and 'NOT BETWEEN'. Comparisons support + * arrays in some time-related parameters. Default '='. + * @type bool $inclusive Optional. Include results from dates specified in 'before' or + * 'after'. Default false. + * @type int|int[] $year Optional. The four-digit year number. Accepts any four-digit year + * or an array of years if `$compare` supports it. Default empty. + * @type int|int[] $month Optional. The two-digit month number. Accepts numbers 1-12 or an + * array of valid numbers if `$compare` supports it. Default empty. + * @type int|int[] $week Optional. The week number of the year. Accepts numbers 0-53 or an + * array of valid numbers if `$compare` supports it. Default empty. + * @type int|int[] $dayofyear Optional. The day number of the year. Accepts numbers 1-366 or an + * array of valid numbers if `$compare` supports it. + * @type int|int[] $day Optional. The day of the month. Accepts numbers 1-31 or an array + * of valid numbers if `$compare` supports it. Default empty. + * @type int|int[] $dayofweek Optional. The day number of the week. Accepts numbers 1-7 (1 is + * Sunday) or an array of valid numbers if `$compare` supports it. + * Default empty. + * @type int|int[] $dayofweek_iso Optional. The day number of the week (ISO). Accepts numbers 1-7 + * (1 is Monday) or an array of valid numbers if `$compare` supports it. + * Default empty. + * @type int|int[] $hour Optional. The hour of the day. Accepts numbers 0-23 or an array + * of valid numbers if `$compare` supports it. Default empty. + * @type int|int[] $minute Optional. The minute of the hour. Accepts numbers 0-59 or an array + * of valid numbers if `$compare` supports it. Default empty. + * @type int|int[] $second Optional. The second of the minute. Accepts numbers 0-59 or an + * array of valid numbers if `$compare` supports it. Default empty. + * } + * } + * } + * @param string $default_column Optional. Default column to query against. See WP_Date_Query::validate_column() + * and the {@see 'date_query_valid_columns'} filter for the list of accepted values. + * Default 'post_date'. + * @phpstan-return void + */ + public function __construct($date_query, $default_column = 'post_date') + { + } + /** + * Recursive-friendly query sanitizer. + * + * Ensures that each query-level clause has a 'relation' key, and that + * each first-order clause contains all the necessary keys from `$defaults`. + * + * @since 4.1.0 + * + * @param array $queries + * @param array $parent_query + * @return array Sanitized queries. + */ + public function sanitize_query($queries, $parent_query = \null) + { + } + /** + * Determines whether this is a first-order clause. + * + * Checks to see if the current clause has any time-related keys. + * If so, it's first-order. + * + * @since 4.1.0 + * + * @param array $query Query clause. + * @return bool True if this is a first-order clause. + */ + protected function is_first_order_clause($query) + { + } + /** + * Determines and validates what comparison operator to use. + * + * @since 3.7.0 + * + * @param array $query A date query or a date subquery. + * @return string The comparison operator. + */ + public function get_compare($query) + { + } + /** + * Validates the given date_query values and triggers errors if something is not valid. + * + * Note that date queries with invalid date ranges are allowed to + * continue (though of course no items will be found for impossible dates). + * This method only generates debug notices for these cases. + * + * @since 4.1.0 + * + * @param array $date_query The date_query array. + * @return bool True if all values in the query are valid, false if one or more fail. + */ + public function validate_date_values($date_query = array()) + { + } + /** + * Validates a column name parameter. + * + * Column names without a table prefix (like 'post_date') are checked against a list of + * allowed and known tables, and then, if found, have a table prefix (such as 'wp_posts.') + * prepended. Prefixed column names (such as 'wp_posts.post_date') bypass this allowed + * check, and are only sanitized to remove illegal characters. + * + * @since 3.7.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $column The user-supplied column name. + * @return string A validated column name value. + */ + public function validate_column($column) + { + } + /** + * Generates WHERE clause to be appended to a main query. + * + * @since 3.7.0 + * + * @return string MySQL WHERE clause. + */ + public function get_sql() + { + } + /** + * Generates SQL clauses to be appended to a main query. + * + * Called by the public WP_Date_Query::get_sql(), this method is abstracted + * out to maintain parity with the other Query classes. + * + * @since 4.1.0 + * + * @return string[] { + * Array containing JOIN and WHERE SQL clauses to append to the main query. + * + * @type string $join SQL fragment to append to the main JOIN clause. + * @type string $where SQL fragment to append to the main WHERE clause. + * } + * @phpstan-return array{ + * join: string, + * where: string, + * } + */ + protected function get_sql_clauses() + { + } + /** + * Generates SQL clauses for a single query array. + * + * If nested subqueries are found, this method recurses the tree to + * produce the properly nested SQL. + * + * @since 4.1.0 + * + * @param array $query Query to parse. + * @param int $depth Optional. Number of tree levels deep we currently are. + * Used to calculate indentation. Default 0. + * @return array { + * Array containing JOIN and WHERE SQL clauses to append to a single query array. + * + * @type string $join SQL fragment to append to the main JOIN clause. + * @type string $where SQL fragment to append to the main WHERE clause. + * } + * @phpstan-return array{ + * join: string, + * where: string, + * } + */ + protected function get_sql_for_query($query, $depth = 0) + { + } + /** + * Turns a single date clause into pieces for a WHERE clause. + * + * A wrapper for get_sql_for_clause(), included here for backward + * compatibility while retaining the naming convention across Query classes. + * + * @since 3.7.0 + * + * @param array $query Date query arguments. + * @return array { + * Array containing JOIN and WHERE SQL clauses to append to the main query. + * + * @type string[] $join Array of SQL fragments to append to the main JOIN clause. + * @type string[] $where Array of SQL fragments to append to the main WHERE clause. + * } + * @phpstan-return array{ + * join: string[], + * where: string[], + * } + */ + protected function get_sql_for_subquery($query) + { + } + /** + * Turns a first-order date query into SQL for a WHERE clause. + * + * @since 4.1.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param array $query Date query clause. + * @param array $parent_query Parent query of the current date query. + * @return array { + * Array containing JOIN and WHERE SQL clauses to append to the main query. + * + * @type string[] $join Array of SQL fragments to append to the main JOIN clause. + * @type string[] $where Array of SQL fragments to append to the main WHERE clause. + * } + * @phpstan-return array{ + * join: string[], + * where: string[], + * } + */ + protected function get_sql_for_clause($query, $parent_query) + { + } + /** + * Builds and validates a value string based on the comparison operator. + * + * @since 3.7.0 + * + * @param string $compare The compare operator to use. + * @param string|array $value The value. + * @return string|false|int The value to be used in SQL or false on error. + */ + public function build_value($compare, $value) + { + } + /** + * Builds a MySQL format date/time based on some query parameters. + * + * You can pass an array of values (year, month, etc.) with missing parameter values being defaulted to + * either the maximum or minimum values (controlled by the $default_to parameter). Alternatively you can + * pass a string that will be passed to date_create(). + * + * @since 3.7.0 + * + * @param string|array $datetime An array of parameters or a strtotime() string. + * @param bool $default_to_max Whether to round up incomplete dates. Supported by values + * of $datetime that are arrays, or string values that are a + * subset of MySQL date format ('Y', 'Y-m', 'Y-m-d', 'Y-m-d H:i'). + * Default: false. + * @return string|false A MySQL format date/time or false on failure. + */ + public function build_mysql_datetime($datetime, $default_to_max = \false) + { + } + /** + * Builds a query string for comparing time values (hour, minute, second). + * + * If just hour, minute, or second is set than a normal comparison will be done. + * However if multiple values are passed, a pseudo-decimal time will be created + * in order to be able to accurately compare against. + * + * @since 3.7.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $column The column to query against. Needs to be pre-validated! + * @param string $compare The comparison operator. Needs to be pre-validated! + * @param int|null $hour Optional. An hour value (0-23). + * @param int|null $minute Optional. A minute value (0-59). + * @param int|null $second Optional. A second value (0-59). + * @return string|false A query part or false on failure. + */ + public function build_time_query($column, $compare, $hour = \null, $minute = \null, $second = \null) + { + } + /** + * Sanitizes a 'relation' operator. + * + * @since 6.0.3 + * + * @param string $relation Raw relation key from the query argument. + * @return string Sanitized relation. Either 'AND' or 'OR'. + * @phpstan-return 'AND'|'OR' + */ + public function sanitize_relation($relation) + { + } + } + /** + * Core base class extended to register items. + * + * @since 2.6.0 + * + * @see _WP_Dependency + */ + #[\AllowDynamicProperties] + class WP_Dependencies + { + /** + * An array of all registered dependencies keyed by handle. + * + * @since 2.6.8 + * + * @var _WP_Dependency[] + */ + public $registered = array(); + /** + * An array of handles of queued dependencies. + * + * @since 2.6.8 + * + * @var string[] + */ + public $queue = array(); + /** + * An array of handles of dependencies to queue. + * + * @since 2.6.0 + * + * @var string[] + */ + public $to_do = array(); + /** + * An array of handles of dependencies already queued. + * + * @since 2.6.0 + * + * @var string[] + */ + public $done = array(); + /** + * An array of additional arguments passed when a handle is registered. + * + * Arguments are appended to the item query string. + * + * @since 2.6.0 + * + * @var array + */ + public $args = array(); + /** + * An array of dependency groups to enqueue. + * + * Each entry is keyed by handle and represents the integer group level or boolean + * false if the handle has no group. + * + * @since 2.8.0 + * + * @var (int|false)[] + * @phpstan-var array<string, int|false> + */ + public $groups = array(); + /** + * A handle group to enqueue. + * + * @since 2.8.0 + * + * @deprecated 4.5.0 + * @var int + */ + public $group = 0; + /** + * Processes the items and dependencies. + * + * Processes the items passed to it or the queue, and their dependencies. + * + * @since 2.6.0 + * @since 2.8.0 Added the `$group` parameter. + * + * @param string|string[]|false $handles Optional. Items to be processed: queue (false), + * single item (string), or multiple items (array of strings). + * Default false. + * @param int|false $group Optional. Group level: level (int), no group (false). + * @return string[] Array of handles of items that have been processed. + */ + public function do_items($handles = \false, $group = \false) + { + } + /** + * Processes a dependency. + * + * @since 2.6.0 + * @since 5.5.0 Added the `$group` parameter. + * + * @param string $handle Name of the item. Should be unique. + * @param int|false $group Optional. Group level: level (int), no group (false). + * Default false. + * @return bool True on success, false if not set. + */ + public function do_item($handle, $group = \false) + { + } + /** + * Determines dependencies. + * + * Recursively builds an array of items to process taking + * dependencies into account. Does NOT catch infinite loops. + * + * @since 2.1.0 + * @since 2.6.0 Moved from `WP_Scripts`. + * @since 2.8.0 Added the `$group` parameter. + * + * @param string|string[] $handles Item handle (string) or item handles (array of strings). + * @param bool $recursion Optional. Internal flag that function is calling itself. + * Default false. + * @param int|false $group Optional. Group level: level (int), no group (false). + * Default false. + * @return bool True on success, false on failure. + */ + public function all_deps($handles, $recursion = \false, $group = \false) + { + } + /** + * Register an item. + * + * Registers the item if no item of that name already exists. + * + * @since 2.1.0 + * @since 2.6.0 Moved from `WP_Scripts`. + * + * @param string $handle Name of the item. Should be unique. + * @param string|false $src Full URL of the item, or path of the item relative + * to the WordPress root directory. If source is set to false, + * the item is an alias of other items it depends on. + * @param string[] $deps Optional. An array of registered item handles this item depends on. + * Default empty array. + * @param string|bool|null $ver Optional. String specifying item version number, if it has one, + * which is added to the URL as a query string for cache busting purposes. + * If version is set to false, a version number is automatically added + * equal to current installed WordPress version. + * If set to null, no version is added. + * @param mixed $args Optional. Custom property of the item. NOT the class property $args. + * Examples: $media, $in_footer. + * @return bool Whether the item has been registered. True on success, false on failure. + */ + public function add($handle, $src, $deps = array(), $ver = \false, $args = \null) + { + } + /** + * Add extra item data. + * + * Adds data to a registered item. + * + * @since 2.6.0 + * + * @param string $handle Name of the item. Should be unique. + * @param string $key The data key. + * @param mixed $value The data value. + * @return bool True on success, false on failure. + */ + public function add_data($handle, $key, $value) + { + } + /** + * Get extra item data. + * + * Gets data associated with a registered item. + * + * @since 3.3.0 + * + * @param string $handle Name of the item. Should be unique. + * @param string $key The data key. + * @return mixed Extra item data (string), false otherwise. + */ + public function get_data($handle, $key) + { + } + /** + * Un-register an item or items. + * + * @since 2.1.0 + * @since 2.6.0 Moved from `WP_Scripts`. + * + * @param string|string[] $handles Item handle (string) or item handles (array of strings). + */ + public function remove($handles) + { + } + /** + * Queue an item or items. + * + * Decodes handles and arguments, then queues handles and stores + * arguments in the class property $args. For example in extending + * classes, $args is appended to the item url as a query string. + * Note $args is NOT the $args property of items in the $registered array. + * + * @since 2.1.0 + * @since 2.6.0 Moved from `WP_Scripts`. + * + * @param string|string[] $handles Item handle (string) or item handles (array of strings). + */ + public function enqueue($handles) + { + } + /** + * Dequeue an item or items. + * + * Decodes handles and arguments, then dequeues handles + * and removes arguments from the class property $args. + * + * @since 2.1.0 + * @since 2.6.0 Moved from `WP_Scripts`. + * + * @param string|string[] $handles Item handle (string) or item handles (array of strings). + */ + public function dequeue($handles) + { + } + /** + * Recursively search the passed dependency tree for a handle. + * + * @since 4.0.0 + * + * @param string[] $queue An array of queued _WP_Dependency handles. + * @param string $handle Name of the item. Should be unique. + * @return bool Whether the handle is found after recursively searching the dependency tree. + */ + protected function recurse_deps($queue, $handle) + { + } + /** + * Query the list for an item. + * + * @since 2.1.0 + * @since 2.6.0 Moved from `WP_Scripts`. + * + * @param string $handle Name of the item. Should be unique. + * @param string $status Optional. Status of the item to query. Default 'registered'. + * @return bool|_WP_Dependency Found, or object Item data. + * @phpstan-template TStatus 'registered'|'scripts'|'enqueued'|'queued'|'to_do'|'to_print'|'done'|'printed' + * @phpstan-return ($handle is not non-empty-string ? false : ($status is not TStatus ? false : ($status is 'registered'|'scripts' ? _WP_Dependency|false : bool))) + */ + public function query($handle, $status = 'registered') + { + } + /** + * Set item group, unless already in a lower group. + * + * @since 2.8.0 + * + * @param string $handle Name of the item. Should be unique. + * @param bool $recursion Internal flag that calling function was called recursively. + * @param int|false $group Group level: level (int), no group (false). + * @return bool Not already in the group or a lower group. + */ + public function set_group($handle, $recursion, $group) + { + } + /** + * Get etag header for cache validation. + * + * @since 6.7.0 + * + * @global string $wp_version The WordPress version string. + * + * @param string[] $load Array of script or style handles to load. + * @return string Etag header. + * @phpstan-return non-falsy-string + */ + public function get_etag($load) + { + } + /** + * Gets a dependency warning message for a handle. + * + * @since 6.9.1 + * + * @param string $handle Handle with missing dependencies. + * @param string[] $missing_dependency_handles Missing dependency handles. + * @return string Formatted, localized warning message. + */ + protected function get_dependency_warning_message($handle, $missing_dependency_handles) + { + } + } + /** + * Class _WP_Dependency + * + * Helper class to register a handle and associated data. + * + * @access private + * @since 2.6.0 + */ + #[\AllowDynamicProperties] + class _WP_Dependency + { + /** + * The handle name. + * + * @since 2.6.0 + * @var string + */ + public $handle; + /** + * The handle source. + * + * If source is set to false, the item is an alias of other items it depends on. + * + * @since 2.6.0 + * @var string|false + */ + public $src; + /** + * An array of handle dependencies. + * + * @since 2.6.0 + * @var string[] + */ + public $deps = array(); + /** + * The handle version. + * + * Used for cache-busting. + * + * @since 2.6.0 + * @var string|false|null + */ + public $ver = \false; + /** + * Additional arguments for the handle. + * + * @since 2.6.0 + * @var mixed + */ + public $args = \null; + /** + * Extra data to supply to the handle. + * + * @since 2.6.0 + * @var array + */ + public $extra = array(); + /** + * Translation textdomain set for this dependency. + * + * @since 5.0.0 + * @var string + */ + public $textdomain; + /** + * Translation path set for this dependency. + * + * @since 5.0.0 + * @var string + */ + public $translations_path; + /** + * Setup dependencies. + * + * @since 2.6.0 + * @since 5.3.0 Formalized the existing `...$args` parameter by adding it + * to the function signature. + * + * @param mixed ...$args Dependency information. + */ + public function __construct(...$args) + { + } + /** + * Add handle data. + * + * @since 2.6.0 + * + * @param string $name The data key to add. + * @param mixed $data The data value to add. + * @return bool False if not scalar, true otherwise. + */ + public function add_data($name, $data) + { + } + /** + * Sets the translation domain for this dependency. + * + * @since 5.0.0 + * + * @param string $domain The translation textdomain. + * @param string $path Optional. The full file path to the directory containing translation files. + * @return bool False if $domain is not a string, true otherwise. + */ + public function set_translations($domain, $path = '') + { + } + } + /** + * Manages duotone block supports and global styles. + * + * @access private + */ + class WP_Duotone + { + /** + * Returns the prefixed id for the duotone filter for use as a CSS id. + * + * Exported for the deprecated function wp_get_duotone_filter_id(). + * + * @internal + * + * @since 6.3.0 + * @deprecated 6.3.0 + * + * @param array $preset Duotone preset value as seen in theme.json. + * @return string Duotone filter CSS id. + */ + public static function get_filter_id_from_preset($preset) + { + } + /** + * Gets the SVG for the duotone filter definition from a preset. + * + * Exported for the deprecated function wp_get_duotone_filter_property(). + * + * @internal + * + * @since 6.3.0 + * @deprecated 6.3.0 + * + * @param array $preset The duotone preset. + * @return string The SVG for the filter definition. + */ + public static function get_filter_svg_from_preset($preset) + { + } + /** + * Registers the style and colors block attributes for block types that support it. + * + * Block support is added with `supports.filter.duotone` in block.json. + * + * @since 6.3.0 + * + * @param WP_Block_Type $block_type Block Type. + */ + public static function register_duotone_support($block_type) + { + } + /** + * Render out the duotone CSS styles and SVG. + * + * The hooks self::set_global_style_block_names and self::set_global_styles_presets + * must be called before this function. + * + * @since 6.3.0 + * + * @param string $block_content Rendered block content. + * @param array $block Block object. + * @param WP_Block $wp_block The block instance. + * @return string Filtered block content. + */ + public static function render_duotone_support($block_content, $block, $wp_block) + { + } + /** + * Fixes the issue with our generated class name not being added to the block's outer container + * in classic themes due to gutenberg_restore_image_outer_container from layout block supports. + * + * @since 6.6.0 + * + * @param string $block_content Rendered block content. + * @return string Filtered block content. + */ + public static function restore_image_outer_container($block_content) + { + } + /** + * Appends the used block duotone filter declarations to the inline block supports CSS. + * + * Uses the declarations saved in earlier calls to self::enqueue_block_css. + * + * @since 6.3.0 + */ + public static function output_block_styles() + { + } + /** + * Appends the used global style duotone filter presets (CSS custom + * properties) to the inline global styles CSS. + * + * Uses the declarations saved in earlier calls to self::enqueue_global_styles_preset. + * + * @since 6.3.0 + */ + public static function output_global_styles() + { + } + /** + * Outputs all necessary SVG for duotone filters, CSS for classic themes. + * + * Uses the declarations saved in earlier calls to self::enqueue_global_styles_preset + * and self::enqueue_custom_filter. + * + * @since 6.3.0 + */ + public static function output_footer_assets() + { + } + /** + * Adds the duotone SVGs and CSS custom properties to the editor settings. + * + * This allows the properties to be pulled in by the EditorStyles component + * in JS and rendered in the post editor. + * + * @since 6.3.0 + * + * @param array $settings The block editor settings from the `block_editor_settings_all` filter. + * @return array The editor settings with duotone SVGs and CSS custom properties. + */ + public static function add_editor_settings($settings) + { + } + /** + * Migrates the experimental duotone support flag to the stabilized location. + * + * This moves `supports.color.__experimentalDuotone` to `supports.filter.duotone`. + * + * @since 6.3.0 + * + * @param array $settings Current block type settings. + * @param array $metadata Block metadata as read in via block.json. + * @return array Filtered block type settings. + */ + public static function migrate_experimental_duotone_support_flag($settings, $metadata) + { + } + /** + * Gets the CSS filter property value from a preset. + * + * Exported for the deprecated function wp_get_duotone_filter_id(). + * + * @internal + * + * @since 6.3.0 + * @deprecated 6.3.0 + * + * @param array $preset The duotone preset. + * @return string The CSS filter property value. + */ + public static function get_filter_css_property_value_from_preset($preset) + { + } + } + /** + * Facilitates adding of the WordPress editor as used on the Write and Edit screens. + * + * @package WordPress + * @since 3.3.0 + * + * Private, not included by default. See wp_editor() in wp-includes/general-template.php. + */ + #[\AllowDynamicProperties] + final class _WP_Editors + { + public static $mce_locale; + /** + * Parse default arguments for the editor instance. + * + * @since 3.3.0 + * + * @param string $editor_id HTML ID for the textarea and TinyMCE and Quicktags instances. + * Should not contain square brackets. + * @param array $settings { + * Array of editor arguments. + * + * @type bool $wpautop Whether to use wpautop(). Default true. + * @type bool $media_buttons Whether to show the Add Media/other media buttons. + * @type string $default_editor When both TinyMCE and Quicktags are used, set which + * editor is shown on page load. Default empty. + * @type bool $drag_drop_upload Whether to enable drag & drop on the editor uploading. Default false. + * Requires the media modal. + * @type string $textarea_name Give the textarea a unique name here. Square brackets + * can be used here. Default $editor_id. + * @type int $textarea_rows Number rows in the editor textarea. Default 20. + * @type string|int $tabindex Tabindex value to use. Default empty. + * @type string $tabfocus_elements The previous and next element ID to move the focus to + * when pressing the Tab key in TinyMCE. Default ':prev,:next'. + * @type string $editor_css Intended for extra styles for both Visual and Code editors. + * Should include `<style>` tags, and can use "scoped". Default empty. + * @type string $editor_class Extra classes to add to the editor textarea element. Default empty. + * @type bool $teeny Whether to output the minimal editor config. Examples include + * Press This and the Comment editor. Default false. + * @type bool $dfw Deprecated in 4.1. Unused. + * @type bool|array $tinymce Whether to load TinyMCE. Can be used to pass settings directly to + * TinyMCE using an array. Default true. + * @type bool|array $quicktags Whether to load Quicktags. Can be used to pass settings directly to + * Quicktags using an array. Default true. + * } + * @return array Parsed arguments array. + * @phpstan-param array{ + * wpautop?: bool, + * media_buttons?: bool, + * default_editor?: string, + * drag_drop_upload?: bool, + * textarea_name?: string, + * textarea_rows?: int, + * tabindex?: string|int, + * tabfocus_elements?: string, + * editor_css?: string, + * editor_class?: string, + * teeny?: bool, + * dfw?: bool, + * tinymce?: bool|array, + * quicktags?: bool|array, + * } $settings + */ + public static function parse_settings($editor_id, $settings) + { + } + /** + * Outputs the HTML for a single instance of the editor. + * + * @since 3.3.0 + * + * @global WP_Screen $current_screen WordPress current screen object. + * + * @param string $content Initial content for the editor. + * @param string $editor_id HTML ID for the textarea and TinyMCE and Quicktags instances. + * Should not contain square brackets. + * @param array $settings See _WP_Editors::parse_settings() for description. + * @phpstan-param array{ + * wpautop?: bool, + * media_buttons?: bool, + * default_editor?: string, + * drag_drop_upload?: bool, + * textarea_name?: string, + * textarea_rows?: int, + * tabindex?: string|int, + * tabfocus_elements?: string, + * editor_css?: string, + * editor_class?: string, + * teeny?: bool, + * dfw?: bool, + * tinymce?: bool|array, + * quicktags?: bool|array, + * } $settings See _WP_Editors::parse_settings() + */ + public static function editor($content, $editor_id, $settings = array()) + { + } + /** + * @since 3.3.0 + * + * @param string $editor_id Unique editor identifier, e.g. 'content'. + * @param array $set Array of editor arguments. + */ + public static function editor_settings($editor_id, $set) + { + } + /** + * @since 3.3.0 + * + * @param bool $default_scripts Optional. Whether default scripts should be enqueued. Default false. + */ + public static function enqueue_scripts($default_scripts = \false) + { + } + /** + * Enqueue all editor scripts. + * For use when the editor is going to be initialized after page load. + * + * @since 4.8.0 + * @phpstan-return void + */ + public static function enqueue_default_editor() + { + } + /** + * Print (output) all editor scripts and default settings. + * For use when the editor is going to be initialized after page load. + * + * @since 4.8.0 + */ + public static function print_default_editor_scripts() + { + } + /** + * Returns the TinyMCE locale. + * + * @since 4.8.0 + * + * @return string + */ + public static function get_mce_locale() + { + } + /** + * Returns the TinyMCE base URL. + * + * @since 4.8.0 + * + * @return string + */ + public static function get_baseurl() + { + } + /** + * Translates the default TinyMCE strings and returns them as JSON encoded object ready to be loaded with tinymce.addI18n(), + * or as JS snippet that should run after tinymce.js is loaded. + * + * @since 3.9.0 + * + * @param string $mce_locale The locale used for the editor. + * @param bool $json_only Optional. Whether to include the JavaScript calls to tinymce.addI18n() and + * tinymce.ScriptLoader.markDone(). Default false. + * @return string Translation object, JSON encoded. + */ + public static function wp_mce_translation($mce_locale = '', $json_only = \false) + { + } + /** + * Force uncompressed TinyMCE when a custom theme has been defined. + * + * The compressed TinyMCE file cannot deal with custom themes, so this makes + * sure that WordPress uses the uncompressed TinyMCE file if a theme is defined. + * Even if the website is running on a production environment. + * + * @since 5.0.0 + * @phpstan-return void + */ + public static function force_uncompressed_tinymce() + { + } + /** + * Print (output) the main TinyMCE scripts. + * + * @since 4.8.0 + * + * @global bool $concatenate_scripts + * @phpstan-return void + */ + public static function print_tinymce_scripts() + { + } + /** + * Print (output) the TinyMCE configuration and initialization scripts. + * + * @since 3.3.0 + * + * @global string $tinymce_version + */ + public static function editor_js() + { + } + /** + * Outputs the HTML for distraction-free writing mode. + * + * @since 3.2.0 + * @deprecated 4.3.0 + */ + public static function wp_fullscreen_html() + { + } + /** + * Performs post queries for internal linking. + * + * @since 3.1.0 + * + * @param array $args { + * Optional. Array of link query arguments. + * + * @type int $pagenum Page number. Default 1. + * @type string $s Search keywords. + * } + * @return array|false $results { + * An array of associative arrays of query results, false if there are none. + * + * @type array ...$0 { + * @type int $ID Post ID. + * @type string $title The trimmed, escaped post title. + * @type string $permalink Post permalink. + * @type string $info A 'Y/m/d'-formatted date for 'post' post type, + * the 'singular_name' post type label otherwise. + * } + * } + * @phpstan-param array{ + * pagenum?: int, + * s?: string, + * } $args + * @phpstan-return false|array<int|string, array{ + * ID: int, + * title: string, + * permalink: string, + * info: string, + * }> + */ + public static function wp_link_query($args = array()) + { + } + /** + * Dialog for internal linking. + * + * @since 3.1.0 + * @phpstan-return void + */ + public static function wp_link_dialog() + { + } + } + /** + * API for easily embedding rich media such as videos and images into content. + * + * @package WordPress + * @subpackage Embed + * @since 2.9.0 + */ + #[\AllowDynamicProperties] + class WP_Embed + { + public $handlers = array(); + public $post_ID; + public $usecache = \true; + public $linkifunknown = \true; + public $last_attr = array(); + public $last_url = ''; + /** + * When a URL cannot be embedded, return false instead of returning a link + * or the URL. + * + * Bypasses the {@see 'embed_maybe_make_link'} filter. + * + * @var bool + */ + public $return_false_on_fail = \false; + /** + * Constructor + */ + public function __construct() + { + } + /** + * Processes the [embed] shortcode. + * + * Since the [embed] shortcode needs to be run earlier than other shortcodes, + * this function removes all existing shortcodes, registers the [embed] shortcode, + * calls do_shortcode(), and then re-registers the old shortcodes. + * + * @global array $shortcode_tags + * + * @param string $content Content to parse. + * @return string Content with shortcode parsed. + */ + public function run_shortcode($content) + { + } + /** + * If a post/page was saved, then output JavaScript to make + * an Ajax request that will call WP_Embed::cache_oembed(). + * @phpstan-return void + */ + public function maybe_run_ajax_cache() + { + } + /** + * Registers an embed handler. + * + * Do not use this function directly, use wp_embed_register_handler() instead. + * + * This function should probably also only be used for sites that do not support oEmbed. + * + * @param string $id An internal ID/name for the handler. Needs to be unique. + * @param string $regex The regex that will be used to see if this handler should be used for a URL. + * @param callable $callback The callback function that will be called if the regex is matched. + * @param int $priority Optional. Used to specify the order in which the registered handlers will be tested. + * Lower numbers correspond with earlier testing, and handlers with the same priority are + * tested in the order in which they were added to the action. Default 10. + */ + public function register_handler($id, $regex, $callback, $priority = 10) + { + } + /** + * Unregisters a previously-registered embed handler. + * + * Do not use this function directly, use wp_embed_unregister_handler() instead. + * + * @param string $id The handler ID that should be removed. + * @param int $priority Optional. The priority of the handler to be removed (default: 10). + */ + public function unregister_handler($id, $priority = 10) + { + } + /** + * Returns embed HTML for a given URL from embed handlers. + * + * Attempts to convert a URL into embed HTML by checking the URL + * against the regex of the registered embed handlers. + * + * @since 5.5.0 + * + * @param array $attr { + * Shortcode attributes. Optional. + * + * @type int $width Width of the embed in pixels. + * @type int $height Height of the embed in pixels. + * } + * @param string $url The URL attempting to be embedded. + * @return string|false The embed HTML on success, false otherwise. + * @phpstan-param array{ + * width?: int, + * height?: int, + * } $attr + */ + public function get_embed_handler_html($attr, $url) + { + } + /** + * The do_shortcode() callback function. + * + * Attempts to convert a URL into embed HTML. Starts by checking the URL against the regex of + * the registered embed handlers. If none of the regex matches and it's enabled, then the URL + * will be given to the WP_oEmbed class. + * + * @param array $attr { + * Shortcode attributes. Optional. + * + * @type int $width Width of the embed in pixels. + * @type int $height Height of the embed in pixels. + * } + * @param string $url The URL attempting to be embedded. + * @return string|false The embed HTML on success, otherwise the original URL. + * `->maybe_make_link()` can return false on failure. + * @phpstan-param array{ + * width?: int, + * height?: int, + * } $attr + */ + public function shortcode($attr, $url = '') + { + } + /** + * Deletes all oEmbed caches. Unused by core as of 4.0.0. + * + * @param int $post_id Post ID to delete the caches for. + * @phpstan-return void + */ + public function delete_oembed_caches($post_id) + { + } + /** + * Triggers a caching of all oEmbed results. + * + * @param int $post_id Post ID to do the caching for. + * @phpstan-return void + */ + public function cache_oembed($post_id) + { + } + /** + * Passes any unlinked URLs that are on their own line to WP_Embed::shortcode() for potential embedding. + * + * @see WP_Embed::autoembed_callback() + * + * @param string $content The content to be searched. + * @return string Potentially modified $content. + */ + public function autoembed($content) + { + } + /** + * Callback function for WP_Embed::autoembed(). + * + * @param array $matches A regex match array. + * @return string The embed HTML on success, otherwise the original URL. + */ + public function autoembed_callback($matches) + { + } + /** + * Conditionally makes a hyperlink based on an internal class variable. + * + * @param string $url URL to potentially be linked. + * @return string|false Linked URL or the original URL. False if 'return_false_on_fail' is true. + */ + public function maybe_make_link($url) + { + } + /** + * Finds the oEmbed cache post ID for a given cache key. + * + * @since 4.9.0 + * + * @param string $cache_key oEmbed cache key. + * @return int|null Post ID on success, null on failure. + */ + public function find_oembed_post_id($cache_key) + { + } + } + /** + * WordPress Error class. + * + * Container for checking for WordPress errors and error messages. Return + * WP_Error and use is_wp_error() to check if this class is returned. Many + * core WordPress functions pass this class in the event of an error and + * if not handled properly will result in code errors. + * + * @since 2.1.0 + */ + #[\AllowDynamicProperties] + class WP_Error + { + /** + * Stores the list of errors. + * + * @since 2.1.0 + * @var array + */ + public $errors = array(); + /** + * Stores the most recently added data for each error code. + * + * @since 2.1.0 + * @var array + */ + public $error_data = array(); + /** + * Stores previously added data added for error codes, oldest-to-newest by code. + * + * @since 5.6.0 + * @var array[] + */ + protected $additional_data = array(); + /** + * Initializes the error. + * + * If `$code` is empty, the other parameters will be ignored. + * When `$code` is not empty, `$message` will be used even if + * it is empty. The `$data` parameter will be used only if it + * is not empty. + * + * Though the class is constructed with a single error code and + * message, multiple codes can be added using the `add()` method. + * + * @since 2.1.0 + * + * @param string|int $code Error code. + * @param string $message Error message. + * @param mixed $data Optional. Error data. Default empty string. + * @phpstan-return void + */ + public function __construct($code = '', $message = '', $data = '') + { + } + /** + * Retrieves all error codes. + * + * @since 2.1.0 + * + * @return array List of error codes, if available. + */ + public function get_error_codes() + { + } + /** + * Retrieves the first error code available. + * + * @since 2.1.0 + * + * @return string|int Empty string, if no error codes. + */ + public function get_error_code() + { + } + /** + * Retrieves all error messages, or the error messages for the given error code. + * + * @since 2.1.0 + * + * @param string|int $code Optional. Error code to retrieve the messages for. + * Default empty string. + * @return string[] Error strings on success, or empty array if there are none. + */ + public function get_error_messages($code = '') + { + } + /** + * Gets a single error message. + * + * This will get the first message available for the code. If no code is + * given then the first code available will be used. + * + * @since 2.1.0 + * + * @param string|int $code Optional. Error code to retrieve the message for. + * Default empty string. + * @return string The error message. + */ + public function get_error_message($code = '') + { + } + /** + * Retrieves the most recently added error data for an error code. + * + * @since 2.1.0 + * + * @param string|int $code Optional. Error code. Default empty string. + * @return mixed Error data, if it exists. + */ + public function get_error_data($code = '') + { + } + /** + * Verifies if the instance contains errors. + * + * @since 5.1.0 + * + * @return bool If the instance contains errors. + */ + public function has_errors() + { + } + /** + * Adds an error or appends an additional message to an existing error. + * + * @since 2.1.0 + * + * @param string|int $code Error code. + * @param string $message Error message. + * @param mixed $data Optional. Error data. Default empty string. + */ + public function add($code, $message, $data = '') + { + } + /** + * Adds data to an error with the given code. + * + * @since 2.1.0 + * @since 5.6.0 Errors can now contain more than one item of error data. {@see WP_Error::$additional_data}. + * + * @param mixed $data Error data. + * @param string|int $code Error code. + */ + public function add_data($data, $code = '') + { + } + /** + * Retrieves all error data for an error code in the order in which the data was added. + * + * @since 5.6.0 + * + * @param string|int $code Error code. + * @return mixed[] Array of error data, if it exists. + */ + public function get_all_error_data($code = '') + { + } + /** + * Removes the specified error. + * + * This function removes all error messages associated with the specified + * error code, along with any error data for that code. + * + * @since 4.1.0 + * + * @param string|int $code Error code. + */ + public function remove($code) + { + } + /** + * Merges the errors in the given error object into this one. + * + * @since 5.6.0 + * + * @param WP_Error $error Error object to merge. + */ + public function merge_from(\WP_Error $error) + { + } + /** + * Exports the errors in this object into the given one. + * + * @since 5.6.0 + * + * @param WP_Error $error Error object to export into. + */ + public function export_to(\WP_Error $error) + { + } + /** + * Copies errors from one WP_Error instance to another. + * + * @since 5.6.0 + * + * @param WP_Error $from The WP_Error to copy from. + * @param WP_Error $to The WP_Error to copy to. + */ + protected static function copy_errors(\WP_Error $from, \WP_Error $to) + { + } + } + /** + * Core base Exception class. + * + * Future, more specific, Exceptions should always extend this base class. + * + * @since 6.7.0 + */ + class WP_Exception extends \Exception + { + } + /** + * Core class used as the default shutdown handler for fatal errors. + * + * A drop-in 'fatal-error-handler.php' can be used to override the instance of this class and use a custom + * implementation for the fatal error handler that WordPress registers. The custom class should extend this class and + * can override its methods individually as necessary. The file must return the instance of the class that should be + * registered. + * + * @since 5.2.0 + */ + #[\AllowDynamicProperties] + class WP_Fatal_Error_Handler + { + /** + * Runs the shutdown handler. + * + * This method is registered via `register_shutdown_function()`. + * + * @since 5.2.0 + * + * @global WP_Locale $wp_locale WordPress date and time locale object. + * @phpstan-return void + */ + public function handle() + { + } + /** + * Detects the error causing the crash if it should be handled. + * + * @since 5.2.0 + * + * @return array|null Error information returned by `error_get_last()`, or null + * if none was recorded or the error should not be handled. + */ + protected function detect_error() + { + } + /** + * Determines whether we are dealing with an error that WordPress should handle + * in order to protect the admin backend against WSODs. + * + * @since 5.2.0 + * + * @param array $error Error information retrieved from `error_get_last()`. + * @return bool Whether WordPress should handle this error. + */ + protected function should_handle_error($error) + { + } + /** + * Displays the PHP error template and sends the HTTP status code, typically 500. + * + * A drop-in 'php-error.php' can be used as a custom template. This drop-in should control the HTTP status code and + * print the HTML markup indicating that a PHP error occurred. Note that this drop-in may potentially be executed + * very early in the WordPress bootstrap process, so any core functions used that are not part of + * `wp-includes/load.php` should be checked for before being called. + * + * If no such drop-in is available, this will call {@see WP_Fatal_Error_Handler::display_default_error_template()}. + * + * @since 5.2.0 + * @since 5.3.0 The `$handled` parameter was added. + * + * @param array $error Error information retrieved from `error_get_last()`. + * @param true|WP_Error $handled Whether Recovery Mode handled the fatal error. + * @phpstan-return void + */ + protected function display_error_template($error, $handled) + { + } + /** + * Displays the default PHP error template. + * + * This method is called conditionally if no 'php-error.php' drop-in is available. + * + * It calls {@see wp_die()} with a message indicating that the site is experiencing technical difficulties and a + * login link to the admin backend. The {@see 'wp_php_error_message'} and {@see 'wp_php_error_args'} filters can + * be used to modify these parameters. + * + * @since 5.2.0 + * @since 5.3.0 The `$handled` parameter was added. + * + * @param array $error Error information retrieved from `error_get_last()`. + * @param true|WP_Error $handled Whether Recovery Mode handled the fatal error. + */ + protected function display_default_error_template($error, $handled) + { + } + } + /** + * Core class used to implement feed cache transients. + * + * @since 2.8.0 + * @since 6.7.0 Now properly implements the SimplePie\Cache\Base interface. + * @since 6.9.0 Switched to Multisite's global cache via the `*_site_transient()` functions. + */ + #[\AllowDynamicProperties] + class WP_Feed_Cache_Transient implements \SimplePie\Cache\Base + { + /** + * Holds the transient name. + * + * @since 2.8.0 + * @var string + */ + public $name; + /** + * Holds the transient mod name. + * + * @since 2.8.0 + * @var string + */ + public $mod_name; + /** + * Holds the cache duration in seconds. + * + * Defaults to 43200 seconds (12 hours). + * + * @since 2.8.0 + * @var int + */ + public $lifetime = 43200; + /** + * Creates a new (transient) cache object. + * + * @since 2.8.0 + * @since 3.2.0 Updated to use a PHP5 constructor. + * @since 6.7.0 Parameter names have been updated to be in line with the `SimplePie\Cache\Base` interface. + * + * @param string $location URL location (scheme is used to determine handler). + * @param string $name Unique identifier for cache object. + * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either `TYPE_FEED` ('spc') for SimplePie data, + * or `TYPE_IMAGE` ('spi') for image data. + */ + public function __construct($location, $name, $type) + { + } + /** + * Saves data to the transient. + * + * @since 2.8.0 + * + * @param array|SimplePie\SimplePie $data Data to save. If passed a SimplePie object, + * only cache the `$data` property. + * @return true Always true. + */ + public function save($data) + { + } + /** + * Retrieves the data saved in the transient. + * + * @since 2.8.0 + * + * @return array Data for `SimplePie::$data`. + */ + public function load() + { + } + /** + * Gets mod transient. + * + * @since 2.8.0 + * + * @return int Timestamp. + */ + public function mtime() + { + } + /** + * Sets mod transient. + * + * @since 2.8.0 + * + * @return bool False if value was not set and true if value was set. + */ + public function touch() + { + } + /** + * Deletes transients. + * + * @since 2.8.0 + * + * @return true Always true. + */ + public function unlink() + { + } + } + /** + * Core class used to implement a feed cache. + * + * @since 2.8.0 + */ + #[\AllowDynamicProperties] + class WP_Feed_Cache extends \SimplePie\Cache + { + /** + * Creates a new SimplePie\Cache object. + * + * @since 2.8.0 + * + * @param string $location URL location (scheme is used to determine handler). + * @param string $filename Unique identifier for cache object. + * @param string $extension 'spi' or 'spc'. + * @return WP_Feed_Cache_Transient Feed cache handler object that uses transients. + */ + public function create($location, $filename, $extension) + { + } + } + /** + * Core class used to implement action and filter hook functionality. + * + * @since 4.7.0 + * + * @see Iterator + * @see ArrayAccess + */ + #[\AllowDynamicProperties] + final class WP_Hook implements \Iterator, \ArrayAccess + { + /** + * Hook callbacks. + * + * @since 4.7.0 + * @var array + */ + public $callbacks = array(); + /** + * Adds a callback function to a filter hook. + * + * @since 4.7.0 + * + * @param string $hook_name The name of the filter to add the callback to. + * @param callable $callback The callback to be run when the filter is applied. + * @param int $priority The order in which the functions associated with a particular filter + * are executed. Lower numbers correspond with earlier execution, + * and functions with the same priority are executed in the order + * in which they were added to the filter. + * @param int $accepted_args The number of arguments the function accepts. + */ + public function add_filter($hook_name, $callback, $priority, $accepted_args) + { + } + /** + * Removes a callback function from a filter hook. + * + * @since 4.7.0 + * + * @param string $hook_name The filter hook to which the function to be removed is hooked. + * @param callable|string|array $callback The callback to be removed from running when the filter is applied. + * This method can be called unconditionally to speculatively remove + * a callback that may or may not exist. + * @param int $priority The exact priority used when adding the original filter callback. + * @return bool Whether the callback existed before it was removed. + */ + public function remove_filter($hook_name, $callback, $priority) + { + } + /** + * Checks if a specific callback has been registered for this hook. + * + * When using the `$callback` argument, this function may return a non-boolean value + * that evaluates to false (e.g. 0), so use the `===` operator for testing the return value. + * + * @since 4.7.0 + * @since 6.9.0 Added the `$priority` parameter. + * + * @param string $hook_name Optional. The name of the filter hook. Default empty. + * @param callable|string|array|false $callback Optional. The callback to check for. + * This method can be called unconditionally to speculatively check + * a callback that may or may not exist. Default false. + * @param int|false $priority Optional. The specific priority at which to check for the callback. + * Default false. + * @return bool|int If `$callback` is omitted, returns boolean for whether the hook has + * anything registered. When checking a specific function, the priority + * of that hook is returned, or false if the function is not attached. + * If `$callback` and `$priority` are both provided, a boolean is returned + * for whether the specific function is registered at that priority. + */ + public function has_filter($hook_name = '', $callback = \false, $priority = \false) + { + } + /** + * Checks if any callbacks have been registered for this hook. + * + * @since 4.7.0 + * + * @return bool True if callbacks have been registered for the current hook, otherwise false. + */ + public function has_filters() + { + } + /** + * Removes all callbacks from the current filter. + * + * @since 4.7.0 + * + * @param int|false $priority Optional. The priority number to remove. Default false. + * @phpstan-return void + */ + public function remove_all_filters($priority = \false) + { + } + /** + * Calls the callback functions that have been added to a filter hook. + * + * @since 4.7.0 + * + * @param mixed $value The value to filter. + * @param array $args Additional parameters to pass to the callback functions. + * This array is expected to include $value at index 0. + * @return mixed The filtered value after all hooked functions are applied to it. + */ + public function apply_filters($value, $args) + { + } + /** + * Calls the callback functions that have been added to an action hook. + * + * @since 4.7.0 + * + * @param array $args Parameters to pass to the callback functions. + */ + public function do_action($args) + { + } + /** + * Processes the functions hooked into the 'all' hook. + * + * @since 4.7.0 + * + * @param array $args Arguments to pass to the hook callbacks. Passed by reference. + */ + public function do_all_hook(&$args) + { + } + /** + * Return the current priority level of the currently running iteration of the hook. + * + * @since 4.7.0 + * + * @return int|false If the hook is running, return the current priority level. + * If it isn't running, return false. + */ + public function current_priority() + { + } + /** + * Normalizes filters set up before WordPress has initialized to WP_Hook objects. + * + * The `$filters` parameter should be an array keyed by hook name, with values + * containing either: + * + * - A `WP_Hook` instance + * - An array of callbacks keyed by their priorities + * + * Examples: + * + * $filters = array( + * 'wp_fatal_error_handler_enabled' => array( + * 10 => array( + * array( + * 'accepted_args' => 0, + * 'function' => function() { + * return false; + * }, + * ), + * ), + * ), + * ); + * + * @since 4.7.0 + * + * @param array $filters Filters to normalize. See documentation above for details. + * @return WP_Hook[] Array of normalized filters. + */ + public static function build_preinitialized_hooks($filters) + { + } + /** + * Determines whether an offset value exists. + * + * @since 4.7.0 + * + * @link https://www.php.net/manual/en/arrayaccess.offsetexists.php + * + * @param mixed $offset An offset to check for. + * @return bool True if the offset exists, false otherwise. + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + } + /** + * Retrieves a value at a specified offset. + * + * @since 4.7.0 + * + * @link https://www.php.net/manual/en/arrayaccess.offsetget.php + * + * @param mixed $offset The offset to retrieve. + * @return mixed If set, the value at the specified offset, null otherwise. + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + } + /** + * Sets a value at a specified offset. + * + * @since 4.7.0 + * + * @link https://www.php.net/manual/en/arrayaccess.offsetset.php + * + * @param mixed $offset The offset to assign the value to. + * @param mixed $value The value to set. + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + } + /** + * Unsets a specified offset. + * + * @since 4.7.0 + * + * @link https://www.php.net/manual/en/arrayaccess.offsetunset.php + * + * @param mixed $offset The offset to unset. + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + } + /** + * Returns the current element. + * + * @since 4.7.0 + * + * @link https://www.php.net/manual/en/iterator.current.php + * + * @return array Of callbacks at current priority. + */ + #[\ReturnTypeWillChange] + public function current() + { + } + /** + * Moves forward to the next element. + * + * @since 4.7.0 + * + * @link https://www.php.net/manual/en/iterator.next.php + * + * @return array Of callbacks at next priority. + */ + #[\ReturnTypeWillChange] + public function next() + { + } + /** + * Returns the key of the current element. + * + * @since 4.7.0 + * + * @link https://www.php.net/manual/en/iterator.key.php + * + * @return mixed Returns current priority on success, or NULL on failure + */ + #[\ReturnTypeWillChange] + public function key() + { + } + /** + * Checks if current position is valid. + * + * @since 4.7.0 + * + * @link https://www.php.net/manual/en/iterator.valid.php + * + * @return bool Whether the current position is valid. + */ + #[\ReturnTypeWillChange] + public function valid() + { + } + /** + * Rewinds the Iterator to the first element. + * + * @since 4.7.0 + * + * @link https://www.php.net/manual/en/iterator.rewind.php + */ + #[\ReturnTypeWillChange] + public function rewind() + { + } + } + /** + * Core class used to encapsulate a single cookie object for internal use. + * + * Returned cookies are represented using this class, and when cookies are set, if they are not + * already a WP_Http_Cookie() object, then they are turned into one. + * + * @todo The WordPress convention is to use underscores instead of camelCase for function and method + * names. Need to switch to use underscores instead for the methods. + * + * @since 2.8.0 + */ + #[\AllowDynamicProperties] + class WP_Http_Cookie + { + /** + * Cookie name. + * + * @since 2.8.0 + * + * @var string + */ + public $name; + /** + * Cookie value. + * + * @since 2.8.0 + * + * @var string + */ + public $value; + /** + * When the cookie expires. Unix timestamp or formatted date. + * + * @since 2.8.0 + * + * @var string|int|null + */ + public $expires; + /** + * Cookie URL path. + * + * @since 2.8.0 + * + * @var string + */ + public $path; + /** + * Cookie Domain. + * + * @since 2.8.0 + * + * @var string + */ + public $domain; + /** + * Cookie port or comma-separated list of ports. + * + * @since 2.8.0 + * + * @var int|string + */ + public $port; + /** + * host-only flag. + * + * @since 5.2.0 + * + * @var bool + */ + public $host_only; + /** + * Sets up this cookie object. + * + * The parameter $data should be either an associative array containing the indices names below + * or a header string detailing it. + * + * @since 2.8.0 + * @since 5.2.0 Added `host_only` to the `$data` parameter. + * + * @param string|array $data { + * Raw cookie data as header string or data array. + * + * @type string $name Cookie name. + * @type mixed $value Value. Should NOT already be urlencoded. + * @type string|int|null $expires Optional. Unix timestamp or formatted date. Default null. + * @type string $path Optional. Path. Default '/'. + * @type string $domain Optional. Domain. Default host of parsed $requested_url. + * @type int|string $port Optional. Port or comma-separated list of ports. Default null. + * @type bool $host_only Optional. host-only storage flag. Default true. + * } + * @param string $requested_url The URL which the cookie was set on, used for default $domain + * and $port values. + * @phpstan-param array{ + * name?: string, + * value?: mixed, + * expires?: string|int|null, + * path?: string, + * domain?: string, + * port?: int|string, + * host_only?: bool, + * } $data + * @phpstan-return void + */ + public function __construct($data, $requested_url = '') + { + } + /** + * Confirms that it's OK to send this cookie to the URL checked against. + * + * Decision is based on RFC 2109/2965, so look there for details on validity. + * + * @since 2.8.0 + * + * @param string $url URL you intend to send this cookie to + * @return bool true if allowed, false otherwise. + */ + public function test($url) + { + } + /** + * Convert cookie name and value back to header string. + * + * @since 2.8.0 + * + * @return string Header encoded cookie name and value. + */ + public function getHeaderValue() + { + } + /** + * Retrieve cookie header for usage in the rest of the WordPress HTTP API. + * + * @since 2.8.0 + * + * @return string + */ + public function getFullHeader() + { + } + /** + * Retrieves cookie attributes. + * + * @since 4.6.0 + * + * @return array { + * List of attributes. + * + * @type string|int|null $expires When the cookie expires. Unix timestamp or formatted date. + * @type string $path Cookie URL path. + * @type string $domain Cookie domain. + * } + * @phpstan-return array{ + * expires: string|int|null, + * path: string, + * domain: string, + * } + */ + public function get_attributes() + { + } + } + /** + * Core class used to integrate Curl as an HTTP transport. + * + * HTTP request method uses Curl extension to retrieve the url. + * + * Requires the Curl extension to be installed. + * + * @since 2.7.0 + * @deprecated 6.4.0 Use WP_Http + * @see WP_Http + */ + #[\AllowDynamicProperties] + class WP_Http_Curl + { + /** + * Send a HTTP request to a URI using cURL extension. + * + * @since 2.7.0 + * + * @param string $url The request URL. + * @param string|array $args Optional. Override the defaults. + * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error + */ + public function request($url, $args = array()) + { + } + /** + * Determines whether this class can be used for retrieving a URL. + * + * @since 2.7.0 + * + * @param array $args Optional. Array of request arguments. Default empty array. + * @return bool False means this class can not be used, true means it can. + */ + public static function test($args = array()) + { + } + } + /** + * Core class used to implement deflate and gzip transfer encoding support for HTTP requests. + * + * Includes RFC 1950, RFC 1951, and RFC 1952. + * + * @since 2.8.0 + */ + #[\AllowDynamicProperties] + class WP_Http_Encoding + { + /** + * Compress raw string using the deflate format. + * + * Supports the RFC 1951 standard. + * + * @since 2.8.0 + * + * @param string $raw String to compress. + * @param int $level Optional. Compression level, 9 is highest. Default 9. + * @param string $supports Optional, not used. When implemented it will choose + * the right compression based on what the server supports. + * @return string|false Compressed string on success, false on failure. + */ + public static function compress($raw, $level = 9, $supports = \null) + { + } + /** + * Decompression of deflated string. + * + * Will attempt to decompress using the RFC 1950 standard, and if that fails + * then the RFC 1951 standard deflate will be attempted. Finally, the RFC + * 1952 standard gzip decode will be attempted. If all fail, then the + * original compressed string will be returned. + * + * @since 2.8.0 + * + * @param string $compressed String to decompress. + * @param int $length The optional length of the compressed data. + * @return string|false Decompressed string on success, false on failure. + */ + public static function decompress($compressed, $length = \null) + { + } + /** + * Decompression of deflated string while staying compatible with the majority of servers. + * + * Certain Servers will return deflated data with headers which PHP's gzinflate() + * function cannot handle out of the box. The following function has been created from + * various snippets on the gzinflate() PHP documentation. + * + * Warning: Magic numbers within. Due to the potential different formats that the compressed + * data may be returned in, some "magic offsets" are needed to ensure proper decompression + * takes place. For a simple pragmatic way to determine the magic offset in use, see: + * https://core.trac.wordpress.org/ticket/18273 + * + * @since 2.8.1 + * + * @link https://core.trac.wordpress.org/ticket/18273 + * @link https://www.php.net/manual/en/function.gzinflate.php#70875 + * @link https://www.php.net/manual/en/function.gzinflate.php#77336 + * + * @param string $gz_data String to decompress. + * @return string|false Decompressed string on success, false on failure. + */ + public static function compatible_gzinflate($gz_data) + { + } + /** + * What encoding types to accept and their priority values. + * + * @since 2.8.0 + * + * @param string $url + * @param array $args + * @return string Types of encoding to accept. + */ + public static function accept_encoding($url, $args) + { + } + /** + * What encoding the content used when it was compressed to send in the headers. + * + * @since 2.8.0 + * + * @return string Content-Encoding string to send in the header. + */ + public static function content_encoding() + { + } + /** + * Whether the content be decoded based on the headers. + * + * @since 2.8.0 + * + * @param array|string $headers All of the available headers. + * @return bool + */ + public static function should_decode($headers) + { + } + /** + * Whether decompression and compression are supported by the PHP version. + * + * Each function is tested instead of checking for the zlib extension, to + * ensure that the functions all exist in the PHP version and aren't + * disabled. + * + * @since 2.8.0 + * + * @return bool + */ + public static function is_available() + { + } + } + /** + * WP_HTTP_IXR_Client + * + * @package WordPress + * @since 3.1.0 + */ + #[\AllowDynamicProperties] + class WP_HTTP_IXR_Client extends \IXR_Client + { + public $scheme; + /** + * @var IXR_Error + */ + public $error; + /** + * @param string $server + * @param string|false $path + * @param int|false $port + * @param int $timeout + */ + public function __construct($server, $path = \false, $port = \false, $timeout = 15) + { + } + /** + * @since 3.1.0 + * @since 5.5.0 Formalized the existing `...$args` parameter by adding it + * to the function signature. + * + * @return bool + */ + public function query(...$args) + { + } + } + /** + * Core class used to implement HTTP API proxy support. + * + * There are caveats to proxy support. It requires that defines be made in the wp-config.php file to + * enable proxy support. There are also a few filters that plugins can hook into for some of the + * constants. + * + * Please note that only BASIC authentication is supported by most transports. + * cURL MAY support more methods (such as NTLM authentication) depending on your environment. + * + * The constants are as follows: + * <ol> + * <li>WP_PROXY_HOST - Enable proxy support and host for connecting.</li> + * <li>WP_PROXY_PORT - Proxy port for connection. No default, must be defined.</li> + * <li>WP_PROXY_USERNAME - Proxy username, if it requires authentication.</li> + * <li>WP_PROXY_PASSWORD - Proxy password, if it requires authentication.</li> + * <li>WP_PROXY_BYPASS_HOSTS - Will prevent the hosts in this list from going through the proxy. + * You do not need to have localhost and the site host in this list, because they will not be passed + * through the proxy. The list should be presented in a comma separated list, wildcards using * are supported. Example: *.wordpress.org</li> + * </ol> + * + * An example can be as seen below. + * + * define('WP_PROXY_HOST', '192.168.84.101'); + * define('WP_PROXY_PORT', '8080'); + * define('WP_PROXY_BYPASS_HOSTS', 'localhost, www.example.com, *.wordpress.org'); + * + * @link https://core.trac.wordpress.org/ticket/4011 Proxy support ticket in WordPress. + * @link https://core.trac.wordpress.org/ticket/14636 Allow wildcard domains in WP_PROXY_BYPASS_HOSTS + * + * @since 2.8.0 + */ + #[\AllowDynamicProperties] + class WP_HTTP_Proxy + { + /** + * Whether proxy connection should be used. + * + * Constants which control this behavior: + * + * - `WP_PROXY_HOST` + * - `WP_PROXY_PORT` + * + * @since 2.8.0 + * + * @return bool + */ + public function is_enabled() + { + } + /** + * Whether authentication should be used. + * + * Constants which control this behavior: + * + * - `WP_PROXY_USERNAME` + * - `WP_PROXY_PASSWORD` + * + * @since 2.8.0 + * + * @return bool + */ + public function use_authentication() + { + } + /** + * Retrieve the host for the proxy server. + * + * @since 2.8.0 + * + * @return string + */ + public function host() + { + } + /** + * Retrieve the port for the proxy server. + * + * @since 2.8.0 + * + * @return string + */ + public function port() + { + } + /** + * Retrieve the username for proxy authentication. + * + * @since 2.8.0 + * + * @return string + */ + public function username() + { + } + /** + * Retrieve the password for proxy authentication. + * + * @since 2.8.0 + * + * @return string + */ + public function password() + { + } + /** + * Retrieve authentication string for proxy authentication. + * + * @since 2.8.0 + * + * @return string + */ + public function authentication() + { + } + /** + * Retrieve header string for proxy authentication. + * + * @since 2.8.0 + * + * @return string + */ + public function authentication_header() + { + } + /** + * Determines whether the request should be sent through a proxy. + * + * We want to keep localhost and the site URL from being sent through the proxy, because + * some proxies can not handle this. We also have the constant available for defining other + * hosts that won't be sent through the proxy. + * + * @since 2.8.0 + * + * @param string $uri URL of the request. + * @return bool Whether to send the request through the proxy. + */ + public function send_through_proxy($uri) + { + } + } + /** + * Bridge to connect Requests internal hooks to WordPress actions. + * + * @since 4.7.0 + * + * @see WpOrg\Requests\Hooks + */ + #[\AllowDynamicProperties] + class WP_HTTP_Requests_Hooks extends \WpOrg\Requests\Hooks + { + /** + * Requested URL. + * + * @var string Requested URL. + */ + protected $url; + /** + * WordPress WP_HTTP request data. + * + * @var array Request data in WP_Http format. + */ + protected $request = array(); + /** + * Constructor. + * + * @param string $url URL to request. + * @param array $request Request data in WP_Http format. + */ + public function __construct($url, $request) + { + } + /** + * Dispatch a Requests hook to a native WordPress action. + * + * @param string $hook Hook name. + * @param array $parameters Parameters to pass to callbacks. + * @return bool True if hooks were run, false if nothing was hooked. + */ + public function dispatch($hook, $parameters = array()) + { + } + } + /** + * Core class used to prepare HTTP responses. + * + * @since 4.4.0 + */ + #[\AllowDynamicProperties] + class WP_HTTP_Response + { + /** + * Response data. + * + * @since 4.4.0 + * @var mixed + */ + public $data; + /** + * Response headers. + * + * @since 4.4.0 + * @var array + */ + public $headers; + /** + * Response status. + * + * @since 4.4.0 + * @var int + */ + public $status; + /** + * Constructor. + * + * @since 4.4.0 + * + * @param mixed $data Response data. Default null. + * @param int $status Optional. HTTP status code. Default 200. + * @param array $headers Optional. HTTP header map. Default empty array. + */ + public function __construct($data = \null, $status = 200, $headers = array()) + { + } + /** + * Retrieves headers associated with the response. + * + * @since 4.4.0 + * + * @return array Map of header name to header value. + */ + public function get_headers() + { + } + /** + * Sets all header values. + * + * @since 4.4.0 + * + * @param array $headers Map of header name to header value. + */ + public function set_headers($headers) + { + } + /** + * Sets a single HTTP header. + * + * @since 4.4.0 + * + * @param string $key Header name. + * @param string $value Header value. + * @param bool $replace Optional. Whether to replace an existing header of the same name. + * Default true. + */ + public function header($key, $value, $replace = \true) + { + } + /** + * Retrieves the HTTP return code for the response. + * + * @since 4.4.0 + * + * @return int The 3-digit HTTP status code. + */ + public function get_status() + { + } + /** + * Sets the 3-digit HTTP status code. + * + * @since 4.4.0 + * + * @param int $code HTTP status. + */ + public function set_status($code) + { + } + /** + * Retrieves the response data. + * + * @since 4.4.0 + * + * @return mixed Response data. + */ + public function get_data() + { + } + /** + * Sets the response data. + * + * @since 4.4.0 + * + * @param mixed $data Response data. + */ + public function set_data($data) + { + } + /** + * Retrieves the response data for JSON serialization. + * + * It is expected that in most implementations, this will return the same as get_data(), + * however this may be different if you want to do custom JSON data handling. + * + * @since 4.4.0 + * + * @return mixed Any JSON-serializable value. + */ + public function jsonSerialize() + { + } + } + /** + * Core wrapper object for a WpOrg\Requests\Response for standardization. + * + * @since 4.6.0 + * + * @see WP_HTTP_Response + */ + class WP_HTTP_Requests_Response extends \WP_HTTP_Response + { + /** + * Requests Response object. + * + * @since 4.6.0 + * @var \WpOrg\Requests\Response + */ + protected $response; + /** + * Filename the response was saved to. + * + * @since 4.6.0 + * @var string|null + */ + protected $filename; + /** + * Constructor. + * + * @since 4.6.0 + * + * @param \WpOrg\Requests\Response $response HTTP response. + * @param string $filename Optional. File name. Default empty. + */ + public function __construct(\WpOrg\Requests\Response $response, $filename = '') + { + } + /** + * Retrieves the response object for the request. + * + * @since 4.6.0 + * + * @return WpOrg\Requests\Response HTTP response. + */ + public function get_response_object() + { + } + /** + * Retrieves headers associated with the response. + * + * @since 4.6.0 + * + * @return \WpOrg\Requests\Utility\CaseInsensitiveDictionary Map of header name to header value. + */ + public function get_headers() + { + } + /** + * Sets all header values. + * + * @since 4.6.0 + * + * @param array $headers Map of header name to header value. + */ + public function set_headers($headers) + { + } + /** + * Sets a single HTTP header. + * + * @since 4.6.0 + * + * @param string $key Header name. + * @param string $value Header value. + * @param bool $replace Optional. Whether to replace an existing header of the same name. + * Default true. + */ + public function header($key, $value, $replace = \true) + { + } + /** + * Retrieves the HTTP return code for the response. + * + * @since 4.6.0 + * + * @return int The 3-digit HTTP status code. + */ + public function get_status() + { + } + /** + * Sets the 3-digit HTTP status code. + * + * @since 4.6.0 + * + * @param int $code HTTP status. + */ + public function set_status($code) + { + } + /** + * Retrieves the response data. + * + * @since 4.6.0 + * + * @return string Response data. + */ + public function get_data() + { + } + /** + * Sets the response data. + * + * @since 4.6.0 + * + * @param string $data Response data. + */ + public function set_data($data) + { + } + /** + * Retrieves cookies from the response. + * + * @since 4.6.0 + * + * @return WP_HTTP_Cookie[] List of cookie objects. + */ + public function get_cookies() + { + } + /** + * Converts the object to a WP_Http response array. + * + * @since 4.6.0 + * + * @return array WP_Http response array, per WP_Http::request(). + */ + public function to_array() + { + } + } + /** + * Core class used to integrate PHP Streams as an HTTP transport. + * + * @since 2.7.0 + * @since 3.7.0 Combined with the fsockopen transport and switched to `stream_socket_client()`. + * @deprecated 6.4.0 Use WP_Http + * @see WP_Http + */ + #[\AllowDynamicProperties] + class WP_Http_Streams + { + /** + * Send a HTTP request to a URI using PHP Streams. + * + * @see WP_Http::request() For default options descriptions. + * + * @since 2.7.0 + * @since 3.7.0 Combined with the fsockopen transport and switched to stream_socket_client(). + * + * @param string $url The request URL. + * @param string|array $args Optional. Override the defaults. + * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error + */ + public function request($url, $args = array()) + { + } + /** + * Verifies the received SSL certificate against its Common Names and subjectAltName fields. + * + * PHP's SSL verifications only verify that it's a valid Certificate, it doesn't verify if + * the certificate is valid for the hostname which was requested. + * This function verifies the requested hostname against certificate's subjectAltName field, + * if that is empty, or contains no DNS entries, a fallback to the Common Name field is used. + * + * IP Address support is included if the request is being made to an IP address. + * + * @since 3.7.0 + * + * @param resource $stream The PHP Stream which the SSL request is being made over + * @param string $host The hostname being requested + * @return bool If the certificate presented in $stream is valid for $host + */ + public static function verify_ssl_certificate($stream, $host) + { + } + /** + * Determines whether this class can be used for retrieving a URL. + * + * @since 2.7.0 + * @since 3.7.0 Combined with the fsockopen transport and switched to stream_socket_client(). + * + * @param array $args Optional. Array of request arguments. Default empty array. + * @return bool False means this class can not be used, true means it can. + */ + public static function test($args = array()) + { + } + } + /** + * Deprecated HTTP Transport method which used fsockopen. + * + * This class is not used, and is included for backward compatibility only. + * All code should make use of WP_Http directly through its API. + * + * @see WP_HTTP::request + * + * @since 2.7.0 + * @deprecated 3.7.0 Please use WP_HTTP::request() directly + */ + class WP_HTTP_Fsockopen extends \WP_Http_Streams + { + // For backward compatibility for users who are using the class directly. + } + /** + * Core class used for managing HTTP transports and making HTTP requests. + * + * This class is used to consistently make outgoing HTTP requests easy for developers + * while still being compatible with the many PHP configurations under which + * WordPress runs. + * + * Debugging includes several actions, which pass different variables for debugging the HTTP API. + * + * @since 2.7.0 + */ + #[\AllowDynamicProperties] + class WP_Http + { + // Aliases for HTTP response codes. + const HTTP_CONTINUE = 100; + const SWITCHING_PROTOCOLS = 101; + const PROCESSING = 102; + const EARLY_HINTS = 103; + const OK = 200; + const CREATED = 201; + const ACCEPTED = 202; + const NON_AUTHORITATIVE_INFORMATION = 203; + const NO_CONTENT = 204; + const RESET_CONTENT = 205; + const PARTIAL_CONTENT = 206; + const MULTI_STATUS = 207; + const IM_USED = 226; + const MULTIPLE_CHOICES = 300; + const MOVED_PERMANENTLY = 301; + const FOUND = 302; + const SEE_OTHER = 303; + const NOT_MODIFIED = 304; + const USE_PROXY = 305; + const RESERVED = 306; + const TEMPORARY_REDIRECT = 307; + const PERMANENT_REDIRECT = 308; + const BAD_REQUEST = 400; + const UNAUTHORIZED = 401; + const PAYMENT_REQUIRED = 402; + const FORBIDDEN = 403; + const NOT_FOUND = 404; + const METHOD_NOT_ALLOWED = 405; + const NOT_ACCEPTABLE = 406; + const PROXY_AUTHENTICATION_REQUIRED = 407; + const REQUEST_TIMEOUT = 408; + const CONFLICT = 409; + const GONE = 410; + const LENGTH_REQUIRED = 411; + const PRECONDITION_FAILED = 412; + const REQUEST_ENTITY_TOO_LARGE = 413; + const REQUEST_URI_TOO_LONG = 414; + const UNSUPPORTED_MEDIA_TYPE = 415; + const REQUESTED_RANGE_NOT_SATISFIABLE = 416; + const EXPECTATION_FAILED = 417; + const IM_A_TEAPOT = 418; + const MISDIRECTED_REQUEST = 421; + const UNPROCESSABLE_ENTITY = 422; + const LOCKED = 423; + const FAILED_DEPENDENCY = 424; + const TOO_EARLY = 425; + const UPGRADE_REQUIRED = 426; + const PRECONDITION_REQUIRED = 428; + const TOO_MANY_REQUESTS = 429; + const REQUEST_HEADER_FIELDS_TOO_LARGE = 431; + const UNAVAILABLE_FOR_LEGAL_REASONS = 451; + const INTERNAL_SERVER_ERROR = 500; + const NOT_IMPLEMENTED = 501; + const BAD_GATEWAY = 502; + const SERVICE_UNAVAILABLE = 503; + const GATEWAY_TIMEOUT = 504; + const HTTP_VERSION_NOT_SUPPORTED = 505; + const VARIANT_ALSO_NEGOTIATES = 506; + const INSUFFICIENT_STORAGE = 507; + const NOT_EXTENDED = 510; + const NETWORK_AUTHENTICATION_REQUIRED = 511; + /** + * Send an HTTP request to a URI. + * + * Please note: The only URI that are supported in the HTTP Transport implementation + * are the HTTP and HTTPS protocols. + * + * @since 2.7.0 + * + * @param string $url The request URL. + * @param string|array $args { + * Optional. Array or string of HTTP request arguments. + * + * @type string $method Request method. Accepts 'GET', 'POST', 'HEAD', 'PUT', 'DELETE', + * 'TRACE', 'OPTIONS', or 'PATCH'. + * Some transports technically allow others, but should not be + * assumed. Default 'GET'. + * @type float $timeout How long the connection should stay open in seconds. Default 5. + * @type int $redirection Number of allowed redirects. Not supported by all transports. + * Default 5. + * @type string $httpversion Version of the HTTP protocol to use. Accepts '1.0' and '1.1'. + * Default '1.0'. + * @type string $user-agent User-agent value sent. + * Default 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ). + * @type bool $reject_unsafe_urls Whether to pass URLs through wp_http_validate_url(). + * Default false. + * @type bool $blocking Whether the calling code requires the result of the request. + * If set to false, the request will be sent to the remote server, + * and processing returned to the calling code immediately, the caller + * will know if the request succeeded or failed, but will not receive + * any response from the remote server. Default true. + * @type string|array $headers Array or string of headers to send with the request. + * Default empty array. + * @type array $cookies List of cookies to send with the request. Default empty array. + * @type string|array $body Body to send with the request. Default null. + * @type bool $compress Whether to compress the $body when sending the request. + * Default false. + * @type bool $decompress Whether to decompress a compressed response. If set to false and + * compressed content is returned in the response anyway, it will + * need to be separately decompressed. Default true. + * @type bool $sslverify Whether to verify SSL for the request. Default true. + * @type string $sslcertificates Absolute path to an SSL certificate .crt file. + * Default ABSPATH . WPINC . '/certificates/ca-bundle.crt'. + * @type bool $stream Whether to stream to a file. If set to true and no filename was + * given, it will be dropped it in the WP temp dir and its name will + * be set using the basename of the URL. Default false. + * @type string $filename Filename of the file to write to when streaming. $stream must be + * set to true. Default null. + * @type int $limit_response_size Size in bytes to limit the response to. Default null. + * + * } + * @return array|WP_Error { + * Array of response data, or a WP_Error instance upon error. + * + * @type \WpOrg\Requests\Utility\CaseInsensitiveDictionary $headers Response headers keyed by name. + * @type string $body Response body. + * @type array $response { + * Array of HTTP response data. + * + * @type int|false $code HTTP response status code. + * @type string|false $message HTTP response message. + * } + * @type WP_HTTP_Cookie[] $cookies Array of cookies set by the server. + * @type string|null $filename Optional. Filename of the response. + * @type WP_HTTP_Requests_Response|null $http_response Response object. + * } + * @phpstan-param array{ + * method?: string, + * timeout?: float, + * redirection?: int, + * httpversion?: string, + * user-agent?: string, + * reject_unsafe_urls?: bool, + * blocking?: bool, + * headers?: string|array, + * cookies?: array, + * body?: string|array, + * compress?: bool, + * decompress?: bool, + * sslverify?: bool, + * sslcertificates?: string, + * stream?: bool, + * filename?: string, + * limit_response_size?: int, + * } $args + * @phpstan-return \WP_Error|array{ + * headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary, + * body: string, + * response: array{ + * code: int|false, + * message: string|false, + * }, + * cookies: WP_HTTP_Cookie[], + * filename: string|null, + * http_response: WP_HTTP_Requests_Response|null, + * } + * @phpstan-return array{headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary, body: string, response: array{code: int, message: string}, cookies: array<int, \WP_Http_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error + */ + public function request($url, $args = array()) + { + } + /** + * Normalizes cookies for using in Requests. + * + * @since 4.6.0 + * + * @param array $cookies Array of cookies to send with the request. + * @return WpOrg\Requests\Cookie\Jar Cookie holder object. + */ + public static function normalize_cookies($cookies) + { + } + /** + * Match redirect behavior to browser handling. + * + * Changes 302 redirects from POST to GET to match browser handling. Per + * RFC 7231, user agents can deviate from the strict reading of the + * specification for compatibility purposes. + * + * @since 4.6.0 + * + * @param string $location URL to redirect to. + * @param array $headers Headers for the redirect. + * @param string|array $data Body to send with the request. + * @param array $options Redirect request options. + * @param WpOrg\Requests\Response $original Response object. + */ + public static function browser_redirect_compatibility($location, $headers, $data, &$options, $original) + { + } + /** + * Validate redirected URLs. + * + * @since 4.7.5 + * + * @throws WpOrg\Requests\Exception On unsuccessful URL validation. + * @param string $location URL to redirect to. + */ + public static function validate_redirects($location) + { + } + /** + * Tests which transports are capable of supporting the request. + * + * @since 3.2.0 + * @deprecated 6.4.0 Use WpOrg\Requests\Requests::get_transport_class() + * @see WpOrg\Requests\Requests::get_transport_class() + * + * @param array $args Request arguments. + * @param string $url URL to request. + * @return string|false Class name for the first transport that claims to support the request. + * False if no transport claims to support the request. + */ + public function _get_first_available_transport($args, $url = \null) + { + } + /** + * Uses the POST HTTP method. + * + * Used for sending data that is expected to be in the body. + * + * @since 2.7.0 + * + * @param string $url The request URL. + * @param string|array $args Optional. Override the defaults. + * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. + * A WP_Error instance upon error. See WP_Http::response() for details. + * @phpstan-return array{headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary, body: string, response: array{code: int, message: string}, cookies: array<int, \WP_Http_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error + */ + public function post($url, $args = array()) + { + } + /** + * Uses the GET HTTP method. + * + * Used for sending data that is expected to be in the body. + * + * @since 2.7.0 + * + * @param string $url The request URL. + * @param string|array $args Optional. Override the defaults. + * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. + * A WP_Error instance upon error. See WP_Http::response() for details. + * @phpstan-return array{headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary, body: string, response: array{code: int, message: string}, cookies: array<int, \WP_Http_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error + */ + public function get($url, $args = array()) + { + } + /** + * Uses the HEAD HTTP method. + * + * Used for sending data that is expected to be in the body. + * + * @since 2.7.0 + * + * @param string $url The request URL. + * @param string|array $args Optional. Override the defaults. + * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. + * A WP_Error instance upon error. See WP_Http::response() for details. + * @phpstan-return array{headers: \WpOrg\Requests\Utility\CaseInsensitiveDictionary, body: string, response: array{code: int, message: string}, cookies: array<int, \WP_Http_Cookie>, filename: string|null, http_response: \WP_HTTP_Requests_Response}|\WP_Error + */ + public function head($url, $args = array()) + { + } + /** + * Parses the responses and splits the parts into headers and body. + * + * @since 2.7.0 + * + * @param string $response The full response string. + * @return array { + * Array with response headers and body. + * + * @type string $headers HTTP response headers. + * @type string $body HTTP response body. + * } + * @phpstan-return array{ + * headers: string, + * body: string, + * } + */ + public static function processResponse($response) + { + } + /** + * Transforms header string into an array. + * + * @since 2.7.0 + * + * @param string|array $headers The original headers. If a string is passed, it will be converted + * to an array. If an array is passed, then it is assumed to be + * raw header data with numeric keys with the headers as the values. + * No headers must be passed that were already processed. + * @param string $url Optional. The URL that was requested. Default empty. + * @return array { + * Processed string headers. If duplicate headers are encountered, + * then a numbered array is returned as the value of that header-key. + * + * @type array $response { + * @type int $code The response status code. Default 0. + * @type string $message The response message. Default empty. + * } + * @type array $newheaders The processed header data as a multidimensional array. + * @type WP_Http_Cookie[] $cookies If the original headers contain the 'Set-Cookie' key, + * an array containing `WP_Http_Cookie` objects is returned. + * } + * @phpstan-return array{ + * response: array{ + * code: int, + * message: string, + * }, + * newheaders: array, + * cookies: WP_Http_Cookie[], + * } + */ + public static function processHeaders($headers, $url = '') + { + } + /** + * Takes the arguments for a ::request() and checks for the cookie array. + * + * If it's found, then it upgrades any basic name => value pairs to WP_Http_Cookie instances, + * which are each parsed into strings and added to the Cookie: header (within the arguments array). + * Edits the array by reference. + * + * @since 2.8.0 + * + * @param array $r Full array of args passed into ::request() + */ + public static function buildCookieHeader(&$r) + { + } + /** + * Decodes chunk transfer-encoding, based off the HTTP 1.1 specification. + * + * Based off the HTTP http_encoding_dechunk function. + * + * @link https://tools.ietf.org/html/rfc2616#section-19.4.6 Process for chunked decoding. + * + * @since 2.7.0 + * + * @param string $body Body content. + * @return string Chunked decoded body on success or raw body on failure. + */ + public static function chunkTransferDecode($body) + { + } + /** + * Determines whether an HTTP API request to the given URL should be blocked. + * + * Those who are behind a proxy and want to prevent access to certain hosts may do so. This will + * prevent plugins from working and core functionality, if you don't include `api.wordpress.org`. + * + * You block external URL requests by defining `WP_HTTP_BLOCK_EXTERNAL` as true in your `wp-config.php` + * file and this will only allow localhost and your site to make requests. The constant + * `WP_ACCESSIBLE_HOSTS` will allow additional hosts to go through for requests. The format of the + * `WP_ACCESSIBLE_HOSTS` constant is a comma separated list of hostnames to allow, wildcard domains + * are supported, eg `*.wordpress.org` will allow for all subdomains of `wordpress.org` to be contacted. + * + * @since 2.8.0 + * + * @link https://core.trac.wordpress.org/ticket/8927 Allow preventing external requests. + * @link https://core.trac.wordpress.org/ticket/14636 Allow wildcard domains in WP_ACCESSIBLE_HOSTS + * + * @param string $uri URI of url. + * @return bool True to block, false to allow. + */ + public function block_request($uri) + { + } + /** + * Used as a wrapper for PHP's parse_url() function that handles edgecases in < PHP 5.4.7. + * + * @deprecated 4.4.0 Use wp_parse_url() + * @see wp_parse_url() + * + * @param string $url The URL to parse. + * @return bool|array False on failure; Array of URL components on success; + * See parse_url()'s return values. + */ + protected static function parse_url($url) + { + } + /** + * Converts a relative URL to an absolute URL relative to a given URL. + * + * If an Absolute URL is provided, no processing of that URL is done. + * + * @since 3.4.0 + * + * @param string $maybe_relative_path The URL which might be relative. + * @param string $url The URL which $maybe_relative_path is relative to. + * @return string An Absolute URL, in a failure condition where the URL cannot be parsed, the relative URL will be returned. + */ + public static function make_absolute_url($maybe_relative_path, $url) + { + } + /** + * Handles an HTTP redirect and follows it if appropriate. + * + * @since 3.7.0 + * + * @param string $url The URL which was requested. + * @param array $args The arguments which were used to make the request. + * @param array $response The response of the HTTP request. + * @return array|false|WP_Error An HTTP API response array if the redirect is successfully followed, + * false if no redirect is present, or a WP_Error object if there's an error. + */ + public static function handle_redirects($url, $args, $response) + { + } + /** + * Determines if a specified string represents an IP address or not. + * + * This function also detects the type of the IP address, returning either + * '4' or '6' to represent an IPv4 and IPv6 address respectively. + * This does not verify if the IP is a valid IP, only that it appears to be + * an IP address. + * + * @link http://home.deds.nl/~aeron/regex/ for IPv6 regex. + * + * @since 3.7.0 + * + * @param string $maybe_ip A suspected IP address. + * @return int|false Upon success, '4' or '6' to represent an IPv4 or IPv6 address, false upon failure. + */ + public static function is_ip_address($maybe_ip) + { + } + } + /** + * Base image editor class from which implementations extend + * + * @since 3.5.0 + */ + #[\AllowDynamicProperties] + abstract class WP_Image_Editor + { + protected $file = \null; + protected $size = \null; + protected $mime_type = \null; + protected $output_mime_type = \null; + protected $default_mime_type = 'image/jpeg'; + protected $quality = \false; + protected $default_quality = 82; + /** + * Each instance handles a single file. + * + * @param string $file Path to the file to load. + */ + public function __construct($file) + { + } + /** + * Checks to see if current environment supports the editor chosen. + * Must be overridden in a subclass. + * + * @since 3.5.0 + * + * @abstract + * + * @param array $args + * @return bool + */ + public static function test($args = array()) + { + } + /** + * Checks to see if editor supports the mime-type specified. + * Must be overridden in a subclass. + * + * @since 3.5.0 + * + * @abstract + * + * @param string $mime_type + * @return bool + */ + public static function supports_mime_type($mime_type) + { + } + /** + * Loads image from $this->file into editor. + * + * @since 3.5.0 + * + * @return true|WP_Error True if loaded; WP_Error on failure. + */ + abstract public function load(); + /** + * Saves current image to file. + * + * @since 3.5.0 + * @since 6.0.0 The `$filesize` value was added to the returned array. + * + * @param string $destfilename Optional. Destination filename. Default null. + * @param string $mime_type Optional. The mime-type. Default null. + * @return array|WP_Error { + * Array on success or WP_Error if the file failed to save. + * + * @type string $path Path to the image file. + * @type string $file Name of the image file. + * @type int $width Image width. + * @type int $height Image height. + * @type string $mime-type The mime type of the image. + * @type int $filesize File size of the image. + * } + * @phpstan-return \WP_Error|array{ + * path: string, + * file: string, + * width: int, + * height: int, + * mime-type: string, + * filesize: int, + * } + */ + abstract public function save($destfilename = \null, $mime_type = \null); + /** + * Resizes current image. + * + * At minimum, either a height or width must be provided. + * If one of the two is set to null, the resize will + * maintain aspect ratio according to the provided dimension. + * + * @since 3.5.0 + * + * @param int|null $max_w Image width. + * @param int|null $max_h Image height. + * @param bool|array $crop { + * Optional. Image cropping behavior. If false, the image will be scaled (default). + * If true, image will be cropped to the specified dimensions using center positions. + * If an array, the image will be cropped using the array to specify the crop location: + * + * @type string $0 The x crop position. Accepts 'left', 'center', or 'right'. + * @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'. + * } + * @return true|WP_Error + * @phpstan-param bool|array{ + * 0: string, + * 1: string, + * } $crop + */ + abstract public function resize($max_w, $max_h, $crop = \false); + /** + * Resize multiple images from a single source. + * + * @since 3.5.0 + * + * @param array $sizes { + * An array of image size arrays. Default sizes are 'small', 'medium', 'large'. + * + * @type array ...$0 { + * @type int $width Image width. + * @type int $height Image height. + * @type bool|array $crop Optional. Whether to crop the image. Default false. + * } + * } + * @return array An array of resized images metadata by size. + * @phpstan-param array<int|string, array{ + * width: int, + * height: int, + * crop?: bool|array, + * }> $sizes + */ + abstract public function multi_resize($sizes); + /** + * Crops Image. + * + * @since 3.5.0 + * + * @param int $src_x The start x position to crop from. + * @param int $src_y The start y position to crop from. + * @param int $src_w The width to crop. + * @param int $src_h The height to crop. + * @param int $dst_w Optional. The destination width. + * @param int $dst_h Optional. The destination height. + * @param bool $src_abs Optional. If the source crop points are absolute. + * @return true|WP_Error + */ + abstract public function crop($src_x, $src_y, $src_w, $src_h, $dst_w = \null, $dst_h = \null, $src_abs = \false); + /** + * Rotates current image counter-clockwise by $angle. + * + * @since 3.5.0 + * + * @param float $angle + * @return true|WP_Error + */ + abstract public function rotate($angle); + /** + * Flips current image. + * + * @since 3.5.0 + * + * @param bool $horz Flip along Horizontal Axis + * @param bool $vert Flip along Vertical Axis + * @return true|WP_Error + */ + abstract public function flip($horz, $vert); + /** + * Streams current image to browser. + * + * @since 3.5.0 + * + * @param string $mime_type The mime type of the image. + * @return true|WP_Error True on success, WP_Error object on failure. + */ + abstract public function stream($mime_type = \null); + /** + * Gets dimensions of image. + * + * @since 3.5.0 + * + * @return int[] { + * Dimensions of the image. + * + * @type int $width The image width. + * @type int $height The image height. + * } + * @phpstan-return array{ + * width: int, + * height: int, + * } + */ + public function get_size() + { + } + /** + * Sets current image size. + * + * @since 3.5.0 + * + * @param int $width + * @param int $height + * @return true + */ + protected function update_size($width = \null, $height = \null) + { + } + /** + * Gets the Image Compression quality on a 1-100% scale. + * + * @since 4.0.0 + * + * @return int Compression Quality. Range: [1,100] + */ + public function get_quality() + { + } + /** + * Sets Image Compression quality on a 1-100% scale. + * + * @since 3.5.0 + * @since 6.8.0 The `$dims` parameter was added. + * + * @param int $quality Compression Quality. Range: [1,100] + * @param array $dims Optional. Image dimensions array with 'width' and 'height' keys. + * @return true|WP_Error True if set successfully; WP_Error on failure. + */ + public function set_quality($quality = \null, $dims = array()) + { + } + /** + * Returns the default compression quality setting for the mime type. + * + * @since 5.8.1 + * + * @param string $mime_type + * @return int The default quality setting for the mime type. + */ + protected function get_default_quality($mime_type) + { + } + /** + * Returns preferred mime-type and extension based on provided + * file's extension and mime, or current file's extension and mime. + * + * Will default to $this->default_mime_type if requested is not supported. + * + * Provides corrected filename only if filename is provided. + * + * @since 3.5.0 + * + * @param string $filename + * @param string $mime_type + * @return array { filename|null, extension, mime-type } + */ + protected function get_output_format($filename = \null, $mime_type = \null) + { + } + /** + * Builds an output filename based on current file, and adding proper suffix + * + * @since 3.5.0 + * @since 6.8.0 Passing an empty string as $suffix will now omit the suffix from the generated filename. + * + * @param string $suffix + * @param string $dest_path + * @param string $extension + * @return string filename + */ + public function generate_filename($suffix = \null, $dest_path = \null, $extension = \null) + { + } + /** + * Builds and returns proper suffix for file based on height and width. + * + * @since 3.5.0 + * + * @return string|false suffix + */ + public function get_suffix() + { + } + /** + * Check if a JPEG image has EXIF Orientation tag and rotate it if needed. + * + * @since 5.3.0 + * + * @return bool|WP_Error True if the image was rotated. False if not rotated (no EXIF data or the image doesn't need to be rotated). + * WP_Error if error while rotating. + */ + public function maybe_exif_rotate() + { + } + /** + * Either calls editor's save function or handles file as a stream. + * + * @since 3.5.0 + * + * @param string $filename + * @param callable $callback + * @param array $arguments + * @return bool + */ + protected function make_image($filename, $callback, $arguments) + { + } + /** + * Returns first matched mime-type from extension, + * as mapped from wp_get_mime_types() + * + * @since 3.5.0 + * + * @param string $extension + * @return string|false + */ + protected static function get_mime_type($extension = \null) + { + } + /** + * Returns first matched extension from Mime-type, + * as mapped from wp_get_mime_types() + * + * @since 3.5.0 + * + * @param string $mime_type + * @return string|false + */ + protected static function get_extension($mime_type = \null) + { + } + } + /** + * WordPress Image Editor Class for Image Manipulation through GD + * + * @since 3.5.0 + * + * @see WP_Image_Editor + */ + class WP_Image_Editor_GD extends \WP_Image_Editor + { + /** + * GD Resource. + * + * @var resource|GdImage + */ + protected $image; + public function __destruct() + { + } + /** + * Checks to see if current environment supports GD. + * + * @since 3.5.0 + * + * @param array $args + * @return bool + */ + public static function test($args = array()) + { + } + /** + * Checks to see if editor supports the mime-type specified. + * + * @since 3.5.0 + * + * @param string $mime_type + * @return bool + */ + public static function supports_mime_type($mime_type) + { + } + /** + * Loads image from $this->file into new GD Resource. + * + * @since 3.5.0 + * + * @return true|WP_Error True if loaded successfully; WP_Error on failure. + */ + public function load() + { + } + /** + * Sets or updates current image size. + * + * @since 3.5.0 + * + * @param int $width + * @param int $height + * @return true + */ + protected function update_size($width = \false, $height = \false) + { + } + /** + * Resizes current image. + * + * Wraps `::_resize()` which returns a GD resource or GdImage instance. + * + * At minimum, either a height or width must be provided. If one of the two is set + * to null, the resize will maintain aspect ratio according to the provided dimension. + * + * @since 3.5.0 + * + * @param int|null $max_w Image width. + * @param int|null $max_h Image height. + * @param bool|array $crop { + * Optional. Image cropping behavior. If false, the image will be scaled (default). + * If true, image will be cropped to the specified dimensions using center positions. + * If an array, the image will be cropped using the array to specify the crop location: + * + * @type string $0 The x crop position. Accepts 'left', 'center', or 'right'. + * @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'. + * } + * @return true|WP_Error + * @phpstan-param bool|array{ + * 0: string, + * 1: string, + * } $crop + */ + public function resize($max_w, $max_h, $crop = \false) + { + } + /** + * @param int $max_w + * @param int $max_h + * @param bool|array $crop { + * Optional. Image cropping behavior. If false, the image will be scaled (default). + * If true, image will be cropped to the specified dimensions using center positions. + * If an array, the image will be cropped using the array to specify the crop location: + * + * @type string $0 The x crop position. Accepts 'left', 'center', or 'right'. + * @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'. + * } + * @return resource|GdImage|WP_Error + * @phpstan-param bool|array{ + * 0: string, + * 1: string, + * } $crop + */ + protected function _resize($max_w, $max_h, $crop = \false) + { + } + /** + * Create multiple smaller images from a single source. + * + * Attempts to create all sub-sizes and returns the meta data at the end. This + * may result in the server running out of resources. When it fails there may be few + * "orphaned" images left over as the meta data is never returned and saved. + * + * As of 5.3.0 the preferred way to do this is with `make_subsize()`. It creates + * the new images one at a time and allows for the meta data to be saved after + * each new image is created. + * + * @since 3.5.0 + * + * @param array $sizes { + * An array of image size data arrays. + * + * Either a height or width must be provided. + * If one of the two is set to null, the resize will + * maintain aspect ratio according to the source image. + * + * @type array ...$0 { + * Array of height, width values, and whether to crop. + * + * @type int $width Image width. Optional if `$height` is specified. + * @type int $height Image height. Optional if `$width` is specified. + * @type bool|array $crop Optional. Whether to crop the image. Default false. + * } + * } + * @return array An array of resized images' metadata by size. + * @phpstan-param array<int|string, array{ + * width?: int, + * height?: int, + * crop?: bool|array, + * }> $sizes + */ + public function multi_resize($sizes) + { + } + /** + * Create an image sub-size and return the image meta data value for it. + * + * @since 5.3.0 + * + * @param array $size_data { + * Array of size data. + * + * @type int $width The maximum width in pixels. + * @type int $height The maximum height in pixels. + * @type bool|array $crop Whether to crop the image to exact dimensions. + * } + * @return array|WP_Error The image data array for inclusion in the `sizes` array in the image meta, + * WP_Error object on error. + * @phpstan-param array{ + * width?: int, + * height?: int, + * crop?: bool|array, + * } $size_data + */ + public function make_subsize($size_data) + { + } + /** + * Crops Image. + * + * @since 3.5.0 + * + * @param int $src_x The start x position to crop from. + * @param int $src_y The start y position to crop from. + * @param int $src_w The width to crop. + * @param int $src_h The height to crop. + * @param int $dst_w Optional. The destination width. + * @param int $dst_h Optional. The destination height. + * @param bool $src_abs Optional. If the source crop points are absolute. + * @return true|WP_Error + */ + public function crop($src_x, $src_y, $src_w, $src_h, $dst_w = \null, $dst_h = \null, $src_abs = \false) + { + } + /** + * Rotates current image counter-clockwise by $angle. + * Ported from image-edit.php + * + * @since 3.5.0 + * + * @param float $angle + * @return true|WP_Error + */ + public function rotate($angle) + { + } + /** + * Flips current image. + * + * @since 3.5.0 + * + * @param bool $horz Flip along Horizontal Axis. + * @param bool $vert Flip along Vertical Axis. + * @return true|WP_Error + */ + public function flip($horz, $vert) + { + } + /** + * Saves current in-memory image to file. + * + * @since 3.5.0 + * @since 5.9.0 Renamed `$filename` to `$destfilename` to match parent class + * for PHP 8 named parameter support. + * @since 6.0.0 The `$filesize` value was added to the returned array. + * + * @param string|null $destfilename Optional. Destination filename. Default null. + * @param string|null $mime_type Optional. The mime-type. Default null. + * @return array|WP_Error { + * Array on success or WP_Error if the file failed to save. + * + * @type string $path Path to the image file. + * @type string $file Name of the image file. + * @type int $width Image width. + * @type int $height Image height. + * @type string $mime-type The mime type of the image. + * @type int $filesize File size of the image. + * } + * @phpstan-return \WP_Error|array{ + * path: string, + * file: string, + * width: int, + * height: int, + * mime-type: string, + * filesize: int, + * } + */ + public function save($destfilename = \null, $mime_type = \null) + { + } + /** + * @since 3.5.0 + * @since 6.0.0 The `$filesize` value was added to the returned array. + * + * @param resource|GdImage $image + * @param string|null $filename + * @param string|null $mime_type + * @return array|WP_Error { + * Array on success or WP_Error if the file failed to save. + * + * @type string $path Path to the image file. + * @type string $file Name of the image file. + * @type int $width Image width. + * @type int $height Image height. + * @type string $mime-type The mime type of the image. + * @type int $filesize File size of the image. + * } + * @phpstan-return \WP_Error|array{ + * path: string, + * file: string, + * width: int, + * height: int, + * mime-type: string, + * filesize: int, + * } + */ + protected function _save($image, $filename = \null, $mime_type = \null) + { + } + /** + * Sets Image Compression quality on a 1-100% scale. Handles WebP lossless images. + * + * @since 6.7.0 + * @since 6.8.0 The `$dims` parameter was added. + * + * @param int $quality Compression Quality. Range: [1,100] + * @param array $dims Optional. Image dimensions array with 'width' and 'height' keys. + * @return true|WP_Error True if set successfully; WP_Error on failure. + */ + public function set_quality($quality = \null, $dims = array()) + { + } + /** + * Returns stream of current image. + * + * @since 3.5.0 + * + * @param string $mime_type The mime type of the image. + * @return bool True on success, false on failure. + */ + public function stream($mime_type = \null) + { + } + /** + * Either calls editor's save function or handles file as a stream. + * + * @since 3.5.0 + * + * @param string $filename + * @param callable $callback + * @param array $arguments + * @return bool + */ + protected function make_image($filename, $callback, $arguments) + { + } + } + /** + * WordPress Image Editor Class for Image Manipulation through Imagick PHP Module + * + * @since 3.5.0 + * + * @see WP_Image_Editor + */ + class WP_Image_Editor_Imagick extends \WP_Image_Editor + { + /** + * Imagick object. + * + * @var Imagick + */ + protected $image; + public function __destruct() + { + } + /** + * Checks to see if current environment supports Imagick. + * + * We require Imagick 2.2.0 or greater, based on whether the queryFormats() + * method can be called statically. + * + * @since 3.5.0 + * + * @param array $args + * @return bool + */ + public static function test($args = array()) + { + } + /** + * Checks to see if editor supports the mime-type specified. + * + * @since 3.5.0 + * + * @param string $mime_type + * @return bool + */ + public static function supports_mime_type($mime_type) + { + } + /** + * Loads image from $this->file into new Imagick Object. + * + * @since 3.5.0 + * + * @return true|WP_Error True if loaded; WP_Error on failure. + */ + public function load() + { + } + /** + * Sets Image Compression quality on a 1-100% scale. + * + * @since 3.5.0 + * @since 6.8.0 The `$dims` parameter was added. + * + * @param int $quality Compression Quality. Range: [1,100] + * @param array $dims Optional. Image dimensions array with 'width' and 'height' keys. + * @return true|WP_Error True if set successfully; WP_Error on failure. + */ + public function set_quality($quality = \null, $dims = array()) + { + } + /** + * Sets or updates current image size. + * + * @since 3.5.0 + * + * @param int $width + * @param int $height + * @return true|WP_Error + */ + protected function update_size($width = \null, $height = \null) + { + } + /** + * Sets Imagick time limit. + * + * Depending on configuration, Imagick processing may take time. + * + * Multiple problems exist if PHP times out before ImageMagick completed: + * 1. Temporary files aren't cleaned by ImageMagick garbage collection. + * 2. No clear error is provided. + * 3. The cause of such timeout can be hard to pinpoint. + * + * This function, which is expected to be run before heavy image routines, resolves + * point 1 above by aligning Imagick's timeout with PHP's timeout, assuming it is set. + * + * However seems it introduces more problems than it fixes, + * see https://core.trac.wordpress.org/ticket/58202. + * + * Note: + * - Imagick resource exhaustion does not issue catchable exceptions (yet). + * See https://github.com/Imagick/imagick/issues/333. + * - The resource limit is not saved/restored. It applies to subsequent + * image operations within the time of the HTTP request. + * + * @since 6.2.0 + * @deprecated 6.3.0 No longer used in core. + * + * @return int|null The new limit on success, null on failure. + */ + public static function set_imagick_time_limit() + { + } + /** + * Resizes current image. + * + * At minimum, either a height or width must be provided. + * If one of the two is set to null, the resize will + * maintain aspect ratio according to the provided dimension. + * + * @since 3.5.0 + * + * @param int|null $max_w Image width. + * @param int|null $max_h Image height. + * @param bool|array $crop { + * Optional. Image cropping behavior. If false, the image will be scaled (default). + * If true, image will be cropped to the specified dimensions using center positions. + * If an array, the image will be cropped using the array to specify the crop location: + * + * @type string $0 The x crop position. Accepts 'left', 'center', or 'right'. + * @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'. + * } + * @return true|WP_Error + * @phpstan-param bool|array{ + * 0: string, + * 1: string, + * } $crop + */ + public function resize($max_w, $max_h, $crop = \false) + { + } + /** + * Efficiently resize the current image + * + * This is a WordPress specific implementation of Imagick::thumbnailImage(), + * which resizes an image to given dimensions and removes any associated profiles. + * + * @since 4.5.0 + * + * @param int $dst_w The destination width. + * @param int $dst_h The destination height. + * @param string $filter_name Optional. The Imagick filter to use when resizing. Default 'FILTER_TRIANGLE'. + * @param bool $strip_meta Optional. Strip all profiles, excluding color profiles, from the image. Default true. + * @return void|WP_Error + */ + protected function thumbnail_image($dst_w, $dst_h, $filter_name = 'FILTER_TRIANGLE', $strip_meta = \true) + { + } + /** + * Create multiple smaller images from a single source. + * + * Attempts to create all sub-sizes and returns the meta data at the end. This + * may result in the server running out of resources. When it fails there may be few + * "orphaned" images left over as the meta data is never returned and saved. + * + * As of 5.3.0 the preferred way to do this is with `make_subsize()`. It creates + * the new images one at a time and allows for the meta data to be saved after + * each new image is created. + * + * @since 3.5.0 + * + * @param array $sizes { + * An array of image size data arrays. + * + * Either a height or width must be provided. + * If one of the two is set to null, the resize will + * maintain aspect ratio according to the provided dimension. + * + * @type array ...$0 { + * Array of height, width values, and whether to crop. + * + * @type int $width Image width. Optional if `$height` is specified. + * @type int $height Image height. Optional if `$width` is specified. + * @type bool|array $crop Optional. Whether to crop the image. Default false. + * } + * } + * @return array An array of resized images' metadata by size. + * @phpstan-param array<int|string, array{ + * width?: int, + * height?: int, + * crop?: bool|array, + * }> $sizes + */ + public function multi_resize($sizes) + { + } + /** + * Create an image sub-size and return the image meta data value for it. + * + * @since 5.3.0 + * + * @param array $size_data { + * Array of size data. + * + * @type int $width The maximum width in pixels. + * @type int $height The maximum height in pixels. + * @type bool|array $crop Whether to crop the image to exact dimensions. + * } + * @return array|WP_Error The image data array for inclusion in the `sizes` array in the image meta, + * WP_Error object on error. + * @phpstan-param array{ + * width?: int, + * height?: int, + * crop?: bool|array, + * } $size_data + */ + public function make_subsize($size_data) + { + } + /** + * Crops Image. + * + * @since 3.5.0 + * + * @param int $src_x The start x position to crop from. + * @param int $src_y The start y position to crop from. + * @param int $src_w The width to crop. + * @param int $src_h The height to crop. + * @param int $dst_w Optional. The destination width. + * @param int $dst_h Optional. The destination height. + * @param bool $src_abs Optional. If the source crop points are absolute. + * @return true|WP_Error + */ + public function crop($src_x, $src_y, $src_w, $src_h, $dst_w = \null, $dst_h = \null, $src_abs = \false) + { + } + /** + * Rotates current image counter-clockwise by $angle. + * + * @since 3.5.0 + * + * @param float $angle + * @return true|WP_Error + */ + public function rotate($angle) + { + } + /** + * Flips current image. + * + * @since 3.5.0 + * + * @param bool $horz Flip along Horizontal Axis + * @param bool $vert Flip along Vertical Axis + * @return true|WP_Error + */ + public function flip($horz, $vert) + { + } + /** + * Check if a JPEG image has EXIF Orientation tag and rotate it if needed. + * + * As ImageMagick copies the EXIF data to the flipped/rotated image, proceed only + * if EXIF Orientation can be reset afterwards. + * + * @since 5.3.0 + * + * @return bool|WP_Error True if the image was rotated. False if no EXIF data or if the image doesn't need rotation. + * WP_Error if error while rotating. + */ + public function maybe_exif_rotate() + { + } + /** + * Saves current image to file. + * + * @since 3.5.0 + * @since 6.0.0 The `$filesize` value was added to the returned array. + * + * @param string $destfilename Optional. Destination filename. Default null. + * @param string $mime_type Optional. The mime-type. Default null. + * @return array|WP_Error { + * Array on success or WP_Error if the file failed to save. + * + * @type string $path Path to the image file. + * @type string $file Name of the image file. + * @type int $width Image width. + * @type int $height Image height. + * @type string $mime-type The mime type of the image. + * @type int $filesize File size of the image. + * } + * @phpstan-return \WP_Error|array{ + * path: string, + * file: string, + * width: int, + * height: int, + * mime-type: string, + * filesize: int, + * } + */ + public function save($destfilename = \null, $mime_type = \null) + { + } + /** + * Removes PDF alpha after it's been read. + * + * @since 6.4.0 + */ + protected function remove_pdf_alpha_channel() + { + } + /** + * @since 3.5.0 + * @since 6.0.0 The `$filesize` value was added to the returned array. + * + * @param Imagick $image + * @param string $filename + * @param string $mime_type + * @return array|WP_Error { + * Array on success or WP_Error if the file failed to save. + * + * @type string $path Path to the image file. + * @type string $file Name of the image file. + * @type int $width Image width. + * @type int $height Image height. + * @type string $mime-type The mime type of the image. + * @type int $filesize File size of the image. + * } + * @phpstan-return \WP_Error|array{ + * path: string, + * file: string, + * width: int, + * height: int, + * mime-type: string, + * filesize: int, + * } + */ + protected function _save($image, $filename = \null, $mime_type = \null) + { + } + /** + * Streams current image to browser. + * + * @since 3.5.0 + * + * @param string $mime_type The mime type of the image. + * @return true|WP_Error True on success, WP_Error object on failure. + */ + public function stream($mime_type = \null) + { + } + /** + * Strips all image meta except color profiles from an image. + * + * @since 4.5.0 + * + * @return true|WP_Error True if stripping metadata was successful. WP_Error object on error. + */ + protected function strip_meta() + { + } + /** + * Sets up Imagick for PDF processing. + * Increases rendering DPI and only loads first page. + * + * @since 4.7.0 + * + * @return string|WP_Error File to load or WP_Error on failure. + */ + protected function pdf_setup() + { + } + /** + * Load the image produced by Ghostscript. + * + * Includes a workaround for a bug in Ghostscript 8.70 that prevents processing of some PDF files + * when `use-cropbox` is set. + * + * @since 5.6.0 + * + * @return true|WP_Error + */ + protected function pdf_load_source() + { + } + } + /** + * List utility. + * + * Utility class to handle operations on an array of objects or arrays. + * + * @since 4.7.0 + */ + #[\AllowDynamicProperties] + class WP_List_Util + { + /** + * Constructor. + * + * Sets the input array. + * + * @since 4.7.0 + * + * @param array $input Array to perform operations on. + */ + public function __construct($input) + { + } + /** + * Returns the original input array. + * + * @since 4.7.0 + * + * @return array The input array. + */ + public function get_input() + { + } + /** + * Returns the output array. + * + * @since 4.7.0 + * + * @return array The output array. + */ + public function get_output() + { + } + /** + * Filters the list, based on a set of key => value arguments. + * + * Retrieves the objects from the list that match the given arguments. + * Key represents property name, and value represents property value. + * + * If an object has more properties than those specified in arguments, + * that will not disqualify it. When using the 'AND' operator, + * any missing properties will disqualify it. + * + * @since 4.7.0 + * + * @param array $args Optional. An array of key => value arguments to match + * against each object. Default empty array. + * @param string $operator Optional. The logical operation to perform. 'AND' means + * all elements from the array must match. 'OR' means only + * one element needs to match. 'NOT' means no elements may + * match. Default 'AND'. + * @return array Array of found values. + */ + public function filter($args = array(), $operator = 'AND') + { + } + /** + * Plucks a certain field out of each element in the input array. + * + * This has the same functionality and prototype of + * array_column() (PHP 5.5) but also supports objects. + * + * @since 4.7.0 + * + * @param int|string $field Field to fetch from the object or array. + * @param int|string $index_key Optional. Field from the element to use as keys for the new array. + * Default null. + * @return array Array of found values. If `$index_key` is set, an array of found values with keys + * corresponding to `$index_key`. If `$index_key` is null, array keys from the original + * `$list` will be preserved in the results. + */ + public function pluck($field, $index_key = \null) + { + } + /** + * Sorts the input array based on one or more orderby arguments. + * + * @since 4.7.0 + * + * @param string|array $orderby Optional. Either the field name to order by or an array + * of multiple orderby fields as `$orderby => $order`. + * Default empty array. + * @param string $order Optional. Either 'ASC' or 'DESC'. Only used if `$orderby` + * is a string. Default 'ASC'. + * @param bool $preserve_keys Optional. Whether to preserve keys. Default false. + * @return array The sorted array. + * @phpstan-param 'ASC'|'DESC' $order + */ + public function sort($orderby = array(), $order = 'ASC', $preserve_keys = \false) + { + } + } + /** + * Core class used for switching locales. + * + * @since 4.7.0 + */ + #[\AllowDynamicProperties] + class WP_Locale_Switcher + { + /** + * Constructor. + * + * Stores the original locale as well as a list of all available languages. + * + * @since 4.7.0 + */ + public function __construct() + { + } + /** + * Initializes the locale switcher. + * + * Hooks into the {@see 'locale'} and {@see 'determine_locale'} filters + * to change the locale on the fly. + * + * @since 4.7.0 + */ + public function init() + { + } + /** + * Switches the translations according to the given locale. + * + * @since 4.7.0 + * + * @param string $locale The locale to switch to. + * @param int|false $user_id Optional. User ID as context. Default false. + * @return bool True on success, false on failure. + */ + public function switch_to_locale($locale, $user_id = \false) + { + } + /** + * Switches the translations according to the given user's locale. + * + * @since 6.2.0 + * + * @param int $user_id User ID. + * @return bool True on success, false on failure. + */ + public function switch_to_user_locale($user_id) + { + } + /** + * Restores the translations according to the previous locale. + * + * @since 4.7.0 + * + * @return string|false Locale on success, false on failure. + */ + public function restore_previous_locale() + { + } + /** + * Restores the translations according to the original locale. + * + * @since 4.7.0 + * + * @return string|false Locale on success, false on failure. + */ + public function restore_current_locale() + { + } + /** + * Whether switch_to_locale() is in effect. + * + * @since 4.7.0 + * + * @return bool True if the locale has been switched, false otherwise. + */ + public function is_switched() + { + } + /** + * Returns the locale currently switched to. + * + * @since 6.2.0 + * + * @return string|false Locale if the locale has been switched, false otherwise. + */ + public function get_switched_locale() + { + } + /** + * Returns the user ID related to the currently switched locale. + * + * @since 6.2.0 + * + * @return int|false User ID if set and if the locale has been switched, false otherwise. + */ + public function get_switched_user_id() + { + } + /** + * Filters the locale of the WordPress installation. + * + * @since 4.7.0 + * + * @param string $locale The locale of the WordPress installation. + * @return string The locale currently being switched to. + */ + public function filter_locale($locale) + { + } + } + /** + * Core class used to store translated data for a locale. + * + * @since 2.1.0 + * @since 4.6.0 Moved to its own file from wp-includes/locale.php. + */ + #[\AllowDynamicProperties] + class WP_Locale + { + /** + * Stores the translated strings for the full weekday names. + * + * @since 2.1.0 + * @since 6.2.0 Initialized to an empty array. + * @var string[] + */ + public $weekday = array(); + /** + * Stores the translated strings for the one character weekday names. + * + * There is a hack to make sure that Tuesday and Thursday, as well + * as Sunday and Saturday, don't conflict. See init() method for more. + * + * @see WP_Locale::init() for how to handle the hack. + * + * @since 2.1.0 + * @since 6.2.0 Initialized to an empty array. + * @var string[] + */ + public $weekday_initial = array(); + /** + * Stores the translated strings for the abbreviated weekday names. + * + * @since 2.1.0 + * @since 6.2.0 Initialized to an empty array. + * @var string[] + */ + public $weekday_abbrev = array(); + /** + * Stores the translated strings for the full month names. + * + * @since 2.1.0 + * @since 6.2.0 Initialized to an empty array. + * @var string[] + */ + public $month = array(); + /** + * Stores the translated strings for the month names in genitive case, if the locale specifies. + * + * @since 4.4.0 + * @since 6.2.0 Initialized to an empty array. + * @var string[] + */ + public $month_genitive = array(); + /** + * Stores the translated strings for the abbreviated month names. + * + * @since 2.1.0 + * @since 6.2.0 Initialized to an empty array. + * @var string[] + */ + public $month_abbrev = array(); + /** + * Stores the translated strings for 'am' and 'pm'. + * + * Also the capitalized versions. + * + * @since 2.1.0 + * @since 6.2.0 Initialized to an empty array. + * @var string[] + */ + public $meridiem = array(); + /** + * The text direction of the locale language. + * + * Default is left to right 'ltr'. + * + * @since 2.1.0 + * @var string + */ + public $text_direction = 'ltr'; + /** + * The thousands separator and decimal point values used for localizing numbers. + * + * @since 2.3.0 + * @since 6.2.0 Initialized to an empty array. + * @var array + */ + public $number_format = array(); + /** + * The separator string used for localizing list item separator. + * + * @since 6.0.0 + * @var string + */ + public $list_item_separator; + /** + * The word count type of the locale language. + * + * Default is 'words'. + * + * @since 6.2.0 + * @var string + * @phpstan-var 'characters_excluding_spaces'|'characters_including_spaces'|'words' + */ + public $word_count_type; + /** + * Constructor which calls helper methods to set up object variables. + * + * @since 2.1.0 + */ + public function __construct() + { + } + /** + * Sets up the translated strings and object properties. + * + * The method creates the translatable strings for various + * calendar elements. Which allows for specifying locale + * specific calendar names and text direction. + * + * @since 2.1.0 + * + * @global string $text_direction + */ + public function init() + { + } + /** + * Retrieves the full translated weekday word. + * + * Week starts on translated Sunday and can be fetched + * by using 0 (zero). So the week starts with 0 (zero) + * and ends on Saturday with is fetched by using 6 (six). + * + * @since 2.1.0 + * + * @param int $weekday_number 0 for Sunday through 6 Saturday. + * @return string Full translated weekday. + */ + public function get_weekday($weekday_number) + { + } + /** + * Retrieves the translated weekday initial. + * + * The weekday initial is retrieved by the translated + * full weekday word. When translating the weekday initial + * pay attention to make sure that the starting letter does + * not conflict. + * + * @since 2.1.0 + * + * @param string $weekday_name Full translated weekday word. + * @return string Translated weekday initial. + */ + public function get_weekday_initial($weekday_name) + { + } + /** + * Retrieves the translated weekday abbreviation. + * + * The weekday abbreviation is retrieved by the translated + * full weekday word. + * + * @since 2.1.0 + * + * @param string $weekday_name Full translated weekday word. + * @return string Translated weekday abbreviation. + */ + public function get_weekday_abbrev($weekday_name) + { + } + /** + * Retrieves the full translated month by month number. + * + * The $month_number parameter has to be a string + * because it must have the '0' in front of any number + * that is less than 10. Starts from '01' and ends at + * '12'. + * + * You can use an integer instead and it will add the + * '0' before the numbers less than 10 for you. + * + * @since 2.1.0 + * + * @param string|int $month_number '01' through '12'. + * @return string Translated full month name. If the month number is not found, an empty string is returned. + */ + public function get_month($month_number) + { + } + /** + * Retrieves translated version of month abbreviation string. + * + * The $month_name parameter is expected to be the translated or + * translatable version of the month. + * + * @since 2.1.0 + * + * @param string $month_name Translated month to get abbreviated version. + * @return string Translated abbreviated month. + */ + public function get_month_abbrev($month_name) + { + } + /** + * Retrieves translated version of month genitive string. + * + * The $month_number parameter has to be a string + * because it must have the '0' in front of any number + * that is less than 10. Starts from '01' and ends at + * '12'. + * + * You can use an integer instead and it will add the + * '0' before the numbers less than 10 for you. + * + * @since 6.8.0 + * + * @param string|int $month_number '01' through '12'. + * @return string Translated genitive month name. + */ + public function get_month_genitive($month_number) + { + } + /** + * Retrieves translated version of meridiem string. + * + * The $meridiem parameter is expected to not be translated. + * + * @since 2.1.0 + * + * @param string $meridiem Either 'am', 'pm', 'AM', or 'PM'. Not translated version. + * @return string Translated version + * @phpstan-param 'am'|'pm'|'AM'|'PM' $meridiem + */ + public function get_meridiem($meridiem) + { + } + /** + * Global variables are deprecated. + * + * For backward compatibility only. + * + * @since 2.1.0 + * @deprecated For backward compatibility only. + * + * @global array $weekday + * @global array $weekday_initial + * @global array $weekday_abbrev + * @global array $month + * @global array $month_abbrev + */ + public function register_globals() + { + } + /** + * Checks if current locale is RTL. + * + * @since 3.0.0 + * @return bool Whether locale is RTL. + */ + public function is_rtl() + { + } + /** + * Registers date/time format strings for general POT. + * + * Private, unused method to add some date/time formats translated + * on wp-admin/options-general.php to the general POT that would + * otherwise be added to the admin POT. + * + * @since 3.6.0 + */ + public function _strings_for_pot() + { + } + /** + * Retrieves the localized list item separator. + * + * @since 6.0.0 + * + * @return string Localized list item separator. + */ + public function get_list_item_separator() + { + } + /** + * Retrieves the localized word count type. + * + * @since 6.2.0 + * + * @return string Localized word count type. Possible values are `characters_excluding_spaces`, + * `characters_including_spaces`, or `words`. Defaults to `words`. + * @phpstan-return 'characters_excluding_spaces'|'characters_including_spaces'|'words' + */ + public function get_word_count_type() + { + } + } + /** + * Helper class to remove the need to use eval to replace $matches[] in query strings. + * + * @since 2.9.0 + */ + #[\AllowDynamicProperties] + class WP_MatchesMapRegex + { + /** + * store for mapping result + * + * @var string + */ + public $output; + /** + * regexp pattern to match $matches[] references + * + * @var string + */ + public $_pattern = '(\$matches\[[1-9]+[0-9]*\])'; + /** + * constructor + * + * @param string $subject subject if regex + * @param array $matches data to use in map + */ + public function __construct($subject, $matches) + { + } + /** + * Substitute substring matches in subject. + * + * static helper function to ease use + * + * @param string $subject subject + * @param array $matches data used for substitution + * @return string + */ + public static function apply($subject, $matches) + { + } + /** + * preg_replace_callback hook + * + * @param array $matches preg_replace regexp matches + * @return string + */ + public function callback($matches) + { + } + } + /** + * Core class used to implement meta queries for the Meta API. + * + * Used for generating SQL clauses that filter a primary query according to metadata keys and values. + * + * WP_Meta_Query is a helper that allows primary query classes, such as WP_Query and WP_User_Query, + * + * to filter their results by object metadata, by generating `JOIN` and `WHERE` subclauses to be attached + * to the primary SQL query string. + * + * @since 3.2.0 + */ + #[\AllowDynamicProperties] + class WP_Meta_Query + { + /** + * Array of metadata queries. + * + * See WP_Meta_Query::__construct() for information on meta query arguments. + * + * @since 3.2.0 + * @var array + */ + public $queries = array(); + /** + * The relation between the queries. Can be one of 'AND' or 'OR'. + * + * @since 3.2.0 + * @var string + */ + public $relation; + /** + * Database table to query for the metadata. + * + * @since 4.1.0 + * @var string + */ + public $meta_table; + /** + * Column in meta_table that represents the ID of the object the metadata belongs to. + * + * @since 4.1.0 + * @var string + */ + public $meta_id_column; + /** + * Database table that where the metadata's objects are stored (eg $wpdb->users). + * + * @since 4.1.0 + * @var string + */ + public $primary_table; + /** + * Column in primary_table that represents the ID of the object. + * + * @since 4.1.0 + * @var string + */ + public $primary_id_column; + /** + * A flat list of table aliases used in JOIN clauses. + * + * @since 4.1.0 + * @var array + */ + protected $table_aliases = array(); + /** + * A flat list of clauses, keyed by clause 'name'. + * + * @since 4.2.0 + * @var array + */ + protected $clauses = array(); + /** + * Whether the query contains any OR relations. + * + * @since 4.3.0 + * @var bool + */ + protected $has_or_relation = \false; + /** + * Constructor. + * + * @since 3.2.0 + * @since 4.2.0 Introduced support for naming query clauses by associative array keys. + * @since 5.1.0 Introduced `$compare_key` clause parameter, which enables LIKE key matches. + * @since 5.3.0 Increased the number of operators available to `$compare_key`. Introduced `$type_key`, + * which enables the `$key` to be cast to a new data type for comparisons. + * + * @param array $meta_query { + * Array of meta query clauses. When first-order clauses or sub-clauses use strings as + * their array keys, they may be referenced in the 'orderby' parameter of the parent query. + * + * @type string $relation Optional. The MySQL keyword used to join the clauses of the query. + * Accepts 'AND' or 'OR'. Default 'AND'. + * @type array ...$0 { + * Optional. An array of first-order clause parameters, or another fully-formed meta query. + * + * @type string|string[] $key Meta key or keys to filter by. + * @type string $compare_key MySQL operator used for comparing the $key. Accepts: + * - '=' + * - '!=' + * - 'LIKE' + * - 'NOT LIKE' + * - 'IN' + * - 'NOT IN' + * - 'REGEXP' + * - 'NOT REGEXP' + * - 'RLIKE' + * - 'EXISTS' (alias of '=') + * - 'NOT EXISTS' (alias of '!=') + * Default is 'IN' when `$key` is an array, '=' otherwise. + * @type string $type_key MySQL data type that the meta_key column will be CAST to for + * comparisons. Accepts 'BINARY' for case-sensitive regular expression + * comparisons. Default is ''. + * @type string|string[] $value Meta value or values to filter by. + * @type string $compare MySQL operator used for comparing the $value. Accepts: + * - '=' + * - '!=' + * - '>' + * - '>=' + * - '<' + * - '<=' + * - 'LIKE' + * - 'NOT LIKE' + * - 'IN' + * - 'NOT IN' + * - 'BETWEEN' + * - 'NOT BETWEEN' + * - 'REGEXP' + * - 'NOT REGEXP' + * - 'RLIKE' + * - 'EXISTS' + * - 'NOT EXISTS' + * Default is 'IN' when `$value` is an array, '=' otherwise. + * @type string $type MySQL data type that the meta_value column will be CAST to for + * comparisons. Accepts: + * - 'NUMERIC' + * - 'BINARY' + * - 'CHAR' + * - 'DATE' + * - 'DATETIME' + * - 'DECIMAL' + * - 'SIGNED' + * - 'TIME' + * - 'UNSIGNED' + * Default is 'CHAR'. + * } + * } + * @phpstan-return void + */ + public function __construct($meta_query = array()) + { + } + /** + * Ensures the 'meta_query' argument passed to the class constructor is well-formed. + * + * Eliminates empty items and ensures that a 'relation' is set. + * + * @since 4.1.0 + * + * @param array $queries Array of query clauses. + * @return array Sanitized array of query clauses. + */ + public function sanitize_query($queries) + { + } + /** + * Determines whether a query clause is first-order. + * + * A first-order meta query clause is one that has either a 'key' or + * a 'value' array key. + * + * @since 4.1.0 + * + * @param array $query Meta query arguments. + * @return bool Whether the query clause is a first-order clause. + */ + protected function is_first_order_clause($query) + { + } + /** + * Constructs a meta query based on 'meta_*' query vars + * + * @since 3.2.0 + * + * @param array $qv The query variables. + */ + public function parse_query_vars($qv) + { + } + /** + * Returns the appropriate alias for the given meta type if applicable. + * + * @since 3.7.0 + * + * @param string $type MySQL type to cast meta_value. + * @return string MySQL type. + */ + public function get_cast_for_type($type = '') + { + } + /** + * Generates SQL clauses to be appended to a main query. + * + * @since 3.2.0 + * + * @param string $type Type of meta. Possible values include but are not limited + * to 'post', 'comment', 'blog', 'term', and 'user'. + * @param string $primary_table Database table where the object being filtered is stored (eg wp_users). + * @param string $primary_id_column ID column for the filtered object in $primary_table. + * @param object $context Optional. The main query object that corresponds to the type, for + * example a `WP_Query`, `WP_User_Query`, or `WP_Site_Query`. + * Default null. + * @return string[]|false { + * Array containing JOIN and WHERE SQL clauses to append to the main query, + * or false if no table exists for the requested meta type. + * + * @type string $join SQL fragment to append to the main JOIN clause. + * @type string $where SQL fragment to append to the main WHERE clause. + * } + * @phpstan-return false|array{ + * join: string, + * where: string, + * } + */ + public function get_sql($type, $primary_table, $primary_id_column, $context = \null) + { + } + /** + * Generates SQL clauses to be appended to a main query. + * + * Called by the public WP_Meta_Query::get_sql(), this method is abstracted + * out to maintain parity with the other Query classes. + * + * @since 4.1.0 + * + * @return string[] { + * Array containing JOIN and WHERE SQL clauses to append to the main query. + * + * @type string $join SQL fragment to append to the main JOIN clause. + * @type string $where SQL fragment to append to the main WHERE clause. + * } + * @phpstan-return array{ + * join: string, + * where: string, + * } + */ + protected function get_sql_clauses() + { + } + /** + * Generates SQL clauses for a single query array. + * + * If nested subqueries are found, this method recurses the tree to + * produce the properly nested SQL. + * + * @since 4.1.0 + * + * @param array $query Query to parse (passed by reference). + * @param int $depth Optional. Number of tree levels deep we currently are. + * Used to calculate indentation. Default 0. + * @return string[] { + * Array containing JOIN and WHERE SQL clauses to append to a single query array. + * + * @type string $join SQL fragment to append to the main JOIN clause. + * @type string $where SQL fragment to append to the main WHERE clause. + * } + * @phpstan-return array{ + * join: string, + * where: string, + * } + */ + protected function get_sql_for_query(&$query, $depth = 0) + { + } + /** + * Generates SQL JOIN and WHERE clauses for a first-order query clause. + * + * "First-order" means that it's an array with a 'key' or 'value'. + * + * @since 4.1.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param array $clause Query clause (passed by reference). + * @param array $parent_query Parent query array. + * @param string $clause_key Optional. The array key used to name the clause in the original `$meta_query` + * parameters. If not provided, a key will be generated automatically. + * Default empty string. + * @return array { + * Array containing JOIN and WHERE SQL clauses to append to a first-order query. + * + * @type string[] $join Array of SQL fragments to append to the main JOIN clause. + * @type string[] $where Array of SQL fragments to append to the main WHERE clause. + * } + * @phpstan-return array{ + * join: string[], + * where: string[], + * } + */ + public function get_sql_for_clause(&$clause, $parent_query, $clause_key = '') + { + } + /** + * Gets a flattened list of sanitized meta clauses. + * + * This array should be used for clause lookup, as when the table alias and CAST type must be determined for + * a value of 'orderby' corresponding to a meta clause. + * + * @since 4.2.0 + * + * @return array Meta clauses. + */ + public function get_clauses() + { + } + /** + * Identifies an existing table alias that is compatible with the current + * query clause. + * + * We avoid unnecessary table joins by allowing each clause to look for + * an existing table alias that is compatible with the query that it + * needs to perform. + * + * An existing alias is compatible if (a) it is a sibling of `$clause` + * (ie, it's under the scope of the same relation), and (b) the combination + * of operator and relation between the clauses allows for a shared table join. + * In the case of WP_Meta_Query, this only applies to 'IN' clauses that are + * connected by the relation 'OR'. + * + * @since 4.1.0 + * + * @param array $clause Query clause. + * @param array $parent_query Parent query of $clause. + * @return string|false Table alias if found, otherwise false. + */ + protected function find_compatible_table_alias($clause, $parent_query) + { + } + /** + * Checks whether the current query has any OR relations. + * + * In some cases, the presence of an OR relation somewhere in the query will require + * the use of a `DISTINCT` or `GROUP BY` keyword in the `SELECT` clause. The current + * method can be used in these cases to determine whether such a clause is necessary. + * + * @since 4.3.0 + * + * @return bool True if the query contains any `OR` relations, otherwise false. + */ + public function has_or_relation() + { + } + } + /** + * Core class used for lazy-loading object metadata. + * + * When loading many objects of a given type, such as posts in a WP_Query loop, it often makes + * sense to prime various metadata caches at the beginning of the loop. This means fetching all + * relevant metadata with a single database query, a technique that has the potential to improve + * performance dramatically in some cases. + * + * In cases where the given metadata may not even be used in the loop, we can improve performance + * even more by only priming the metadata cache for affected items the first time a piece of metadata + * is requested - ie, by lazy-loading it. So, for example, comment meta may not be loaded into the + * cache in the comments section of a post until the first time get_comment_meta() is called in the + * context of the comment loop. + * + * WP uses the WP_Metadata_Lazyloader class to queue objects for metadata cache priming. The class + * then detects the relevant get_*_meta() function call, and queries the metadata of all queued objects. + * + * Do not access this class directly. Use the wp_metadata_lazyloader() function. + * + * @since 4.5.0 + */ + #[\AllowDynamicProperties] + class WP_Metadata_Lazyloader + { + /** + * Pending objects queue. + * + * @since 4.5.0 + * @var array + */ + protected $pending_objects; + /** + * Settings for supported object types. + * + * @since 4.5.0 + * @var array + */ + protected $settings = array(); + /** + * Constructor. + * + * @since 4.5.0 + */ + public function __construct() + { + } + /** + * Adds objects to the metadata lazy-load queue. + * + * @since 4.5.0 + * + * @param string $object_type Type of object whose meta is to be lazy-loaded. Accepts 'term' or 'comment'. + * @param array $object_ids Array of object IDs. + * @return void|WP_Error WP_Error on failure. + * @phpstan-param 'term'|'comment' $object_type + */ + public function queue_objects($object_type, $object_ids) + { + } + /** + * Resets lazy-load queue for a given object type. + * + * @since 4.5.0 + * + * @param string $object_type Object type. Accepts 'comment' or 'term'. + * @return void|WP_Error WP_Error on failure. + * @phpstan-param 'comment'|'term' $object_type + */ + public function reset_queue($object_type) + { + } + /** + * Lazy-loads term meta for queued terms. + * + * This method is public so that it can be used as a filter callback. As a rule, there + * is no need to invoke it directly. + * + * @since 4.5.0 + * @deprecated 6.3.0 Use WP_Metadata_Lazyloader::lazyload_meta_callback() instead. + * + * @param mixed $check The `$check` param passed from the 'get_term_metadata' hook. + * @return mixed In order not to short-circuit `get_metadata()`. Generally, this is `null`, but it could be + * another value if filtered by a plugin. + */ + public function lazyload_term_meta($check) + { + } + /** + * Lazy-loads comment meta for queued comments. + * + * This method is public so that it can be used as a filter callback. As a rule, there is no need to invoke it + * directly, from either inside or outside the `WP_Query` object. + * + * @since 4.5.0 + * @deprecated 6.3.0 Use WP_Metadata_Lazyloader::lazyload_meta_callback() instead. + * + * @param mixed $check The `$check` param passed from the {@see 'get_comment_metadata'} hook. + * @return mixed The original value of `$check`, so as not to short-circuit `get_comment_metadata()`. + */ + public function lazyload_comment_meta($check) + { + } + /** + * Lazy-loads meta for queued objects. + * + * This method is public so that it can be used as a filter callback. As a rule, there + * is no need to invoke it directly. + * + * @since 6.3.0 + * + * @param mixed $check The `$check` param passed from the 'get_*_metadata' hook. + * @param int $object_id ID of the object metadata is for. + * @param string $meta_key Unused. + * @param bool $single Unused. + * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', + * or any other object type with an associated meta table. + * @return mixed In order not to short-circuit `get_metadata()`. Generally, this is `null`, but it could be + * another value if filtered by a plugin. + */ + public function lazyload_meta_callback($check, $object_id, $meta_key, $single, $meta_type) + { + } + } + /** + * Manages fallback behavior for Navigation menus. + * + * @since 6.3.0 + */ + class WP_Navigation_Fallback + { + /** + * Updates the wp_navigation custom post type schema, in order to expose + * additional fields in the embeddable links of WP_REST_Navigation_Fallback_Controller. + * + * The Navigation Fallback endpoint may embed the full Navigation Menu object + * into the response as the `self` link. By default, the Posts Controller + * will only expose a limited subset of fields but the editor requires + * additional fields to be available in order to utilize the menu. + * + * Used with the `rest_wp_navigation_item_schema` hook. + * + * @since 6.4.0 + * + * @param array $schema The schema for the `wp_navigation` post. + * @return array The modified schema. + */ + public static function update_wp_navigation_post_schema($schema) + { + } + /** + * Gets (and/or creates) an appropriate fallback Navigation Menu. + * + * @since 6.3.0 + * + * @return WP_Post|null the fallback Navigation Post or null. + */ + public static function get_fallback() + { + } + } + /** + * Core class used for querying networks. + * + * @since 4.6.0 + * + * @see WP_Network_Query::__construct() for accepted arguments. + */ + #[\AllowDynamicProperties] + class WP_Network_Query + { + /** + * SQL for database query. + * + * @since 4.6.0 + * @var string + */ + public $request; + /** + * SQL query clauses. + * + * @since 4.6.0 + * @var array + */ + protected $sql_clauses = array('select' => '', 'from' => '', 'where' => array(), 'groupby' => '', 'orderby' => '', 'limits' => ''); + /** + * Query vars set by the user. + * + * @since 4.6.0 + * @var array + */ + public $query_vars; + /** + * Default values for query vars. + * + * @since 4.6.0 + * @var array + */ + public $query_var_defaults; + /** + * List of networks located by the query. + * + * @since 4.6.0 + * @var array + */ + public $networks; + /** + * The amount of found networks for the current query. + * + * @since 4.6.0 + * @var int + */ + public $found_networks = 0; + /** + * The number of pages. + * + * @since 4.6.0 + * @var int + */ + public $max_num_pages = 0; + /** + * Constructor. + * + * Sets up the network query, based on the query vars passed. + * + * @since 4.6.0 + * + * @param string|array $query { + * Optional. Array or query string of network query parameters. Default empty. + * + * @type int[] $network__in Array of network IDs to include. Default empty. + * @type int[] $network__not_in Array of network IDs to exclude. Default empty. + * @type bool $count Whether to return a network count (true) or array of network objects. + * Default false. + * @type string $fields Network fields to return. Accepts 'ids' (returns an array of network IDs) + * or empty (returns an array of complete network objects). Default empty. + * @type int $number Maximum number of networks to retrieve. Default empty (no limit). + * @type int $offset Number of networks to offset the query. Used to build LIMIT clause. + * Default 0. + * @type bool $no_found_rows Whether to disable the `SQL_CALC_FOUND_ROWS` query. Default true. + * @type string|array $orderby Network status or array of statuses. Accepts 'id', 'domain', 'path', + * 'domain_length', 'path_length' and 'network__in'. Also accepts false, + * an empty array, or 'none' to disable `ORDER BY` clause. Default 'id'. + * @type string $order How to order retrieved networks. Accepts 'ASC', 'DESC'. Default 'ASC'. + * @type string $domain Limit results to those affiliated with a given domain. Default empty. + * @type string[] $domain__in Array of domains to include affiliated networks for. Default empty. + * @type string[] $domain__not_in Array of domains to exclude affiliated networks for. Default empty. + * @type string $path Limit results to those affiliated with a given path. Default empty. + * @type string[] $path__in Array of paths to include affiliated networks for. Default empty. + * @type string[] $path__not_in Array of paths to exclude affiliated networks for. Default empty. + * @type string $search Search term(s) to retrieve matching networks for. Default empty. + * @type bool $update_network_cache Whether to prime the cache for found networks. Default true. + * } + * @phpstan-param array{ + * network__in?: int[], + * network__not_in?: int[], + * count?: bool, + * fields?: string, + * number?: int, + * offset?: int, + * no_found_rows?: bool, + * orderby?: string|array, + * order?: string, + * domain?: string, + * domain__in?: string[], + * domain__not_in?: string[], + * path?: string, + * path__in?: string[], + * path__not_in?: string[], + * search?: string, + * update_network_cache?: bool, + * } $query + */ + public function __construct($query = '') + { + } + /** + * Parses arguments passed to the network query with default query parameters. + * + * @since 4.6.0 + * + * @param string|array $query WP_Network_Query arguments. See WP_Network_Query::__construct() for accepted arguments. + * @phpstan-param array{ + * network__in?: int[], + * network__not_in?: int[], + * count?: bool, + * fields?: string, + * number?: int, + * offset?: int, + * no_found_rows?: bool, + * orderby?: string|array, + * order?: string, + * domain?: string, + * domain__in?: string[], + * domain__not_in?: string[], + * path?: string, + * path__in?: string[], + * path__not_in?: string[], + * search?: string, + * update_network_cache?: bool, + * } $query See WP_Network_Query::__construct() + */ + public function parse_query($query = '') + { + } + /** + * Sets up the WordPress query for retrieving networks. + * + * @since 4.6.0 + * + * @param string|array $query Array or URL query string of parameters. + * @return array|int List of WP_Network objects, a list of network IDs when 'fields' is set to 'ids', + * or the number of networks when 'count' is passed as a query var. + */ + public function query($query) + { + } + /** + * Gets a list of networks matching the query vars. + * + * @since 4.6.0 + * + * @return array|int List of WP_Network objects, a list of network IDs when 'fields' is set to 'ids', + * or the number of networks when 'count' is passed as a query var. + */ + public function get_networks() + { + } + /** + * Used internally to get a list of network IDs matching the query vars. + * + * @since 4.6.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @return int|array A single count of network IDs if a count query. An array of network IDs if a full query. + */ + protected function get_network_ids() + { + } + /** + * Used internally to generate an SQL string for searching across multiple columns. + * + * @since 4.6.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $search Search string. + * @param string[] $columns Array of columns to search. + * @return string Search SQL. + */ + protected function get_search_sql($search, $columns) + { + } + /** + * Parses and sanitizes 'orderby' keys passed to the network query. + * + * @since 4.6.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $orderby Alias for the field to order by. + * @return string|false Value to used in the ORDER clause. False otherwise. + */ + protected function parse_orderby($orderby) + { + } + /** + * Parses an 'order' query variable and cast it to 'ASC' or 'DESC' as necessary. + * + * @since 4.6.0 + * + * @param string $order The 'order' query variable. + * @return string The sanitized 'order' query variable. + */ + protected function parse_order($order) + { + } + } + /** + * Core class used for interacting with a multisite network. + * + * This class is used during load to populate the `$current_site` global and + * setup the current network. + * + * This class is most useful in WordPress multi-network installations where the + * ability to interact with any network of sites is required. + * + * @since 4.4.0 + * + * @property int $id + * @property int $site_id + */ + #[\AllowDynamicProperties] + class WP_Network + { + /** + * Domain of the network. + * + * @since 4.4.0 + * @var string + */ + public $domain = ''; + /** + * Path of the network. + * + * @since 4.4.0 + * @var string + */ + public $path = ''; + /** + * Domain used to set cookies for this network. + * + * @since 4.4.0 + * @var string + */ + public $cookie_domain = ''; + /** + * Name of this network. + * + * Named "site" vs. "network" for legacy reasons. + * + * @since 4.4.0 + * @var string + */ + public $site_name = ''; + /** + * Retrieves a network from the database by its ID. + * + * @since 4.4.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param int $network_id The ID of the network to retrieve. + * @return WP_Network|false The network's object if found. False if not. + */ + public static function get_instance($network_id) + { + } + /** + * Creates a new WP_Network object. + * + * Will populate object properties from the object provided and assign other + * default properties based on that information. + * + * @since 4.4.0 + * + * @param WP_Network|object $network A network object. + */ + public function __construct($network) + { + } + /** + * Getter. + * + * Allows current multisite naming conventions when getting properties. + * + * @since 4.6.0 + * + * @param string $key Property to get. + * @return mixed Value of the property. Null if not available. + */ + public function __get($key) + { + } + /** + * Isset-er. + * + * Allows current multisite naming conventions when checking for properties. + * + * @since 4.6.0 + * + * @param string $key Property to check if set. + * @return bool Whether the property is set. + */ + public function __isset($key) + { + } + /** + * Setter. + * + * Allows current multisite naming conventions while setting properties. + * + * @since 4.6.0 + * + * @param string $key Property to set. + * @param mixed $value Value to assign to the property. + */ + public function __set($key, $value) + { + } + /** + * Retrieves the closest matching network for a domain and path. + * + * This will not necessarily return an exact match for a domain and path. Instead, it + * breaks the domain and path into pieces that are then used to match the closest + * possibility from a query. + * + * The intent of this method is to match a network during bootstrap for a + * requested site address. + * + * @since 4.4.0 + * + * @param string $domain Domain to check. + * @param string $path Path to check. + * @param int|null $segments Path segments to use. Defaults to null, or the full path. + * @return WP_Network|false Network object if successful. False when no network is found. + */ + public static function get_by_path($domain = '', $path = '', $segments = \null) + { + } + } + /** + * Core class that implements an object cache. + * + * The WordPress Object Cache is used to save on trips to the database. The + * Object Cache stores all of the cache data to memory and makes the cache + * contents available by using a key, which is used to name and later retrieve + * the cache contents. + * + * The Object Cache can be replaced by other caching mechanisms by placing files + * in the wp-content folder which is looked at in wp-settings. If that file + * exists, then this file will not be included. + * + * @since 2.0.0 + */ + #[\AllowDynamicProperties] + class WP_Object_Cache + { + /** + * The amount of times the cache data was already stored in the cache. + * + * @since 2.5.0 + * @var int + */ + public $cache_hits = 0; + /** + * Amount of times the cache did not have the request in cache. + * + * @since 2.0.0 + * @var int + */ + public $cache_misses = 0; + /** + * List of global cache groups. + * + * @since 3.0.0 + * @var string[] + */ + protected $global_groups = array(); + /** + * Sets up object properties. + * + * @since 2.0.8 + */ + public function __construct() + { + } + /** + * Makes private properties readable for backward compatibility. + * + * @since 4.0.0 + * + * @param string $name Property to get. + * @return mixed Property. + */ + public function __get($name) + { + } + /** + * Makes private properties settable for backward compatibility. + * + * @since 4.0.0 + * + * @param string $name Property to set. + * @param mixed $value Property value. + */ + public function __set($name, $value) + { + } + /** + * Makes private properties checkable for backward compatibility. + * + * @since 4.0.0 + * + * @param string $name Property to check if set. + * @return bool Whether the property is set. + */ + public function __isset($name) + { + } + /** + * Makes private properties un-settable for backward compatibility. + * + * @since 4.0.0 + * + * @param string $name Property to unset. + */ + public function __unset($name) + { + } + /** + * Serves as a utility function to determine whether a key is valid. + * + * @since 6.1.0 + * + * @param int|string $key Cache key to check for validity. + * @return bool Whether the key is valid. + */ + protected function is_valid_key($key) + { + } + /** + * Serves as a utility function to determine whether a key exists in the cache. + * + * @since 3.4.0 + * + * @param int|string $key Cache key to check for existence. + * @param string $group Cache group for the key existence check. + * @return bool Whether the key exists in the cache for the given group. + */ + protected function _exists($key, $group) + { + } + /** + * Adds data to the cache if it doesn't already exist. + * + * @since 2.0.0 + * + * @uses WP_Object_Cache::_exists() Checks to see if the cache already has data. + * @uses WP_Object_Cache::set() Sets the data after the checking the cache + * contents existence. + * + * @param int|string $key What to call the contents in the cache. + * @param mixed $data The contents to store in the cache. + * @param string $group Optional. Where to group the cache contents. Default 'default'. + * @param int $expire Optional. When to expire the cache contents, in seconds. + * Default 0 (no expiration). + * @return bool True on success, false if cache key and group already exist. + */ + public function add($key, $data, $group = 'default', $expire = 0) + { + } + /** + * Adds multiple values to the cache in one call. + * + * @since 6.0.0 + * + * @param array $data Array of keys and values to be added. + * @param string $group Optional. Where the cache contents are grouped. Default empty. + * @param int $expire Optional. When to expire the cache contents, in seconds. + * Default 0 (no expiration). + * @return bool[] Array of return values, grouped by key. Each value is either + * true on success, or false if cache key and group already exist. + */ + public function add_multiple(array $data, $group = '', $expire = 0) + { + } + /** + * Replaces the contents in the cache, if contents already exist. + * + * @since 2.0.0 + * + * @see WP_Object_Cache::set() + * + * @param int|string $key What to call the contents in the cache. + * @param mixed $data The contents to store in the cache. + * @param string $group Optional. Where to group the cache contents. Default 'default'. + * @param int $expire Optional. When to expire the cache contents, in seconds. + * Default 0 (no expiration). + * @return bool True if contents were replaced, false if original value does not exist. + */ + public function replace($key, $data, $group = 'default', $expire = 0) + { + } + /** + * Sets the data contents into the cache. + * + * The cache contents are grouped by the $group parameter followed by the + * $key. This allows for duplicate IDs in unique groups. Therefore, naming of + * the group should be used with care and should follow normal function + * naming guidelines outside of core WordPress usage. + * + * The $expire parameter is not used, because the cache will automatically + * expire for each time a page is accessed and PHP finishes. The method is + * more for cache plugins which use files. + * + * @since 2.0.0 + * @since 6.1.0 Returns false if cache key is invalid. + * + * @param int|string $key What to call the contents in the cache. + * @param mixed $data The contents to store in the cache. + * @param string $group Optional. Where to group the cache contents. Default 'default'. + * @param int $expire Optional. Not used. + * @return bool True if contents were set, false if key is invalid. + */ + public function set($key, $data, $group = 'default', $expire = 0) + { + } + /** + * Sets multiple values to the cache in one call. + * + * @since 6.0.0 + * + * @param array $data Array of key and value to be set. + * @param string $group Optional. Where the cache contents are grouped. Default empty. + * @param int $expire Optional. When to expire the cache contents, in seconds. + * Default 0 (no expiration). + * @return bool[] Array of return values, grouped by key. Each value is always true. + */ + public function set_multiple(array $data, $group = '', $expire = 0) + { + } + /** + * Retrieves the cache contents, if it exists. + * + * The contents will be first attempted to be retrieved by searching by the + * key in the cache group. If the cache is hit (success) then the contents + * are returned. + * + * On failure, the number of cache misses will be incremented. + * + * @since 2.0.0 + * + * @param int|string $key The key under which the cache contents are stored. + * @param string $group Optional. Where the cache contents are grouped. Default 'default'. + * @param bool $force Optional. Unused. Whether to force an update of the local cache + * from the persistent cache. Default false. + * @param bool|null $found Optional. Whether the key was found in the cache (passed by reference). + * Disambiguates a return of false, a storable value. Default null. + * @return mixed|false The cache contents on success, false on failure to retrieve contents. + */ + public function get($key, $group = 'default', $force = \false, &$found = \null) + { + } + /** + * Retrieves multiple values from the cache in one call. + * + * @since 5.5.0 + * + * @param array $keys Array of keys under which the cache contents are stored. + * @param string $group Optional. Where the cache contents are grouped. Default 'default'. + * @param bool $force Optional. Whether to force an update of the local cache + * from the persistent cache. Default false. + * @return array Array of return values, grouped by key. Each value is either + * the cache contents on success, or false on failure. + */ + public function get_multiple($keys, $group = 'default', $force = \false) + { + } + /** + * Removes the contents of the cache key in the group. + * + * If the cache key does not exist in the group, then nothing will happen. + * + * @since 2.0.0 + * + * @param int|string $key What the contents in the cache are called. + * @param string $group Optional. Where the cache contents are grouped. Default 'default'. + * @param bool $deprecated Optional. Unused. Default false. + * @return bool True on success, false if the contents were not deleted. + */ + public function delete($key, $group = 'default', $deprecated = \false) + { + } + /** + * Deletes multiple values from the cache in one call. + * + * @since 6.0.0 + * + * @param array $keys Array of keys to be deleted. + * @param string $group Optional. Where the cache contents are grouped. Default empty. + * @return bool[] Array of return values, grouped by key. Each value is either + * true on success, or false if the contents were not deleted. + */ + public function delete_multiple(array $keys, $group = '') + { + } + /** + * Increments numeric cache item's value. + * + * @since 3.3.0 + * + * @param int|string $key The cache key to increment. + * @param int $offset Optional. The amount by which to increment the item's value. + * Default 1. + * @param string $group Optional. The group the key is in. Default 'default'. + * @return int|false The item's new value on success, false on failure. + */ + public function incr($key, $offset = 1, $group = 'default') + { + } + /** + * Decrements numeric cache item's value. + * + * @since 3.3.0 + * + * @param int|string $key The cache key to decrement. + * @param int $offset Optional. The amount by which to decrement the item's value. + * Default 1. + * @param string $group Optional. The group the key is in. Default 'default'. + * @return int|false The item's new value on success, false on failure. + */ + public function decr($key, $offset = 1, $group = 'default') + { + } + /** + * Clears the object cache of all data. + * + * @since 2.0.0 + * + * @return true Always returns true. + */ + public function flush() + { + } + /** + * Removes all cache items in a group. + * + * @since 6.1.0 + * + * @param string $group Name of group to remove from cache. + * @return true Always returns true. + */ + public function flush_group($group) + { + } + /** + * Sets the list of global cache groups. + * + * @since 3.0.0 + * + * @param string|string[] $groups List of groups that are global. + */ + public function add_global_groups($groups) + { + } + /** + * Switches the internal blog ID. + * + * This changes the blog ID used to create keys in blog specific groups. + * + * @since 3.5.0 + * + * @param int $blog_id Blog ID. + */ + public function switch_to_blog($blog_id) + { + } + /** + * Resets cache keys. + * + * @since 3.0.0 + * + * @deprecated 3.5.0 Use WP_Object_Cache::switch_to_blog() + * @see switch_to_blog() + */ + public function reset() + { + } + /** + * Echoes the stats of the caching. + * + * Gives the cache hits, and cache misses. Also prints every cached group, + * key and the data. + * + * @since 2.0.0 + */ + public function stats() + { + } + } + /** + * oEmbed API endpoint controller. + * + * Registers the REST API route and delivers the response data. + * The output format (XML or JSON) is handled by the REST API. + * + * @since 4.4.0 + */ + #[\AllowDynamicProperties] + final class WP_oEmbed_Controller + { + /** + * Register the oEmbed REST API route. + * + * @since 4.4.0 + */ + public function register_routes() + { + } + /** + * Callback for the embed API endpoint. + * + * Returns the JSON object for the post. + * + * @since 4.4.0 + * + * @param WP_REST_Request $request Full data about the request. + * @return array|WP_Error oEmbed response data or WP_Error on failure. + */ + public function get_item($request) + { + } + /** + * Checks if current user can make a proxy oEmbed request. + * + * @since 4.8.0 + * + * @return true|WP_Error True if the request has read access, WP_Error object otherwise. + */ + public function get_proxy_item_permissions_check() + { + } + /** + * Callback for the proxy API endpoint. + * + * Returns the JSON object for the proxied item. + * + * @since 4.8.0 + * + * @see WP_oEmbed::get_html() + * @global WP_Embed $wp_embed WordPress Embed object. + * @global WP_Scripts $wp_scripts + * + * @param WP_REST_Request $request Full data about the request. + * @return object|WP_Error oEmbed response data or WP_Error on failure. + */ + public function get_proxy_item($request) + { + } + } + /** + * Core class used to implement oEmbed functionality. + * + * @since 2.9.0 + */ + #[\AllowDynamicProperties] + class WP_oEmbed + { + /** + * A list of oEmbed providers. + * + * @since 2.9.0 + * @var array + */ + public $providers = array(); + /** + * A list of an early oEmbed providers. + * + * @since 4.0.0 + * @var array + */ + public static $early_providers = array(); + /** + * Constructor. + * + * @since 2.9.0 + */ + public function __construct() + { + } + /** + * Exposes private/protected methods for backward compatibility. + * + * @since 4.0.0 + * + * @param string $name Method to call. + * @param array $arguments Arguments to pass when calling. + * @return mixed|false Return value of the callback, false otherwise. + */ + public function __call($name, $arguments) + { + } + /** + * Takes a URL and returns the corresponding oEmbed provider's URL, if there is one. + * + * @since 4.0.0 + * + * @see WP_oEmbed::discover() + * + * @param string $url The URL to the content. + * @param string|array $args { + * Optional. Additional provider arguments. Default empty. + * + * @type bool $discover Optional. Determines whether to attempt to discover link tags + * at the given URL for an oEmbed provider when the provider URL + * is not found in the built-in providers list. Default true. + * } + * @return string|false The oEmbed provider URL on success, false on failure. + * @phpstan-param array{ + * discover?: bool, + * } $args + */ + public function get_provider($url, $args = '') + { + } + /** + * Adds an oEmbed provider. + * + * The provider is added just-in-time when wp_oembed_add_provider() is called before + * the {@see 'plugins_loaded'} hook. + * + * The just-in-time addition is for the benefit of the {@see 'oembed_providers'} filter. + * + * @since 4.0.0 + * + * @see wp_oembed_add_provider() + * + * @param string $format Format of URL that this provider can handle. You can use + * asterisks as wildcards. + * @param string $provider The URL to the oEmbed provider.. + * @param bool $regex Optional. Whether the $format parameter is in a regex format. + * Default false. + */ + public static function _add_provider_early($format, $provider, $regex = \false) + { + } + /** + * Removes an oEmbed provider. + * + * The provider is removed just-in-time when wp_oembed_remove_provider() is called before + * the {@see 'plugins_loaded'} hook. + * + * The just-in-time removal is for the benefit of the {@see 'oembed_providers'} filter. + * + * @since 4.0.0 + * + * @see wp_oembed_remove_provider() + * + * @param string $format The format of URL that this provider can handle. You can use + * asterisks as wildcards. + */ + public static function _remove_provider_early($format) + { + } + /** + * Takes a URL and attempts to return the oEmbed data. + * + * @see WP_oEmbed::fetch() + * + * @since 4.8.0 + * + * @param string $url The URL to the content that should be attempted to be embedded. + * @param string|array $args Optional. Additional arguments for retrieving embed HTML. + * See wp_oembed_get() for accepted arguments. Default empty. + * @return object|false The result in the form of an object on success, false on failure. + * @phpstan-param array{ + * width?: int|string, + * height?: int|string, + * discover?: bool, + * } $args See wp_oembed_get() + */ + public function get_data($url, $args = '') + { + } + /** + * The do-it-all function that takes a URL and attempts to return the HTML. + * + * @see WP_oEmbed::fetch() + * @see WP_oEmbed::data2html() + * + * @since 2.9.0 + * + * @param string $url The URL to the content that should be attempted to be embedded. + * @param string|array $args Optional. Additional arguments for retrieving embed HTML. + * See wp_oembed_get() for accepted arguments. Default empty. + * @return string|false The UNSANITIZED (and potentially unsafe) HTML that should be used to embed + * on success, false on failure. + * @phpstan-param array{ + * width?: int|string, + * height?: int|string, + * discover?: bool, + * } $args See wp_oembed_get() + */ + public function get_html($url, $args = '') + { + } + /** + * Attempts to discover link tags at the given URL for an oEmbed provider. + * + * @since 2.9.0 + * + * @param string $url The URL that should be inspected for discovery `<link>` tags. + * @return string|false The oEmbed provider URL on success, false on failure. + */ + public function discover($url) + { + } + /** + * Connects to an oEmbed provider and returns the result. + * + * @since 2.9.0 + * + * @param string $provider The URL to the oEmbed provider. + * @param string $url The URL to the content that is desired to be embedded. + * @param string|array $args Optional. Additional arguments for retrieving embed HTML. + * See wp_oembed_get() for accepted arguments. Default empty. + * @return object|false The result in the form of an object on success, false on failure. + * @phpstan-param array{ + * width?: int|string, + * height?: int|string, + * discover?: bool, + * } $args See wp_oembed_get() + */ + public function fetch($provider, $url, $args = '') + { + } + /** + * Converts a data object from WP_oEmbed::fetch() and returns the HTML. + * + * @since 2.9.0 + * + * @param object $data A data object result from an oEmbed provider. + * @param string $url The URL to the content that is desired to be embedded. + * @return string|false The HTML needed to embed on success, false on failure. + */ + public function data2html($data, $url) + { + } + /** + * Strips any new lines from the HTML. + * + * @since 2.9.0 as strip_scribd_newlines() + * @since 3.0.0 + * + * @param string|false $html Existing HTML. + * @param object $data Data object from WP_oEmbed::data2html() + * @param string $url The original URL passed to oEmbed. + * @return string|false Possibly modified $html. + */ + public function _strip_newlines($html, $data, $url) + { + } + } + /** + * Core class used for storing paused extensions. + * + * @since 5.2.0 + */ + #[\AllowDynamicProperties] + class WP_Paused_Extensions_Storage + { + /** + * Type of extension. Used to key extension storage. Either 'plugin' or 'theme'. + * + * @since 5.2.0 + * @var string + */ + protected $type; + /** + * Constructor. + * + * @since 5.2.0 + * + * @param string $extension_type Extension type. Either 'plugin' or 'theme'. + * @phpstan-param 'plugin'|'theme' $extension_type + */ + public function __construct($extension_type) + { + } + /** + * Records an extension error. + * + * Only one error is stored per extension, with subsequent errors for the same extension overriding the + * previously stored error. + * + * @since 5.2.0 + * + * @param string $extension Plugin or theme directory name. + * @param array $error { + * Error information returned by `error_get_last()`. + * + * @type int $type The error type. + * @type string $file The name of the file in which the error occurred. + * @type int $line The line number in which the error occurred. + * @type string $message The error message. + * } + * @return bool True on success, false on failure. + * @phpstan-param array{ + * type?: int, + * file?: string, + * line?: int, + * message?: string, + * } $error + */ + public function set($extension, $error) + { + } + /** + * Forgets a previously recorded extension error. + * + * @since 5.2.0 + * + * @param string $extension Plugin or theme directory name. + * @return bool True on success, false on failure. + */ + public function delete($extension) + { + } + /** + * Gets the error for an extension, if paused. + * + * @since 5.2.0 + * + * @param string $extension Plugin or theme directory name. + * @return array|null Error that is stored, or null if the extension is not paused. + */ + public function get($extension) + { + } + /** + * Gets the paused extensions with their errors. + * + * @since 5.2.0 + * + * @return array { + * Associative array of errors keyed by extension slug. + * + * @type array ...$0 Error information returned by `error_get_last()`. + * } + * @phpstan-return array<int|string, array> + */ + public function get_all() + { + } + /** + * Remove all paused extensions. + * + * @since 5.2.0 + * + * @return bool + */ + public function delete_all() + { + } + /** + * Checks whether the underlying API to store paused extensions is loaded. + * + * @since 5.2.0 + * + * @return bool True if the API is loaded, false otherwise. + */ + protected function is_api_loaded() + { + } + /** + * Get the option name for storing paused extensions. + * + * @since 5.2.0 + * + * @return string + */ + protected function get_option_name() + { + } + } + /** + * WordPress PHPMailer class. + * + * Overrides the internationalization method in order to use WordPress' instead. + * + * @since 6.8.0 + */ + class WP_PHPMailer extends \PHPMailer\PHPMailer\PHPMailer + { + /** + * Constructor. + * + * @since 6.8.0 + * + * @param bool $exceptions Optional. Whether to throw exceptions for errors. Default false. + */ + public function __construct($exceptions = \false) + { + } + /** + * Defines the error messages using WordPress' internationalization method. + * + * @since 6.8.0 + * + * @param string $langcode Optional. Unused. ISO 639-1 2-character language code. Default 'en'. + * @param string $lang_path Optional. Unused. Path to the language file directory. Default empty string. + * @return true Always returns true. + */ + public static function setLanguage($langcode = 'en', $lang_path = '') + { + } + } + /** + * Core class for installing plugin dependencies. + * + * It is designed to add plugin dependencies as designated in the + * `Requires Plugins` header to a new view in the plugins install page. + */ + class WP_Plugin_Dependencies + { + /** + * Holds 'get_plugins()'. + * + * @since 6.5.0 + * + * @var array + */ + protected static $plugins; + /** + * Holds plugin directory names to compare with cache. + * + * @since 6.5.0 + * + * @var array + */ + protected static $plugin_dirnames; + /** + * Holds sanitized plugin dependency slugs. + * + * Keyed on the dependent plugin's filepath, + * relative to the plugins directory. + * + * @since 6.5.0 + * + * @var array + */ + protected static $dependencies; + /** + * Holds an array of sanitized plugin dependency slugs. + * + * @since 6.5.0 + * + * @var array + */ + protected static $dependency_slugs; + /** + * Holds an array of dependent plugin slugs. + * + * Keyed on the dependent plugin's filepath, + * relative to the plugins directory. + * + * @since 6.5.0 + * + * @var array + */ + protected static $dependent_slugs; + /** + * Holds 'plugins_api()' data for plugin dependencies. + * + * @since 6.5.0 + * + * @var array + */ + protected static $dependency_api_data; + /** + * Holds plugin dependency filepaths, relative to the plugins directory. + * + * Keyed on the dependency's slug. + * + * @since 6.5.0 + * + * @var string[] + */ + protected static $dependency_filepaths; + /** + * An array of circular dependency pairings. + * + * @since 6.5.0 + * + * @var array[] + */ + protected static $circular_dependencies_pairs; + /** + * An array of circular dependency slugs. + * + * @since 6.5.0 + * + * @var string[] + */ + protected static $circular_dependencies_slugs; + /** + * Whether Plugin Dependencies have been initialized. + * + * @since 6.5.0 + * + * @var bool + */ + protected static $initialized = \false; + /** + * Initializes by fetching plugin header and plugin API data. + * + * @since 6.5.0 + */ + public static function initialize() + { + } + /** + * Determines whether the plugin has plugins that depend on it. + * + * @since 6.5.0 + * + * @param string $plugin_file The plugin's filepath, relative to the plugins directory. + * @return bool Whether the plugin has plugins that depend on it. + */ + public static function has_dependents($plugin_file) + { + } + /** + * Determines whether the plugin has plugin dependencies. + * + * @since 6.5.0 + * + * @param string $plugin_file The plugin's filepath, relative to the plugins directory. + * @return bool Whether a plugin has plugin dependencies. + */ + public static function has_dependencies($plugin_file) + { + } + /** + * Determines whether the plugin has active dependents. + * + * @since 6.5.0 + * + * @param string $plugin_file The plugin's filepath, relative to the plugins directory. + * @return bool Whether the plugin has active dependents. + */ + public static function has_active_dependents($plugin_file) + { + } + /** + * Gets filepaths of plugins that require the dependency. + * + * @since 6.5.0 + * + * @param string $slug The dependency's slug. + * @return array An array of dependent plugin filepaths, relative to the plugins directory. + */ + public static function get_dependents($slug) + { + } + /** + * Gets the slugs of plugins that the dependent requires. + * + * @since 6.5.0 + * + * @param string $plugin_file The dependent plugin's filepath, relative to the plugins directory. + * @return array An array of dependency plugin slugs. + */ + public static function get_dependencies($plugin_file) + { + } + /** + * Gets a dependent plugin's filepath. + * + * @since 6.5.0 + * + * @param string $slug The dependent plugin's slug. + * @return string|false The dependent plugin's filepath, relative to the plugins directory, + * or false if the plugin has no dependencies. + */ + public static function get_dependent_filepath($slug) + { + } + /** + * Determines whether the plugin has unmet dependencies. + * + * @since 6.5.0 + * + * @param string $plugin_file The plugin's filepath, relative to the plugins directory. + * @return bool Whether the plugin has unmet dependencies. + */ + public static function has_unmet_dependencies($plugin_file) + { + } + /** + * Determines whether the plugin has a circular dependency. + * + * @since 6.5.0 + * + * @param string $plugin_file The plugin's filepath, relative to the plugins directory. + * @return bool Whether the plugin has a circular dependency. + */ + public static function has_circular_dependency($plugin_file) + { + } + /** + * Gets the names of plugins that require the plugin. + * + * @since 6.5.0 + * + * @param string $plugin_file The plugin's filepath, relative to the plugins directory. + * @return array An array of dependent names. + */ + public static function get_dependent_names($plugin_file) + { + } + /** + * Gets the names of plugins required by the plugin. + * + * @since 6.5.0 + * + * @param string $plugin_file The dependent plugin's filepath, relative to the plugins directory. + * @return array An array of dependency names. + */ + public static function get_dependency_names($plugin_file) + { + } + /** + * Gets the filepath for a dependency, relative to the plugin's directory. + * + * @since 6.5.0 + * + * @param string $slug The dependency's slug. + * @return string|false If installed, the dependency's filepath relative to the plugins directory, otherwise false. + */ + public static function get_dependency_filepath($slug) + { + } + /** + * Returns API data for the dependency. + * + * @since 6.5.0 + * + * @param string $slug The dependency's slug. + * @return array|false The dependency's API data on success, otherwise false. + */ + public static function get_dependency_data($slug) + { + } + /** + * Displays an admin notice if dependencies are not installed. + * + * @since 6.5.0 + */ + public static function display_admin_notice_for_unmet_dependencies() + { + } + /** + * Displays an admin notice if circular dependencies are installed. + * + * @since 6.5.0 + */ + public static function display_admin_notice_for_circular_dependencies() + { + } + /** + * Checks plugin dependencies after a plugin is installed via AJAX. + * + * @since 6.5.0 + */ + public static function check_plugin_dependencies_during_ajax() + { + } + /** + * Gets data for installed plugins. + * + * @since 6.5.0 + * + * @return array An array of plugin data. + */ + protected static function get_plugins() + { + } + /** + * Reads and stores dependency slugs from a plugin's 'Requires Plugins' header. + * + * @since 6.5.0 + */ + protected static function read_dependencies_from_plugin_headers() + { + } + /** + * Sanitizes slugs. + * + * @since 6.5.0 + * + * @param string $slugs A comma-separated string of plugin dependency slugs. + * @return array An array of sanitized plugin dependency slugs. + */ + protected static function sanitize_dependency_slugs($slugs) + { + } + /** + * Gets the filepath of installed dependencies. + * If a dependency is not installed, the filepath defaults to false. + * + * @since 6.5.0 + * + * @return array An array of install dependencies filepaths, relative to the plugins directory. + */ + protected static function get_dependency_filepaths() + { + } + /** + * Retrieves and stores dependency plugin data from the WordPress.org Plugin API. + * + * @since 6.5.0 + * + * @global string $pagenow The filename of the current screen. + * + * @return array|void An array of dependency API data, or void on early exit. + */ + protected static function get_dependency_api_data() + { + } + /** + * Gets plugin directory names. + * + * @since 6.5.0 + * + * @return array An array of plugin directory names. + */ + protected static function get_plugin_dirnames() + { + } + /** + * Gets circular dependency data. + * + * @since 6.5.0 + * + * @return array[] An array of circular dependency pairings. + */ + protected static function get_circular_dependencies() + { + } + /** + * Checks for circular dependencies. + * + * @since 6.5.0 + * + * @param array $dependents Array of dependent plugins. + * @param array $dependencies Array of plugins dependencies. + * @return array A circular dependency pairing, or an empty array if none exists. + */ + protected static function check_for_circular_dependencies($dependents, $dependencies) + { + } + /** + * Converts a plugin filepath to a slug. + * + * @since 6.5.0 + * + * @param string $plugin_file The plugin's filepath, relative to the plugins directory. + * @return string The plugin's slug. + */ + protected static function convert_to_slug($plugin_file) + { + } + } + /** + * Core class used for interacting with post types. + * + * @since 4.6.0 + * + * @see register_post_type() + */ + #[\AllowDynamicProperties] + final class WP_Post_Type + { + /** + * Post type key. + * + * @since 4.6.0 + * @var string $name + */ + public $name; + /** + * Name of the post type shown in the menu. Usually plural. + * + * @since 4.6.0 + * @var string $label + */ + public $label; + /** + * Labels object for this post type. + * + * If not set, post labels are inherited for non-hierarchical types + * and page labels for hierarchical ones. + * + * @see get_post_type_labels() + * + * @since 4.6.0 + * @var stdClass $labels + */ + public $labels; + /** + * A short descriptive summary of what the post type is. + * + * Default empty. + * + * @since 4.6.0 + * @var string $description + */ + public $description = ''; + /** + * Whether a post type is intended for use publicly either via the admin interface or by front-end users. + * + * While the default settings of $exclude_from_search, $publicly_queryable, $show_ui, and $show_in_nav_menus + * are inherited from public, each does not rely on this relationship and controls a very specific intention. + * + * Default false. + * + * @since 4.6.0 + * @var bool $public + */ + public $public = \false; + /** + * Whether the post type is hierarchical (e.g. page). + * + * Default false. + * + * @since 4.6.0 + * @var bool $hierarchical + */ + public $hierarchical = \false; + /** + * Whether to exclude posts with this post type from front end search + * results. + * + * Default is the opposite value of $public. + * + * @since 4.6.0 + * @var bool $exclude_from_search + */ + public $exclude_from_search = \null; + /** + * Whether queries can be performed on the front end for the post type as part of `parse_request()`. + * + * Endpoints would include: + * + * - `?post_type={post_type_key}` + * - `?{post_type_key}={single_post_slug}` + * - `?{post_type_query_var}={single_post_slug}` + * + * Default is the value of $public. + * + * @since 4.6.0 + * @var bool $publicly_queryable + */ + public $publicly_queryable = \null; + /** + * Whether this post type is embeddable. + * + * Default is the value of $public. + * + * @since 6.8.0 + * @var bool $embeddable + */ + public $embeddable = \null; + /** + * Whether to generate and allow a UI for managing this post type in the admin. + * + * Default is the value of $public. + * + * @since 4.6.0 + * @var bool $show_ui + */ + public $show_ui = \null; + /** + * Where to show the post type in the admin menu. + * + * To work, $show_ui must be true. If true, the post type is shown in its own top level menu. If false, no menu is + * shown. If a string of an existing top level menu ('tools.php' or 'edit.php?post_type=page', for example), the + * post type will be placed as a sub-menu of that. + * + * Default is the value of $show_ui. + * + * @since 4.6.0 + * @var bool|string $show_in_menu + */ + public $show_in_menu = \null; + /** + * Makes this post type available for selection in navigation menus. + * + * Default is the value $public. + * + * @since 4.6.0 + * @var bool $show_in_nav_menus + */ + public $show_in_nav_menus = \null; + /** + * Makes this post type available via the admin bar. + * + * Default is the value of $show_in_menu. + * + * @since 4.6.0 + * @var bool $show_in_admin_bar + */ + public $show_in_admin_bar = \null; + /** + * The position in the menu order the post type should appear. + * + * To work, $show_in_menu must be true. Default null (at the bottom). + * + * @since 4.6.0 + * @var int $menu_position + */ + public $menu_position = \null; + /** + * The URL or reference to the icon to be used for this menu. + * + * Pass a base64-encoded SVG using a data URI, which will be colored to match the color scheme. + * This should begin with 'data:image/svg+xml;base64,'. Pass the name of a Dashicons helper class + * to use a font icon, e.g. 'dashicons-chart-pie'. Pass 'none' to leave div.wp-menu-image empty + * so an icon can be added via CSS. + * + * Defaults to use the posts icon. + * + * @since 4.6.0 + * @var string $menu_icon + */ + public $menu_icon = \null; + /** + * The string to use to build the read, edit, and delete capabilities. + * + * May be passed as an array to allow for alternative plurals when using + * this argument as a base to construct the capabilities, e.g. + * array( 'story', 'stories' ). Default 'post'. + * + * @since 4.6.0 + * @var string $capability_type + */ + public $capability_type = 'post'; + /** + * Whether to use the internal default meta capability handling. + * + * Default false. + * + * @since 4.6.0 + * @var bool $map_meta_cap + */ + public $map_meta_cap = \false; + /** + * Provide a callback function that sets up the meta boxes for the edit form. + * + * Do `remove_meta_box()` and `add_meta_box()` calls in the callback. Default null. + * + * @since 4.6.0 + * @var callable $register_meta_box_cb + */ + public $register_meta_box_cb = \null; + /** + * An array of taxonomy identifiers that will be registered for the post type. + * + * Taxonomies can be registered later with `register_taxonomy()` or `register_taxonomy_for_object_type()`. + * + * Default empty array. + * + * @since 4.6.0 + * @var string[] $taxonomies + */ + public $taxonomies = array(); + /** + * Whether there should be post type archives, or if a string, the archive slug to use. + * + * Will generate the proper rewrite rules if $rewrite is enabled. Default false. + * + * @since 4.6.0 + * @var bool|string $has_archive + */ + public $has_archive = \false; + /** + * Sets the query_var key for this post type. + * + * Defaults to $post_type key. If false, a post type cannot be loaded at `?{query_var}={post_slug}`. + * If specified as a string, the query `?{query_var_string}={post_slug}` will be valid. + * + * @since 4.6.0 + * @var string|bool $query_var + */ + public $query_var; + /** + * Whether to allow this post type to be exported. + * + * Default true. + * + * @since 4.6.0 + * @var bool $can_export + */ + public $can_export = \true; + /** + * Whether to delete posts of this type when deleting a user. + * + * - If true, posts of this type belonging to the user will be moved to Trash when the user is deleted. + * - If false, posts of this type belonging to the user will *not* be trashed or deleted. + * - If not set (the default), posts are trashed if post type supports the 'author' feature. + * Otherwise posts are not trashed or deleted. + * + * Default null. + * + * @since 4.6.0 + * @var bool $delete_with_user + */ + public $delete_with_user = \null; + /** + * Array of blocks to use as the default initial state for an editor session. + * + * Each item should be an array containing block name and optional attributes. + * + * Default empty array. + * + * @link https://developer.wordpress.org/block-editor/developers/block-api/block-templates/ + * + * @since 5.0.0 + * @var array[] $template + */ + public $template = array(); + /** + * Whether the block template should be locked if $template is set. + * + * - If set to 'all', the user is unable to insert new blocks, move existing blocks + * and delete blocks. + * - If set to 'insert', the user is able to move existing blocks but is unable to insert + * new blocks and delete blocks. + * + * Default false. + * + * @link https://developer.wordpress.org/block-editor/developers/block-api/block-templates/ + * + * @since 5.0.0 + * @var string|false $template_lock + */ + public $template_lock = \false; + /** + * Whether this post type is a native or "built-in" post_type. + * + * Default false. + * + * @since 4.6.0 + * @var bool $_builtin + */ + public $_builtin = \false; + /** + * URL segment to use for edit link of this post type. + * + * Default 'post.php?post=%d'. + * + * @since 4.6.0 + * @var string $_edit_link + */ + public $_edit_link = 'post.php?post=%d'; + /** + * Post type capabilities. + * + * @since 4.6.0 + * @var stdClass $cap + */ + public $cap; + /** + * Triggers the handling of rewrites for this post type. + * + * Defaults to true, using $post_type as slug. + * + * @since 4.6.0 + * @var array|false $rewrite + */ + public $rewrite; + /** + * The features supported by the post type. + * + * @since 4.6.0 + * @var array|bool $supports + */ + public $supports; + /** + * Whether this post type should appear in the REST API. + * + * Default false. If true, standard endpoints will be registered with + * respect to $rest_base and $rest_controller_class. + * + * @since 4.7.4 + * @var bool $show_in_rest + */ + public $show_in_rest; + /** + * The base path for this post type's REST API endpoints. + * + * @since 4.7.4 + * @var string|bool $rest_base + */ + public $rest_base; + /** + * The namespace for this post type's REST API endpoints. + * + * @since 5.9.0 + * @var string|bool $rest_namespace + */ + public $rest_namespace; + /** + * The controller for this post type's REST API endpoints. + * + * Custom controllers must extend WP_REST_Controller. + * + * @since 4.7.4 + * @var string|bool $rest_controller_class + */ + public $rest_controller_class; + /** + * The controller instance for this post type's REST API endpoints. + * + * Lazily computed. Should be accessed using {@see WP_Post_Type::get_rest_controller()}. + * + * @since 5.3.0 + * @var WP_REST_Controller $rest_controller + */ + public $rest_controller; + /** + * The controller for this post type's revisions REST API endpoints. + * + * Custom controllers must extend WP_REST_Controller. + * + * @since 6.4.0 + * @var string|bool $revisions_rest_controller_class + */ + public $revisions_rest_controller_class; + /** + * The controller instance for this post type's revisions REST API endpoints. + * + * Lazily computed. Should be accessed using {@see WP_Post_Type::get_revisions_rest_controller()}. + * + * @since 6.4.0 + * @var WP_REST_Controller $revisions_rest_controller + */ + public $revisions_rest_controller; + /** + * The controller for this post type's autosave REST API endpoints. + * + * Custom controllers must extend WP_REST_Controller. + * + * @since 6.4.0 + * @var string|bool $autosave_rest_controller_class + */ + public $autosave_rest_controller_class; + /** + * The controller instance for this post type's autosave REST API endpoints. + * + * Lazily computed. Should be accessed using {@see WP_Post_Type::get_autosave_rest_controller()}. + * + * @since 6.4.0 + * @var WP_REST_Controller $autosave_rest_controller + */ + public $autosave_rest_controller; + /** + * A flag to register the post type REST API controller after its associated autosave / revisions controllers, instead of before. Registration order affects route matching priority. + * + * @since 6.4.0 + * @var bool $late_route_registration + */ + public $late_route_registration; + /** + * Constructor. + * + * See the register_post_type() function for accepted arguments for `$args`. + * + * Will populate object properties from the provided arguments and assign other + * default properties based on that information. + * + * @since 4.6.0 + * + * @see register_post_type() + * + * @param string $post_type Post type key. + * @param array|string $args Optional. Array or string of arguments for registering a post type. + * See register_post_type() for information on accepted arguments. + * Default empty array. + * @phpstan-param array{ + * label?: string, + * labels?: string[], + * description?: string, + * public?: bool, + * hierarchical?: bool, + * exclude_from_search?: bool, + * publicly_queryable?: bool, + * show_ui?: bool, + * show_in_menu?: bool|string, + * show_in_nav_menus?: bool, + * show_in_admin_bar?: bool, + * show_in_rest?: bool, + * rest_base?: string, + * rest_namespace?: string, + * rest_controller_class?: string, + * autosave_rest_controller_class?: string|bool, + * revisions_rest_controller_class?: string|bool, + * late_route_registration?: bool, + * menu_position?: int, + * menu_icon?: string, + * capability_type?: string|array, + * capabilities?: string[], + * map_meta_cap?: bool, + * supports?: array|false, + * register_meta_box_cb?: callable, + * taxonomies?: string[], + * has_archive?: bool|string, + * rewrite?: bool|array{ + * slug?: string, + * with_front?: bool, + * feeds?: bool, + * pages?: bool, + * ep_mask?: int, + * }, + * query_var?: string|bool, + * can_export?: bool, + * delete_with_user?: bool, + * template?: array, + * template_lock?: string|false, + * _builtin?: bool, + * _edit_link?: string, + * } $args See register_post_type() + */ + public function __construct($post_type, $args = array()) + { + } + /** + * Sets post type properties. + * + * See the register_post_type() function for accepted arguments for `$args`. + * + * @since 4.6.0 + * + * @param array|string $args Array or string of arguments for registering a post type. + */ + public function set_props($args) + { + } + /** + * Sets the features support for the post type. + * + * @since 4.6.0 + */ + public function add_supports() + { + } + /** + * Adds the necessary rewrite rules for the post type. + * + * @since 4.6.0 + * + * @global WP_Rewrite $wp_rewrite WordPress rewrite component. + * @global WP $wp Current WordPress environment instance. + */ + public function add_rewrite_rules() + { + } + /** + * Registers the post type meta box if a custom callback was specified. + * + * @since 4.6.0 + */ + public function register_meta_boxes() + { + } + /** + * Adds the future post hook action for the post type. + * + * @since 4.6.0 + */ + public function add_hooks() + { + } + /** + * Registers the taxonomies for the post type. + * + * @since 4.6.0 + */ + public function register_taxonomies() + { + } + /** + * Removes the features support for the post type. + * + * @since 4.6.0 + * + * @global array $_wp_post_type_features Post type features. + */ + public function remove_supports() + { + } + /** + * Removes any rewrite rules, permastructs, and rules for the post type. + * + * @since 4.6.0 + * + * @global WP_Rewrite $wp_rewrite WordPress rewrite component. + * @global WP $wp Current WordPress environment instance. + * @global array $post_type_meta_caps Used to remove meta capabilities. + */ + public function remove_rewrite_rules() + { + } + /** + * Unregisters the post type meta box if a custom callback was specified. + * + * @since 4.6.0 + */ + public function unregister_meta_boxes() + { + } + /** + * Removes the post type from all taxonomies. + * + * @since 4.6.0 + */ + public function unregister_taxonomies() + { + } + /** + * Removes the future post hook action for the post type. + * + * @since 4.6.0 + */ + public function remove_hooks() + { + } + /** + * Gets the REST API controller for this post type. + * + * Will only instantiate the controller class once per request. + * + * @since 5.3.0 + * + * @return WP_REST_Controller|null The controller instance, or null if the post type + * is set not to show in rest. + */ + public function get_rest_controller() + { + } + /** + * Gets the REST API revisions controller for this post type. + * + * Will only instantiate the controller class once per request. + * + * @since 6.4.0 + * + * @return WP_REST_Controller|null The controller instance, or null if the post type + * is set not to show in rest. + */ + public function get_revisions_rest_controller() + { + } + /** + * Gets the REST API autosave controller for this post type. + * + * Will only instantiate the controller class once per request. + * + * @since 6.4.0 + * + * @return WP_REST_Controller|null The controller instance, or null if the post type + * is set not to show in rest. + */ + public function get_autosave_rest_controller() + { + } + /** + * Returns the default labels for post types. + * + * @since 6.0.0 + * + * @return (string|null)[][] The default labels for post types. + */ + public static function get_default_labels() + { + } + /** + * Resets the cache for the default labels. + * + * @since 6.0.0 + */ + public static function reset_default_labels() + { + } + } + /** + * Core class used to implement the WP_Post object. + * + * @since 3.5.0 + * + * @property string $page_template + * + * @property-read int[] $ancestors + * @property-read int[] $post_category + * @property-read string[] $tags_input + */ + #[\AllowDynamicProperties] + final class WP_Post + { + /** + * Post ID. + * + * @since 3.5.0 + * @var int + */ + public $ID; + /** + * ID of post author. + * + * A numeric string, for compatibility reasons. + * + * @since 3.5.0 + * @var string + */ + public $post_author = '0'; + /** + * The post's local publication time. + * + * @since 3.5.0 + * @var string + */ + public $post_date = '0000-00-00 00:00:00'; + /** + * The post's GMT publication time. + * + * @since 3.5.0 + * @var string + */ + public $post_date_gmt = '0000-00-00 00:00:00'; + /** + * The post's content. + * + * @since 3.5.0 + * @var string + */ + public $post_content = ''; + /** + * The post's title. + * + * @since 3.5.0 + * @var string + */ + public $post_title = ''; + /** + * The post's excerpt. + * + * @since 3.5.0 + * @var string + */ + public $post_excerpt = ''; + /** + * The post's status. + * + * @since 3.5.0 + * @var string + */ + public $post_status = 'publish'; + /** + * Whether comments are allowed. + * + * @since 3.5.0 + * @var string + */ + public $comment_status = 'open'; + /** + * Whether pings are allowed. + * + * @since 3.5.0 + * @var string + */ + public $ping_status = 'open'; + /** + * The post's password in plain text. + * + * @since 3.5.0 + * @var string + */ + public $post_password = ''; + /** + * The post's slug. + * + * @since 3.5.0 + * @var string + */ + public $post_name = ''; + /** + * URLs queued to be pinged. + * + * @since 3.5.0 + * @var string + */ + public $to_ping = ''; + /** + * URLs that have been pinged. + * + * @since 3.5.0 + * @var string + */ + public $pinged = ''; + /** + * The post's local modified time. + * + * @since 3.5.0 + * @var string + */ + public $post_modified = '0000-00-00 00:00:00'; + /** + * The post's GMT modified time. + * + * @since 3.5.0 + * @var string + */ + public $post_modified_gmt = '0000-00-00 00:00:00'; + /** + * A utility DB field for post content. + * + * @since 3.5.0 + * @var string + */ + public $post_content_filtered = ''; + /** + * ID of a post's parent post. + * + * @since 3.5.0 + * @var int + */ + public $post_parent = 0; + /** + * The unique identifier for a post, not necessarily a URL, used as the feed GUID. + * + * @since 3.5.0 + * @var string + */ + public $guid = ''; + /** + * A field used for ordering posts. + * + * @since 3.5.0 + * @var int + */ + public $menu_order = 0; + /** + * The post's type, like post or page. + * + * @since 3.5.0 + * @var string + */ + public $post_type = 'post'; + /** + * An attachment's mime type. + * + * @since 3.5.0 + * @var string + */ + public $post_mime_type = ''; + /** + * Cached comment count. + * + * A numeric string, for compatibility reasons. + * + * @since 3.5.0 + * @var string + */ + public $comment_count = '0'; + /** + * Stores the post object's sanitization level. + * + * Does not correspond to a DB field. + * + * @since 3.5.0 + * @var string + */ + public $filter; + /** + * Retrieve WP_Post instance. + * + * @since 3.5.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param int $post_id Post ID. + * @return WP_Post|false Post object, false otherwise. + */ + public static function get_instance($post_id) + { + } + /** + * Constructor. + * + * @since 3.5.0 + * + * @param WP_Post|object $post Post object. + */ + public function __construct($post) + { + } + /** + * Isset-er. + * + * @since 3.5.0 + * + * @param string $key Property to check if set. + * @return bool + */ + public function __isset($key) + { + } + /** + * Getter. + * + * @since 3.5.0 + * + * @param string $key Key to get. + * @return mixed + */ + public function __get($key) + { + } + /** + * {@Missing Summary} + * + * @since 3.5.0 + * + * @param string $filter Filter. + * @return WP_Post + */ + public function filter($filter) + { + } + /** + * Convert object to array. + * + * @since 3.5.0 + * + * @return array Object as array. + */ + public function to_array() + { + } + } + /** + * The WordPress Query class. + * + * @link https://developer.wordpress.org/reference/classes/wp_query/ + * + * @since 1.5.0 + * @since 4.5.0 Removed the `$comments_popup` property. + * @phpstan-property-read bool $query_vars_changed + * @phpstan-property-read bool|string $query_vars_hash + * @phpstan-method void init_query_flags() + */ + #[\AllowDynamicProperties] + class WP_Query + { + /** + * Query vars set by the user. + * + * @since 1.5.0 + * @var array + */ + public $query; + /** + * Query vars, after parsing. + * + * @since 1.5.0 + * @var array + */ + public $query_vars = array(); + /** + * Taxonomy query, as passed to get_tax_sql(). + * + * @since 3.1.0 + * @var WP_Tax_Query|null A taxonomy query instance. + */ + public $tax_query; + /** + * Metadata query container. + * + * @since 3.2.0 + * @var WP_Meta_Query A meta query instance. + */ + public $meta_query = \false; + /** + * Date query container. + * + * @since 3.7.0 + * @var WP_Date_Query A date query instance. + */ + public $date_query = \false; + /** + * Holds the data for a single object that is queried. + * + * Holds the contents of a post, page, category, attachment. + * + * @since 1.5.0 + * @var WP_Term|WP_Post_Type|WP_Post|WP_User|null + */ + public $queried_object; + /** + * The ID of the queried object. + * + * @since 1.5.0 + * @var int + */ + public $queried_object_id; + /** + * SQL for the database query. + * + * @since 2.0.1 + * @var string + */ + public $request; + /** + * Array of post objects or post IDs. + * + * @since 1.5.0 + * @var WP_Post[]|int[] + */ + public $posts; + /** + * The number of posts for the current query. + * + * @since 1.5.0 + * @var int + */ + public $post_count = 0; + /** + * Index of the current item in the loop. + * + * @since 1.5.0 + * @var int + */ + public $current_post = -1; + /** + * Whether the caller is before the loop. + * + * @since 6.3.0 + * @var bool + */ + public $before_loop = \true; + /** + * Whether the loop has started and the caller is in the loop. + * + * @since 2.0.0 + * @var bool + */ + public $in_the_loop = \false; + /** + * The current post. + * + * This property does not get populated when the `fields` argument is set to + * `ids` or `id=>parent`. + * + * @since 1.5.0 + * @var WP_Post|null + */ + public $post; + /** + * The list of comments for current post. + * + * @since 2.2.0 + * @var WP_Comment[] + */ + public $comments; + /** + * The number of comments for the posts. + * + * @since 2.2.0 + * @var int + */ + public $comment_count = 0; + /** + * The index of the comment in the comment loop. + * + * @since 2.2.0 + * @var int + */ + public $current_comment = -1; + /** + * Current comment object. + * + * @since 2.2.0 + * @var WP_Comment + */ + public $comment; + /** + * The number of found posts for the current query. + * + * If limit clause was not used, equals $post_count. + * + * @since 2.1.0 + * @var int + */ + public $found_posts = 0; + /** + * The number of pages. + * + * @since 2.1.0 + * @var int + */ + public $max_num_pages = 0; + /** + * The number of comment pages. + * + * @since 2.7.0 + * @var int + */ + public $max_num_comment_pages = 0; + /** + * Signifies whether the current query is for a single post. + * + * @since 1.5.0 + * @var bool + */ + public $is_single = \false; + /** + * Signifies whether the current query is for a preview. + * + * @since 2.0.0 + * @var bool + */ + public $is_preview = \false; + /** + * Signifies whether the current query is for a page. + * + * @since 1.5.0 + * @var bool + */ + public $is_page = \false; + /** + * Signifies whether the current query is for an archive. + * + * @since 1.5.0 + * @var bool + */ + public $is_archive = \false; + /** + * Signifies whether the current query is for a date archive. + * + * @since 1.5.0 + * @var bool + */ + public $is_date = \false; + /** + * Signifies whether the current query is for a year archive. + * + * @since 1.5.0 + * @var bool + */ + public $is_year = \false; + /** + * Signifies whether the current query is for a month archive. + * + * @since 1.5.0 + * @var bool + */ + public $is_month = \false; + /** + * Signifies whether the current query is for a day archive. + * + * @since 1.5.0 + * @var bool + */ + public $is_day = \false; + /** + * Signifies whether the current query is for a specific time. + * + * @since 1.5.0 + * @var bool + */ + public $is_time = \false; + /** + * Signifies whether the current query is for an author archive. + * + * @since 1.5.0 + * @var bool + */ + public $is_author = \false; + /** + * Signifies whether the current query is for a category archive. + * + * @since 1.5.0 + * @var bool + */ + public $is_category = \false; + /** + * Signifies whether the current query is for a tag archive. + * + * @since 2.3.0 + * @var bool + */ + public $is_tag = \false; + /** + * Signifies whether the current query is for a taxonomy archive. + * + * @since 2.5.0 + * @var bool + */ + public $is_tax = \false; + /** + * Signifies whether the current query is for a search. + * + * @since 1.5.0 + * @var bool + */ + public $is_search = \false; + /** + * Signifies whether the current query is for a feed. + * + * @since 1.5.0 + * @var bool + */ + public $is_feed = \false; + /** + * Signifies whether the current query is for a comment feed. + * + * @since 2.2.0 + * @var bool + */ + public $is_comment_feed = \false; + /** + * Signifies whether the current query is for trackback endpoint call. + * + * @since 1.5.0 + * @var bool + */ + public $is_trackback = \false; + /** + * Signifies whether the current query is for the site homepage. + * + * @since 1.5.0 + * @var bool + */ + public $is_home = \false; + /** + * Signifies whether the current query is for the Privacy Policy page. + * + * @since 5.2.0 + * @var bool + */ + public $is_privacy_policy = \false; + /** + * Signifies whether the current query couldn't find anything. + * + * @since 1.5.0 + * @var bool + */ + public $is_404 = \false; + /** + * Signifies whether the current query is for an embed. + * + * @since 4.4.0 + * @var bool + */ + public $is_embed = \false; + /** + * Signifies whether the current query is for a paged result and not for the first page. + * + * @since 1.5.0 + * @var bool + */ + public $is_paged = \false; + /** + * Signifies whether the current query is for an administrative interface page. + * + * @since 1.5.0 + * @var bool + */ + public $is_admin = \false; + /** + * Signifies whether the current query is for an attachment page. + * + * @since 2.0.0 + * @var bool + */ + public $is_attachment = \false; + /** + * Signifies whether the current query is for an existing single post of any post type + * (post, attachment, page, custom post types). + * + * @since 2.1.0 + * @var bool + */ + public $is_singular = \false; + /** + * Signifies whether the current query is for the robots.txt file. + * + * @since 2.1.0 + * @var bool + */ + public $is_robots = \false; + /** + * Signifies whether the current query is for the favicon.ico file. + * + * @since 5.4.0 + * @var bool + */ + public $is_favicon = \false; + /** + * Signifies whether the current query is for the page_for_posts page. + * + * Basically, the homepage if the option isn't set for the static homepage. + * + * @since 2.1.0 + * @var bool + */ + public $is_posts_page = \false; + /** + * Signifies whether the current query is for a post type archive. + * + * @since 3.1.0 + * @var bool + */ + public $is_post_type_archive = \false; + /** + * Set if post thumbnails are cached + * + * @since 3.2.0 + * @var bool + */ + public $thumbnails_cached = \false; + /** + * Controls whether an attachment query should include filenames or not. + * + * @since 6.0.3 + * @var bool + */ + protected $allow_query_attachment_by_filename = \false; + /** + * Initiates object properties and sets default values. + * + * @since 1.5.0 + */ + public function init() + { + } + /** + * Reparses the query vars. + * + * @since 1.5.0 + */ + public function parse_query_vars() + { + } + /** + * Fills in the query variables, which do not exist within the parameter. + * + * @since 2.1.0 + * @since 4.5.0 Removed the `comments_popup` public query variable. + * + * @param array $query_vars Defined query variables. + * @return array Complete query variables with undefined ones filled in empty. + */ + public function fill_query_vars($query_vars) + { + } + /** + * Parses a query string and sets query type booleans. + * + * @since 1.5.0 + * @since 4.2.0 Introduced the ability to order by specific clauses of a `$meta_query`, by passing the clause's + * array key to `$orderby`. + * @since 4.4.0 Introduced `$post_name__in` and `$title` parameters. `$s` was updated to support excluded + * search terms, by prepending a hyphen. + * @since 4.5.0 Removed the `$comments_popup` parameter. + * Introduced the `$comment_status` and `$ping_status` parameters. + * Introduced `RAND(x)` syntax for `$orderby`, which allows an integer seed value to random sorts. + * @since 4.6.0 Added 'post_name__in' support for `$orderby`. Introduced the `$lazy_load_term_meta` argument. + * @since 4.9.0 Introduced the `$comment_count` parameter. + * @since 5.1.0 Introduced the `$meta_compare_key` parameter. + * @since 5.3.0 Introduced the `$meta_type_key` parameter. + * @since 6.1.0 Introduced the `$update_menu_item_cache` parameter. + * @since 6.2.0 Introduced the `$search_columns` parameter. + * + * @param string|array $query { + * Optional. Array or string of Query parameters. + * + * @type int $attachment_id Attachment post ID. Used for 'attachment' post_type. + * @type int|string $author Author ID, or comma-separated list of IDs. + * @type string $author_name User 'user_nicename'. + * @type int[] $author__in An array of author IDs to query from. + * @type int[] $author__not_in An array of author IDs not to query from. + * @type bool $cache_results Whether to cache post information. Default true. + * @type int|string $cat Category ID or comma-separated list of IDs (this or any children). + * @type int[] $category__and An array of category IDs (AND in). + * @type int[] $category__in An array of category IDs (OR in, no children). + * @type int[] $category__not_in An array of category IDs (NOT in). + * @type string $category_name Use category slug (not name, this or any children). + * @type array|int $comment_count Filter results by comment count. Provide an integer to match + * comment count exactly. Provide an array with integer 'value' + * and 'compare' operator ('=', '!=', '>', '>=', '<', '<=' ) to + * compare against comment_count in a specific way. + * @type string $comment_status Comment status. + * @type int $comments_per_page The number of comments to return per page. + * Default 'comments_per_page' option. + * @type array $date_query An associative array of WP_Date_Query arguments. + * See WP_Date_Query::__construct(). + * @type int $day Day of the month. Default empty. Accepts numbers 1-31. + * @type bool $exact Whether to search by exact keyword. Default false. + * @type string $fields Post fields to query for. Accepts: + * - '' Returns an array of complete post objects (`WP_Post[]`). + * - 'ids' Returns an array of post IDs (`int[]`). + * - 'id=>parent' Returns an associative array of parent post IDs, + * keyed by post ID (`int[]`). + * Default ''. + * @type int $hour Hour of the day. Default empty. Accepts numbers 0-23. + * @type int|bool $ignore_sticky_posts Whether to ignore sticky posts or not. Setting this to false + * excludes stickies from 'post__in'. Accepts 1|true, 0|false. + * Default false. + * @type int $m Combination YearMonth. Accepts any four-digit year and month + * numbers 01-12. Default empty. + * @type string|string[] $meta_key Meta key or keys to filter by. + * @type string|string[] $meta_value Meta value or values to filter by. + * @type string $meta_compare MySQL operator used for comparing the meta value. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type string $meta_compare_key MySQL operator used for comparing the meta key. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type string $meta_type MySQL data type that the meta_value column will be CAST to for comparisons. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type string $meta_type_key MySQL data type that the meta_key column will be CAST to for comparisons. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type array $meta_query An associative array of WP_Meta_Query arguments. + * See WP_Meta_Query::__construct() for accepted values. + * @type int $menu_order The menu order of the posts. + * @type int $minute Minute of the hour. Default empty. Accepts numbers 0-59. + * @type int $monthnum The two-digit month. Default empty. Accepts numbers 1-12. + * @type string $name Post slug. + * @type bool $nopaging Show all posts (true) or paginate (false). Default false. + * @type bool $no_found_rows Whether to skip counting the total rows found. Enabling can improve + * performance. Default false. + * @type int $offset The number of posts to offset before retrieval. + * @type string $order Designates ascending or descending order of posts. Default 'DESC'. + * Accepts 'ASC', 'DESC'. + * @type string|array $orderby Sort retrieved posts by parameter. One or more options may be passed. + * To use 'meta_value', or 'meta_value_num', 'meta_key=keyname' must be + * also be defined. To sort by a specific `$meta_query` clause, use that + * clause's array key. Accepts: + * - 'none' + * - 'name' + * - 'author' + * - 'date' + * - 'title' + * - 'modified' + * - 'menu_order' + * - 'parent' + * - 'ID' + * - 'rand' + * - 'relevance' + * - 'RAND(x)' (where 'x' is an integer seed value) + * - 'comment_count' + * - 'meta_value' + * - 'meta_value_num' + * - 'post__in' + * - 'post_name__in' + * - 'post_parent__in' + * - The array keys of `$meta_query`. + * Default is 'date', except when a search is being performed, when + * the default is 'relevance'. + * @type int $p Post ID. + * @type int $page Show the number of posts that would show up on page X of a + * static front page. + * @type int $paged The number of the current page. + * @type int $page_id Page ID. + * @type string $pagename Page slug. + * @type string $perm Show posts if user has the appropriate capability. + * @type string $ping_status Ping status. + * @type int[] $post__in An array of post IDs to retrieve, sticky posts will be included. + * @type int[] $post__not_in An array of post IDs not to retrieve. Note: a string of comma- + * separated IDs will NOT work. + * @type string $post_mime_type The mime type of the post. Used for 'attachment' post_type. + * @type string[] $post_name__in An array of post slugs that results must match. + * @type int $post_parent Page ID to retrieve child pages for. Use 0 to only retrieve + * top-level pages. + * @type int[] $post_parent__in An array containing parent page IDs to query child pages from. + * @type int[] $post_parent__not_in An array containing parent page IDs not to query child pages from. + * @type string|string[] $post_type A post type slug (string) or array of post type slugs. + * Default 'any' if using 'tax_query'. + * @type string|string[] $post_status A post status (string) or array of post statuses. + * @type int $posts_per_page The number of posts to query for. Use -1 to request all posts. + * @type int $posts_per_archive_page The number of posts to query for by archive page. Overrides + * 'posts_per_page' when is_archive(), or is_search() are true. + * @type string $s Search keyword(s). Prepending a term with a hyphen will + * exclude posts matching that term. Eg, 'pillow -sofa' will + * return posts containing 'pillow' but not 'sofa'. The + * character used for exclusion can be modified using the + * the 'wp_query_search_exclusion_prefix' filter. + * @type string[] $search_columns Array of column names to be searched. Accepts 'post_title', + * 'post_excerpt' and 'post_content'. Default empty array. + * @type int $second Second of the minute. Default empty. Accepts numbers 0-59. + * @type bool $sentence Whether to search by phrase. Default false. + * @type bool $suppress_filters Whether to suppress filters. Default false. + * @type string $tag Tag slug. Comma-separated (either), Plus-separated (all). + * @type int[] $tag__and An array of tag IDs (AND in). + * @type int[] $tag__in An array of tag IDs (OR in). + * @type int[] $tag__not_in An array of tag IDs (NOT in). + * @type int $tag_id Tag id or comma-separated list of IDs. + * @type string[] $tag_slug__and An array of tag slugs (AND in). + * @type string[] $tag_slug__in An array of tag slugs (OR in). unless 'ignore_sticky_posts' is + * true. Note: a string of comma-separated IDs will NOT work. + * @type array $tax_query An associative array of WP_Tax_Query arguments. + * See WP_Tax_Query::__construct(). + * @type string $title Post title. + * @type bool $update_post_meta_cache Whether to update the post meta cache. Default true. + * @type bool $update_post_term_cache Whether to update the post term cache. Default true. + * @type bool $update_menu_item_cache Whether to update the menu item cache. Default false. + * @type bool $lazy_load_term_meta Whether to lazy-load term meta. Setting to false will + * disable cache priming for term meta, so that each + * get_term_meta() call will hit the database. + * Defaults to the value of `$update_post_term_cache`. + * @type int $w The week number of the year. Default empty. Accepts numbers 0-53. + * @type int $year The four-digit year. Default empty. Accepts any four-digit year. + * } + * @phpstan-param array{ + * attachment_id?: int, + * author?: int|string, + * author_name?: string, + * author__in?: int[], + * author__not_in?: int[], + * cache_results?: bool, + * cat?: int|string, + * category__and?: int[], + * category__in?: int[], + * category__not_in?: int[], + * category_name?: string, + * comment_count?: array|int, + * comment_status?: string, + * comments_per_page?: int, + * date_query?: array, + * day?: int, + * exact?: bool, + * fields?: string, + * hour?: int, + * ignore_sticky_posts?: int|bool, + * m?: int, + * meta_key?: string|string[], + * meta_value?: string|string[], + * meta_compare?: string, + * meta_compare_key?: string, + * meta_type?: string, + * meta_type_key?: string, + * meta_query?: array, + * menu_order?: int, + * minute?: int, + * monthnum?: int, + * name?: string, + * nopaging?: bool, + * no_found_rows?: bool, + * offset?: int, + * order?: string, + * orderby?: string|array, + * p?: int, + * page?: int, + * paged?: int, + * page_id?: int, + * pagename?: string, + * perm?: string, + * ping_status?: string, + * post__in?: int[], + * post__not_in?: int[], + * post_mime_type?: string, + * post_name__in?: string[], + * post_parent?: int, + * post_parent__in?: int[], + * post_parent__not_in?: int[], + * post_type?: string|string[], + * post_status?: string|string[], + * posts_per_page?: int, + * posts_per_archive_page?: int, + * s?: string, + * search_columns?: string[], + * second?: int, + * sentence?: bool, + * suppress_filters?: bool, + * tag?: string, + * tag__and?: int[], + * tag__in?: int[], + * tag__not_in?: int[], + * tag_id?: int, + * tag_slug__and?: string[], + * tag_slug__in?: string[], + * tax_query?: array, + * title?: string, + * update_post_meta_cache?: bool, + * update_post_term_cache?: bool, + * update_menu_item_cache?: bool, + * lazy_load_term_meta?: bool, + * w?: int, + * year?: int, + * } $query + */ + public function parse_query($query = '') + { + } + /** + * Parses various taxonomy related query vars. + * + * For BC, this method is not marked as protected. See [28987]. + * + * @since 3.1.0 + * + * @param array $query_vars The query variables. Passed by reference. + */ + public function parse_tax_query(&$query_vars) + { + } + /** + * Generates SQL for the WHERE clause based on passed search terms. + * + * @since 3.7.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param array $query_vars Query variables. + * @return string WHERE clause. + */ + protected function parse_search(&$query_vars) + { + } + /** + * Checks if the terms are suitable for searching. + * + * Uses an array of stopwords (terms) that are excluded from the separate + * term matching when searching for posts. The list of English stopwords is + * the approximate search engines list, and is translatable. + * + * @since 3.7.0 + * + * @param string[] $terms Array of terms to check. + * @return string[] Terms that are not stopwords. + */ + protected function parse_search_terms($terms) + { + } + /** + * Retrieves stopwords used when parsing search terms. + * + * @since 3.7.0 + * + * @return string[] Stopwords. + */ + protected function get_search_stopwords() + { + } + /** + * Generates SQL for the ORDER BY condition based on passed search terms. + * + * @since 3.7.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param array $query_vars Query variables. + * @return string ORDER BY clause. + */ + protected function parse_search_order(&$query_vars) + { + } + /** + * Converts the given orderby alias (if allowed) to a properly-prefixed value. + * + * @since 4.0.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $orderby Alias for the field to order by. + * @return string|false Table-prefixed value to used in the ORDER clause. False otherwise. + */ + protected function parse_orderby($orderby) + { + } + /** + * Parse an 'order' query variable and cast it to ASC or DESC as necessary. + * + * @since 4.0.0 + * + * @param string $order The 'order' query variable. + * @return string The sanitized 'order' query variable. + */ + protected function parse_order($order) + { + } + /** + * Sets the 404 property and saves whether query is feed. + * + * @since 2.0.0 + */ + public function set_404() + { + } + /** + * Retrieves the value of a query variable. + * + * @since 1.5.0 + * @since 3.9.0 The `$default_value` argument was introduced. + * + * @param string $query_var Query variable key. + * @param mixed $default_value Optional. Value to return if the query variable is not set. + * Default empty string. + * @return mixed Contents of the query variable. + */ + public function get($query_var, $default_value = '') + { + } + /** + * Sets the value of a query variable. + * + * @since 1.5.0 + * + * @param string $query_var Query variable key. + * @param mixed $value Query variable value. + */ + public function set($query_var, $value) + { + } + /** + * Retrieves an array of posts based on query variables. + * + * There are a few filters and actions that can be used to modify the post + * database query. + * + * @since 1.5.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @return WP_Post[]|int[] Array of post objects or post IDs. + */ + public function get_posts() + { + } + /** + * Sets up the next post and iterate current post index. + * + * @since 1.5.0 + * + * @return WP_Post Next post. + */ + public function next_post() + { + } + /** + * Sets up the current post. + * + * Retrieves the next post, sets up the post, sets the 'in the loop' + * property to true. + * + * @since 1.5.0 + * + * @global WP_Post $post Global post object. + */ + public function the_post() + { + } + /** + * Determines whether there are more posts available in the loop. + * + * Calls the {@see 'loop_end'} action when the loop is complete. + * + * @since 1.5.0 + * + * @return bool True if posts are available, false if end of the loop. + * @phpstan-impure + */ + public function have_posts() + { + } + /** + * Rewinds the posts and resets post index. + * + * @since 1.5.0 + */ + public function rewind_posts() + { + } + /** + * Iterates current comment index and returns WP_Comment object. + * + * @since 2.2.0 + * + * @return WP_Comment Comment object. + */ + public function next_comment() + { + } + /** + * Sets up the current comment. + * + * @since 2.2.0 + * + * @global WP_Comment $comment Global comment object. + */ + public function the_comment() + { + } + /** + * Determines whether there are more comments available. + * + * Automatically rewinds comments when finished. + * + * @since 2.2.0 + * + * @return bool True if comments are available, false if no more comments. + */ + public function have_comments() + { + } + /** + * Rewinds the comments, resets the comment index and comment to first. + * + * @since 2.2.0 + */ + public function rewind_comments() + { + } + /** + * Sets up the WordPress query by parsing query string. + * + * @since 1.5.0 + * + * @see WP_Query::parse_query() for all available arguments. + * + * @param string|array $query URL query string or array of query arguments. + * @return WP_Post[]|int[] Array of post objects or post IDs. + */ + public function query($query) + { + } + /** + * Retrieves the currently queried object. + * + * If queried object is not set, then the queried object will be set from + * the category, tag, taxonomy, posts page, single post, page, or author + * query variable. After it is set up, it will be returned. + * + * @since 1.5.0 + * + * @return WP_Term|WP_Post_Type|WP_Post|WP_User|null The queried object. + */ + public function get_queried_object() + { + } + /** + * Retrieves the ID of the currently queried object. + * + * @since 1.5.0 + * + * @return int + */ + public function get_queried_object_id() + { + } + /** + * Constructor. + * + * Sets up the WordPress query, if parameter is not empty. + * + * @since 1.5.0 + * + * @see WP_Query::parse_query() for all available arguments. + * + * @param string|array $query URL query string or array of vars. + */ + public function __construct($query = '') + { + } + /** + * Makes private properties readable for backward compatibility. + * + * @since 4.0.0 + * + * @param string $name Property to get. + * @return mixed Property. + */ + public function __get($name) + { + } + /** + * Makes private properties checkable for backward compatibility. + * + * @since 4.0.0 + * + * @param string $name Property to check if set. + * @return bool Whether the property is set. + */ + public function __isset($name) + { + } + /** + * Makes private/protected methods readable for backward compatibility. + * + * @since 4.0.0 + * + * @param string $name Method to call. + * @param array $arguments Arguments to pass when calling. + * @return mixed|false Return value of the callback, false otherwise. + */ + public function __call($name, $arguments) + { + } + /** + * Determines whether the query is for an existing archive page. + * + * Archive pages include category, tag, author, date, custom post type, + * and custom taxonomy based archives. + * + * @since 3.1.0 + * + * @see WP_Query::is_category() + * @see WP_Query::is_tag() + * @see WP_Query::is_author() + * @see WP_Query::is_date() + * @see WP_Query::is_post_type_archive() + * @see WP_Query::is_tax() + * + * @return bool Whether the query is for an existing archive page. + */ + public function is_archive() + { + } + /** + * Determines whether the query is for an existing post type archive page. + * + * @since 3.1.0 + * + * @param string|string[] $post_types Optional. Post type or array of posts types + * to check against. Default empty. + * @return bool Whether the query is for an existing post type archive page. + */ + public function is_post_type_archive($post_types = '') + { + } + /** + * Determines whether the query is for an existing attachment page. + * + * @since 3.1.0 + * + * @param int|string|int[]|string[] $attachment Optional. Attachment ID, title, slug, or array of such + * to check against. Default empty. + * @return bool Whether the query is for an existing attachment page. + */ + public function is_attachment($attachment = '') + { + } + /** + * Determines whether the query is for an existing author archive page. + * + * If the $author parameter is specified, this function will additionally + * check if the query is for one of the authors specified. + * + * @since 3.1.0 + * + * @param int|string|int[]|string[] $author Optional. User ID, nickname, nicename, or array of such + * to check against. Default empty. + * @return bool Whether the query is for an existing author archive page. + */ + public function is_author($author = '') + { + } + /** + * Determines whether the query is for an existing category archive page. + * + * If the $category parameter is specified, this function will additionally + * check if the query is for one of the categories specified. + * + * @since 3.1.0 + * + * @param int|string|int[]|string[] $category Optional. Category ID, name, slug, or array of such + * to check against. Default empty. + * @return bool Whether the query is for an existing category archive page. + */ + public function is_category($category = '') + { + } + /** + * Determines whether the query is for an existing tag archive page. + * + * If the $tag parameter is specified, this function will additionally + * check if the query is for one of the tags specified. + * + * @since 3.1.0 + * + * @param int|string|int[]|string[] $tag Optional. Tag ID, name, slug, or array of such + * to check against. Default empty. + * @return bool Whether the query is for an existing tag archive page. + */ + public function is_tag($tag = '') + { + } + /** + * Determines whether the query is for an existing custom taxonomy archive page. + * + * If the $taxonomy parameter is specified, this function will additionally + * check if the query is for that specific $taxonomy. + * + * If the $term parameter is specified in addition to the $taxonomy parameter, + * this function will additionally check if the query is for one of the terms + * specified. + * + * @since 3.1.0 + * + * @global WP_Taxonomy[] $wp_taxonomies Registered taxonomies. + * + * @param string|string[] $taxonomy Optional. Taxonomy slug or slugs to check against. + * Default empty. + * @param int|string|int[]|string[] $term Optional. Term ID, name, slug, or array of such + * to check against. Default empty. + * @return bool Whether the query is for an existing custom taxonomy archive page. + * True for custom taxonomy archive pages, false for built-in taxonomies + * (category and tag archives). + */ + public function is_tax($taxonomy = '', $term = '') + { + } + /** + * Determines whether the current URL is within the comments popup window. + * + * @since 3.1.0 + * @deprecated 4.5.0 + * + * @return false Always returns false. + */ + public function is_comments_popup() + { + } + /** + * Determines whether the query is for an existing date archive. + * + * @since 3.1.0 + * + * @return bool Whether the query is for an existing date archive. + */ + public function is_date() + { + } + /** + * Determines whether the query is for an existing day archive. + * + * @since 3.1.0 + * + * @return bool Whether the query is for an existing day archive. + */ + public function is_day() + { + } + /** + * Determines whether the query is for a feed. + * + * @since 3.1.0 + * + * @param string|string[] $feeds Optional. Feed type or array of feed types + * to check against. Default empty. + * @return bool Whether the query is for a feed. + */ + public function is_feed($feeds = '') + { + } + /** + * Determines whether the query is for a comments feed. + * + * @since 3.1.0 + * + * @return bool Whether the query is for a comments feed. + */ + public function is_comment_feed() + { + } + /** + * Determines whether the query is for the front page of the site. + * + * This is for what is displayed at your site's main URL. + * + * Depends on the site's "Front page displays" Reading Settings 'show_on_front' and 'page_on_front'. + * + * If you set a static page for the front page of your site, this function will return + * true when viewing that page. + * + * Otherwise the same as {@see WP_Query::is_home()}. + * + * @since 3.1.0 + * + * @return bool Whether the query is for the front page of the site. + */ + public function is_front_page() + { + } + /** + * Determines whether the query is for the blog homepage. + * + * This is the page which shows the time based blog content of your site. + * + * Depends on the site's "Front page displays" Reading Settings 'show_on_front' and 'page_for_posts'. + * + * If you set a static page for the front page of your site, this function will return + * true only on the page you set as the "Posts page". + * + * @since 3.1.0 + * + * @see WP_Query::is_front_page() + * + * @return bool Whether the query is for the blog homepage. + */ + public function is_home() + { + } + /** + * Determines whether the query is for the Privacy Policy page. + * + * This is the page which shows the Privacy Policy content of your site. + * + * Depends on the site's "Change your Privacy Policy page" Privacy Settings 'wp_page_for_privacy_policy'. + * + * This function will return true only on the page you set as the "Privacy Policy page". + * + * @since 5.2.0 + * + * @return bool Whether the query is for the Privacy Policy page. + */ + public function is_privacy_policy() + { + } + /** + * Determines whether the query is for an existing month archive. + * + * @since 3.1.0 + * + * @return bool Whether the query is for an existing month archive. + */ + public function is_month() + { + } + /** + * Determines whether the query is for an existing single page. + * + * If the $page parameter is specified, this function will additionally + * check if the query is for one of the pages specified. + * + * @since 3.1.0 + * + * @see WP_Query::is_single() + * @see WP_Query::is_singular() + * + * @param int|string|int[]|string[] $page Optional. Page ID, title, slug, path, or array of such + * to check against. Default empty. + * @return bool Whether the query is for an existing single page. + */ + public function is_page($page = '') + { + } + /** + * Determines whether the query is for a paged result and not for the first page. + * + * @since 3.1.0 + * + * @return bool Whether the query is for a paged result. + */ + public function is_paged() + { + } + /** + * Determines whether the query is for a post or page preview. + * + * @since 3.1.0 + * + * @return bool Whether the query is for a post or page preview. + */ + public function is_preview() + { + } + /** + * Determines whether the query is for the robots.txt file. + * + * @since 3.1.0 + * + * @return bool Whether the query is for the robots.txt file. + */ + public function is_robots() + { + } + /** + * Determines whether the query is for the favicon.ico file. + * + * @since 5.4.0 + * + * @return bool Whether the query is for the favicon.ico file. + */ + public function is_favicon() + { + } + /** + * Determines whether the query is for a search. + * + * @since 3.1.0 + * + * @return bool Whether the query is for a search. + */ + public function is_search() + { + } + /** + * Determines whether the query is for an existing single post. + * + * Works for any post type excluding pages. + * + * If the $post parameter is specified, this function will additionally + * check if the query is for one of the Posts specified. + * + * @since 3.1.0 + * + * @see WP_Query::is_page() + * @see WP_Query::is_singular() + * + * @param int|string|int[]|string[] $post Optional. Post ID, title, slug, path, or array of such + * to check against. Default empty. + * @return bool Whether the query is for an existing single post. + */ + public function is_single($post = '') + { + } + /** + * Determines whether the query is for an existing single post of any post type + * (post, attachment, page, custom post types). + * + * If the $post_types parameter is specified, this function will additionally + * check if the query is for one of the Posts Types specified. + * + * @since 3.1.0 + * + * @see WP_Query::is_page() + * @see WP_Query::is_single() + * + * @param string|string[] $post_types Optional. Post type or array of post types + * to check against. Default empty. + * @return bool Whether the query is for an existing single post + * or any of the given post types. + */ + public function is_singular($post_types = '') + { + } + /** + * Determines whether the query is for a specific time. + * + * @since 3.1.0 + * + * @return bool Whether the query is for a specific time. + */ + public function is_time() + { + } + /** + * Determines whether the query is for a trackback endpoint call. + * + * @since 3.1.0 + * + * @return bool Whether the query is for a trackback endpoint call. + */ + public function is_trackback() + { + } + /** + * Determines whether the query is for an existing year archive. + * + * @since 3.1.0 + * + * @return bool Whether the query is for an existing year archive. + */ + public function is_year() + { + } + /** + * Determines whether the query is a 404 (returns no results). + * + * @since 3.1.0 + * + * @return bool Whether the query is a 404 error. + */ + public function is_404() + { + } + /** + * Determines whether the query is for an embedded post. + * + * @since 4.4.0 + * + * @return bool Whether the query is for an embedded post. + */ + public function is_embed() + { + } + /** + * Determines whether the query is the main query. + * + * @since 3.3.0 + * + * @global WP_Query $wp_the_query WordPress Query object. + * + * @return bool Whether the query is the main query. + */ + public function is_main_query() + { + } + /** + * Sets up global post data. + * + * @since 4.1.0 + * @since 4.4.0 Added the ability to pass a post ID to `$post`. + * + * @global int $id + * @global WP_User $authordata + * @global string $currentday + * @global string $currentmonth + * @global int $page + * @global array $pages + * @global int $multipage + * @global int $more + * @global int $numpages + * + * @param WP_Post|object|int $post WP_Post instance or Post ID/object. + * @return true True when finished. + */ + public function setup_postdata($post) + { + } + /** + * Generates post data. + * + * @since 5.2.0 + * + * @param WP_Post|object|int $post WP_Post instance or Post ID/object. + * @return array|false Elements of post or false on failure. + */ + public function generate_postdata($post) + { + } + /** + * Generates cache key. + * + * @since 6.1.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param array $args Query arguments. + * @param string $sql SQL statement. + * @return string Cache key. + */ + protected function generate_cache_key(array $args, $sql) + { + } + /** + * After looping through a nested query, this function + * restores the $post global to the current post in this query. + * + * @since 3.7.0 + * + * @global WP_Post $post Global post object. + */ + public function reset_postdata() + { + } + /** + * Lazyloads term meta for posts in the loop. + * + * @since 4.4.0 + * @deprecated 4.5.0 See wp_queue_posts_for_term_meta_lazyload(). + * + * @param mixed $check + * @param int $term_id + * @return mixed + */ + public function lazyload_term_meta($check, $term_id) + { + } + /** + * Lazyloads comment meta for comments in the loop. + * + * @since 4.4.0 + * @deprecated 4.5.0 See wp_lazyload_comment_meta(). + * + * @param mixed $check + * @param int $comment_id + * @return mixed + */ + public function lazyload_comment_meta($check, $comment_id) + { + } + } + /** + * Core class used to set, validate, and clear cookies that identify a Recovery Mode session. + * + * @since 5.2.0 + */ + #[\AllowDynamicProperties] + final class WP_Recovery_Mode_Cookie_Service + { + /** + * Checks whether the recovery mode cookie is set. + * + * @since 5.2.0 + * + * @return bool True if the cookie is set, false otherwise. + */ + public function is_cookie_set() + { + } + /** + * Sets the recovery mode cookie. + * + * This must be immediately followed by exiting the request. + * + * @since 5.2.0 + */ + public function set_cookie() + { + } + /** + * Clears the recovery mode cookie. + * + * @since 5.2.0 + */ + public function clear_cookie() + { + } + /** + * Validates the recovery mode cookie. + * + * @since 5.2.0 + * + * @param string $cookie Optionally specify the cookie string. + * If omitted, it will be retrieved from the super global. + * @return true|WP_Error True on success, error object on failure. + */ + public function validate_cookie($cookie = '') + { + } + /** + * Gets the session identifier from the cookie. + * + * The cookie should be validated before calling this API. + * + * @since 5.2.0 + * + * @param string $cookie Optionally specify the cookie string. + * If omitted, it will be retrieved from the super global. + * @return string|WP_Error Session ID on success, or error object on failure. + */ + public function get_session_id_from_cookie($cookie = '') + { + } + } + /** + * Core class used to send an email with a link to begin Recovery Mode. + * + * @since 5.2.0 + */ + #[\AllowDynamicProperties] + final class WP_Recovery_Mode_Email_Service + { + const RATE_LIMIT_OPTION = 'recovery_mode_email_last_sent'; + /** + * WP_Recovery_Mode_Email_Service constructor. + * + * @since 5.2.0 + * + * @param WP_Recovery_Mode_Link_Service $link_service + */ + public function __construct(\WP_Recovery_Mode_Link_Service $link_service) + { + } + /** + * Sends the recovery mode email if the rate limit has not been sent. + * + * @since 5.2.0 + * + * @param int $rate_limit Number of seconds before another email can be sent. + * @param array $error Error details from `error_get_last()`. + * @param array $extension { + * The extension that caused the error. + * + * @type string $slug The extension slug. The plugin or theme's directory. + * @type string $type The extension type. Either 'plugin' or 'theme'. + * } + * @return true|WP_Error True if email sent, WP_Error otherwise. + * @phpstan-param array{ + * slug?: string, + * type?: string, + * } $extension + */ + public function maybe_send_recovery_mode_email($rate_limit, $error, $extension) + { + } + /** + * Clears the rate limit, allowing a new recovery mode email to be sent immediately. + * + * @since 5.2.0 + * + * @return bool True on success, false on failure. + */ + public function clear_rate_limit() + { + } + } + /** + * Core class used to generate and validate keys used to enter Recovery Mode. + * + * @since 5.2.0 + */ + #[\AllowDynamicProperties] + final class WP_Recovery_Mode_Key_Service + { + /** + * Creates a recovery mode token. + * + * @since 5.2.0 + * + * @return string A random string to identify its associated key in storage. + */ + public function generate_recovery_mode_token() + { + } + /** + * Creates a recovery mode key. + * + * @since 5.2.0 + * @since 6.8.0 The stored key is now hashed using wp_fast_hash() instead of phpass. + * + * @param string $token A token generated by {@see generate_recovery_mode_token()}. + * @return string Recovery mode key. + */ + public function generate_and_store_recovery_mode_key($token) + { + } + /** + * Verifies if the recovery mode key is correct. + * + * Recovery mode keys can only be used once; the key will be consumed in the process. + * + * @since 5.2.0 + * + * @param string $token The token used when generating the given key. + * @param string $key The plain text key. + * @param int $ttl Time in seconds for the key to be valid for. + * @return true|WP_Error True on success, error object on failure. + */ + public function validate_recovery_mode_key($token, $key, $ttl) + { + } + /** + * Removes expired recovery mode keys. + * + * @since 5.2.0 + * + * @param int $ttl Time in seconds for the keys to be valid for. + */ + public function clean_expired_keys($ttl) + { + } + } + /** + * Core class used to generate and handle recovery mode links. + * + * @since 5.2.0 + */ + #[\AllowDynamicProperties] + class WP_Recovery_Mode_Link_Service + { + const LOGIN_ACTION_ENTER = 'enter_recovery_mode'; + const LOGIN_ACTION_ENTERED = 'entered_recovery_mode'; + /** + * WP_Recovery_Mode_Link_Service constructor. + * + * @since 5.2.0 + * + * @param WP_Recovery_Mode_Cookie_Service $cookie_service Service to handle setting the recovery mode cookie. + * @param WP_Recovery_Mode_Key_Service $key_service Service to handle generating recovery mode keys. + */ + public function __construct(\WP_Recovery_Mode_Cookie_Service $cookie_service, \WP_Recovery_Mode_Key_Service $key_service) + { + } + /** + * Generates a URL to begin recovery mode. + * + * Only one recovery mode URL can may be valid at the same time. + * + * @since 5.2.0 + * + * @return string Generated URL. + */ + public function generate_url() + { + } + /** + * Enters recovery mode when the user hits wp-login.php with a valid recovery mode link. + * + * @since 5.2.0 + * + * @global string $pagenow The filename of the current screen. + * + * @param int $ttl Number of seconds the link should be valid for. + * @phpstan-return void + */ + public function handle_begin_link($ttl) + { + } + } + /** + * Core class used to implement Recovery Mode. + * + * @since 5.2.0 + */ + #[\AllowDynamicProperties] + class WP_Recovery_Mode + { + const EXIT_ACTION = 'exit_recovery_mode'; + /** + * WP_Recovery_Mode constructor. + * + * @since 5.2.0 + */ + public function __construct() + { + } + /** + * Initialize recovery mode for the current request. + * + * @since 5.2.0 + * @phpstan-return void + */ + public function initialize() + { + } + /** + * Checks whether recovery mode is active. + * + * This will not change after recovery mode has been initialized. {@see WP_Recovery_Mode::run()}. + * + * @since 5.2.0 + * + * @return bool True if recovery mode is active, false otherwise. + */ + public function is_active() + { + } + /** + * Gets the recovery mode session ID. + * + * @since 5.2.0 + * + * @return string The session ID if recovery mode is active, empty string otherwise. + */ + public function get_session_id() + { + } + /** + * Checks whether recovery mode has been initialized. + * + * Recovery mode should not be used until this point. Initialization happens immediately before loading plugins. + * + * @since 5.2.0 + * + * @return bool + */ + public function is_initialized() + { + } + /** + * Handles a fatal error occurring. + * + * The calling API should immediately die() after calling this function. + * + * @since 5.2.0 + * + * @param array $error Error details from `error_get_last()`. + * @return true|WP_Error|void True if the error was handled and headers have already been sent. + * Or the request will exit to try and catch multiple errors at once. + * WP_Error if an error occurred preventing it from being handled. + */ + public function handle_error(array $error) + { + } + /** + * Ends the current recovery mode session. + * + * @since 5.2.0 + * + * @return bool True on success, false on failure. + */ + public function exit_recovery_mode() + { + } + /** + * Handles a request to exit Recovery Mode. + * + * @since 5.2.0 + * @phpstan-return void + */ + public function handle_exit_recovery_mode() + { + } + /** + * Cleans any recovery mode keys that have expired according to the link TTL. + * + * Executes on a daily cron schedule. + * + * @since 5.2.0 + */ + public function clean_expired_keys() + { + } + /** + * Handles checking for the recovery mode cookie and validating it. + * + * @since 5.2.0 + */ + protected function handle_cookie() + { + } + /** + * Gets the rate limit between sending new recovery mode email links. + * + * @since 5.2.0 + * + * @return int Rate limit in seconds. + */ + protected function get_email_rate_limit() + { + } + /** + * Gets the number of seconds the recovery mode link is valid for. + * + * @since 5.2.0 + * + * @return int Interval in seconds. + */ + protected function get_link_ttl() + { + } + /** + * Gets the extension that the error occurred in. + * + * @since 5.2.0 + * + * @global string[] $wp_theme_directories + * + * @param array $error Error details from `error_get_last()`. + * @return array|false { + * Extension details. + * + * @type string $slug The extension slug. This is the plugin or theme's directory. + * @type string $type The extension type. Either 'plugin' or 'theme'. + * } + * @phpstan-return false|array{ + * slug: string, + * type: string, + * } + */ + protected function get_extension_for_error($error) + { + } + /** + * Checks whether the given extension a network activated plugin. + * + * @since 5.2.0 + * + * @param array $extension Extension data. + * @return bool True if network plugin, false otherwise. + */ + protected function is_network_plugin($extension) + { + } + /** + * Stores the given error so that the extension causing it is paused. + * + * @since 5.2.0 + * + * @param array $error Error details from `error_get_last()`. + * @return bool True if the error was stored successfully, false otherwise. + */ + protected function store_error($error) + { + } + /** + * Redirects the current request to allow recovering multiple errors in one go. + * + * The redirection will only happen when on a protected endpoint. + * + * It must be ensured that this method is only called when an error actually occurred and will not occur on the + * next request again. Otherwise it will create a redirect loop. + * + * @since 5.2.0 + * @phpstan-return never + */ + protected function redirect_protected() + { + } + } + /** + * Core class used to implement a rewrite component API. + * + * The WordPress Rewrite class writes the rewrite module rules to the .htaccess + * file. It also handles parsing the request to get the correct setup for the + * WordPress Query class. + * + * The Rewrite along with WP class function as a front controller for WordPress. + * You can add rules to trigger your page view and processing using this + * component. The full functionality of a front controller does not exist, + * meaning you can't define how the template files load based on the rewrite + * rules. + * + * @since 1.5.0 + */ + #[\AllowDynamicProperties] + class WP_Rewrite + { + /** + * Permalink structure for posts. + * + * @since 1.5.0 + * @var string + */ + public $permalink_structure; + /** + * Whether to add trailing slashes. + * + * @since 2.2.0 + * @var bool + */ + public $use_trailing_slashes; + /** + * Base for the author permalink structure (example.com/$author_base/authorname). + * + * @since 1.5.0 + * @var string + */ + public $author_base = 'author'; + /** + * Permalink structure for author archives. + * + * @since 1.5.0 + * @var string + */ + public $author_structure; + /** + * Permalink structure for date archives. + * + * @since 1.5.0 + * @var string + */ + public $date_structure; + /** + * Permalink structure for pages. + * + * @since 1.5.0 + * @var string + */ + public $page_structure; + /** + * Base of the search permalink structure (example.com/$search_base/query). + * + * @since 1.5.0 + * @var string + */ + public $search_base = 'search'; + /** + * Permalink structure for searches. + * + * @since 1.5.0 + * @var string + */ + public $search_structure; + /** + * Comments permalink base. + * + * @since 1.5.0 + * @var string + */ + public $comments_base = 'comments'; + /** + * Pagination permalink base. + * + * @since 3.1.0 + * @var string + */ + public $pagination_base = 'page'; + /** + * Comments pagination permalink base. + * + * @since 4.2.0 + * @var string + */ + public $comments_pagination_base = 'comment-page'; + /** + * Feed permalink base. + * + * @since 1.5.0 + * @var string + */ + public $feed_base = 'feed'; + /** + * Comments feed permalink structure. + * + * @since 1.5.0 + * @var string + */ + public $comment_feed_structure; + /** + * Feed request permalink structure. + * + * @since 1.5.0 + * @var string + */ + public $feed_structure; + /** + * The static portion of the post permalink structure. + * + * If the permalink structure is "/archive/%post_id%" then the front + * is "/archive/". If the permalink structure is "/%year%/%postname%/" + * then the front is "/". + * + * @since 1.5.0 + * @var string + * + * @see WP_Rewrite::init() + */ + public $front; + /** + * The prefix for all permalink structures. + * + * If PATHINFO/index permalinks are in use then the root is the value of + * `WP_Rewrite::$index` with a trailing slash appended. Otherwise the root + * will be empty. + * + * @since 1.5.0 + * @var string + * + * @see WP_Rewrite::init() + * @see WP_Rewrite::using_index_permalinks() + */ + public $root = ''; + /** + * The name of the index file which is the entry point to all requests. + * + * @since 1.5.0 + * @var string + */ + public $index = 'index.php'; + /** + * Variable name to use for regex matches in the rewritten query. + * + * @since 1.5.0 + * @var string + */ + public $matches = ''; + /** + * Rewrite rules to match against the request to find the redirect or query. + * + * @since 1.5.0 + * @var string[] + */ + public $rules; + /** + * Additional rules added external to the rewrite class. + * + * Those not generated by the class, see add_rewrite_rule(). + * + * @since 2.1.0 + * @var string[] + */ + public $extra_rules = array(); + /** + * Additional rules that belong at the beginning to match first. + * + * Those not generated by the class, see add_rewrite_rule(). + * + * @since 2.3.0 + * @var string[] + */ + public $extra_rules_top = array(); + /** + * Rules that don't redirect to WordPress' index.php. + * + * These rules are written to the mod_rewrite portion of the .htaccess, + * and are added by add_external_rule(). + * + * @since 2.1.0 + * @var string[] + */ + public $non_wp_rules = array(); + /** + * Extra permalink structures, e.g. categories, added by add_permastruct(). + * + * @since 2.1.0 + * @var array[] + */ + public $extra_permastructs = array(); + /** + * Endpoints (like /trackback/) added by add_rewrite_endpoint(). + * + * @since 2.1.0 + * @var array[] + */ + public $endpoints; + /** + * Whether to write every mod_rewrite rule for WordPress into the .htaccess file. + * + * This is off by default, turning it on might print a lot of rewrite rules + * to the .htaccess file. + * + * @since 2.0.0 + * @var bool + * + * @see WP_Rewrite::mod_rewrite_rules() + */ + public $use_verbose_rules = \false; + /** + * Could post permalinks be confused with those of pages? + * + * If the first rewrite tag in the post permalink structure is one that could + * also match a page name (e.g. %postname% or %author%) then this flag is + * set to true. Prior to WordPress 3.3 this flag indicated that every page + * would have a set of rules added to the top of the rewrite rules array. + * Now it tells WP::parse_request() to check if a URL matching the page + * permastruct is actually a page before accepting it. + * + * @since 2.5.0 + * @var bool + * + * @see WP_Rewrite::init() + */ + public $use_verbose_page_rules = \true; + /** + * Rewrite tags that can be used in permalink structures. + * + * These are translated into the regular expressions stored in + * `WP_Rewrite::$rewritereplace` and are rewritten to the query + * variables listed in WP_Rewrite::$queryreplace. + * + * Additional tags can be added with add_rewrite_tag(). + * + * @since 1.5.0 + * @var string[] + */ + public $rewritecode = array('%year%', '%monthnum%', '%day%', '%hour%', '%minute%', '%second%', '%postname%', '%post_id%', '%author%', '%pagename%', '%search%'); + /** + * Regular expressions to be substituted into rewrite rules in place + * of rewrite tags, see WP_Rewrite::$rewritecode. + * + * @since 1.5.0 + * @var string[] + */ + public $rewritereplace = array('([0-9]{4})', '([0-9]{1,2})', '([0-9]{1,2})', '([0-9]{1,2})', '([0-9]{1,2})', '([0-9]{1,2})', '([^/]+)', '([0-9]+)', '([^/]+)', '([^/]+?)', '(.+)'); + /** + * Query variables that rewrite tags map to, see WP_Rewrite::$rewritecode. + * + * @since 1.5.0 + * @var string[] + */ + public $queryreplace = array('year=', 'monthnum=', 'day=', 'hour=', 'minute=', 'second=', 'name=', 'p=', 'author_name=', 'pagename=', 's='); + /** + * Supported default feeds. + * + * @since 1.5.0 + * @var string[] + */ + public $feeds = array('feed', 'rdf', 'rss', 'rss2', 'atom'); + /** + * Determines whether permalinks are being used. + * + * This can be either rewrite module or permalink in the HTTP query string. + * + * @since 1.5.0 + * + * @return bool True, if permalinks are enabled. + */ + public function using_permalinks() + { + } + /** + * Determines whether permalinks are being used and rewrite module is not enabled. + * + * Means that permalink links are enabled and index.php is in the URL. + * + * @since 1.5.0 + * + * @return bool Whether permalink links are enabled and index.php is in the URL. + */ + public function using_index_permalinks() + { + } + /** + * Determines whether permalinks are being used and rewrite module is enabled. + * + * Using permalinks and index.php is not in the URL. + * + * @since 1.5.0 + * + * @return bool Whether permalink links are enabled and index.php is NOT in the URL. + */ + public function using_mod_rewrite_permalinks() + { + } + /** + * Indexes for matches for usage in preg_*() functions. + * + * The format of the string is, with empty matches property value, '$NUM'. + * The 'NUM' will be replaced with the value in the $number parameter. With + * the matches property not empty, the value of the returned string will + * contain that value of the matches property. The format then will be + * '$MATCHES[NUM]', with MATCHES as the value in the property and NUM the + * value of the $number parameter. + * + * @since 1.5.0 + * + * @param int $number Index number. + * @return string + */ + public function preg_index($number) + { + } + /** + * Retrieves all pages and attachments for pages URIs. + * + * The attachments are for those that have pages as parents and will be + * retrieved. + * + * @since 2.5.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @return array Array of page URIs as first element and attachment URIs as second element. + */ + public function page_uri_index() + { + } + /** + * Retrieves all of the rewrite rules for pages. + * + * @since 1.5.0 + * + * @return string[] Page rewrite rules. + */ + public function page_rewrite_rules() + { + } + /** + * Retrieves date permalink structure, with year, month, and day. + * + * The permalink structure for the date, if not set already depends on the + * permalink structure. It can be one of three formats. The first is year, + * month, day; the second is day, month, year; and the last format is month, + * day, year. These are matched against the permalink structure for which + * one is used. If none matches, then the default will be used, which is + * year, month, day. + * + * Prevents post ID and date permalinks from overlapping. In the case of + * post_id, the date permalink will be prepended with front permalink with + * 'date/' before the actual permalink to form the complete date permalink + * structure. + * + * @since 1.5.0 + * + * @return string|false Date permalink structure on success, false on failure. + */ + public function get_date_permastruct() + { + } + /** + * Retrieves the year permalink structure without month and day. + * + * Gets the date permalink structure and strips out the month and day + * permalink structures. + * + * @since 1.5.0 + * + * @return string|false Year permalink structure on success, false on failure. + */ + public function get_year_permastruct() + { + } + /** + * Retrieves the month permalink structure without day and with year. + * + * Gets the date permalink structure and strips out the day permalink + * structures. Keeps the year permalink structure. + * + * @since 1.5.0 + * + * @return string|false Year/Month permalink structure on success, false on failure. + */ + public function get_month_permastruct() + { + } + /** + * Retrieves the day permalink structure with month and year. + * + * Keeps date permalink structure with all year, month, and day. + * + * @since 1.5.0 + * + * @return string|false Year/Month/Day permalink structure on success, false on failure. + */ + public function get_day_permastruct() + { + } + /** + * Retrieves the permalink structure for categories. + * + * If the category_base property has no value, then the category structure + * will have the front property value, followed by 'category', and finally + * '%category%'. If it does, then the root property will be used, along with + * the category_base property value. + * + * @since 1.5.0 + * + * @return string|false Category permalink structure on success, false on failure. + */ + public function get_category_permastruct() + { + } + /** + * Retrieves the permalink structure for tags. + * + * If the tag_base property has no value, then the tag structure will have + * the front property value, followed by 'tag', and finally '%tag%'. If it + * does, then the root property will be used, along with the tag_base + * property value. + * + * @since 2.3.0 + * + * @return string|false Tag permalink structure on success, false on failure. + */ + public function get_tag_permastruct() + { + } + /** + * Retrieves an extra permalink structure by name. + * + * @since 2.5.0 + * + * @param string $name Permalink structure name. + * @return string|false Permalink structure string on success, false on failure. + */ + public function get_extra_permastruct($name) + { + } + /** + * Retrieves the author permalink structure. + * + * The permalink structure is front property, author base, and finally + * '/%author%'. Will set the author_structure property and then return it + * without attempting to set the value again. + * + * @since 1.5.0 + * + * @return string|false Author permalink structure on success, false on failure. + */ + public function get_author_permastruct() + { + } + /** + * Retrieves the search permalink structure. + * + * The permalink structure is root property, search base, and finally + * '/%search%'. Will set the search_structure property and then return it + * without attempting to set the value again. + * + * @since 1.5.0 + * + * @return string|false Search permalink structure on success, false on failure. + */ + public function get_search_permastruct() + { + } + /** + * Retrieves the page permalink structure. + * + * The permalink structure is root property, and '%pagename%'. Will set the + * page_structure property and then return it without attempting to set the + * value again. + * + * @since 1.5.0 + * + * @return string|false Page permalink structure on success, false on failure. + */ + public function get_page_permastruct() + { + } + /** + * Retrieves the feed permalink structure. + * + * The permalink structure is root property, feed base, and finally + * '/%feed%'. Will set the feed_structure property and then return it + * without attempting to set the value again. + * + * @since 1.5.0 + * + * @return string|false Feed permalink structure on success, false on failure. + */ + public function get_feed_permastruct() + { + } + /** + * Retrieves the comment feed permalink structure. + * + * The permalink structure is root property, comment base property, feed + * base and finally '/%feed%'. Will set the comment_feed_structure property + * and then return it without attempting to set the value again. + * + * @since 1.5.0 + * + * @return string|false Comment feed permalink structure on success, false on failure. + */ + public function get_comment_feed_permastruct() + { + } + /** + * Adds or updates existing rewrite tags (e.g. %postname%). + * + * If the tag already exists, replace the existing pattern and query for + * that tag, otherwise add the new tag. + * + * @since 1.5.0 + * + * @see WP_Rewrite::$rewritecode + * @see WP_Rewrite::$rewritereplace + * @see WP_Rewrite::$queryreplace + * + * @param string $tag Name of the rewrite tag to add or update. + * @param string $regex Regular expression to substitute the tag for in rewrite rules. + * @param string $query String to append to the rewritten query. Must end in '='. + */ + public function add_rewrite_tag($tag, $regex, $query) + { + } + /** + * Removes an existing rewrite tag. + * + * @since 4.5.0 + * + * @see WP_Rewrite::$rewritecode + * @see WP_Rewrite::$rewritereplace + * @see WP_Rewrite::$queryreplace + * + * @param string $tag Name of the rewrite tag to remove. + */ + public function remove_rewrite_tag($tag) + { + } + /** + * Generates rewrite rules from a permalink structure. + * + * The main WP_Rewrite function for building the rewrite rule list. The + * contents of the function is a mix of black magic and regular expressions, + * so best just ignore the contents and move to the parameters. + * + * @since 1.5.0 + * + * @param string $permalink_structure The permalink structure. + * @param int $ep_mask Optional. Endpoint mask defining what endpoints are added to the structure. + * Accepts a mask of: + * - `EP_ALL` + * - `EP_NONE` + * - `EP_ALL_ARCHIVES` + * - `EP_ATTACHMENT` + * - `EP_AUTHORS` + * - `EP_CATEGORIES` + * - `EP_COMMENTS` + * - `EP_DATE` + * - `EP_DAY` + * - `EP_MONTH` + * - `EP_PAGES` + * - `EP_PERMALINK` + * - `EP_ROOT` + * - `EP_SEARCH` + * - `EP_TAGS` + * - `EP_YEAR` + * Default `EP_NONE`. + * @param bool $paged Optional. Whether archive pagination rules should be added for the structure. + * Default true. + * @param bool $feed Optional. Whether feed rewrite rules should be added for the structure. + * Default true. + * @param bool $forcomments Optional. Whether the feed rules should be a query for a comments feed. + * Default false. + * @param bool $walk_dirs Optional. Whether the 'directories' making up the structure should be walked + * over and rewrite rules built for each in-turn. Default true. + * @param bool $endpoints Optional. Whether endpoints should be applied to the generated rewrite rules. + * Default true. + * @return string[] Array of rewrite rules keyed by their regex pattern. + */ + public function generate_rewrite_rules($permalink_structure, $ep_mask = \EP_NONE, $paged = \true, $feed = \true, $forcomments = \false, $walk_dirs = \true, $endpoints = \true) + { + } + /** + * Generates rewrite rules with permalink structure and walking directory only. + * + * Shorten version of WP_Rewrite::generate_rewrite_rules() that allows for shorter + * list of parameters. See the method for longer description of what generating + * rewrite rules does. + * + * @since 1.5.0 + * + * @see WP_Rewrite::generate_rewrite_rules() See for long description and rest of parameters. + * + * @param string $permalink_structure The permalink structure to generate rules. + * @param bool $walk_dirs Optional. Whether to create list of directories to walk over. + * Default false. + * @return array An array of rewrite rules keyed by their regex pattern. + */ + public function generate_rewrite_rule($permalink_structure, $walk_dirs = \false) + { + } + /** + * Constructs rewrite matches and queries from permalink structure. + * + * Runs the action {@see 'generate_rewrite_rules'} with the parameter that is an + * reference to the current WP_Rewrite instance to further manipulate the + * permalink structures and rewrite rules. Runs the {@see 'rewrite_rules_array'} + * filter on the full rewrite rule array. + * + * There are two ways to manipulate the rewrite rules, one by hooking into + * the {@see 'generate_rewrite_rules'} action and gaining full control of the + * object or just manipulating the rewrite rule array before it is passed + * from the function. + * + * @since 1.5.0 + * + * @return string[] An associative array of matches and queries. + */ + public function rewrite_rules() + { + } + /** + * Retrieves the rewrite rules. + * + * The difference between this method and WP_Rewrite::rewrite_rules() is that + * this method stores the rewrite rules in the 'rewrite_rules' option and retrieves + * it. This prevents having to process all of the permalinks to get the rewrite rules + * in the form of caching. + * + * @since 1.5.0 + * + * @return string[] Array of rewrite rules keyed by their regex pattern. + */ + public function wp_rewrite_rules() + { + } + /** + * Retrieves mod_rewrite-formatted rewrite rules to write to .htaccess. + * + * Does not actually write to the .htaccess file, but creates the rules for + * the process that will. + * + * Will add the non_wp_rules property rules to the .htaccess file before + * the WordPress rewrite rules one. + * + * @since 1.5.0 + * + * @return string + */ + public function mod_rewrite_rules() + { + } + /** + * Retrieves IIS7 URL Rewrite formatted rewrite rules to write to web.config file. + * + * Does not actually write to the web.config file, but creates the rules for + * the process that will. + * + * @since 2.8.0 + * + * @param bool $add_parent_tags Optional. Whether to add parent tags to the rewrite rule sets. + * Default false. + * @return string IIS7 URL rewrite rule sets. + */ + public function iis7_url_rewrite_rules($add_parent_tags = \false) + { + } + /** + * Adds a rewrite rule that transforms a URL structure to a set of query vars. + * + * Any value in the $after parameter that isn't 'bottom' will result in the rule + * being placed at the top of the rewrite rules. + * + * @since 2.1.0 + * @since 4.4.0 Array support was added to the `$query` parameter. + * + * @param string $regex Regular expression to match request against. + * @param string|array $query The corresponding query vars for this rewrite rule. + * @param string $after Optional. Priority of the new rule. Accepts 'top' + * or 'bottom'. Default 'bottom'. + * @phpstan-param 'top'|'bottom' $after + */ + public function add_rule($regex, $query, $after = 'bottom') + { + } + /** + * Adds a rewrite rule that doesn't correspond to index.php. + * + * @since 2.1.0 + * + * @param string $regex Regular expression to match request against. + * @param string $query The corresponding query vars for this rewrite rule. + */ + public function add_external_rule($regex, $query) + { + } + /** + * Adds an endpoint, like /trackback/. + * + * @since 2.1.0 + * @since 3.9.0 $query_var parameter added. + * @since 4.3.0 Added support for skipping query var registration by passing `false` to `$query_var`. + * + * @see add_rewrite_endpoint() for full documentation. + * @global WP $wp Current WordPress environment instance. + * + * @param string $name Name of the endpoint. + * @param int $places Endpoint mask describing the places the endpoint should be added. + * Accepts a mask of: + * - `EP_ALL` + * - `EP_NONE` + * - `EP_ALL_ARCHIVES` + * - `EP_ATTACHMENT` + * - `EP_AUTHORS` + * - `EP_CATEGORIES` + * - `EP_COMMENTS` + * - `EP_DATE` + * - `EP_DAY` + * - `EP_MONTH` + * - `EP_PAGES` + * - `EP_PERMALINK` + * - `EP_ROOT` + * - `EP_SEARCH` + * - `EP_TAGS` + * - `EP_YEAR` + * @param string|bool $query_var Optional. Name of the corresponding query variable. Pass `false` to + * skip registering a query_var for this endpoint. Defaults to the + * value of `$name`. + */ + public function add_endpoint($name, $places, $query_var = \true) + { + } + /** + * Adds a new permalink structure. + * + * A permalink structure (permastruct) is an abstract definition of a set of rewrite rules; + * it is an easy way of expressing a set of regular expressions that rewrite to a set of + * query strings. The new permastruct is added to the WP_Rewrite::$extra_permastructs array. + * + * When the rewrite rules are built by WP_Rewrite::rewrite_rules(), all of these extra + * permastructs are passed to WP_Rewrite::generate_rewrite_rules() which transforms them + * into the regular expressions that many love to hate. + * + * The `$args` parameter gives you control over how WP_Rewrite::generate_rewrite_rules() + * works on the new permastruct. + * + * @since 2.5.0 + * + * @param string $name Name for permalink structure. + * @param string $struct Permalink structure (e.g. category/%category%) + * @param array $args { + * Optional. Arguments for building rewrite rules based on the permalink structure. + * Default empty array. + * + * @type bool $with_front Whether the structure should be prepended with `WP_Rewrite::$front`. + * Default true. + * @type int $ep_mask The endpoint mask defining which endpoints are added to the structure. + * Accepts a mask of: + * - `EP_ALL` + * - `EP_NONE` + * - `EP_ALL_ARCHIVES` + * - `EP_ATTACHMENT` + * - `EP_AUTHORS` + * - `EP_CATEGORIES` + * - `EP_COMMENTS` + * - `EP_DATE` + * - `EP_DAY` + * - `EP_MONTH` + * - `EP_PAGES` + * - `EP_PERMALINK` + * - `EP_ROOT` + * - `EP_SEARCH` + * - `EP_TAGS` + * - `EP_YEAR` + * Default `EP_NONE`. + * @type bool $paged Whether archive pagination rules should be added for the structure. + * Default true. + * @type bool $feed Whether feed rewrite rules should be added for the structure. Default true. + * @type bool $forcomments Whether the feed rules should be a query for a comments feed. Default false. + * @type bool $walk_dirs Whether the 'directories' making up the structure should be walked over + * and rewrite rules built for each in-turn. Default true. + * @type bool $endpoints Whether endpoints should be applied to the generated rules. Default true. + * } + * @phpstan-param array{ + * with_front?: bool, + * ep_mask?: int, + * paged?: bool, + * feed?: bool, + * forcomments?: bool, + * walk_dirs?: bool, + * endpoints?: bool, + * } $args + */ + public function add_permastruct($name, $struct, $args = array()) + { + } + /** + * Removes a permalink structure. + * + * @since 4.5.0 + * + * @param string $name Name for permalink structure. + */ + public function remove_permastruct($name) + { + } + /** + * Removes rewrite rules and then recreate rewrite rules. + * + * Calls WP_Rewrite::wp_rewrite_rules() after removing the 'rewrite_rules' option. + * If the function named 'save_mod_rewrite_rules' exists, it will be called. + * + * @since 2.0.1 + * + * @param bool $hard Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard). + * @phpstan-return void + */ + public function flush_rules($hard = \true) + { + } + /** + * Sets up the object's properties. + * + * The 'use_verbose_page_rules' object property will be set to true if the + * permalink structure begins with one of the following: '%postname%', '%category%', + * '%tag%', or '%author%'. + * + * @since 1.5.0 + */ + public function init() + { + } + /** + * Sets the main permalink structure for the site. + * + * Will update the 'permalink_structure' option, if there is a difference + * between the current permalink structure and the parameter value. Calls + * WP_Rewrite::init() after the option is updated. + * + * Fires the {@see 'permalink_structure_changed'} action once the init call has + * processed passing the old and new values + * + * @since 1.5.0 + * + * @param string $permalink_structure Permalink structure. + */ + public function set_permalink_structure($permalink_structure) + { + } + /** + * Sets the category base for the category permalink. + * + * Will update the 'category_base' option, if there is a difference between + * the current category base and the parameter value. Calls WP_Rewrite::init() + * after the option is updated. + * + * @since 1.5.0 + * + * @param string $category_base Category permalink structure base. + */ + public function set_category_base($category_base) + { + } + /** + * Sets the tag base for the tag permalink. + * + * Will update the 'tag_base' option, if there is a difference between the + * current tag base and the parameter value. Calls WP_Rewrite::init() after + * the option is updated. + * + * @since 2.3.0 + * + * @param string $tag_base Tag permalink structure base. + */ + public function set_tag_base($tag_base) + { + } + /** + * Constructor - Calls init(), which runs setup. + * + * @since 1.5.0 + */ + public function __construct() + { + } + } + /** + * Core class used to extend the user roles API. + * + * @since 2.0.0 + */ + #[\AllowDynamicProperties] + class WP_Role + { + /** + * Role name. + * + * @since 2.0.0 + * @var string + */ + public $name; + /** + * List of capabilities the role contains. + * + * @since 2.0.0 + * @var bool[] Array of key/value pairs where keys represent a capability name and boolean values + * represent whether the role has that capability. + */ + public $capabilities; + /** + * Constructor - Set up object properties. + * + * The list of capabilities must have the key as the name of the capability + * and the value a boolean of whether it is granted to the role. + * + * @since 2.0.0 + * + * @param string $role Role name. + * @param bool[] $capabilities Array of key/value pairs where keys represent a capability name and boolean values + * represent whether the role has that capability. + */ + public function __construct($role, $capabilities) + { + } + /** + * Assign role a capability. + * + * @since 2.0.0 + * + * @param string $cap Capability name. + * @param bool $grant Whether role has capability privilege. + */ + public function add_cap($cap, $grant = \true) + { + } + /** + * Removes a capability from a role. + * + * @since 2.0.0 + * + * @param string $cap Capability name. + */ + public function remove_cap($cap) + { + } + /** + * Determines whether the role has the given capability. + * + * @since 2.0.0 + * + * @param string $cap Capability name. + * @return bool Whether the role has the given capability. + */ + public function has_cap($cap) + { + } + } + /** + * Core class used to implement a user roles API. + * + * The role option is simple, the structure is organized by role name that store + * the name in value of the 'name' key. The capabilities are stored as an array + * in the value of the 'capability' key. + * + * array ( + * 'rolename' => array ( + * 'name' => 'rolename', + * 'capabilities' => array() + * ) + * ) + * + * @since 2.0.0 + */ + #[\AllowDynamicProperties] + class WP_Roles + { + /** + * List of roles and capabilities. + * + * @since 2.0.0 + * @var array[] + */ + public $roles; + /** + * List of the role objects. + * + * @since 2.0.0 + * @var WP_Role[] + */ + public $role_objects = array(); + /** + * List of role names. + * + * @since 2.0.0 + * @var string[] + */ + public $role_names = array(); + /** + * Option name for storing role list. + * + * @since 2.0.0 + * @var string + */ + public $role_key; + /** + * Whether to use the database for retrieval and storage. + * + * @since 2.1.0 + * @var bool + */ + public $use_db = \true; + /** + * The site ID the roles are initialized for. + * + * @since 4.9.0 + * @var int + */ + protected $site_id = 0; + /** + * Constructor. + * + * @since 2.0.0 + * @since 4.9.0 The `$site_id` argument was added. + * + * @global array $wp_user_roles Used to set the 'roles' property value. + * + * @param int $site_id Site ID to initialize roles for. Default is the current site. + */ + public function __construct($site_id = \null) + { + } + /** + * Makes private/protected methods readable for backward compatibility. + * + * @since 4.0.0 + * + * @param string $name Method to call. + * @param array $arguments Arguments to pass when calling. + * @return mixed|false Return value of the callback, false otherwise. + */ + public function __call($name, $arguments) + { + } + /** + * Sets up the object properties. + * + * The role key is set to the current prefix for the $wpdb object with + * 'user_roles' appended. If the $wp_user_roles global is set, then it will + * be used and the role option will not be updated or used. + * + * @since 2.1.0 + * @deprecated 4.9.0 Use WP_Roles::for_site() + */ + protected function _init() + { + } + /** + * Reinitializes the object. + * + * Recreates the role objects. This is typically called only by switch_to_blog() + * after switching wpdb to a new site ID. + * + * @since 3.5.0 + * @deprecated 4.7.0 Use WP_Roles::for_site() + */ + public function reinit() + { + } + /** + * Adds a role name with capabilities to the list. + * + * Updates the list of roles, if the role doesn't already exist. + * + * The list of capabilities can be passed either as a numerically indexed array of capability names, or an + * associative array of boolean values keyed by the capability name. To explicitly deny the role a capability, set + * the value for that capability to false. + * + * Examples: + * + * // Add a role that can edit posts. + * wp_roles()->add_role( 'custom_role', 'Custom Role', array( + * 'read', + * 'edit_posts', + * ) ); + * + * Or, using an associative array: + * + * // Add a role that can edit posts but explicitly cannot not delete them. + * wp_roles()->add_role( 'custom_role', 'Custom Role', array( + * 'read' => true, + * 'edit_posts' => true, + * 'delete_posts' => false, + * ) ); + * + * @since 2.0.0 + * @since 6.9.0 Support was added for a numerically indexed array of strings for the capabilities array. + * + * @param string $role Role name. + * @param string $display_name Role display name. + * @param array<string,bool>|array<int,string> $capabilities Capabilities to be added to the role. + * Default empty array. + * @return WP_Role|void WP_Role object, if the role is added. + */ + public function add_role($role, $display_name, $capabilities = array()) + { + } + /** + * Removes a role by name. + * + * @since 2.0.0 + * + * @param string $role Role name. + * @phpstan-return void + */ + public function remove_role($role) + { + } + /** + * Adds a capability to role. + * + * @since 2.0.0 + * + * @param string $role Role name. + * @param string $cap Capability name. + * @param bool $grant Optional. Whether role is capable of performing capability. + * Default true. + * @phpstan-return void + */ + public function add_cap($role, $cap, $grant = \true) + { + } + /** + * Removes a capability from role. + * + * @since 2.0.0 + * + * @param string $role Role name. + * @param string $cap Capability name. + * @phpstan-return void + */ + public function remove_cap($role, $cap) + { + } + /** + * Retrieves a role object by name. + * + * @since 2.0.0 + * + * @param string $role Role name. + * @return WP_Role|null WP_Role object if found, null if the role does not exist. + */ + public function get_role($role) + { + } + /** + * Retrieves a list of role names. + * + * @since 2.0.0 + * + * @return string[] List of role names. + */ + public function get_names() + { + } + /** + * Determines whether a role name is currently in the list of available roles. + * + * @since 2.0.0 + * + * @param string $role Role name to look up. + * @return bool + */ + public function is_role($role) + { + } + /** + * Initializes all of the available roles. + * + * @since 4.9.0 + * @phpstan-return void + */ + public function init_roles() + { + } + /** + * Sets the site to operate on. Defaults to the current site. + * + * @since 4.9.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param int $site_id Site ID to initialize roles for. Default is the current site. + * @phpstan-return void + */ + public function for_site($site_id = \null) + { + } + /** + * Gets the ID of the site for which roles are currently initialized. + * + * @since 4.9.0 + * + * @return int Site ID. + */ + public function get_site_id() + { + } + /** + * Gets the available roles data. + * + * @since 4.9.0 + * + * @global array $wp_user_roles Used to set the 'roles' property value. + * + * @return array Roles array. + */ + protected function get_roles_data() + { + } + } + /** + * Core class used to register script modules. + * + * @since 6.5.0 + */ + class WP_Script_Modules + { + /** + * Registers the script module if no script module with that script module + * identifier has already been registered. + * + * @since 6.5.0 + * @since 6.9.0 Added the $args parameter. + * + * @param string $id The identifier of the script module. Should be unique. It will be used in the + * final import map. + * @param string $src Optional. Full URL of the script module, or path of the script module relative + * to the WordPress root directory. If it is provided and the script module has + * not been registered yet, it will be registered. + * @param array $deps { + * Optional. List of dependencies. + * + * @type string|array ...$0 { + * An array of script module identifiers of the dependencies of this script + * module. The dependencies can be strings or arrays. If they are arrays, + * they need an `id` key with the script module identifier, and can contain + * an `import` key with either `static` or `dynamic`. By default, + * dependencies that don't contain an `import` key are considered static. + * + * @type string $id The script module identifier. + * @type string $import Optional. Import type. May be either `static` or + * `dynamic`. Defaults to `static`. + * } + * } + * @param string|false|null $version Optional. String specifying the script module version number. Defaults to false. + * It is added to the URL as a query string for cache busting purposes. If $version + * is set to false, the version number is the currently installed WordPress version. + * If $version is set to null, no version is added. + * @param array $args { + * Optional. An array of additional args. Default empty array. + * + * @type bool $in_footer Whether to print the script module in the footer. Only relevant to block themes. Default 'false'. Optional. + * @type 'auto'|'low'|'high' $fetchpriority Fetch priority. Default 'auto'. Optional. + * } + * @phpstan-param array<int|string, array{ + * id: string, + * import?: string, + * }> $deps + * @phpstan-param array{ + * in_footer?: bool, + * fetchpriority?: 'auto'|'low'|'high', + * } $args + * @phpstan-return void + */ + public function register(string $id, string $src, array $deps = array(), $version = \false, array $args = array()) + { + } + /** + * Gets IDs for queued script modules. + * + * @since 6.9.0 + * + * @return string[] Script module IDs. + */ + public function get_queue(): array + { + } + /** + * Sets the fetch priority for a script module. + * + * @since 6.9.0 + * + * @param string $id Script module identifier. + * @param 'auto'|'low'|'high' $priority Fetch priority for the script module. + * @return bool Whether setting the fetchpriority was successful. + */ + public function set_fetchpriority(string $id, string $priority): bool + { + } + /** + * Sets whether a script module should be printed in the footer. + * + * This is only relevant in block themes. + * + * @since 6.9.0 + * + * @param string $id Script module identifier. + * @param bool $in_footer Whether to print in the footer. + * @return bool Whether setting the printing location was successful. + */ + public function set_in_footer(string $id, bool $in_footer): bool + { + } + /** + * Marks the script module to be enqueued in the page. + * + * If a src is provided and the script module has not been registered yet, it + * will be registered. + * + * @since 6.5.0 + * @since 6.9.0 Added the $args parameter. + * + * @param string $id The identifier of the script module. Should be unique. It will be used in the + * final import map. + * @param string $src Optional. Full URL of the script module, or path of the script module relative + * to the WordPress root directory. If it is provided and the script module has + * not been registered yet, it will be registered. + * @param array $deps { + * Optional. List of dependencies. + * + * @type string|array ...$0 { + * An array of script module identifiers of the dependencies of this script + * module. The dependencies can be strings or arrays. If they are arrays, + * they need an `id` key with the script module identifier, and can contain + * an `import` key with either `static` or `dynamic`. By default, + * dependencies that don't contain an `import` key are considered static. + * + * @type string $id The script module identifier. + * @type string $import Optional. Import type. May be either `static` or + * `dynamic`. Defaults to `static`. + * } + * } + * @param string|false|null $version Optional. String specifying the script module version number. Defaults to false. + * It is added to the URL as a query string for cache busting purposes. If $version + * is set to false, the version number is the currently installed WordPress version. + * If $version is set to null, no version is added. + * @param array $args { + * Optional. An array of additional args. Default empty array. + * + * @type bool $in_footer Whether to print the script module in the footer. Only relevant to block themes. Default 'false'. Optional. + * @type 'auto'|'low'|'high' $fetchpriority Fetch priority. Default 'auto'. Optional. + * } + * @phpstan-param array<int|string, array{ + * id: string, + * import?: string, + * }> $deps + * @phpstan-param array{ + * in_footer?: bool, + * fetchpriority?: 'auto'|'low'|'high', + * } $args + * @phpstan-return void + */ + public function enqueue(string $id, string $src = '', array $deps = array(), $version = \false, array $args = array()) + { + } + /** + * Unmarks the script module so it will no longer be enqueued in the page. + * + * @since 6.5.0 + * + * @param string $id The identifier of the script module. + */ + public function dequeue(string $id) + { + } + /** + * Removes a registered script module. + * + * @since 6.5.0 + * + * @param string $id The identifier of the script module. + */ + public function deregister(string $id) + { + } + /** + * Adds the hooks to print the import map, enqueued script modules and script + * module preloads. + * + * In classic themes, the script modules used by the blocks are not yet known + * when the `wp_head` actions is fired, so it needs to print everything in the + * footer. + * + * @since 6.5.0 + */ + public function add_hooks() + { + } + /** + * Prints the enqueued script modules in head. + * + * This is only used in block themes. + * + * @since 6.9.0 + */ + public function print_head_enqueued_script_modules() + { + } + /** + * Prints the enqueued script modules in footer. + * + * @since 6.5.0 + */ + public function print_enqueued_script_modules() + { + } + /** + * Prints the static dependencies of the enqueued script modules using + * link tags with rel="modulepreload" attributes. + * + * If a script module is marked for enqueue, it will not be preloaded. + * + * @since 6.5.0 + */ + public function print_script_module_preloads() + { + } + /** + * Prints the import map using a script tag with a type="importmap" attribute. + * + * @since 6.5.0 + */ + public function print_import_map() + { + } + /** + * Print data associated with Script Modules. + * + * The data will be embedded in the page HTML and can be read by Script Modules on page load. + * + * @since 6.7.0 + * + * Data can be associated with a Script Module via the + * {@see "script_module_data_{$module_id}"} filter. + * + * The data for a Script Module will be serialized as JSON in a script tag with an ID of the + * form `wp-script-module-data-{$module_id}`. + */ + public function print_script_module_data(): void + { + } + /** + * @access private This is only intended to be called by the registered actions. + * + * @since 6.7.0 + * @phpstan-return void + */ + public function print_a11y_script_module_html() + { + } + } + /** + * Core class used to register scripts. + * + * @since 2.1.0 + * + * @see WP_Dependencies + */ + class WP_Scripts extends \WP_Dependencies + { + /** + * Base URL for scripts. + * + * Full URL with trailing slash. + * + * @since 2.6.0 + * @var string + */ + public $base_url; + /** + * URL of the content directory. + * + * @since 2.8.0 + * @var string + */ + public $content_url; + /** + * Default version string for scripts. + * + * @since 2.6.0 + * @var string + */ + public $default_version; + /** + * Holds handles of scripts which are enqueued in footer. + * + * @since 2.8.0 + * @var array + */ + public $in_footer = array(); + /** + * Holds a list of script handles which will be concatenated. + * + * @since 2.8.0 + * @var string + */ + public $concat = ''; + /** + * Holds a string which contains script handles and their version. + * + * @since 2.8.0 + * @deprecated 3.4.0 + * @var string + */ + public $concat_version = ''; + /** + * Whether to perform concatenation. + * + * @since 2.8.0 + * @var bool + */ + public $do_concat = \false; + /** + * Holds HTML markup of scripts and additional data if concatenation + * is enabled. + * + * @since 2.8.0 + * @var string + */ + public $print_html = ''; + /** + * Holds inline code if concatenation is enabled. + * + * @since 2.8.0 + * @var string + */ + public $print_code = ''; + /** + * Holds a list of script handles which are not in the default directory + * if concatenation is enabled. + * + * Unused in core. + * + * @since 2.8.0 + * @var string + */ + public $ext_handles = ''; + /** + * Holds a string which contains handles and versions of scripts which + * are not in the default directory if concatenation is enabled. + * + * Unused in core. + * + * @since 2.8.0 + * @var string + */ + public $ext_version = ''; + /** + * List of default directories. + * + * @since 2.8.0 + * @var array + */ + public $default_dirs; + /** + * Constructor. + * + * @since 2.6.0 + */ + public function __construct() + { + } + /** + * Initialize the class. + * + * @since 3.4.0 + */ + public function init() + { + } + /** + * Prints scripts. + * + * Prints the scripts passed to it or the print queue. Also prints all necessary dependencies. + * + * @since 2.1.0 + * @since 2.8.0 Added the `$group` parameter. + * + * @param string|string[]|false $handles Optional. Scripts to be printed: queue (false), + * single script (string), or multiple scripts (array of strings). + * Default false. + * @param int|false $group Optional. Group level: level (int), no groups (false). + * Default false. + * @return string[] Handles of scripts that have been printed. + */ + public function print_scripts($handles = \false, $group = \false) + { + } + /** + * Prints extra scripts of a registered script. + * + * @since 2.1.0 + * @since 2.8.0 Added the `$display` parameter. + * @deprecated 3.3.0 + * + * @see print_extra_script() + * + * @param string $handle The script's registered handle. + * @param bool $display Optional. Whether to print the extra script + * instead of just returning it. Default true. + * @return bool|string|void Void if no data exists, extra scripts if `$display` is true, + * true otherwise. + */ + public function print_scripts_l10n($handle, $display = \true) + { + } + /** + * Prints extra scripts of a registered script. + * + * @since 3.3.0 + * + * @param string $handle The script's registered handle. + * @param bool $display Optional. Whether to print the extra script + * instead of just returning it. Default true. + * @return bool|string|void Void if no data exists, extra scripts if `$display` is true, + * true otherwise. + */ + public function print_extra_script($handle, $display = \true) + { + } + /** + * Processes a script dependency. + * + * @since 2.6.0 + * @since 2.8.0 Added the `$group` parameter. + * + * @see WP_Dependencies::do_item() + * + * @param string $handle The script's registered handle. + * @param int|false $group Optional. Group level: level (int), no groups (false). + * Default false. + * @return bool True on success, false on failure. + */ + public function do_item($handle, $group = \false) + { + } + /** + * Adds extra code to a registered script. + * + * @since 4.5.0 + * + * @param string $handle Name of the script to add the inline script to. + * Must be lowercase. + * @param string $data String containing the JavaScript to be added. + * @param string $position Optional. Whether to add the inline script + * before the handle or after. Default 'after'. + * @return bool True on success, false on failure. + */ + public function add_inline_script($handle, $data, $position = 'after') + { + } + /** + * Prints inline scripts registered for a specific handle. + * + * @since 4.5.0 + * @deprecated 6.3.0 Use methods get_inline_script_tag() or get_inline_script_data() instead. + * + * @param string $handle Name of the script to print inline scripts for. + * Must be lowercase. + * @param string $position Optional. Whether to add the inline script + * before the handle or after. Default 'after'. + * @param bool $display Optional. Whether to print the script tag + * instead of just returning the script data. Default true. + * @return string|false Script data on success, false otherwise. + */ + public function print_inline_script($handle, $position = 'after', $display = \true) + { + } + /** + * Gets data for inline scripts registered for a specific handle. + * + * @since 6.3.0 + * + * @param string $handle Name of the script to get data for. + * Must be lowercase. + * @param string $position Optional. Whether to add the inline script + * before the handle or after. Default 'after'. + * @return string Inline script, which may be empty string. + */ + public function get_inline_script_data($handle, $position = 'after') + { + } + /** + * Gets tags for inline scripts registered for a specific handle. + * + * @since 6.3.0 + * + * @param string $handle Name of the script to get associated inline script tag for. + * Must be lowercase. + * @param string $position Optional. Whether to get tag for inline + * scripts in the before or after position. Default 'after'. + * @return string Inline script, which may be empty string. + */ + public function get_inline_script_tag($handle, $position = 'after') + { + } + /** + * Localizes a script, only if the script has already been added. + * + * @since 2.1.0 + * + * @param string $handle Name of the script to attach data to. + * @param string $object_name Name of the variable that will contain the data. + * @param array $l10n Array of data to localize. + * @return bool True on success, false on failure. + */ + public function localize($handle, $object_name, $l10n) + { + } + /** + * Sets handle group. + * + * @since 2.8.0 + * + * @see WP_Dependencies::set_group() + * + * @param string $handle Name of the item. Should be unique. + * @param bool $recursion Internal flag that calling function was called recursively. + * @param int|false $group Optional. Group level: level (int), no groups (false). + * Default false. + * @return bool Not already in the group or a lower group. + */ + public function set_group($handle, $recursion, $group = \false) + { + } + /** + * Sets a translation textdomain. + * + * @since 5.0.0 + * @since 5.1.0 The `$domain` parameter was made optional. + * + * @param string $handle Name of the script to register a translation domain to. + * @param string $domain Optional. Text domain. Default 'default'. + * @param string $path Optional. The full file path to the directory containing translation files. + * @return bool True if the text domain was registered, false if not. + */ + public function set_translations($handle, $domain = 'default', $path = '') + { + } + /** + * Prints translations set for a specific handle. + * + * @since 5.0.0 + * + * @param string $handle Name of the script to add the inline script to. + * Must be lowercase. + * @param bool $display Optional. Whether to print the script + * instead of just returning it. Default true. + * @return string|false Script on success, false otherwise. + */ + public function print_translations($handle, $display = \true) + { + } + /** + * Determines script dependencies. + * + * @since 2.1.0 + * + * @see WP_Dependencies::all_deps() + * + * @param string|string[] $handles Item handle (string) or item handles (array of strings). + * @param bool $recursion Optional. Internal flag that function is calling itself. + * Default false. + * @param int|false $group Optional. Group level: level (int), no groups (false). + * Default false. + * @return bool True on success, false on failure. + */ + public function all_deps($handles, $recursion = \false, $group = \false) + { + } + /** + * Processes items and dependencies for the head group. + * + * @since 2.8.0 + * + * @see WP_Dependencies::do_items() + * + * @return string[] Handles of items that have been processed. + */ + public function do_head_items() + { + } + /** + * Processes items and dependencies for the footer group. + * + * @since 2.8.0 + * + * @see WP_Dependencies::do_items() + * + * @return string[] Handles of items that have been processed. + */ + public function do_footer_items() + { + } + /** + * Whether a handle's source is in a default directory. + * + * @since 2.8.0 + * + * @param string $src The source of the enqueued script. + * @return bool True if found, false if not. + */ + public function in_default_dir($src) + { + } + /** + * This overrides the add_data method from WP_Dependencies, to support normalizing of $args. + * + * @since 6.3.0 + * + * @param string $handle Name of the item. Should be unique. + * @param string $key The data key. + * @param mixed $value The data value. + * @return bool True on success, false on failure. + */ + public function add_data($handle, $key, $value) + { + } + /** + * Resets class properties. + * + * @since 2.8.0 + */ + public function reset() + { + } + /** + * Gets a script-specific dependency warning message. + * + * @since 6.9.1 + * + * @param string $handle Script handle with missing dependencies. + * @param string[] $missing_dependency_handles Missing dependency handles. + * @return string Formatted, localized warning message. + */ + protected function get_dependency_warning_message($handle, $missing_dependency_handles) + { + } + } + /** + * Abstract class for managing user session tokens. + * + * @since 4.0.0 + */ + #[\AllowDynamicProperties] + abstract class WP_Session_Tokens + { + /** + * User ID. + * + * @since 4.0.0 + * @var int User ID. + */ + protected $user_id; + /** + * Protected constructor. Use the `get_instance()` method to get the instance. + * + * @since 4.0.0 + * + * @param int $user_id User whose session to manage. + */ + protected function __construct($user_id) + { + } + /** + * Retrieves a session manager instance for a user. + * + * This method contains a {@see 'session_token_manager'} filter, allowing a plugin to swap out + * the session manager for a subclass of `WP_Session_Tokens`. + * + * @since 4.0.0 + * + * @param int $user_id User whose session to manage. + * @return WP_Session_Tokens The session object, which is by default an instance of + * the `WP_User_Meta_Session_Tokens` class. + */ + final public static function get_instance($user_id) + { + } + /** + * Retrieves a user's session for the given token. + * + * @since 4.0.0 + * + * @param string $token Session token. + * @return array|null The session, or null if it does not exist. + */ + final public function get($token) + { + } + /** + * Validates the given session token for authenticity and validity. + * + * Checks that the given token is present and hasn't expired. + * + * @since 4.0.0 + * + * @param string $token Token to verify. + * @return bool Whether the token is valid for the user. + */ + final public function verify($token) + { + } + /** + * Generates a session token and attaches session information to it. + * + * A session token is a long, random string. It is used in a cookie + * to link that cookie to an expiration time and to ensure the cookie + * becomes invalidated when the user logs out. + * + * This function generates a token and stores it with the associated + * expiration time (and potentially other session information via the + * {@see 'attach_session_information'} filter). + * + * @since 4.0.0 + * + * @param int $expiration Session expiration timestamp. + * @return string Session token. + */ + final public function create($expiration) + { + } + /** + * Updates the data for the session with the given token. + * + * @since 4.0.0 + * + * @param string $token Session token to update. + * @param array $session Session information. + */ + final public function update($token, $session) + { + } + /** + * Destroys the session with the given token. + * + * @since 4.0.0 + * + * @param string $token Session token to destroy. + */ + final public function destroy($token) + { + } + /** + * Destroys all sessions for this user except the one with the given token (presumably the one in use). + * + * @since 4.0.0 + * + * @param string $token_to_keep Session token to keep. + */ + final public function destroy_others($token_to_keep) + { + } + /** + * Determines whether a session is still valid, based on its expiration timestamp. + * + * @since 4.0.0 + * + * @param array $session Session to check. + * @return bool Whether session is valid. + */ + final protected function is_still_valid($session) + { + } + /** + * Destroys all sessions for a user. + * + * @since 4.0.0 + */ + final public function destroy_all() + { + } + /** + * Destroys all sessions for all users. + * + * @since 4.0.0 + */ + final public static function destroy_all_for_all_users() + { + } + /** + * Retrieves all sessions for a user. + * + * @since 4.0.0 + * + * @return array Sessions for a user. + */ + final public function get_all() + { + } + /** + * Retrieves all sessions of the user. + * + * @since 4.0.0 + * + * @return array Sessions of the user. + */ + abstract protected function get_sessions(); + /** + * Retrieves a session based on its verifier (token hash). + * + * @since 4.0.0 + * + * @param string $verifier Verifier for the session to retrieve. + * @return array|null The session, or null if it does not exist. + */ + abstract protected function get_session($verifier); + /** + * Updates a session based on its verifier (token hash). + * + * Omitting the second argument destroys the session. + * + * @since 4.0.0 + * + * @param string $verifier Verifier for the session to update. + * @param array $session Optional. Session. Omitting this argument destroys the session. + */ + abstract protected function update_session($verifier, $session = \null); + /** + * Destroys all sessions for this user, except the single session with the given verifier. + * + * @since 4.0.0 + * + * @param string $verifier Verifier of the session to keep. + */ + abstract protected function destroy_other_sessions($verifier); + /** + * Destroys all sessions for the user. + * + * @since 4.0.0 + */ + abstract protected function destroy_all_sessions(); + /** + * Destroys all sessions for all users. + * + * @since 4.0.0 + */ + public static function drop_sessions() + { + } + } + /** + * Core class for fetching remote files and reading local files with SimplePie. + * + * This uses Core's HTTP API to make requests, which gives plugins the ability + * to hook into the process. + * + * @since 2.8.0 + */ + #[\AllowDynamicProperties] + class WP_SimplePie_File extends \SimplePie\File + { + /** + * Timeout. + * + * @var int How long the connection should stay open in seconds. + */ + public $timeout = 10; + /** + * Constructor. + * + * @since 2.8.0 + * @since 3.2.0 Updated to use a PHP5 constructor. + * @since 5.6.1 Multiple headers are concatenated into a comma-separated string, + * rather than remaining an array. + * + * @param string $url Remote file URL. + * @param int $timeout Optional. How long the connection should stay open in seconds. + * Default 10. + * @param int $redirects Optional. The number of allowed redirects. Default 5. + * @param string|array $headers Optional. Array or string of headers to send with the request. + * Default null. + * @param string $useragent Optional. User-agent value sent. Default null. + * @param bool $force_fsockopen Optional. Whether to force opening internet or unix domain socket + * connection or not. Default false. + */ + public function __construct($url, $timeout = 10, $redirects = 5, $headers = \null, $useragent = \null, $force_fsockopen = \false) + { + } + } + /** + * Core class used to implement SimplePie feed sanitization. + * + * Extends the SimplePie\Sanitize class to use KSES, because + * we cannot universally count on DOMDocument being available. + * + * @since 3.5.0 + */ + #[\AllowDynamicProperties] + class WP_SimplePie_Sanitize_KSES extends \SimplePie\Sanitize + { + /** + * WordPress SimplePie sanitization using KSES. + * + * Sanitizes the incoming data, to ensure that it matches the type of data expected, using KSES. + * + * @since 3.5.0 + * + * @param mixed $data The data that needs to be sanitized. + * @param int $type The type of data that it's supposed to be. + * @param string $base Optional. The `xml:base` value to use when converting relative + * URLs to absolute ones. Default empty. + * @return mixed Sanitized data. + */ + public function sanitize($data, $type, $base = '') + { + } + } + /** + * Core class used for querying sites. + * + * @since 4.6.0 + * + * @see WP_Site_Query::__construct() for accepted arguments. + */ + #[\AllowDynamicProperties] + class WP_Site_Query + { + /** + * SQL for database query. + * + * @since 4.6.0 + * @var string + */ + public $request; + /** + * SQL query clauses. + * + * @since 4.6.0 + * @var array + */ + protected $sql_clauses = array('select' => '', 'from' => '', 'where' => array(), 'groupby' => '', 'orderby' => '', 'limits' => ''); + /** + * Metadata query container. + * + * @since 5.1.0 + * @var WP_Meta_Query + */ + public $meta_query = \false; + /** + * Metadata query clauses. + * + * @since 5.1.0 + * @var array + */ + protected $meta_query_clauses; + /** + * Date query container. + * + * @since 4.6.0 + * @var WP_Date_Query A date query instance. + */ + public $date_query = \false; + /** + * Query vars set by the user. + * + * @since 4.6.0 + * @var array + */ + public $query_vars; + /** + * Default values for query vars. + * + * @since 4.6.0 + * @var array + */ + public $query_var_defaults; + /** + * List of sites located by the query. + * + * @since 4.6.0 + * @var array + */ + public $sites; + /** + * The amount of found sites for the current query. + * + * @since 4.6.0 + * @var int + */ + public $found_sites = 0; + /** + * The number of pages. + * + * @since 4.6.0 + * @var int + */ + public $max_num_pages = 0; + /** + * Sets up the site query, based on the query vars passed. + * + * @since 4.6.0 + * @since 4.8.0 Introduced the 'lang_id', 'lang__in', and 'lang__not_in' parameters. + * @since 5.1.0 Introduced the 'update_site_meta_cache', 'meta_query', 'meta_key', + * 'meta_compare_key', 'meta_value', 'meta_type', and 'meta_compare' parameters. + * @since 5.3.0 Introduced the 'meta_type_key' parameter. + * + * @param string|array $query { + * Optional. Array or query string of site query parameters. Default empty. + * + * @type int[] $site__in Array of site IDs to include. Default empty. + * @type int[] $site__not_in Array of site IDs to exclude. Default empty. + * @type bool $count Whether to return a site count (true) or array of site objects. + * Default false. + * @type array $date_query Date query clauses to limit sites by. See WP_Date_Query. + * Default null. + * @type string $fields Site fields to return. Accepts 'ids' (returns an array of site IDs) + * or empty (returns an array of complete site objects). Default empty. + * @type int $ID A site ID to only return that site. Default empty. + * @type int $number Maximum number of sites to retrieve. Default 100. + * @type int $offset Number of sites to offset the query. Used to build LIMIT clause. + * Default 0. + * @type bool $no_found_rows Whether to disable the `SQL_CALC_FOUND_ROWS` query. Default true. + * @type string|array $orderby Site status or array of statuses. Accepts: + * - 'id' + * - 'domain' + * - 'path' + * - 'network_id' + * - 'last_updated' + * - 'registered' + * - 'domain_length' + * - 'path_length' + * - 'site__in' + * - 'network__in' + * - 'deleted' + * - 'mature' + * - 'spam' + * - 'archived' + * - 'public' + * - false, an empty array, or 'none' to disable `ORDER BY` clause. + * Default 'id'. + * @type string $order How to order retrieved sites. Accepts 'ASC', 'DESC'. Default 'ASC'. + * @type int $network_id Limit results to those affiliated with a given network ID. If 0, + * include all networks. Default 0. + * @type int[] $network__in Array of network IDs to include affiliated sites for. Default empty. + * @type int[] $network__not_in Array of network IDs to exclude affiliated sites for. Default empty. + * @type string $domain Limit results to those affiliated with a given domain. Default empty. + * @type string[] $domain__in Array of domains to include affiliated sites for. Default empty. + * @type string[] $domain__not_in Array of domains to exclude affiliated sites for. Default empty. + * @type string $path Limit results to those affiliated with a given path. Default empty. + * @type string[] $path__in Array of paths to include affiliated sites for. Default empty. + * @type string[] $path__not_in Array of paths to exclude affiliated sites for. Default empty. + * @type int $public Limit results to public sites. Accepts 1 or 0. Default empty. + * @type int $archived Limit results to archived sites. Accepts 1 or 0. Default empty. + * @type int $mature Limit results to mature sites. Accepts 1 or 0. Default empty. + * @type int $spam Limit results to spam sites. Accepts 1 or 0. Default empty. + * @type int $deleted Limit results to deleted sites. Accepts 1 or 0. Default empty. + * @type int $lang_id Limit results to a language ID. Default empty. + * @type string[] $lang__in Array of language IDs to include affiliated sites for. Default empty. + * @type string[] $lang__not_in Array of language IDs to exclude affiliated sites for. Default empty. + * @type string $search Search term(s) to retrieve matching sites for. Default empty. + * @type string[] $search_columns Array of column names to be searched. Accepts 'domain' and 'path'. + * Default empty array. + * @type bool $update_site_cache Whether to prime the cache for found sites. Default true. + * @type bool $update_site_meta_cache Whether to prime the metadata cache for found sites. Default true. + * @type string|string[] $meta_key Meta key or keys to filter by. + * @type string|string[] $meta_value Meta value or values to filter by. + * @type string $meta_compare MySQL operator used for comparing the meta value. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type string $meta_compare_key MySQL operator used for comparing the meta key. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type string $meta_type MySQL data type that the meta_value column will be CAST to for comparisons. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type string $meta_type_key MySQL data type that the meta_key column will be CAST to for comparisons. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type array $meta_query An associative array of WP_Meta_Query arguments. + * See WP_Meta_Query::__construct() for accepted values. + * } + * @phpstan-param array{ + * site__in?: int[], + * site__not_in?: int[], + * count?: bool, + * date_query?: array, + * fields?: string, + * ID?: int, + * number?: int, + * offset?: int, + * no_found_rows?: bool, + * orderby?: string|array, + * order?: string, + * network_id?: int, + * network__in?: int[], + * network__not_in?: int[], + * domain?: string, + * domain__in?: string[], + * domain__not_in?: string[], + * path?: string, + * path__in?: string[], + * path__not_in?: string[], + * public?: int, + * archived?: int, + * mature?: int, + * spam?: int, + * deleted?: int, + * lang_id?: int, + * lang__in?: string[], + * lang__not_in?: string[], + * search?: string, + * search_columns?: string[], + * update_site_cache?: bool, + * update_site_meta_cache?: bool, + * meta_key?: string|string[], + * meta_value?: string|string[], + * meta_compare?: string, + * meta_compare_key?: string, + * meta_type?: string, + * meta_type_key?: string, + * meta_query?: array, + * } $query + */ + public function __construct($query = '') + { + } + /** + * Parses arguments passed to the site query with default query parameters. + * + * @since 4.6.0 + * + * @see WP_Site_Query::__construct() + * + * @param string|array $query Array or string of WP_Site_Query arguments. See WP_Site_Query::__construct(). + * @phpstan-param array{ + * site__in?: int[], + * site__not_in?: int[], + * count?: bool, + * date_query?: array, + * fields?: string, + * ID?: int, + * number?: int, + * offset?: int, + * no_found_rows?: bool, + * orderby?: string|array, + * order?: string, + * network_id?: int, + * network__in?: int[], + * network__not_in?: int[], + * domain?: string, + * domain__in?: string[], + * domain__not_in?: string[], + * path?: string, + * path__in?: string[], + * path__not_in?: string[], + * public?: int, + * archived?: int, + * mature?: int, + * spam?: int, + * deleted?: int, + * lang_id?: int, + * lang__in?: string[], + * lang__not_in?: string[], + * search?: string, + * search_columns?: string[], + * update_site_cache?: bool, + * update_site_meta_cache?: bool, + * meta_key?: string|string[], + * meta_value?: string|string[], + * meta_compare?: string, + * meta_compare_key?: string, + * meta_type?: string, + * meta_type_key?: string, + * meta_query?: array, + * } $query See WP_Site_Query::__construct() + */ + public function parse_query($query = '') + { + } + /** + * Sets up the WordPress query for retrieving sites. + * + * @since 4.6.0 + * + * @param string|array $query Array or URL query string of parameters. + * @return WP_Site[]|int[]|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids', + * or the number of sites when 'count' is passed as a query var. + */ + public function query($query) + { + } + /** + * Retrieves a list of sites matching the query vars. + * + * @since 4.6.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @return WP_Site[]|int[]|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids', + * or the number of sites when 'count' is passed as a query var. + */ + public function get_sites() + { + } + /** + * Used internally to get a list of site IDs matching the query vars. + * + * @since 4.6.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @return int|array A single count of site IDs if a count query. An array of site IDs if a full query. + */ + protected function get_site_ids() + { + } + /** + * Used internally to generate an SQL string for searching across multiple columns. + * + * @since 4.6.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $search Search string. + * @param string[] $columns Array of columns to search. + * @return string Search SQL. + */ + protected function get_search_sql($search, $columns) + { + } + /** + * Parses and sanitizes 'orderby' keys passed to the site query. + * + * @since 4.6.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $orderby Alias for the field to order by. + * @return string|false Value to used in the ORDER clause. False otherwise. + */ + protected function parse_orderby($orderby) + { + } + /** + * Parses an 'order' query variable and cast it to 'ASC' or 'DESC' as necessary. + * + * @since 4.6.0 + * + * @param string $order The 'order' query variable. + * @return string The sanitized 'order' query variable. + */ + protected function parse_order($order) + { + } + } + /** + * Core class used for interacting with a multisite site. + * + * This class is used during load to populate the `$current_blog` global and + * setup the current site. + * + * @since 4.5.0 + * + * @property int $id + * @property int $network_id + * @property string $blogname + * @property string $siteurl + * @property int $post_count + * @property string $home + */ + #[\AllowDynamicProperties] + final class WP_Site + { + /** + * Site ID. + * + * Named "blog" vs. "site" for legacy reasons. + * + * A numeric string, for compatibility reasons. + * + * @since 4.5.0 + * @var string + */ + public $blog_id; + /** + * Domain of the site. + * + * @since 4.5.0 + * @var string + */ + public $domain = ''; + /** + * Path of the site. + * + * @since 4.5.0 + * @var string + */ + public $path = ''; + /** + * The ID of the site's parent network. + * + * Named "site" vs. "network" for legacy reasons. An individual site's "site" is + * its network. + * + * A numeric string, for compatibility reasons. + * + * @since 4.5.0 + * @var string + */ + public $site_id = '0'; + /** + * The date and time on which the site was created or registered. + * + * @since 4.5.0 + * @var string Date in MySQL's datetime format. + */ + public $registered = '0000-00-00 00:00:00'; + /** + * The date and time on which site settings were last updated. + * + * @since 4.5.0 + * @var string Date in MySQL's datetime format. + */ + public $last_updated = '0000-00-00 00:00:00'; + /** + * Whether the site should be treated as public. + * + * A numeric string, for compatibility reasons. + * + * @since 4.5.0 + * @var string + */ + public $public = '1'; + /** + * Whether the site should be treated as archived. + * + * A numeric string, for compatibility reasons. + * + * @since 4.5.0 + * @var string + */ + public $archived = '0'; + /** + * Whether the site should be treated as mature. + * + * Handling for this does not exist throughout WordPress core, but custom + * implementations exist that require the property to be present. + * + * A numeric string, for compatibility reasons. + * + * @since 4.5.0 + * @var string + */ + public $mature = '0'; + /** + * Whether the site should be treated as spam. + * + * A numeric string, for compatibility reasons. + * + * @since 4.5.0 + * @var string + */ + public $spam = '0'; + /** + * Whether the site should be treated as flagged for deletion. + * + * A numeric string, for compatibility reasons. + * + * @since 4.5.0 + * @var string + */ + public $deleted = '0'; + /** + * The language pack associated with this site. + * + * A numeric string, for compatibility reasons. + * + * @since 4.5.0 + * @var string + */ + public $lang_id = '0'; + /** + * Retrieves a site from the database by its ID. + * + * @since 4.5.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param int $site_id The ID of the site to retrieve. + * @return WP_Site|false The site's object if found. False if not. + */ + public static function get_instance($site_id) + { + } + /** + * Creates a new WP_Site object. + * + * Will populate object properties from the object provided and assign other + * default properties based on that information. + * + * @since 4.5.0 + * + * @param WP_Site|object $site A site object. + */ + public function __construct($site) + { + } + /** + * Converts an object to array. + * + * @since 4.6.0 + * + * @return array Object as array. + */ + public function to_array() + { + } + /** + * Getter. + * + * Allows current multisite naming conventions when getting properties. + * Allows access to extended site properties. + * + * @since 4.6.0 + * + * @param string $key Property to get. + * @return mixed Value of the property. Null if not available. + */ + public function __get($key) + { + } + /** + * Isset-er. + * + * Allows current multisite naming conventions when checking for properties. + * Checks for extended site properties. + * + * @since 4.6.0 + * + * @param string $key Property to check if set. + * @return bool Whether the property is set. + */ + public function __isset($key) + { + } + /** + * Setter. + * + * Allows current multisite naming conventions while setting properties. + * + * @since 4.6.0 + * + * @param string $key Property to set. + * @param mixed $value Value to assign to the property. + */ + public function __set($key, $value) + { + } + } + /** + * Class representing a set of speculation rules. + * + * @since 6.8.0 + * @access private + */ + final class WP_Speculation_Rules implements \JsonSerializable + { + /** + * Adds a speculation rule to the speculation rules to consider. + * + * @since 6.8.0 + * + * @param string $mode Speculative loading mode. Either 'prefetch' or 'prerender'. + * @param string $id Unique string identifier for the speculation rule. + * @param array<string, mixed> $rule Associative array of rule arguments. + * @return bool True on success, false if invalid parameters are provided. + * @phpstan-param 'prefetch'|'prerender' $mode + */ + public function add_rule(string $mode, string $id, array $rule): bool + { + } + /** + * Checks whether a speculation rule for the given mode and ID already exists. + * + * @since 6.8.0 + * + * @param string $mode Speculative loading mode. Either 'prefetch' or 'prerender'. + * @param string $id Unique string identifier for the speculation rule. + * @return bool True if the rule already exists, false otherwise. + * @phpstan-param 'prefetch'|'prerender' $mode + */ + public function has_rule(string $mode, string $id): bool + { + } + /** + * Returns the speculation rules data ready to be JSON-encoded. + * + * @since 6.8.0 + * + * @return array<string, array<string, mixed>> Speculation rules data. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + } + /** + * Checks whether the given speculation rules mode is valid. + * + * @since 6.8.0 + * + * @param string $mode Speculation rules mode. + * @return bool True if valid, false otherwise. + */ + public static function is_valid_mode(string $mode): bool + { + } + /** + * Checks whether the given speculation rules eagerness is valid. + * + * @since 6.8.0 + * + * @param string $eagerness Speculation rules eagerness. + * @return bool True if valid, false otherwise. + */ + public static function is_valid_eagerness(string $eagerness): bool + { + } + /** + * Checks whether the given speculation rules source is valid. + * + * @since 6.8.0 + * + * @param string $source Speculation rules source. + * @return bool True if valid, false otherwise. + */ + public static function is_valid_source(string $source): bool + { + } + } + /** + * Core class used to register styles. + * + * @since 2.6.0 + * + * @see WP_Dependencies + */ + class WP_Styles extends \WP_Dependencies + { + /** + * Base URL for styles. + * + * Full URL with trailing slash. + * + * @since 2.6.0 + * @var string + */ + public $base_url; + /** + * URL of the content directory. + * + * @since 2.8.0 + * @var string + */ + public $content_url; + /** + * Default version string for stylesheets. + * + * @since 2.6.0 + * @var string + */ + public $default_version; + /** + * The current text direction. + * + * @since 2.6.0 + * @var string + */ + public $text_direction = 'ltr'; + /** + * Holds a list of style handles which will be concatenated. + * + * @since 2.8.0 + * @var string + */ + public $concat = ''; + /** + * Holds a string which contains style handles and their version. + * + * @since 2.8.0 + * @deprecated 3.4.0 + * @var string + */ + public $concat_version = ''; + /** + * Whether to perform concatenation. + * + * @since 2.8.0 + * @var bool + */ + public $do_concat = \false; + /** + * Holds HTML markup of styles and additional data if concatenation + * is enabled. + * + * @since 2.8.0 + * @var string + */ + public $print_html = ''; + /** + * Holds inline styles if concatenation is enabled. + * + * @since 3.3.0 + * @var string + */ + public $print_code = ''; + /** + * List of default directories. + * + * @since 2.8.0 + * @var array + */ + public $default_dirs; + /** + * Constructor. + * + * @since 2.6.0 + */ + public function __construct() + { + } + /** + * Processes a style dependency. + * + * @since 2.6.0 + * @since 5.5.0 Added the `$group` parameter. + * + * @see WP_Dependencies::do_item() + * + * @param string $handle The style's registered handle. + * @param int|false $group Optional. Group level: level (int), no groups (false). + * Default false. + * @return bool True on success, false on failure. + */ + public function do_item($handle, $group = \false) + { + } + /** + * Adds extra CSS styles to a registered stylesheet. + * + * @since 3.3.0 + * + * @param string $handle The style's registered handle. + * @param string $code String containing the CSS styles to be added. + * @return bool True on success, false on failure. + */ + public function add_inline_style($handle, $code) + { + } + /** + * Prints extra CSS styles of a registered stylesheet. + * + * @since 3.3.0 + * + * @param string $handle The style's registered handle. + * @param bool $display Optional. Whether to print the inline style + * instead of just returning it. Default true. + * @return string|bool False if no data exists, inline styles if `$display` is true, + * true otherwise. + */ + public function print_inline_style($handle, $display = \true) + { + } + /** + * Overrides the add_data method from WP_Dependencies, to allow unsetting dependencies for conditional styles. + * + * @since 6.9.0 + * + * @param string $handle Name of the item. Should be unique. + * @param string $key The data key. + * @param mixed $value The data value. + * @return bool True on success, false on failure. + */ + public function add_data($handle, $key, $value) + { + } + /** + * Determines style dependencies. + * + * @since 2.6.0 + * + * @see WP_Dependencies::all_deps() + * + * @param string|string[] $handles Item handle (string) or item handles (array of strings). + * @param bool $recursion Optional. Internal flag that function is calling itself. + * Default false. + * @param int|false $group Optional. Group level: level (int), no groups (false). + * Default false. + * @return bool True on success, false on failure. + */ + public function all_deps($handles, $recursion = \false, $group = \false) + { + } + /** + * Generates an enqueued style's fully-qualified URL. + * + * @since 2.6.0 + * + * @param string $src The source of the enqueued style. + * @param string $ver The version of the enqueued style. + * @param string $handle The style's registered handle. + * @return string Style's fully-qualified URL. + */ + public function _css_href($src, $ver, $handle) + { + } + /** + * Whether a handle's source is in a default directory. + * + * @since 2.8.0 + * + * @param string $src The source of the enqueued style. + * @return bool True if found, false if not. + */ + public function in_default_dir($src) + { + } + /** + * Processes items and dependencies for the footer group. + * + * HTML 5 allows styles in the body, grab late enqueued items and output them in the footer. + * + * @since 3.3.0 + * + * @see WP_Dependencies::do_items() + * + * @return string[] Handles of items that have been processed. + */ + public function do_footer_items() + { + } + /** + * Resets class properties. + * + * @since 3.3.0 + */ + public function reset() + { + } + /** + * Gets a style-specific dependency warning message. + * + * @since 6.9.1 + * + * @param string $handle Style handle with missing dependencies. + * @param string[] $missing_dependency_handles Missing dependency handles. + * @return string Formatted, localized warning message. + */ + protected function get_dependency_warning_message($handle, $missing_dependency_handles) + { + } + } + /** + * Core class used to implement taxonomy queries for the Taxonomy API. + * + * Used for generating SQL clauses that filter a primary query according to object + * taxonomy terms. + * + * WP_Tax_Query is a helper that allows primary query classes, such as WP_Query, to filter + * their results by object metadata, by generating `JOIN` and `WHERE` subclauses to be + * attached to the primary SQL query string. + * + * @since 3.1.0 + */ + #[\AllowDynamicProperties] + class WP_Tax_Query + { + /** + * Array of taxonomy queries. + * + * See WP_Tax_Query::__construct() for information on tax query arguments. + * + * @since 3.1.0 + * @var array + */ + public $queries = array(); + /** + * The relation between the queries. Can be one of 'AND' or 'OR'. + * + * @since 3.1.0 + * @var string + */ + public $relation; + /** + * A flat list of table aliases used in the JOIN clauses. + * + * @since 4.1.0 + * @var array + */ + protected $table_aliases = array(); + /** + * Terms and taxonomies fetched by this query. + * + * We store this data in a flat array because they are referenced in a + * number of places by WP_Query. + * + * @since 4.1.0 + * @var array + */ + public $queried_terms = array(); + /** + * Database table that where the metadata's objects are stored (eg $wpdb->users). + * + * @since 4.1.0 + * @var string + */ + public $primary_table; + /** + * Column in 'primary_table' that represents the ID of the object. + * + * @since 4.1.0 + * @var string + */ + public $primary_id_column; + /** + * Constructor. + * + * @since 3.1.0 + * @since 4.1.0 Added support for `$operator` 'NOT EXISTS' and 'EXISTS' values. + * + * @param array $tax_query { + * Array of taxonomy query clauses. + * + * @type string $relation Optional. The MySQL keyword used to join + * the clauses of the query. Accepts 'AND', or 'OR'. Default 'AND'. + * @type array ...$0 { + * An array of first-order clause parameters, or another fully-formed tax query. + * + * @type string $taxonomy Taxonomy being queried. Optional when field=term_taxonomy_id. + * @type string|int|array $terms Term or terms to filter by. + * @type string $field Field to match $terms against. Accepts 'term_id', 'slug', + * 'name', or 'term_taxonomy_id'. Default: 'term_id'. + * @type string $operator MySQL operator to be used with $terms in the WHERE clause. + * Accepts 'AND', 'IN', 'NOT IN', 'EXISTS', 'NOT EXISTS'. + * Default: 'IN'. + * @type bool $include_children Optional. Whether to include child terms. + * Requires a $taxonomy. Default: true. + * } + * } + */ + public function __construct($tax_query) + { + } + /** + * Ensures the 'tax_query' argument passed to the class constructor is well-formed. + * + * Ensures that each query-level clause has a 'relation' key, and that + * each first-order clause contains all the necessary keys from `$defaults`. + * + * @since 4.1.0 + * + * @param array $queries Array of queries clauses. + * @return array Sanitized array of query clauses. + */ + public function sanitize_query($queries) + { + } + /** + * Sanitizes a 'relation' operator. + * + * @since 4.1.0 + * + * @param string $relation Raw relation key from the query argument. + * @return string Sanitized relation. Either 'AND' or 'OR'. + * @phpstan-return 'AND'|'OR' + */ + public function sanitize_relation($relation) + { + } + /** + * Determines whether a clause is first-order. + * + * A "first-order" clause is one that contains any of the first-order + * clause keys ('terms', 'taxonomy', 'include_children', 'field', + * 'operator'). An empty clause also counts as a first-order clause, + * for backward compatibility. Any clause that doesn't meet this is + * determined, by process of elimination, to be a higher-order query. + * + * @since 4.1.0 + * + * @param array $query Tax query arguments. + * @return bool Whether the query clause is a first-order clause. + */ + protected static function is_first_order_clause($query) + { + } + /** + * Generates SQL clauses to be appended to a main query. + * + * @since 3.1.0 + * + * @param string $primary_table Database table where the object being filtered is stored (eg wp_users). + * @param string $primary_id_column ID column for the filtered object in $primary_table. + * @return string[] { + * Array containing JOIN and WHERE SQL clauses to append to the main query. + * + * @type string $join SQL fragment to append to the main JOIN clause. + * @type string $where SQL fragment to append to the main WHERE clause. + * } + * @phpstan-return array{ + * join: string, + * where: string, + * } + */ + public function get_sql($primary_table, $primary_id_column) + { + } + /** + * Generates SQL clauses to be appended to a main query. + * + * Called by the public WP_Tax_Query::get_sql(), this method + * is abstracted out to maintain parity with the other Query classes. + * + * @since 4.1.0 + * + * @return string[] { + * Array containing JOIN and WHERE SQL clauses to append to the main query. + * + * @type string $join SQL fragment to append to the main JOIN clause. + * @type string $where SQL fragment to append to the main WHERE clause. + * } + * @phpstan-return array{ + * join: string, + * where: string, + * } + */ + protected function get_sql_clauses() + { + } + /** + * Generates SQL clauses for a single query array. + * + * If nested subqueries are found, this method recurses the tree to + * produce the properly nested SQL. + * + * @since 4.1.0 + * + * @param array $query Query to parse (passed by reference). + * @param int $depth Optional. Number of tree levels deep we currently are. + * Used to calculate indentation. Default 0. + * @return string[] { + * Array containing JOIN and WHERE SQL clauses to append to a single query array. + * + * @type string $join SQL fragment to append to the main JOIN clause. + * @type string $where SQL fragment to append to the main WHERE clause. + * } + * @phpstan-return array{ + * join: string, + * where: string, + * } + */ + protected function get_sql_for_query(&$query, $depth = 0) + { + } + /** + * Generates SQL JOIN and WHERE clauses for a "first-order" query clause. + * + * @since 4.1.0 + * + * @global wpdb $wpdb The WordPress database abstraction object. + * + * @param array $clause Query clause (passed by reference). + * @param array $parent_query Parent query array. + * @return array { + * Array containing JOIN and WHERE SQL clauses to append to a first-order query. + * + * @type string[] $join Array of SQL fragments to append to the main JOIN clause. + * @type string[] $where Array of SQL fragments to append to the main WHERE clause. + * } + * @phpstan-return array{ + * join: string[], + * where: string[], + * } + */ + public function get_sql_for_clause(&$clause, $parent_query) + { + } + /** + * Identifies an existing table alias that is compatible with the current query clause. + * + * We avoid unnecessary table joins by allowing each clause to look for + * an existing table alias that is compatible with the query that it + * needs to perform. + * + * An existing alias is compatible if (a) it is a sibling of `$clause` + * (ie, it's under the scope of the same relation), and (b) the combination + * of operator and relation between the clauses allows for a shared table + * join. In the case of WP_Tax_Query, this only applies to 'IN' + * clauses that are connected by the relation 'OR'. + * + * @since 4.1.0 + * + * @param array $clause Query clause. + * @param array $parent_query Parent query of $clause. + * @return string|false Table alias if found, otherwise false. + */ + protected function find_compatible_table_alias($clause, $parent_query) + { + } + /** + * Transforms a single query, from one field to another. + * + * Operates on the `$query` object by reference. In the case of error, + * `$query` is converted to a WP_Error object. + * + * @since 3.2.0 + * + * @param array $query The single query. Passed by reference. + * @param string $resulting_field The resulting field. Accepts 'slug', 'name', 'term_taxonomy_id', + * or 'term_id'. Default 'term_id'. + * @phpstan-param 'slug'|'name'|'term_taxonomy_id'|'term_id' $resulting_field + * @phpstan-return void + */ + public function transform_query(&$query, $resulting_field) + { + } + } + /** + * Core class used for interacting with taxonomies. + * + * @since 4.7.0 + */ + #[\AllowDynamicProperties] + final class WP_Taxonomy + { + /** + * Taxonomy key. + * + * @since 4.7.0 + * @var string + */ + public $name; + /** + * Name of the taxonomy shown in the menu. Usually plural. + * + * @since 4.7.0 + * @var string + */ + public $label; + /** + * Labels object for this taxonomy. + * + * If not set, tag labels are inherited for non-hierarchical types + * and category labels for hierarchical ones. + * + * @see get_taxonomy_labels() + * + * @since 4.7.0 + * @var stdClass + */ + public $labels; + /** + * A short descriptive summary of what the taxonomy is for. + * + * @since 4.7.0 + * @var string + */ + public $description = ''; + /** + * Whether a taxonomy is intended for use publicly either via the admin interface or by front-end users. + * + * @since 4.7.0 + * @var bool + */ + public $public = \true; + /** + * Whether the taxonomy is publicly queryable. + * + * @since 4.7.0 + * @var bool + */ + public $publicly_queryable = \true; + /** + * Whether the taxonomy is hierarchical. + * + * @since 4.7.0 + * @var bool + */ + public $hierarchical = \false; + /** + * Whether to generate and allow a UI for managing terms in this taxonomy in the admin. + * + * @since 4.7.0 + * @var bool + */ + public $show_ui = \true; + /** + * Whether to show the taxonomy in the admin menu. + * + * If true, the taxonomy is shown as a submenu of the object type menu. If false, no menu is shown. + * + * @since 4.7.0 + * @var bool + */ + public $show_in_menu = \true; + /** + * Whether the taxonomy is available for selection in navigation menus. + * + * @since 4.7.0 + * @var bool + */ + public $show_in_nav_menus = \true; + /** + * Whether to list the taxonomy in the tag cloud widget controls. + * + * @since 4.7.0 + * @var bool + */ + public $show_tagcloud = \true; + /** + * Whether to show the taxonomy in the quick/bulk edit panel. + * + * @since 4.7.0 + * @var bool + */ + public $show_in_quick_edit = \true; + /** + * Whether to display a column for the taxonomy on its post type listing screens. + * + * @since 4.7.0 + * @var bool + */ + public $show_admin_column = \false; + /** + * The callback function for the meta box display. + * + * @since 4.7.0 + * @var bool|callable + */ + public $meta_box_cb = \null; + /** + * The callback function for sanitizing taxonomy data saved from a meta box. + * + * @since 5.1.0 + * @var callable + */ + public $meta_box_sanitize_cb = \null; + /** + * An array of object types this taxonomy is registered for. + * + * @since 4.7.0 + * @var string[] + */ + public $object_type = \null; + /** + * Capabilities for this taxonomy. + * + * @since 4.7.0 + * @var stdClass + */ + public $cap; + /** + * Rewrites information for this taxonomy. + * + * @since 4.7.0 + * @var array|false + */ + public $rewrite; + /** + * Query var string for this taxonomy. + * + * @since 4.7.0 + * @var string|false + */ + public $query_var; + /** + * Function that will be called when the count is updated. + * + * @since 4.7.0 + * @var callable + */ + public $update_count_callback; + /** + * Whether this taxonomy should appear in the REST API. + * + * Default false. If true, standard endpoints will be registered with + * respect to $rest_base and $rest_controller_class. + * + * @since 4.7.4 + * @var bool $show_in_rest + */ + public $show_in_rest; + /** + * The base path for this taxonomy's REST API endpoints. + * + * @since 4.7.4 + * @var string|bool $rest_base + */ + public $rest_base; + /** + * The namespace for this taxonomy's REST API endpoints. + * + * @since 5.9.0 + * @var string|bool $rest_namespace + */ + public $rest_namespace; + /** + * The controller for this taxonomy's REST API endpoints. + * + * Custom controllers must extend WP_REST_Controller. + * + * @since 4.7.4 + * @var string|bool $rest_controller_class + */ + public $rest_controller_class; + /** + * The controller instance for this taxonomy's REST API endpoints. + * + * Lazily computed. Should be accessed using {@see WP_Taxonomy::get_rest_controller()}. + * + * @since 5.5.0 + * @var WP_REST_Controller $rest_controller + */ + public $rest_controller; + /** + * The default term name for this taxonomy. If you pass an array you have + * to set 'name' and optionally 'slug' and 'description'. + * + * @since 5.5.0 + * @var array|string + */ + public $default_term; + /** + * Whether terms in this taxonomy should be sorted in the order they are provided to `wp_set_object_terms()`. + * + * Use this in combination with `'orderby' => 'term_order'` when fetching terms. + * + * @since 2.5.0 + * @var bool|null + */ + public $sort = \null; + /** + * Array of arguments to automatically use inside `wp_get_object_terms()` for this taxonomy. + * + * @since 2.6.0 + * @var array|null + */ + public $args = \null; + /** + * Whether it is a built-in taxonomy. + * + * @since 4.7.0 + * @var bool + */ + public $_builtin; + /** + * Constructor. + * + * See the register_taxonomy() function for accepted arguments for `$args`. + * + * @since 4.7.0 + * + * @param string $taxonomy Taxonomy key, must not exceed 32 characters. + * @param array|string $object_type Name of the object type for the taxonomy object. + * @param array|string $args Optional. Array or query string of arguments for registering a taxonomy. + * See register_taxonomy() for information on accepted arguments. + * Default empty array. + * @phpstan-param array{ + * labels?: string[], + * description?: string, + * public?: bool, + * publicly_queryable?: bool, + * hierarchical?: bool, + * show_ui?: bool, + * show_in_menu?: bool, + * show_in_nav_menus?: bool, + * show_in_rest?: bool, + * rest_base?: string, + * rest_namespace?: string, + * rest_controller_class?: string, + * show_tagcloud?: bool, + * show_in_quick_edit?: bool, + * show_admin_column?: bool, + * meta_box_cb?: bool|callable, + * meta_box_sanitize_cb?: callable, + * capabilities?: array{ + * manage_terms?: string, + * edit_terms?: string, + * delete_terms?: string, + * assign_terms?: string, + * }, + * rewrite?: bool|array{ + * slug?: string, + * with_front?: bool, + * hierarchical?: bool, + * ep_mask?: int, + * }, + * query_var?: string|bool, + * update_count_callback?: callable, + * default_term?: string|array{ + * name?: string, + * slug?: string, + * description?: string, + * }, + * sort?: bool, + * args?: array, + * _builtin?: bool, + * } $args See register_taxonomy() + */ + public function __construct($taxonomy, $object_type, $args = array()) + { + } + /** + * Sets taxonomy properties. + * + * See the register_taxonomy() function for accepted arguments for `$args`. + * + * @since 4.7.0 + * + * @param string|string[] $object_type Name or array of names of the object types for the taxonomy. + * @param array|string $args Array or query string of arguments for registering a taxonomy. + */ + public function set_props($object_type, $args) + { + } + /** + * Adds the necessary rewrite rules for the taxonomy. + * + * @since 4.7.0 + * + * @global WP $wp Current WordPress environment instance. + */ + public function add_rewrite_rules() + { + } + /** + * Removes any rewrite rules, permastructs, and rules for the taxonomy. + * + * @since 4.7.0 + * + * @global WP $wp Current WordPress environment instance. + */ + public function remove_rewrite_rules() + { + } + /** + * Registers the ajax callback for the meta box. + * + * @since 4.7.0 + */ + public function add_hooks() + { + } + /** + * Removes the ajax callback for the meta box. + * + * @since 4.7.0 + */ + public function remove_hooks() + { + } + /** + * Gets the REST API controller for this taxonomy. + * + * Will only instantiate the controller class once per request. + * + * @since 5.5.0 + * + * @return WP_REST_Controller|null The controller instance, or null if the taxonomy + * is set not to show in rest. + */ + public function get_rest_controller() + { + } + /** + * Returns the default labels for taxonomies. + * + * @since 6.0.0 + * + * @return (string|null)[][] The default labels for taxonomies. + */ + public static function get_default_labels() + { + } + /** + * Resets the cache for the default labels. + * + * @since 6.0.0 + */ + public static function reset_default_labels() + { + } + } + /** + * Class used for querying terms. + * + * @since 4.6.0 + * + * @see WP_Term_Query::__construct() for accepted arguments. + */ + #[\AllowDynamicProperties] + class WP_Term_Query + { + /** + * SQL string used to perform database query. + * + * @since 4.6.0 + * @var string + */ + public $request; + /** + * Metadata query container. + * + * @since 4.6.0 + * @var WP_Meta_Query A meta query instance. + */ + public $meta_query = \false; + /** + * Metadata query clauses. + * + * @since 4.6.0 + * @var array + */ + protected $meta_query_clauses; + /** + * SQL query clauses. + * + * @since 4.6.0 + * @var array + */ + protected $sql_clauses = array('select' => '', 'from' => '', 'where' => array(), 'orderby' => '', 'limits' => ''); + /** + * Query vars set by the user. + * + * @since 4.6.0 + * @var array + */ + public $query_vars; + /** + * Default values for query vars. + * + * @since 4.6.0 + * @var array + */ + public $query_var_defaults; + /** + * List of terms located by the query. + * + * @since 4.6.0 + * @var array + */ + public $terms; + /** + * Constructor. + * + * Sets up the term query, based on the query vars passed. + * + * @since 4.6.0 + * @since 4.6.0 Introduced 'term_taxonomy_id' parameter. + * @since 4.7.0 Introduced 'object_ids' parameter. + * @since 4.9.0 Added 'slug__in' support for 'orderby'. + * @since 5.1.0 Introduced the 'meta_compare_key' parameter. + * @since 5.3.0 Introduced the 'meta_type_key' parameter. + * @since 6.4.0 Introduced the 'cache_results' parameter. + * + * @param string|array $query { + * Optional. Array or query string of term query parameters. Default empty. + * + * @type string|string[] $taxonomy Taxonomy name, or array of taxonomy names, to which results + * should be limited. + * @type int|int[] $object_ids Object ID, or array of object IDs. Results will be + * limited to terms associated with these objects. + * @type string $orderby Field(s) to order terms by. Accepts: + * - Term fields ('name', 'slug', 'term_group', 'term_id', 'id', + * 'description', 'parent', 'term_order'). Unless `$object_ids` + * is not empty, 'term_order' is treated the same as 'term_id'. + * - 'count' to use the number of objects associated with the term. + * - 'include' to match the 'order' of the `$include` param. + * - 'slug__in' to match the 'order' of the `$slug` param. + * - 'meta_value' + * - 'meta_value_num'. + * - The value of `$meta_key`. + * - The array keys of `$meta_query`. + * - 'none' to omit the ORDER BY clause. + * Default 'name'. + * @type string $order Whether to order terms in ascending or descending order. + * Accepts 'ASC' (ascending) or 'DESC' (descending). + * Default 'ASC'. + * @type bool|int $hide_empty Whether to hide terms not assigned to any posts. Accepts + * 1|true or 0|false. Default 1|true. + * @type int[]|string $include Array or comma/space-separated string of term IDs to include. + * Default empty array. + * @type int[]|string $exclude Array or comma/space-separated string of term IDs to exclude. + * If `$include` is non-empty, `$exclude` is ignored. + * Default empty array. + * @type int[]|string $exclude_tree Array or comma/space-separated string of term IDs to exclude + * along with all of their descendant terms. If `$include` is + * non-empty, `$exclude_tree` is ignored. Default empty array. + * @type int|string $number Maximum number of terms to return. Accepts ''|0 (all) or any + * positive number. Default ''|0 (all). Note that `$number` may + * not return accurate results when coupled with `$object_ids`. + * See #41796 for details. + * @type int $offset The number by which to offset the terms query. Default empty. + * @type string $fields Term fields to query for. Accepts: + * - 'all' Returns an array of complete term objects (`WP_Term[]`). + * - 'all_with_object_id' Returns an array of term objects + * with the 'object_id' param (`WP_Term[]`). Works only + * when the `$object_ids` parameter is populated. + * - 'ids' Returns an array of term IDs (`int[]`). + * - 'tt_ids' Returns an array of term taxonomy IDs (`int[]`). + * - 'names' Returns an array of term names (`string[]`). + * - 'slugs' Returns an array of term slugs (`string[]`). + * - 'count' Returns the number of matching terms (`int`). + * - 'id=>parent' Returns an associative array of parent term IDs, + * keyed by term ID (`int[]`). + * - 'id=>name' Returns an associative array of term names, + * keyed by term ID (`string[]`). + * - 'id=>slug' Returns an associative array of term slugs, + * keyed by term ID (`string[]`). + * Default 'all'. + * @type string|string[] $name Name or array of names to return term(s) for. + * Default empty. + * @type string|string[] $slug Slug or array of slugs to return term(s) for. + * Default empty. + * @type int|int[] $term_taxonomy_id Term taxonomy ID, or array of term taxonomy IDs, + * to match when querying terms. + * @type bool $hierarchical Whether to include terms that have non-empty descendants + * (even if `$hide_empty` is set to true). Default true. + * @type string $search Search criteria to match terms. Will be SQL-formatted with + * wildcards before and after. Default empty. + * @type string $name__like Retrieve terms with criteria by which a term is LIKE + * `$name__like`. Default empty. + * @type string $description__like Retrieve terms where the description is LIKE + * `$description__like`. Default empty. + * @type bool $pad_counts Whether to pad the quantity of a term's children in the + * quantity of each term's "count" object variable. + * Default false. + * @type string $get Whether to return terms regardless of ancestry or whether the + * terms are empty. Accepts 'all' or '' (disabled). + * Default ''. + * @type int $child_of Term ID to retrieve child terms of. If multiple taxonomies + * are passed, `$child_of` is ignored. Default 0. + * @type int $parent Parent term ID to retrieve direct-child terms of. + * Default empty. + * @type bool $childless True to limit results to terms that have no children. + * This parameter has no effect on non-hierarchical taxonomies. + * Default false. + * @type string $cache_domain Unique cache key to be produced when this query is stored in + * an object cache. Default 'core'. + * @type bool $cache_results Whether to cache term information. Default true. + * @type bool $update_term_meta_cache Whether to prime meta caches for matched terms. Default true. + * @type string|string[] $meta_key Meta key or keys to filter by. + * @type string|string[] $meta_value Meta value or values to filter by. + * @type string $meta_compare MySQL operator used for comparing the meta value. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type string $meta_compare_key MySQL operator used for comparing the meta key. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type string $meta_type MySQL data type that the meta_value column will be CAST to for comparisons. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type string $meta_type_key MySQL data type that the meta_key column will be CAST to for comparisons. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type array $meta_query An associative array of WP_Meta_Query arguments. + * See WP_Meta_Query::__construct() for accepted values. + * } + * @phpstan-param array{ + * taxonomy?: string|string[], + * object_ids?: int|int[], + * orderby?: string, + * order?: string, + * hide_empty?: bool|int, + * include?: int[]|string, + * exclude?: int[]|string, + * exclude_tree?: int[]|string, + * number?: int|string, + * offset?: int, + * fields?: string, + * name?: string|string[], + * slug?: string|string[], + * term_taxonomy_id?: int|int[], + * hierarchical?: bool, + * search?: string, + * name__like?: string, + * description__like?: string, + * pad_counts?: bool, + * get?: string, + * child_of?: int, + * parent?: int, + * childless?: bool, + * cache_domain?: string, + * cache_results?: bool, + * update_term_meta_cache?: bool, + * meta_key?: string|string[], + * meta_value?: string|string[], + * meta_compare?: string, + * meta_compare_key?: string, + * meta_type?: string, + * meta_type_key?: string, + * meta_query?: array, + * } $query + */ + public function __construct($query = '') + { + } + /** + * Parse arguments passed to the term query with default query parameters. + * + * @since 4.6.0 + * + * @param string|array $query WP_Term_Query arguments. See WP_Term_Query::__construct() for accepted arguments. + * @phpstan-param array{ + * taxonomy?: string|string[], + * object_ids?: int|int[], + * orderby?: string, + * order?: string, + * hide_empty?: bool|int, + * include?: int[]|string, + * exclude?: int[]|string, + * exclude_tree?: int[]|string, + * number?: int|string, + * offset?: int, + * fields?: string, + * name?: string|string[], + * slug?: string|string[], + * term_taxonomy_id?: int|int[], + * hierarchical?: bool, + * search?: string, + * name__like?: string, + * description__like?: string, + * pad_counts?: bool, + * get?: string, + * child_of?: int, + * parent?: int, + * childless?: bool, + * cache_domain?: string, + * cache_results?: bool, + * update_term_meta_cache?: bool, + * meta_key?: string|string[], + * meta_value?: string|string[], + * meta_compare?: string, + * meta_compare_key?: string, + * meta_type?: string, + * meta_type_key?: string, + * meta_query?: array, + * } $query See WP_Term_Query::__construct() + */ + public function parse_query($query = '') + { + } + /** + * Sets up the query and retrieves the results. + * + * The return type varies depending on the value passed to `$args['fields']`. See + * WP_Term_Query::get_terms() for details. + * + * @since 4.6.0 + * + * @param string|array $query Array or URL query string of parameters. + * @return WP_Term[]|int[]|string[]|string Array of terms, or number of terms as numeric string + * when 'count' is passed to `$args['fields']`. + */ + public function query($query) + { + } + /** + * Retrieves the query results. + * + * The return type varies depending on the value passed to `$args['fields']`. + * + * The following will result in an array of `WP_Term` objects being returned: + * + * - 'all' + * - 'all_with_object_id' + * + * The following will result in a numeric string being returned: + * + * - 'count' + * + * The following will result in an array of text strings being returned: + * + * - 'id=>name' + * - 'id=>slug' + * - 'names' + * - 'slugs' + * + * The following will result in an array of numeric strings being returned: + * + * - 'id=>parent' + * + * The following will result in an array of integers being returned: + * + * - 'ids' + * - 'tt_ids' + * + * @since 4.6.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @return WP_Term[]|int[]|string[]|string Array of terms, or number of terms as numeric string + * when 'count' is passed to `$args['fields']`. + */ + public function get_terms() + { + } + /** + * Parse and sanitize 'orderby' keys passed to the term query. + * + * @since 4.6.0 + * + * @param string $orderby_raw Alias for the field to order by. + * @return string|false Value to used in the ORDER clause. False otherwise. + */ + protected function parse_orderby($orderby_raw) + { + } + /** + * Format response depending on field requested. + * + * @since 6.0.0 + * + * @param WP_Term[] $term_objects Array of term objects. + * @param string $_fields Field to format. + * + * @return WP_Term[]|int[]|string[] Array of terms / strings / ints depending on field requested. + */ + protected function format_terms($term_objects, $_fields) + { + } + /** + * Generate the ORDER BY clause for an 'orderby' param that is potentially related to a meta query. + * + * @since 4.6.0 + * + * @param string $orderby_raw Raw 'orderby' value passed to WP_Term_Query. + * @return string ORDER BY clause. + */ + protected function parse_orderby_meta($orderby_raw) + { + } + /** + * Parse an 'order' query variable and cast it to ASC or DESC as necessary. + * + * @since 4.6.0 + * + * @param string $order The 'order' query variable. + * @return string The sanitized 'order' query variable. + */ + protected function parse_order($order) + { + } + /** + * Used internally to generate a SQL string related to the 'search' parameter. + * + * @since 4.6.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $search Search string. + * @return string Search SQL. + */ + protected function get_search_sql($search) + { + } + /** + * Creates an array of term objects from an array of term IDs. + * + * Also discards invalid term objects. + * + * @since 4.9.8 + * + * @param Object[]|int[] $terms List of objects or term ids. + * @return WP_Term[] Array of `WP_Term` objects. + */ + protected function populate_terms($terms) + { + } + /** + * Generate cache key. + * + * @since 6.2.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param array $args WP_Term_Query arguments. + * @param string $sql SQL statement. + * + * @return string Cache key. + */ + protected function generate_cache_key(array $args, $sql) + { + } + } + /** + * Core class used to implement the WP_Term object. + * + * @since 4.4.0 + * + * @property-read object $data Sanitized term data. + */ + #[\AllowDynamicProperties] + final class WP_Term + { + /** + * Term ID. + * + * @since 4.4.0 + * @var int + */ + public $term_id; + /** + * The term's name. + * + * @since 4.4.0 + * @var string + */ + public $name = ''; + /** + * The term's slug. + * + * @since 4.4.0 + * @var string + */ + public $slug = ''; + /** + * The term's term_group. + * + * @since 4.4.0 + * @var int + */ + public $term_group = ''; + /** + * Term Taxonomy ID. + * + * @since 4.4.0 + * @var int + */ + public $term_taxonomy_id = 0; + /** + * The term's taxonomy name. + * + * @since 4.4.0 + * @var string + */ + public $taxonomy = ''; + /** + * The term's description. + * + * @since 4.4.0 + * @var string + */ + public $description = ''; + /** + * ID of a term's parent term. + * + * @since 4.4.0 + * @var int + */ + public $parent = 0; + /** + * Cached object count for this term. + * + * @since 4.4.0 + * @var int + */ + public $count = 0; + /** + * Stores the term object's sanitization level. + * + * Does not correspond to a database field. + * + * @since 4.4.0 + * @var string + */ + public $filter = 'raw'; + /** + * Retrieve WP_Term instance. + * + * @since 4.4.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param int $term_id Term ID. + * @param string $taxonomy Optional. Limit matched terms to those matching `$taxonomy`. Only used for + * disambiguating potentially shared terms. + * @return WP_Term|WP_Error|false Term object, if found. WP_Error if `$term_id` is shared between taxonomies and + * there's insufficient data to distinguish which term is intended. + * False for other failures. + */ + public static function get_instance($term_id, $taxonomy = \null) + { + } + /** + * Constructor. + * + * @since 4.4.0 + * + * @param WP_Term|object $term Term object. + */ + public function __construct($term) + { + } + /** + * Sanitizes term fields, according to the filter type provided. + * + * @since 4.4.0 + * + * @param string $filter Filter context. Accepts 'edit', 'db', 'display', 'attribute', 'js', 'rss', or 'raw'. + * @phpstan-param 'edit'|'db'|'display'|'attribute'|'js'|'rss'|'raw' $filter + */ + public function filter($filter) + { + } + /** + * Converts an object to array. + * + * @since 4.4.0 + * + * @return array Object as array. + */ + public function to_array() + { + } + /** + * Getter. + * + * @since 4.4.0 + * + * @param string $key Property to get. + * @return mixed Property value. + */ + public function __get($key) + { + } + } + /** + * Better word splitting than the PEAR package provides. + * + * @since 2.6.0 + * @uses Text_Diff_Renderer_inline Extends + */ + #[\AllowDynamicProperties] + class WP_Text_Diff_Renderer_inline extends \Text_Diff_Renderer_inline + { + /** + * @ignore + * @since 2.6.0 + * + * @param string $string + * @param string $newlineEscape + * @return string + */ + public function _splitOnWords($string, $newlineEscape = "\n") + { + } + } + /** + * Table renderer to display the diff lines. + * + * @since 2.6.0 + * @uses Text_Diff_Renderer Extends + */ + #[\AllowDynamicProperties] + class WP_Text_Diff_Renderer_Table extends \Text_Diff_Renderer + { + /** + * @see Text_Diff_Renderer::_leading_context_lines + * @var int + * @since 2.6.0 + */ + public $_leading_context_lines = 10000; + /** + * @see Text_Diff_Renderer::_trailing_context_lines + * @var int + * @since 2.6.0 + */ + public $_trailing_context_lines = 10000; + /** + * Title of the item being compared. + * + * @since 6.4.0 Declared a previously dynamic property. + * @var string|null + */ + public $_title; + /** + * Title for the left column. + * + * @since 6.4.0 Declared a previously dynamic property. + * @var string|null + */ + public $_title_left; + /** + * Title for the right column. + * + * @since 6.4.0 Declared a previously dynamic property. + * @var string|null + */ + public $_title_right; + /** + * Threshold for when a diff should be saved or omitted. + * + * @var float + * @since 2.6.0 + */ + protected $_diff_threshold = 0.6; + /** + * Inline display helper object name. + * + * @var string + * @since 2.6.0 + */ + protected $inline_diff_renderer = 'WP_Text_Diff_Renderer_inline'; + /** + * Should we show the split view or not + * + * @var string + * @since 3.6.0 + */ + protected $_show_split_view = \true; + protected $compat_fields = array('_show_split_view', 'inline_diff_renderer', '_diff_threshold'); + /** + * Caches the output of count_chars() in compute_string_distance() + * + * @var array + * @since 5.0.0 + */ + protected $count_cache = array(); + /** + * Caches the difference calculation in compute_string_distance() + * + * @var array + * @since 5.0.0 + */ + protected $difference_cache = array(); + /** + * Constructor - Call parent constructor with params array. + * + * This will set class properties based on the key value pairs in the array. + * + * @since 2.6.0 + * + * @param array $params + */ + public function __construct($params = array()) + { + } + /** + * @ignore + * + * @param string $header + * @return string + */ + public function _startBlock($header) + { + } + /** + * @ignore + * + * @param array $lines + * @param string $prefix + */ + public function _lines($lines, $prefix = ' ') + { + } + /** + * @ignore + * + * @param string $line HTML-escape the value. + * @return string + */ + public function addedLine($line) + { + } + /** + * @ignore + * + * @param string $line HTML-escape the value. + * @return string + */ + public function deletedLine($line) + { + } + /** + * @ignore + * + * @param string $line HTML-escape the value. + * @return string + */ + public function contextLine($line) + { + } + /** + * @ignore + * + * @return string + */ + public function emptyLine() + { + } + /** + * @ignore + * + * @param array $lines + * @param bool $encode + * @return string + */ + public function _added($lines, $encode = \true) + { + } + /** + * @ignore + * + * @param array $lines + * @param bool $encode + * @return string + */ + public function _deleted($lines, $encode = \true) + { + } + /** + * @ignore + * + * @param array $lines + * @param bool $encode + * @return string + */ + public function _context($lines, $encode = \true) + { + } + /** + * Process changed lines to do word-by-word diffs for extra highlighting. + * + * (TRAC style) sometimes these lines can actually be deleted or added rows. + * We do additional processing to figure that out + * + * @since 2.6.0 + * + * @param array $orig + * @param array $final + * @return string + */ + public function _changed($orig, $final) + { + } + /** + * Takes changed blocks and matches which rows in orig turned into which rows in final. + * + * @since 2.6.0 + * + * @param array $orig Lines of the original version of the text. + * @param array $final Lines of the final version of the text. + * @return array { + * Array containing results of comparing the original text to the final text. + * + * @type array $orig_matches Associative array of original matches. Index == row + * number of `$orig`, value == corresponding row number + * of that same line in `$final` or 'x' if there is no + * corresponding row (indicating it is a deleted line). + * @type array $final_matches Associative array of final matches. Index == row + * number of `$final`, value == corresponding row number + * of that same line in `$orig` or 'x' if there is no + * corresponding row (indicating it is a new line). + * @type array $orig_rows Associative array of interleaved rows of `$orig` with + * blanks to keep matches aligned with side-by-side diff + * of `$final`. A value >= 0 corresponds to index of `$orig`. + * Value < 0 indicates a blank row. + * @type array $final_rows Associative array of interleaved rows of `$final` with + * blanks to keep matches aligned with side-by-side diff + * of `$orig`. A value >= 0 corresponds to index of `$final`. + * Value < 0 indicates a blank row. + * } + * @phpstan-return array{ + * orig_matches: array, + * final_matches: array, + * orig_rows: array, + * final_rows: array, + * } + */ + public function interleave_changed_lines($orig, $final) + { + } + /** + * Computes a number that is intended to reflect the "distance" between two strings. + * + * @since 2.6.0 + * + * @param string $string1 + * @param string $string2 + * @return int + */ + public function compute_string_distance($string1, $string2) + { + } + /** + * @ignore + * @since 2.6.0 + * + * @param int $a + * @param int $b + * @return int + */ + public function difference($a, $b) + { + } + /** + * Make private properties readable for backward compatibility. + * + * @since 4.0.0 + * @since 6.4.0 Getting a dynamic property is deprecated. + * + * @param string $name Property to get. + * @return mixed A declared property's value, else null. + */ + public function __get($name) + { + } + /** + * Make private properties settable for backward compatibility. + * + * @since 4.0.0 + * @since 6.4.0 Setting a dynamic property is deprecated. + * + * @param string $name Property to check if set. + * @param mixed $value Property value. + * @phpstan-return void + */ + public function __set($name, $value) + { + } + /** + * Make private properties checkable for backward compatibility. + * + * @since 4.0.0 + * @since 6.4.0 Checking a dynamic property is deprecated. + * + * @param string $name Property to check if set. + * @return bool Whether the property is set. + */ + public function __isset($name) + { + } + /** + * Make private properties un-settable for backward compatibility. + * + * @since 4.0.0 + * @since 6.4.0 Unsetting a dynamic property is deprecated. + * + * @param string $name Property to unset. + * @phpstan-return void + */ + public function __unset($name) + { + } + } + /** + * Core class used for registering text domains. + * + * @since 6.1.0 + */ + #[\AllowDynamicProperties] + class WP_Textdomain_Registry + { + /** + * List of domains and all their language directory paths for each locale. + * + * @since 6.1.0 + * + * @var array + */ + protected $all = array(); + /** + * List of domains and their language directory path for the current (most recent) locale. + * + * @since 6.1.0 + * + * @var array + */ + protected $current = array(); + /** + * List of domains and their custom language directory paths. + * + * @see load_plugin_textdomain() + * @see load_theme_textdomain() + * + * @since 6.1.0 + * + * @var array + */ + protected $custom_paths = array(); + /** + * Holds a cached list of available .mo files to improve performance. + * + * @since 6.1.0 + * @since 6.5.0 This property is no longer used. + * + * @var array + * + * @deprecated + */ + protected $cached_mo_files = array(); + /** + * Holds a cached list of domains with translations to improve performance. + * + * @since 6.2.0 + * + * @var string[] + */ + protected $domains_with_translations = array(); + /** + * Initializes the registry. + * + * Hooks into the {@see 'upgrader_process_complete'} filter + * to invalidate MO files caches. + * + * @since 6.5.0 + */ + public function init() + { + } + /** + * Returns the languages directory path for a specific domain and locale. + * + * @since 6.1.0 + * + * @param string $domain Text domain. + * @param string $locale Locale. + * + * @return string|false Languages directory path or false if there is none available. + */ + public function get($domain, $locale) + { + } + /** + * Determines whether any MO file paths are available for the domain. + * + * This is the case if a path has been set for the current locale, + * or if there is no information stored yet, in which case + * {@see _load_textdomain_just_in_time()} will fetch the information first. + * + * @since 6.1.0 + * + * @param string $domain Text domain. + * @return bool Whether any MO file paths are available for the domain. + */ + public function has($domain) + { + } + /** + * Sets the language directory path for a specific domain and locale. + * + * Also sets the 'current' property for direct access + * to the path for the current (most recent) locale. + * + * @since 6.1.0 + * + * @param string $domain Text domain. + * @param string $locale Locale. + * @param string|false $path Language directory path or false if there is none available. + */ + public function set($domain, $locale, $path) + { + } + /** + * Sets the custom path to the plugin's/theme's languages directory. + * + * Used by {@see load_plugin_textdomain()} and {@see load_theme_textdomain()}. + * + * @since 6.1.0 + * + * @param string $domain Text domain. + * @param string $path Language directory path. + */ + public function set_custom_path($domain, $path) + { + } + /** + * Retrieves translation files from the specified path. + * + * Allows early retrieval through the {@see 'pre_get_mo_files_from_path'} filter to optimize + * performance, especially in directories with many files. + * + * @since 6.5.0 + * + * @param string $path The directory path to search for translation files. + * @return array Array of translation file paths. Can contain .mo and .l10n.php files. + */ + public function get_language_files_from_path($path) + { + } + /** + * Invalidate the cache for .mo files. + * + * This function deletes the cache entries related to .mo files when triggered + * by specific actions, such as the completion of an upgrade process. + * + * @since 6.5.0 + * + * @param WP_Upgrader $upgrader Unused. WP_Upgrader instance. In other contexts this might be a + * Theme_Upgrader, Plugin_Upgrader, Core_Upgrade, or Language_Pack_Upgrader instance. + * @param array $hook_extra { + * Array of bulk item update data. + * + * @type string $action Type of action. Default 'update'. + * @type string $type Type of update process. Accepts 'plugin', 'theme', 'translation', or 'core'. + * @type bool $bulk Whether the update process is a bulk update. Default true. + * @type array $plugins Array of the basename paths of the plugins' main files. + * @type array $themes The theme slugs. + * @type array $translations { + * Array of translations update data. + * + * @type string $language The locale the translation is for. + * @type string $type Type of translation. Accepts 'plugin', 'theme', or 'core'. + * @type string $slug Text domain the translation is for. The slug of a theme/plugin or + * 'default' for core translations. + * @type string $version The version of a theme, plugin, or core. + * } + * } + * @phpstan-param array{ + * action?: string, + * type?: string, + * bulk?: bool, + * plugins?: array, + * themes?: array, + * translations?: array{ + * language: string, + * type: string, + * slug: string, + * version: string, + * }, + * } $hook_extra + * @phpstan-return void + */ + public function invalidate_mo_files_cache($upgrader, $hook_extra) + { + } + } + /** + * Class to provide access to update a theme.json structure. + */ + #[\AllowDynamicProperties] + class WP_Theme_JSON_Data + { + /** + * Constructor. + * + * @since 6.1.0 + * + * @link https://developer.wordpress.org/block-editor/reference-guides/theme-json-reference/ + * + * @param array $data Array following the theme.json specification. + * @param string $origin The origin of the data: default, theme, user. + */ + public function __construct($data = array('version' => \WP_Theme_JSON::LATEST_SCHEMA), $origin = 'theme') + { + } + /** + * Updates the theme.json with the the given data. + * + * @since 6.1.0 + * + * @param array $new_data Array following the theme.json specification. + * + * @return WP_Theme_JSON_Data The own instance with access to the modified data. + */ + public function update_with($new_data) + { + } + /** + * Returns an array containing the underlying data + * following the theme.json specification. + * + * @since 6.1.0 + * + * @return array + */ + public function get_data() + { + } + /** + * Returns theme JSON object. + * + * @since 6.6.0 + * + * @return WP_Theme_JSON The theme JSON structure stored in this data object. + */ + public function get_theme_json() + { + } + } + /** + * Class that abstracts the processing of the different data sources + * for site-level config and offers an API to work with them. + * + * This class is for internal core usage and is not supposed to be used by extenders (plugins and/or themes). + * This is a low-level API that may need to do breaking changes. Please, + * use get_global_settings(), get_global_styles(), and get_global_stylesheet() instead. + * + * @access private + */ + #[\AllowDynamicProperties] + class WP_Theme_JSON_Resolver + { + /** + * Container for keep track of registered blocks. + * + * @since 6.1.0 + * @var array + */ + protected static $blocks_cache = array('core' => array(), 'blocks' => array(), 'theme' => array(), 'user' => array()); + /** + * Container for data coming from core. + * + * @since 5.8.0 + * @var WP_Theme_JSON + */ + protected static $core = \null; + /** + * Container for data coming from the blocks. + * + * @since 6.1.0 + * @var WP_Theme_JSON + */ + protected static $blocks = \null; + /** + * Container for data coming from the theme. + * + * @since 5.8.0 + * @var WP_Theme_JSON + */ + protected static $theme = \null; + /** + * Container for data coming from the user. + * + * @since 5.9.0 + * @var WP_Theme_JSON + */ + protected static $user = \null; + /** + * Stores the ID of the custom post type + * that holds the user data. + * + * @since 5.9.0 + * @var int + */ + protected static $user_custom_post_type_id = \null; + /** + * Container to keep loaded i18n schema for `theme.json`. + * + * @since 5.8.0 As `$theme_json_i18n`. + * @since 5.9.0 Renamed from `$theme_json_i18n` to `$i18n_schema`. + * @var array + */ + protected static $i18n_schema = \null; + /** + * `theme.json` file cache. + * + * @since 6.1.0 + * @var array + */ + protected static $theme_json_file_cache = array(); + /** + * Processes a file that adheres to the theme.json schema + * and returns an array with its contents, or a void array if none found. + * + * @since 5.8.0 + * @since 6.1.0 Added caching. + * + * @param string $file_path Path to file. Empty if no file. + * @return array Contents that adhere to the theme.json schema. + */ + protected static function read_json_file($file_path) + { + } + /** + * Returns a data structure used in theme.json translation. + * + * @since 5.8.0 + * @deprecated 5.9.0 + * + * @return array An array of theme.json fields that are translatable and the keys that are translatable. + */ + public static function get_fields_to_translate() + { + } + /** + * Given a theme.json structure modifies it in place to update certain values + * by its translated strings according to the language set by the user. + * + * @since 5.8.0 + * + * @param array $theme_json The theme.json to translate. + * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings. + * Default 'default'. + * @return array Returns the modified $theme_json_structure. + */ + protected static function translate($theme_json, $domain = 'default') + { + } + /** + * Returns core's origin config. + * + * @since 5.8.0 + * + * @return WP_Theme_JSON Entity that holds core data. + */ + public static function get_core_data() + { + } + /** + * Checks whether the registered blocks were already processed for this origin. + * + * @since 6.1.0 + * + * @param string $origin Data source for which to cache the blocks. + * Valid values are 'core', 'blocks', 'theme', and 'user'. + * @return bool True on success, false otherwise. + * @phpstan-param 'core'|'blocks'|'theme'|'user' $origin + */ + protected static function has_same_registered_blocks($origin) + { + } + /** + * Returns the theme's data. + * + * Data from theme.json will be backfilled from existing + * theme supports, if any. Note that if the same data + * is present in theme.json and in theme supports, + * the theme.json takes precedence. + * + * @since 5.8.0 + * @since 5.9.0 Theme supports have been inlined and the `$theme_support_data` argument removed. + * @since 6.0.0 Added an `$options` parameter to allow the theme data to be returned without theme supports. + * @since 6.6.0 Add support for 'default-font-sizes' and 'default-spacing-sizes' theme supports. + * Added registration and merging of block style variations from partial theme.json files and the block styles registry. + * + * @param array $deprecated Deprecated. Not used. + * @param array $options { + * Options arguments. + * + * @type bool $with_supports Whether to include theme supports in the data. Default true. + * } + * @return WP_Theme_JSON Entity that holds theme data. + * @phpstan-param array{ + * with_supports?: bool, + * } $options + */ + public static function get_theme_data($deprecated = array(), $options = array()) + { + } + /** + * Gets the styles for blocks from the block.json file. + * + * @since 6.1.0 + * + * @return WP_Theme_JSON + */ + public static function get_block_data() + { + } + /** + * Returns the custom post type that contains the user's origin config + * for the active theme or an empty array if none are found. + * + * This can also create and return a new draft custom post type. + * + * @since 5.9.0 + * + * @param WP_Theme $theme The theme object. If empty, it + * defaults to the active theme. + * @param bool $create_post Optional. Whether a new custom post + * type should be created if none are + * found. Default false. + * @param array $post_status_filter Optional. Filter custom post type by + * post status. Default `array( 'publish' )`, + * so it only fetches published posts. + * @return array Custom Post Type for the user's origin config. + */ + public static function get_user_data_from_wp_global_styles($theme, $create_post = \false, $post_status_filter = array('publish')) + { + } + /** + * Returns the user's origin config. + * + * @since 5.9.0 + * @since 6.6.0 The 'isGlobalStylesUserThemeJSON' flag is left on the user data. + * Register the block style variations coming from the user data. + * + * @return WP_Theme_JSON Entity that holds styles for user data. + */ + public static function get_user_data() + { + } + /** + * Returns the data merged from multiple origins. + * + * There are four sources of data (origins) for a site: + * + * - default => WordPress + * - blocks => each one of the blocks provides data for itself + * - theme => the active theme + * - custom => data provided by the user + * + * The custom's has higher priority than the theme's, the theme's higher than blocks', + * and block's higher than default's. + * + * Unlike the getters + * {@link https://developer.wordpress.org/reference/classes/wp_theme_json_resolver/get_core_data/ get_core_data}, + * {@link https://developer.wordpress.org/reference/classes/wp_theme_json_resolver/get_theme_data/ get_theme_data}, + * and {@link https://developer.wordpress.org/reference/classes/wp_theme_json_resolver/get_user_data/ get_user_data}, + * this method returns data after it has been merged with the previous origins. + * This means that if the same piece of data is declared in different origins + * (default, blocks, theme, custom), the last origin overrides the previous. + * + * For example, if the user has set a background color + * for the paragraph block, and the theme has done it as well, + * the user preference wins. + * + * @since 5.8.0 + * @since 5.9.0 Added user data, removed the `$settings` parameter, + * added the `$origin` parameter. + * @since 6.1.0 Added block data and generation of spacingSizes array. + * @since 6.2.0 Changed ' $origin' parameter values to 'default', 'blocks', 'theme' or 'custom'. + * + * @param string $origin Optional. To what level should we merge data: 'default', 'blocks', 'theme' or 'custom'. + * 'custom' is used as default value as well as fallback value if the origin is unknown. + * @return WP_Theme_JSON + * @phpstan-param 'default'|'blocks'|'theme'|'custom' $origin + */ + public static function get_merged_data($origin = 'custom') + { + } + /** + * Returns the ID of the custom post type + * that stores user data. + * + * @since 5.9.0 + * + * @return integer|null + */ + public static function get_user_global_styles_post_id() + { + } + /** + * Determines whether the active theme has a theme.json file. + * + * @since 5.8.0 + * @since 5.9.0 Added a check in the parent theme. + * @deprecated 6.2.0 Use wp_theme_has_theme_json() instead. + * + * @return bool + */ + public static function theme_has_support() + { + } + /** + * Builds the path to the given file and checks that it is readable. + * + * If it isn't, returns an empty string, otherwise returns the whole file path. + * + * @since 5.8.0 + * @since 5.9.0 Adapted to work with child themes, added the `$template` argument. + * + * @param string $file_name Name of the file. + * @param bool $template Optional. Use template theme directory. Default false. + * @return string The whole file path or empty if the file doesn't exist. + */ + protected static function get_file_path_from_theme($file_name, $template = \false) + { + } + /** + * Cleans the cached data so it can be recalculated. + * + * @since 5.8.0 + * @since 5.9.0 Added the `$user`, `$user_custom_post_type_id`, + * and `$i18n_schema` variables to reset. + * @since 6.1.0 Added the `$blocks` and `$blocks_cache` variables + * to reset. + */ + public static function clean_cached_data() + { + } + /** + * Returns the style variations defined by the theme. + * + * @since 6.0.0 + * @since 6.2.0 Returns parent theme variations if theme is a child. + * @since 6.6.0 Added configurable scope parameter to allow filtering + * theme.json partial files by the scope to which they + * can be applied e.g. theme vs block etc. + * Added basic caching for read theme.json partial files. + * + * @param string $scope The scope or type of style variation to retrieve e.g. theme, block etc. + * @return array + */ + public static function get_style_variations($scope = 'theme') + { + } + /** + * Resolves relative paths in theme.json styles to theme absolute paths + * and returns them in an array that can be embedded + * as the value of `_link` object in REST API responses. + * + * @since 6.6.0 + * @since 6.7.0 Resolve relative paths in block styles. + * + * @param WP_Theme_JSON $theme_json A theme json instance. + * @return array An array of resolved paths. + */ + public static function get_resolved_theme_uris($theme_json) + { + } + /** + * Resolves relative paths in theme.json styles to theme absolute paths + * and merges them with incoming theme JSON. + * + * @since 6.6.0 + * + * @param WP_Theme_JSON $theme_json A theme json instance. + * @return WP_Theme_JSON Theme merged with resolved paths, if any found. + */ + public static function resolve_theme_file_uris($theme_json) + { + } + } + /** + * Class that migrates a given theme.json structure to the latest schema. + * + * This class is for internal core usage and is not supposed to be used by extenders (plugins and/or themes). + * This is a low-level API that may need to do breaking changes. Please, + * use get_global_settings, get_global_styles, and get_global_stylesheet instead. + * + * @since 5.9.0 + * @access private + */ + #[\AllowDynamicProperties] + class WP_Theme_JSON_Schema + { + /** + * Maps old properties to their new location within the schema's settings. + * This will be applied at both the defaults and individual block levels. + */ + const V1_TO_V2_RENAMED_PATHS = array('border.customRadius' => 'border.radius', 'spacing.customMargin' => 'spacing.margin', 'spacing.customPadding' => 'spacing.padding', 'typography.customLineHeight' => 'typography.lineHeight'); + /** + * Function that migrates a given theme.json structure to the last version. + * + * @since 5.9.0 + * @since 6.6.0 Migrate up to v3 and add $origin parameter. + * + * @param array $theme_json The structure to migrate. + * @param string $origin Optional. What source of data this object represents. + * One of 'blocks', 'default', 'theme', or 'custom'. Default 'theme'. + * @return array The structure in the last version. + * @phpstan-param 'blocks'|'default'|'theme'|'custom' $origin + */ + public static function migrate($theme_json, $origin = 'theme') + { + } + } + /** + * Class that encapsulates the processing of structures that adhere to the theme.json spec. + * + * This class is for internal core usage and is not supposed to be used by extenders (plugins and/or themes). + * This is a low-level API that may need to do breaking changes. Please, + * use get_global_settings, get_global_styles, and get_global_stylesheet instead. + * + * @access private + */ + #[\AllowDynamicProperties] + class WP_Theme_JSON + { + /** + * Container of data in theme.json format. + * + * @since 5.8.0 + * @var array + */ + protected $theme_json = \null; + /** + * Holds block metadata extracted from block.json + * to be shared among all instances so we don't + * process it twice. + * + * @since 5.8.0 + * @since 6.1.0 Initialize as an empty array. + * @var array + */ + protected static $blocks_metadata = array(); + /** + * The CSS selector for the top-level preset settings. + * + * @since 6.6.0 + * @var string + */ + const ROOT_CSS_PROPERTIES_SELECTOR = ':root'; + /** + * The CSS selector for the top-level styles. + * + * @since 5.8.0 + * @var string + */ + const ROOT_BLOCK_SELECTOR = 'body'; + /** + * The sources of data this object can represent. + * + * @since 5.8.0 + * @since 6.1.0 Added 'blocks'. + * @var string[] + */ + const VALID_ORIGINS = array('default', 'blocks', 'theme', 'custom'); + /** + * Presets are a set of values that serve + * to bootstrap some styles: colors, font sizes, etc. + * + * They are a unkeyed array of values such as: + * + * array( + * array( + * 'slug' => 'unique-name-within-the-set', + * 'name' => 'Name for the UI', + * <value_key> => 'value' + * ), + * ) + * + * This contains the necessary metadata to process them: + * + * - path => Where to find the preset within the settings section. + * - prevent_override => Disables override of default presets by theme presets. + * The relationship between whether to override the defaults + * and whether the defaults are enabled is inverse: + * - If defaults are enabled => theme presets should not be overridden + * - If defaults are disabled => theme presets should be overridden + * For example, a theme sets defaultPalette to false, + * making the default palette hidden from the user. + * In that case, we want all the theme presets to be present, + * so they should override the defaults by setting this false. + * - use_default_names => whether to use the default names + * - value_key => the key that represents the value + * - value_func => optionally, instead of value_key, a function to generate + * the value that takes a preset as an argument + * (either value_key or value_func should be present) + * - css_vars => template string to use in generating the CSS Custom Property. + * Example output: "--wp--preset--duotone--blue: <value>" will generate as many CSS Custom Properties as presets defined + * substituting the $slug for the slug's value for each preset value. + * - classes => array containing a structure with the classes to + * generate for the presets, where for each array item + * the key is the class name and the value the property name. + * The "$slug" substring will be replaced by the slug of each preset. + * For example: + * 'classes' => array( + * '.has-$slug-color' => 'color', + * '.has-$slug-background-color' => 'background-color', + * '.has-$slug-border-color' => 'border-color', + * ) + * - properties => array of CSS properties to be used by kses to + * validate the content of each preset + * by means of the remove_insecure_properties method. + * + * @since 5.8.0 + * @since 5.9.0 Added the `color.duotone` and `typography.fontFamilies` presets, + * `use_default_names` preset key, and simplified the metadata structure. + * @since 6.0.0 Replaced `override` with `prevent_override` and updated the + * `prevent_override` value for `color.duotone` to use `color.defaultDuotone`. + * @since 6.2.0 Added 'shadow' presets. + * @since 6.3.0 Replaced value_func for duotone with `null`. Custom properties are handled by class-wp-duotone.php. + * @since 6.6.0 Added the `dimensions.aspectRatios` and `dimensions.defaultAspectRatios` presets. + * Updated the 'prevent_override' value for font size presets to use 'typography.defaultFontSizes' + * and spacing size presets to use `spacing.defaultSpacingSizes`. + * @since 6.9.0 Added `border.radiusSizes`. + * @var array + */ + const PRESETS_METADATA = array(array('path' => array('dimensions', 'aspectRatios'), 'prevent_override' => array('dimensions', 'defaultAspectRatios'), 'use_default_names' => \false, 'value_key' => 'ratio', 'css_vars' => '--wp--preset--aspect-ratio--$slug', 'classes' => array(), 'properties' => array('aspect-ratio')), array('path' => array('color', 'palette'), 'prevent_override' => array('color', 'defaultPalette'), 'use_default_names' => \false, 'value_key' => 'color', 'css_vars' => '--wp--preset--color--$slug', 'classes' => array('.has-$slug-color' => 'color', '.has-$slug-background-color' => 'background-color', '.has-$slug-border-color' => 'border-color'), 'properties' => array('color', 'background-color', 'border-color')), array('path' => array('color', 'gradients'), 'prevent_override' => array('color', 'defaultGradients'), 'use_default_names' => \false, 'value_key' => 'gradient', 'css_vars' => '--wp--preset--gradient--$slug', 'classes' => array('.has-$slug-gradient-background' => 'background'), 'properties' => array('background')), array( + 'path' => array('color', 'duotone'), + 'prevent_override' => array('color', 'defaultDuotone'), + 'use_default_names' => \false, + 'value_func' => \null, + // CSS Custom Properties for duotone are handled by block supports in class-wp-duotone.php. + 'css_vars' => \null, + 'classes' => array(), + 'properties' => array('filter'), + ), array('path' => array('typography', 'fontSizes'), 'prevent_override' => array('typography', 'defaultFontSizes'), 'use_default_names' => \true, 'value_func' => 'wp_get_typography_font_size_value', 'css_vars' => '--wp--preset--font-size--$slug', 'classes' => array('.has-$slug-font-size' => 'font-size'), 'properties' => array('font-size')), array('path' => array('typography', 'fontFamilies'), 'prevent_override' => \false, 'use_default_names' => \false, 'value_key' => 'fontFamily', 'css_vars' => '--wp--preset--font-family--$slug', 'classes' => array('.has-$slug-font-family' => 'font-family'), 'properties' => array('font-family')), array('path' => array('spacing', 'spacingSizes'), 'prevent_override' => array('spacing', 'defaultSpacingSizes'), 'use_default_names' => \true, 'value_key' => 'size', 'css_vars' => '--wp--preset--spacing--$slug', 'classes' => array(), 'properties' => array('padding', 'margin')), array('path' => array('shadow', 'presets'), 'prevent_override' => array('shadow', 'defaultPresets'), 'use_default_names' => \false, 'value_key' => 'shadow', 'css_vars' => '--wp--preset--shadow--$slug', 'classes' => array(), 'properties' => array('box-shadow')), array('path' => array('border', 'radiusSizes'), 'prevent_override' => \false, 'use_default_names' => \false, 'value_key' => 'size', 'css_vars' => '--wp--preset--border-radius--$slug', 'classes' => array(), 'properties' => array('border-radius'))); + /** + * Metadata for style properties. + * + * Each element is a direct mapping from the CSS property name to the + * path to the value in theme.json & block attributes. + * + * @since 5.8.0 + * @since 5.9.0 Added the `border-*`, `font-family`, `font-style`, `font-weight`, + * `letter-spacing`, `margin-*`, `padding-*`, `--wp--style--block-gap`, + * `text-decoration`, `text-transform`, and `filter` properties, + * simplified the metadata structure. + * @since 6.1.0 Added the `border-*-color`, `border-*-width`, `border-*-style`, + * `--wp--style--root--padding-*`, and `box-shadow` properties, + * removed the `--wp--style--block-gap` property. + * @since 6.2.0 Added `outline-*`, and `min-height` properties. + * @since 6.3.0 Added `column-count` property. + * @since 6.4.0 Added `writing-mode` property. + * @since 6.5.0 Added `aspect-ratio` property. + * @since 6.6.0 Added `background-[image|position|repeat|size]` properties. + * @since 6.7.0 Added `background-attachment` property. + * @var array + */ + const PROPERTIES_METADATA = array('aspect-ratio' => array('dimensions', 'aspectRatio'), 'background' => array('color', 'gradient'), 'background-color' => array('color', 'background'), 'background-image' => array('background', 'backgroundImage'), 'background-position' => array('background', 'backgroundPosition'), 'background-repeat' => array('background', 'backgroundRepeat'), 'background-size' => array('background', 'backgroundSize'), 'background-attachment' => array('background', 'backgroundAttachment'), 'border-radius' => array('border', 'radius'), 'border-top-left-radius' => array('border', 'radius', 'topLeft'), 'border-top-right-radius' => array('border', 'radius', 'topRight'), 'border-bottom-left-radius' => array('border', 'radius', 'bottomLeft'), 'border-bottom-right-radius' => array('border', 'radius', 'bottomRight'), 'border-color' => array('border', 'color'), 'border-width' => array('border', 'width'), 'border-style' => array('border', 'style'), 'border-top-color' => array('border', 'top', 'color'), 'border-top-width' => array('border', 'top', 'width'), 'border-top-style' => array('border', 'top', 'style'), 'border-right-color' => array('border', 'right', 'color'), 'border-right-width' => array('border', 'right', 'width'), 'border-right-style' => array('border', 'right', 'style'), 'border-bottom-color' => array('border', 'bottom', 'color'), 'border-bottom-width' => array('border', 'bottom', 'width'), 'border-bottom-style' => array('border', 'bottom', 'style'), 'border-left-color' => array('border', 'left', 'color'), 'border-left-width' => array('border', 'left', 'width'), 'border-left-style' => array('border', 'left', 'style'), 'color' => array('color', 'text'), 'text-align' => array('typography', 'textAlign'), 'column-count' => array('typography', 'textColumns'), 'font-family' => array('typography', 'fontFamily'), 'font-size' => array('typography', 'fontSize'), 'font-style' => array('typography', 'fontStyle'), 'font-weight' => array('typography', 'fontWeight'), 'letter-spacing' => array('typography', 'letterSpacing'), 'line-height' => array('typography', 'lineHeight'), 'margin' => array('spacing', 'margin'), 'margin-top' => array('spacing', 'margin', 'top'), 'margin-right' => array('spacing', 'margin', 'right'), 'margin-bottom' => array('spacing', 'margin', 'bottom'), 'margin-left' => array('spacing', 'margin', 'left'), 'min-height' => array('dimensions', 'minHeight'), 'outline-color' => array('outline', 'color'), 'outline-offset' => array('outline', 'offset'), 'outline-style' => array('outline', 'style'), 'outline-width' => array('outline', 'width'), 'padding' => array('spacing', 'padding'), 'padding-top' => array('spacing', 'padding', 'top'), 'padding-right' => array('spacing', 'padding', 'right'), 'padding-bottom' => array('spacing', 'padding', 'bottom'), 'padding-left' => array('spacing', 'padding', 'left'), '--wp--style--root--padding' => array('spacing', 'padding'), '--wp--style--root--padding-top' => array('spacing', 'padding', 'top'), '--wp--style--root--padding-right' => array('spacing', 'padding', 'right'), '--wp--style--root--padding-bottom' => array('spacing', 'padding', 'bottom'), '--wp--style--root--padding-left' => array('spacing', 'padding', 'left'), 'text-decoration' => array('typography', 'textDecoration'), 'text-transform' => array('typography', 'textTransform'), 'filter' => array('filter', 'duotone'), 'box-shadow' => array('shadow'), 'writing-mode' => array('typography', 'writingMode')); + /** + * Indirect metadata for style properties that are not directly output. + * + * Each element maps from a CSS property name to an array of + * paths to the value in theme.json & block attributes. + * + * Indirect properties are not output directly by `compute_style_properties`, + * but are used elsewhere in the processing of global styles. The indirect + * property is used to validate whether a style value is allowed. + * + * @since 6.2.0 + * @since 6.6.0 Added background-image properties. + * @var array + */ + const INDIRECT_PROPERTIES_METADATA = array('gap' => array(array('spacing', 'blockGap')), 'column-gap' => array(array('spacing', 'blockGap', 'left')), 'row-gap' => array(array('spacing', 'blockGap', 'top')), 'max-width' => array(array('layout', 'contentSize'), array('layout', 'wideSize')), 'background-image' => array(array('background', 'backgroundImage', 'url'))); + /** + * Protected style properties. + * + * These style properties are only rendered if a setting enables it + * via a value other than `null`. + * + * Each element maps the style property to the corresponding theme.json + * setting key. + * + * @since 5.9.0 + * @var array + */ + const PROTECTED_PROPERTIES = array('spacing.blockGap' => array('spacing', 'blockGap')); + /** + * The top-level keys a theme.json can have. + * + * @since 5.8.0 As `ALLOWED_TOP_LEVEL_KEYS`. + * @since 5.9.0 Renamed from `ALLOWED_TOP_LEVEL_KEYS` to `VALID_TOP_LEVEL_KEYS`, + * added the `customTemplates` and `templateParts` values. + * @since 6.3.0 Added the `description` value. + * @since 6.6.0 Added `blockTypes` to support block style variation theme.json partials. + * @var string[] + */ + const VALID_TOP_LEVEL_KEYS = array('blockTypes', 'customTemplates', 'description', 'patterns', 'settings', 'slug', 'styles', 'templateParts', 'title', 'version'); + /** + * The valid properties under the settings key. + * + * @since 5.8.0 As `ALLOWED_SETTINGS`. + * @since 5.9.0 Renamed from `ALLOWED_SETTINGS` to `VALID_SETTINGS`, + * added new properties for `border`, `color`, `spacing`, + * and `typography`, and renamed others according to the new schema. + * @since 6.0.0 Added `color.defaultDuotone`. + * @since 6.1.0 Added `layout.definitions` and `useRootPaddingAwareAlignments`. + * @since 6.2.0 Added `dimensions.minHeight`, 'shadow.presets', 'shadow.defaultPresets', + * `position.fixed` and `position.sticky`. + * @since 6.3.0 Added support for `typography.textColumns`, removed `layout.definitions`. + * @since 6.4.0 Added support for `layout.allowEditing`, `background.backgroundImage`, + * `typography.writingMode`, `lightbox.enabled` and `lightbox.allowEditing`. + * @since 6.5.0 Added support for `layout.allowCustomContentAndWideSize`, + * `background.backgroundSize` and `dimensions.aspectRatio`. + * @since 6.6.0 Added support for 'dimensions.aspectRatios', 'dimensions.defaultAspectRatios', + * 'typography.defaultFontSizes', and 'spacing.defaultSpacingSizes'. + * @since 6.9.0 Added support for `border.radiusSizes`. + * @var array + */ + const VALID_SETTINGS = array('appearanceTools' => \null, 'useRootPaddingAwareAlignments' => \null, 'background' => array('backgroundImage' => \null, 'backgroundSize' => \null), 'border' => array('color' => \null, 'radius' => \null, 'radiusSizes' => \null, 'style' => \null, 'width' => \null), 'color' => array('background' => \null, 'custom' => \null, 'customDuotone' => \null, 'customGradient' => \null, 'defaultDuotone' => \null, 'defaultGradients' => \null, 'defaultPalette' => \null, 'duotone' => \null, 'gradients' => \null, 'link' => \null, 'heading' => \null, 'button' => \null, 'caption' => \null, 'palette' => \null, 'text' => \null), 'custom' => \null, 'dimensions' => array('aspectRatio' => \null, 'aspectRatios' => \null, 'defaultAspectRatios' => \null, 'minHeight' => \null), 'layout' => array('contentSize' => \null, 'wideSize' => \null, 'allowEditing' => \null, 'allowCustomContentAndWideSize' => \null), 'lightbox' => array('enabled' => \null, 'allowEditing' => \null), 'position' => array('fixed' => \null, 'sticky' => \null), 'spacing' => array('customSpacingSize' => \null, 'defaultSpacingSizes' => \null, 'spacingSizes' => \null, 'spacingScale' => \null, 'blockGap' => \null, 'margin' => \null, 'padding' => \null, 'units' => \null), 'shadow' => array('presets' => \null, 'defaultPresets' => \null), 'typography' => array('fluid' => \null, 'customFontSize' => \null, 'defaultFontSizes' => \null, 'dropCap' => \null, 'fontFamilies' => \null, 'fontSizes' => \null, 'fontStyle' => \null, 'fontWeight' => \null, 'letterSpacing' => \null, 'lineHeight' => \null, 'textAlign' => \null, 'textColumns' => \null, 'textDecoration' => \null, 'textTransform' => \null, 'writingMode' => \null)); + /** + * The valid properties for fontFamilies under settings key. + * + * @since 6.5.0 + * @var array + */ + const FONT_FAMILY_SCHEMA = array(array('fontFamily' => \null, 'name' => \null, 'slug' => \null, 'fontFace' => array(array('ascentOverride' => \null, 'descentOverride' => \null, 'fontDisplay' => \null, 'fontFamily' => \null, 'fontFeatureSettings' => \null, 'fontStyle' => \null, 'fontStretch' => \null, 'fontVariationSettings' => \null, 'fontWeight' => \null, 'lineGapOverride' => \null, 'sizeAdjust' => \null, 'src' => \null, 'unicodeRange' => \null)))); + /** + * The valid properties under the styles key. + * + * @since 5.8.0 As `ALLOWED_STYLES`. + * @since 5.9.0 Renamed from `ALLOWED_STYLES` to `VALID_STYLES`, + * added new properties for `border`, `filter`, `spacing`, + * and `typography`. + * @since 6.1.0 Added new side properties for `border`, + * added new property `shadow`, + * updated `blockGap` to be allowed at any level. + * @since 6.2.0 Added `outline`, and `minHeight` properties. + * @since 6.3.0 Added support for `typography.textColumns`. + * @since 6.5.0 Added support for `dimensions.aspectRatio`. + * @since 6.6.0 Added `background` sub properties to top-level only. + * @var array + */ + const VALID_STYLES = array('background' => array('backgroundImage' => \null, 'backgroundPosition' => \null, 'backgroundRepeat' => \null, 'backgroundSize' => \null, 'backgroundAttachment' => \null), 'border' => array('color' => \null, 'radius' => \null, 'style' => \null, 'width' => \null, 'top' => \null, 'right' => \null, 'bottom' => \null, 'left' => \null), 'color' => array('background' => \null, 'gradient' => \null, 'text' => \null), 'dimensions' => array('aspectRatio' => \null, 'minHeight' => \null), 'filter' => array('duotone' => \null), 'outline' => array('color' => \null, 'offset' => \null, 'style' => \null, 'width' => \null), 'shadow' => \null, 'spacing' => array('margin' => \null, 'padding' => \null, 'blockGap' => \null), 'typography' => array('fontFamily' => \null, 'fontSize' => \null, 'fontStyle' => \null, 'fontWeight' => \null, 'letterSpacing' => \null, 'lineHeight' => \null, 'textAlign' => \null, 'textColumns' => \null, 'textDecoration' => \null, 'textTransform' => \null, 'writingMode' => \null), 'css' => \null); + /** + * Defines which pseudo selectors are enabled for which elements. + * + * The order of the selectors should be: link, any-link, visited, hover, focus, focus-visible, active. + * This is to ensure the user action (hover, focus and active) styles have a higher + * specificity than the visited styles, which in turn have a higher specificity than + * the unvisited styles. + * + * See https://core.trac.wordpress.org/ticket/56928. + * Note: this will affect both top-level and block-level elements. + * + * @since 6.1.0 + * @since 6.2.0 Added support for ':link' and ':any-link'. + * @since 6.8.0 Added support for ':focus-visible'. + * @since 6.9.0 Added `textInput` and `select` elements. + * @var array + */ + const VALID_ELEMENT_PSEUDO_SELECTORS = array('link' => array(':link', ':any-link', ':visited', ':hover', ':focus', ':focus-visible', ':active'), 'button' => array(':link', ':any-link', ':visited', ':hover', ':focus', ':focus-visible', ':active')); + /** + * The valid elements that can be found under styles. + * + * @since 5.8.0 + * @since 6.1.0 Added `heading`, `button`, and `caption` elements. + * @var string[] + */ + const ELEMENTS = array( + 'link' => 'a:where(:not(.wp-element-button))', + // The `where` is needed to lower the specificity. + 'heading' => 'h1, h2, h3, h4, h5, h6', + 'h1' => 'h1', + 'h2' => 'h2', + 'h3' => 'h3', + 'h4' => 'h4', + 'h5' => 'h5', + 'h6' => 'h6', + // We have the .wp-block-button__link class so that this will target older buttons that have been serialized. + 'button' => '.wp-element-button, .wp-block-button__link', + // The block classes are necessary to target older content that won't use the new class names. + 'caption' => '.wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption', + 'cite' => 'cite', + 'textInput' => 'textarea, input:where([type=email],[type=number],[type=password],[type=search],[type=text],[type=tel],[type=url])', + 'select' => 'select', + ); + const __EXPERIMENTAL_ELEMENT_CLASS_NAMES = array('button' => 'wp-element-button', 'caption' => 'wp-element-caption'); + /** + * List of block support features that can have their related styles + * generated under their own feature level selector rather than the block's. + * + * @since 6.1.0 + * @var string[] + */ + const BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS = array('__experimentalBorder' => 'border', 'color' => 'color', 'spacing' => 'spacing', 'typography' => 'typography'); + /** + * Return the input schema at the root and per origin. + * + * @since 6.5.0 + * + * @param array $schema The base schema. + * @return array The schema at the root and per origin. + * + * Example: + * schema_in_root_and_per_origin( + * array( + * 'fontFamily' => null, + * 'slug' => null, + * ) + * ) + * + * Returns: + * array( + * 'fontFamily' => null, + * 'slug' => null, + * 'default' => array( + * 'fontFamily' => null, + * 'slug' => null, + * ), + * 'blocks' => array( + * 'fontFamily' => null, + * 'slug' => null, + * ), + * 'theme' => array( + * 'fontFamily' => null, + * 'slug' => null, + * ), + * 'custom' => array( + * 'fontFamily' => null, + * 'slug' => null, + * ), + * ) + */ + protected static function schema_in_root_and_per_origin($schema) + { + } + /** + * Returns a class name by an element name. + * + * @since 6.1.0 + * + * @param string $element The name of the element. + * @return string The name of the class. + */ + public static function get_element_class_name($element) + { + } + /** + * Options that settings.appearanceTools enables. + * + * @since 6.0.0 + * @since 6.2.0 Added `dimensions.minHeight` and `position.sticky`. + * @since 6.4.0 Added `background.backgroundImage`. + * @since 6.5.0 Added `background.backgroundSize` and `dimensions.aspectRatio`. + * @var array + */ + const APPEARANCE_TOOLS_OPT_INS = array(array('background', 'backgroundImage'), array('background', 'backgroundSize'), array('border', 'color'), array('border', 'radius'), array('border', 'style'), array('border', 'width'), array('color', 'link'), array('color', 'heading'), array('color', 'button'), array('color', 'caption'), array('dimensions', 'aspectRatio'), array('dimensions', 'minHeight'), array('position', 'sticky'), array('spacing', 'blockGap'), array('spacing', 'margin'), array('spacing', 'padding'), array('typography', 'lineHeight')); + /** + * The latest version of the schema in use. + * + * @since 5.8.0 + * @since 5.9.0 Changed value from 1 to 2. + * @since 6.6.0 Changed value from 2 to 3. + * @var int + */ + const LATEST_SCHEMA = 3; + /** + * Constructor. + * + * @since 5.8.0 + * @since 6.6.0 Key spacingScale by origin, and Pre-generate the spacingSizes from spacingScale. + * Added unwrapping of shared block style variations into block type variations if registered. + * + * @param array $theme_json A structure that follows the theme.json schema. + * @param string $origin Optional. What source of data this object represents. + * One of 'blocks', 'default', 'theme', or 'custom'. Default 'theme'. + * @phpstan-param 'blocks'|'default'|'theme'|'custom' $origin + */ + public function __construct($theme_json = array('version' => self::LATEST_SCHEMA), $origin = 'theme') + { + } + /** + * Enables some opt-in settings if theme declared support. + * + * @since 5.9.0 + * + * @param array $theme_json A theme.json structure to modify. + * @return array The modified theme.json structure. + */ + protected static function maybe_opt_in_into_settings($theme_json) + { + } + /** + * Enables some settings. + * + * @since 5.9.0 + * + * @param array $context The context to which the settings belong. + */ + protected static function do_opt_in_into_settings(&$context) + { + } + /** + * Sanitizes the input according to the schemas. + * + * @since 5.8.0 + * @since 5.9.0 Added the `$valid_block_names` and `$valid_element_name` parameters. + * @since 6.3.0 Added the `$valid_variations` parameter. + * @since 6.6.0 Updated schema to allow extended block style variations. + * + * @param array $input Structure to sanitize. + * @param array $valid_block_names List of valid block names. + * @param array $valid_element_names List of valid element names. + * @param array $valid_variations List of valid variations per block. + * @return array The sanitized output. + */ + protected static function sanitize($input, $valid_block_names, $valid_element_names, $valid_variations) + { + } + /** + * Appends a sub-selector to an existing one. + * + * Given the compounded $selector "h1, h2, h3" + * and the $to_append selector ".some-class" the result will be + * "h1.some-class, h2.some-class, h3.some-class". + * + * @since 5.8.0 + * @since 6.1.0 Added append position. + * @since 6.3.0 Removed append position parameter. + * + * @param string $selector Original selector. + * @param string $to_append Selector to append. + * @return string The new selector. + */ + protected static function append_to_selector($selector, $to_append) + { + } + /** + * Prepends a sub-selector to an existing one. + * + * Given the compounded $selector "h1, h2, h3" + * and the $to_prepend selector ".some-class " the result will be + * ".some-class h1, .some-class h2, .some-class h3". + * + * @since 6.3.0 + * + * @param string $selector Original selector. + * @param string $to_prepend Selector to prepend. + * @return string The new selector. + */ + protected static function prepend_to_selector($selector, $to_prepend) + { + } + /** + * Returns the metadata for each block. + * + * Example: + * + * { + * 'core/paragraph': { + * 'selector': 'p', + * 'elements': { + * 'link' => 'link selector', + * 'etc' => 'element selector' + * } + * }, + * 'core/heading': { + * 'selector': 'h1', + * 'elements': {} + * }, + * 'core/image': { + * 'selector': '.wp-block-image', + * 'duotone': 'img', + * 'elements': {} + * } + * } + * + * @since 5.8.0 + * @since 5.9.0 Added `duotone` key with CSS selector. + * @since 6.1.0 Added `features` key with block support feature level selectors. + * @since 6.3.0 Refactored and stabilized selectors API. + * @since 6.6.0 Updated to include block style variations from the block styles registry. + * + * @return array Block metadata. + */ + protected static function get_blocks_metadata() + { + } + /** + * Given a tree, removes the keys that are not present in the schema. + * + * It is recursive and modifies the input in-place. + * + * @since 5.8.0 + * + * @param array $tree Input to process. + * @param array $schema Schema to adhere to. + * @return array The modified $tree. + */ + protected static function remove_keys_not_in_schema($tree, $schema) + { + } + /** + * Returns the existing settings for each block. + * + * Example: + * + * { + * 'root': { + * 'color': { + * 'custom': true + * } + * }, + * 'core/paragraph': { + * 'spacing': { + * 'customPadding': true + * } + * } + * } + * + * @since 5.8.0 + * + * @return array Settings per block. + */ + public function get_settings() + { + } + /** + * Returns the stylesheet that results of processing + * the theme.json structure this object represents. + * + * @since 5.8.0 + * @since 5.9.0 Removed the `$type` parameter, added the `$types` and `$origins` parameters. + * @since 6.3.0 Add fallback layout styles for Post Template when block gap support isn't available. + * @since 6.6.0 Added boolean `skip_root_layout_styles` and `include_block_style_variations` options + * to control styles output as desired. + * + * @param string[] $types Types of styles to load. Will load all by default. It accepts: + * - `variables`: only the CSS Custom Properties for presets & custom ones. + * - `styles`: only the styles section in theme.json. + * - `presets`: only the classes for the presets. + * - `base-layout-styles`: only the base layout styles. + * - `custom-css`: only the custom CSS. + * @param string[] $origins A list of origins to include. By default it includes VALID_ORIGINS. + * @param array $options { + * Optional. An array of options for now used for internal purposes only (may change without notice). + * + * @type string $scope Makes sure all style are scoped to a given selector + * @type string $root_selector Overwrites and forces a given selector to be used on the root node + * @type bool $skip_root_layout_styles Omits root layout styles from the generated stylesheet. Default false. + * @type bool $include_block_style_variations Includes styles for block style variations in the generated stylesheet. Default false. + * } + * @return string The resulting stylesheet. + * @phpstan-param array{ + * scope?: string, + * root_selector?: string, + * skip_root_layout_styles?: bool, + * include_block_style_variations?: bool, + * } $options + */ + public function get_stylesheet($types = array('variables', 'styles', 'presets'), $origins = \null, $options = array()) + { + } + /** + * Processes the CSS, to apply nesting. + * + * @since 6.2.0 + * @since 6.6.0 Enforced 0-1-0 specificity for block custom CSS selectors. + * + * @param string $css The CSS to process. + * @param string $selector The selector to nest. + * @return string The processed CSS. + */ + protected function process_blocks_custom_css($css, $selector) + { + } + /** + * Returns the global styles custom CSS. + * + * @since 6.2.0 + * @deprecated 6.7.0 Use {@see 'get_stylesheet'} instead. + * + * @return string The global styles custom CSS. + */ + public function get_custom_css() + { + } + /** + * Returns the page templates of the active theme. + * + * @since 5.9.0 + * + * @return array + */ + public function get_custom_templates() + { + } + /** + * Returns the template part data of active theme. + * + * @since 5.9.0 + * + * @return array + */ + public function get_template_parts() + { + } + /** + * Converts each style section into a list of rulesets + * containing the block styles to be appended to the stylesheet. + * + * See glossary at https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax + * + * For each section this creates a new ruleset such as: + * + * block-selector { + * style-property-one: value; + * } + * + * @since 5.8.0 As `get_block_styles()`. + * @since 5.9.0 Renamed from `get_block_styles()` to `get_block_classes()` + * and no longer returns preset classes. + * Removed the `$setting_nodes` parameter. + * @since 6.1.0 Moved most internal logic to `get_styles_for_block()`. + * + * @param array $style_nodes Nodes with styles. + * @return string The new stylesheet. + */ + protected function get_block_classes($style_nodes) + { + } + /** + * Gets the CSS layout rules for a particular block from theme.json layout definitions. + * + * @since 6.1.0 + * @since 6.3.0 Reduced specificity for layout margin rules. + * @since 6.5.1 Only output rules referencing content and wide sizes when values exist. + * @since 6.5.3 Add types parameter to check if only base layout styles are needed. + * @since 6.6.0 Updated layout style specificity to be compatible with overall 0-1-0 specificity in global styles. + * + * @param array $block_metadata Metadata about the block to get styles for. + * @param array $types Optional. Types of styles to output. If empty, all styles will be output. + * @return string Layout styles for the block. + */ + protected function get_layout_styles($block_metadata, $types = array()) + { + } + /** + * Creates new rulesets as classes for each preset value such as: + * + * .has-value-color { + * color: value; + * } + * + * .has-value-background-color { + * background-color: value; + * } + * + * .has-value-font-size { + * font-size: value; + * } + * + * .has-value-gradient-background { + * background: value; + * } + * + * p.has-value-gradient-background { + * background: value; + * } + * + * @since 5.9.0 + * + * @param array $setting_nodes Nodes with settings. + * @param string[] $origins List of origins to process presets from. + * @return string The new stylesheet. + */ + protected function get_preset_classes($setting_nodes, $origins) + { + } + /** + * Converts each styles section into a list of rulesets + * to be appended to the stylesheet. + * These rulesets contain all the css variables (custom variables and preset variables). + * + * See glossary at https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax + * + * For each section this creates a new ruleset such as: + * + * block-selector { + * --wp--preset--category--slug: value; + * --wp--custom--variable: value; + * } + * + * @since 5.8.0 + * @since 5.9.0 Added the `$origins` parameter. + * + * @param array $nodes Nodes with settings. + * @param string[] $origins List of origins to process. + * @return string The new stylesheet. + */ + protected function get_css_variables($nodes, $origins) + { + } + /** + * Given a selector and a declaration list, + * creates the corresponding ruleset. + * + * @since 5.8.0 + * + * @param string $selector CSS selector. + * @param array $declarations List of declarations. + * @return string The resulting CSS ruleset. + */ + protected static function to_ruleset($selector, $declarations) + { + } + /** + * Given a settings array, returns the generated rulesets + * for the preset classes. + * + * @since 5.8.0 + * @since 5.9.0 Added the `$origins` parameter. + * @since 6.6.0 Added check for root CSS properties selector. + * + * @param array $settings Settings to process. + * @param string $selector Selector wrapping the classes. + * @param string[] $origins List of origins to process. + * @return string The result of processing the presets. + */ + protected static function compute_preset_classes($settings, $selector, $origins) + { + } + /** + * Function that scopes a selector with another one. This works a bit like + * SCSS nesting except the `&` operator isn't supported. + * + * <code> + * $scope = '.a, .b .c'; + * $selector = '> .x, .y'; + * $merged = scope_selector( $scope, $selector ); + * // $merged is '.a > .x, .a .y, .b .c > .x, .b .c .y' + * </code> + * + * @since 5.9.0 + * @since 6.6.0 Added early return if missing scope or selector. + * + * @param string $scope Selector to scope to. + * @param string $selector Original selector. + * @return string Scoped selector. + */ + public static function scope_selector($scope, $selector) + { + } + /** + * Scopes the selectors for a given style node. + * + * This includes the primary selector, i.e. `$node['selector']`, as well as any custom + * selectors for features and subfeatures, e.g. `$node['selectors']['border']` etc. + * + * @since 6.6.0 + * + * @param string $scope Selector to scope to. + * @param array $node Style node with selectors to scope. + * @return array Node with updated selectors. + */ + protected static function scope_style_node_selectors($scope, $node) + { + } + /** + * Gets preset values keyed by slugs based on settings and metadata. + * + * <code> + * $settings = array( + * 'typography' => array( + * 'fontFamilies' => array( + * array( + * 'slug' => 'sansSerif', + * 'fontFamily' => '"Helvetica Neue", sans-serif', + * ), + * array( + * 'slug' => 'serif', + * 'colors' => 'Georgia, serif', + * ) + * ), + * ), + * ); + * $meta = array( + * 'path' => array( 'typography', 'fontFamilies' ), + * 'value_key' => 'fontFamily', + * ); + * $values_by_slug = get_settings_values_by_slug(); + * // $values_by_slug === array( + * // 'sans-serif' => '"Helvetica Neue", sans-serif', + * // 'serif' => 'Georgia, serif', + * // ); + * </code> + * + * @since 5.9.0 + * @since 6.6.0 Passing $settings to the callbacks defined in static::PRESETS_METADATA. + * + * @param array $settings Settings to process. + * @param array $preset_metadata One of the PRESETS_METADATA values. + * @param string[] $origins List of origins to process. + * @return array Array of presets where each key is a slug and each value is the preset value. + */ + protected static function get_settings_values_by_slug($settings, $preset_metadata, $origins) + { + } + /** + * Similar to get_settings_values_by_slug, but doesn't compute the value. + * + * @since 5.9.0 + * + * @param array $settings Settings to process. + * @param array $preset_metadata One of the PRESETS_METADATA values. + * @param string[] $origins List of origins to process. + * @return array Array of presets where the key and value are both the slug. + */ + protected static function get_settings_slugs($settings, $preset_metadata, $origins = \null) + { + } + /** + * Transforms a slug into a CSS Custom Property. + * + * @since 5.9.0 + * + * @param string $input String to replace. + * @param string $slug The slug value to use to generate the custom property. + * @return string The CSS Custom Property. Something along the lines of `--wp--preset--color--black`. + */ + protected static function replace_slug_in_string($input, $slug) + { + } + /** + * Given the block settings, extracts the CSS Custom Properties + * for the presets and adds them to the $declarations array + * following the format: + * + * array( + * 'name' => 'property_name', + * 'value' => 'property_value, + * ) + * + * @since 5.8.0 + * @since 5.9.0 Added the `$origins` parameter. + * + * @param array $settings Settings to process. + * @param string[] $origins List of origins to process. + * @return array The modified $declarations. + */ + protected static function compute_preset_vars($settings, $origins) + { + } + /** + * Given an array of settings, extracts the CSS Custom Properties + * for the custom values and adds them to the $declarations + * array following the format: + * + * array( + * 'name' => 'property_name', + * 'value' => 'property_value, + * ) + * + * @since 5.8.0 + * + * @param array $settings Settings to process. + * @return array The modified $declarations. + */ + protected static function compute_theme_vars($settings) + { + } + /** + * Given a tree, it creates a flattened one + * by merging the keys and binding the leaf values + * to the new keys. + * + * It also transforms camelCase names into kebab-case + * and substitutes '/' by '-'. + * + * This is thought to be useful to generate + * CSS Custom Properties from a tree, + * although there's nothing in the implementation + * of this function that requires that format. + * + * For example, assuming the given prefix is '--wp' + * and the token is '--', for this input tree: + * + * { + * 'some/property': 'value', + * 'nestedProperty': { + * 'sub-property': 'value' + * } + * } + * + * it'll return this output: + * + * { + * '--wp--some-property': 'value', + * '--wp--nested-property--sub-property': 'value' + * } + * + * @since 5.8.0 + * + * @param array $tree Input tree to process. + * @param string $prefix Optional. Prefix to prepend to each variable. Default empty string. + * @param string $token Optional. Token to use between levels. Default '--'. + * @return array The flattened tree. + */ + protected static function flatten_tree($tree, $prefix = '', $token = '--') + { + } + /** + * Given a styles array, it extracts the style properties + * and adds them to the $declarations array following the format: + * + * array( + * 'name' => 'property_name', + * 'value' => 'property_value', + * ) + * + * @since 5.8.0 + * @since 5.9.0 Added the `$settings` and `$properties` parameters. + * @since 6.1.0 Added `$theme_json`, `$selector`, and `$use_root_padding` parameters. + * @since 6.5.0 Output a `min-height: unset` rule when `aspect-ratio` is set. + * @since 6.6.0 Pass current theme JSON settings to wp_get_typography_font_size_value(), and process background properties. + * @since 6.7.0 `ref` resolution of background properties, and assigning custom default values. + * + * @param array $styles Styles to process. + * @param array $settings Theme settings. + * @param array $properties Properties metadata. + * @param array $theme_json Theme JSON array. + * @param string $selector The style block selector. + * @param boolean $use_root_padding Whether to add custom properties at root level. + * @return array Returns the modified $declarations. + */ + protected static function compute_style_properties($styles, $settings = array(), $properties = \null, $theme_json = \null, $selector = \null, $use_root_padding = \null) + { + } + /** + * Returns the style property for the given path. + * + * It also converts references to a path to the value + * stored at that location, e.g. + * { "ref": "style.color.background" } => "#fff". + * + * @since 5.8.0 + * @since 5.9.0 Added support for values of array type, which are returned as is. + * @since 6.1.0 Added the `$theme_json` parameter. + * @since 6.3.0 It no longer converts the internal format "var:preset|color|secondary" + * to the standard form "--wp--preset--color--secondary". + * This is already done by the sanitize method, + * so every property will be in the standard form. + * @since 6.7.0 Added support for background image refs. + * + * @param array $styles Styles subtree. + * @param array $path Which property to process. + * @param array $theme_json Theme JSON array. + * @return string|array Style property value. + */ + protected static function get_property_value($styles, $path, $theme_json = \null) + { + } + /** + * Builds metadata for the setting nodes, which returns in the form of: + * + * [ + * [ + * 'path' => ['path', 'to', 'some', 'node' ], + * 'selector' => 'CSS selector for some node' + * ], + * [ + * 'path' => [ 'path', 'to', 'other', 'node' ], + * 'selector' => 'CSS selector for other node' + * ], + * ] + * + * @since 5.8.0 + * + * @param array $theme_json The tree to extract setting nodes from. + * @param array $selectors List of selectors per block. + * @return array An array of setting nodes metadata. + */ + protected static function get_setting_nodes($theme_json, $selectors = array()) + { + } + /** + * Builds metadata for the style nodes, which returns in the form of: + * + * [ + * [ + * 'path' => [ 'path', 'to', 'some', 'node' ], + * 'selector' => 'CSS selector for some node', + * 'duotone' => 'CSS selector for duotone for some node' + * ], + * [ + * 'path' => ['path', 'to', 'other', 'node' ], + * 'selector' => 'CSS selector for other node', + * 'duotone' => null + * ], + * ] + * + * @since 5.8.0 + * @since 6.6.0 Added options array for modifying generated nodes. + * + * @param array $theme_json The tree to extract style nodes from. + * @param array $selectors List of selectors per block. + * @param array $options { + * Optional. An array of options for now used for internal purposes only (may change without notice). + * + * @type bool $include_block_style_variations Includes style nodes for block style variations. Default false. + * } + * @return array An array of style nodes metadata. + * @phpstan-param array{ + * include_block_style_variations?: bool, + * } $options + */ + protected static function get_style_nodes($theme_json, $selectors = array(), $options = array()) + { + } + /** + * A public helper to get the block nodes from a theme.json file. + * + * @since 6.1.0 + * + * @return array The block nodes in theme.json. + */ + public function get_styles_block_nodes() + { + } + /** + * Gets the CSS rules for a particular block from theme.json. + * + * @since 6.1.0 + * @since 6.6.0 Setting a min-height of HTML when root styles have a background gradient or image. + * Updated general global styles specificity to 0-1-0. + * Fixed custom CSS output in block style variations. + * + * @param array $block_metadata Metadata about the block to get styles for. + * @return string Styles for the block. + */ + public function get_styles_for_block($block_metadata) + { + } + /** + * Outputs the CSS for layout rules on the root. + * + * @since 6.1.0 + * @since 6.6.0 Use `ROOT_CSS_PROPERTIES_SELECTOR` for CSS custom properties and improved consistency of root padding rules. + * Updated specificity of body margin reset and first/last child selectors. + * + * @param string $selector The root node selector. + * @param array $block_metadata The metadata for the root block. + * @return string The additional root rules CSS. + */ + public function get_root_layout_rules($selector, $block_metadata) + { + } + /** + * For metadata values that can either be booleans or paths to booleans, gets the value. + * + * $data = array( + * 'color' => array( + * 'defaultPalette' => true + * ) + * ); + * + * static::get_metadata_boolean( $data, false ); + * // => false + * + * static::get_metadata_boolean( $data, array( 'color', 'defaultPalette' ) ); + * // => true + * + * @since 6.0.0 + * + * @param array $data The data to inspect. + * @param bool|array $path Boolean or path to a boolean. + * @param bool $default_value Default value if the referenced path is missing. + * Default false. + * @return bool Value of boolean metadata. + */ + protected static function get_metadata_boolean($data, $path, $default_value = \false) + { + } + /** + * Merges new incoming data. + * + * @since 5.8.0 + * @since 5.9.0 Duotone preset also has origins. + * @since 6.7.0 Replace background image objects during merge. + * + * @param WP_Theme_JSON $incoming Data to merge. + */ + public function merge($incoming) + { + } + /** + * Converts all filter (duotone) presets into SVGs. + * + * @since 5.9.1 + * + * @param array $origins List of origins to process. + * @return string SVG filters. + */ + public function get_svg_filters($origins) + { + } + /** + * Determines whether a presets should be overridden or not. + * + * @since 5.9.0 + * @deprecated 6.0.0 Use {@see 'get_metadata_boolean'} instead. + * + * @param array $theme_json The theme.json like structure to inspect. + * @param array $path Path to inspect. + * @param bool|array $override Data to compute whether to override the preset. + * @return bool + */ + protected static function should_override_preset($theme_json, $path, $override) + { + } + /** + * Returns the default slugs for all the presets in an associative array + * whose keys are the preset paths and the leaves is the list of slugs. + * + * For example: + * + * array( + * 'color' => array( + * 'palette' => array( 'slug-1', 'slug-2' ), + * 'gradients' => array( 'slug-3', 'slug-4' ), + * ), + * ) + * + * @since 5.9.0 + * + * @param array $data A theme.json like structure. + * @param array $node_path The path to inspect. It's 'settings' by default. + * @return array + */ + protected static function get_default_slugs($data, $node_path) + { + } + /** + * Gets a `default`'s preset name by a provided slug. + * + * @since 5.9.0 + * + * @param string $slug The slug we want to find a match from default presets. + * @param array $base_path The path to inspect. It's 'settings' by default. + * @return string|null + */ + protected function get_name_from_defaults($slug, $base_path) + { + } + /** + * Removes the preset values whose slug is equal to any of given slugs. + * + * @since 5.9.0 + * + * @param array $node The node with the presets to validate. + * @param array $slugs The slugs that should not be overridden. + * @return array The new node. + */ + protected static function filter_slugs($node, $slugs) + { + } + /** + * Removes insecure data from theme.json. + * + * @since 5.9.0 + * @since 6.3.2 Preserves global styles block variations when securing styles. + * @since 6.6.0 Updated to allow variation element styles and $origin parameter. + * + * @param array $theme_json Structure to sanitize. + * @param string $origin Optional. What source of data this object represents. + * One of 'blocks', 'default', 'theme', or 'custom'. Default 'theme'. + * @return array Sanitized structure. + * @phpstan-param 'blocks'|'default'|'theme'|'custom' $origin + */ + public static function remove_insecure_properties($theme_json, $origin = 'theme') + { + } + /** + * Remove insecure element styles within a variation or block. + * + * @since 6.8.0 + * + * @param array $elements The elements to process. + * @return array The sanitized elements styles. + */ + protected static function remove_insecure_element_styles($elements) + { + } + /** + * Remove insecure styles from inner blocks and their elements. + * + * @since 6.8.0 + * + * @param array $blocks The block styles to process. + * @return array Sanitized block type styles. + */ + protected static function remove_insecure_inner_block_styles($blocks) + { + } + /** + * Processes a setting node and returns the same node + * without the insecure settings. + * + * @since 5.9.0 + * + * @param array $input Node to process. + * @return array + */ + protected static function remove_insecure_settings($input) + { + } + /** + * Processes a style node and returns the same node + * without the insecure styles. + * + * @since 5.9.0 + * + * @param array $input Node to process. + * @return array + */ + protected static function remove_insecure_styles($input) + { + } + /** + * Checks that a declaration provided by the user is safe. + * + * @since 5.9.0 + * + * @param string $property_name Property name in a CSS declaration, i.e. the `color` in `color: red`. + * @param string $property_value Value in a CSS declaration, i.e. the `red` in `color: red`. + * @return bool + */ + protected static function is_safe_css_declaration($property_name, $property_value) + { + } + /** + * Returns the raw data. + * + * @since 5.8.0 + * + * @return array Raw data. + */ + public function get_raw_data() + { + } + /** + * Transforms the given editor settings according the + * add_theme_support format to the theme.json format. + * + * @since 5.8.0 + * + * @param array $settings Existing editor settings. + * @return array Config that adheres to the theme.json schema. + */ + public static function get_from_editor_settings($settings) + { + } + /** + * Returns the current theme's wanted patterns(slugs) to be + * registered from Pattern Directory. + * + * @since 6.0.0 + * + * @return string[] + */ + public function get_patterns() + { + } + /** + * Returns a valid theme.json as provided by a theme. + * + * Unlike get_raw_data() this returns the presets flattened, as provided by a theme. + * This also uses appearanceTools instead of their opt-ins if all of them are true. + * + * @since 6.0.0 + * + * @return array + */ + public function get_data() + { + } + /** + * Sets the spacingSizes array based on the spacingScale values from theme.json. + * + * @since 6.1.0 + * @deprecated 6.6.0 No longer used as the spacingSizes are automatically + * generated in the constructor and merge methods instead + * of manually after instantiation. + * + * @return null|void + */ + public function set_spacing_sizes() + { + } + /** + * Returns the selectors metadata for a block. + * + * @since 6.3.0 + * + * @param object $block_type The block type. + * @param string $root_selector The block's root selector. + * @return array The custom selectors set by the block. + */ + protected static function get_block_selectors($block_type, $root_selector) + { + } + /** + * Generates all the element selectors for a block. + * + * @since 6.3.0 + * + * @param string $root_selector The block's root CSS selector. + * @return array The block's element selectors. + */ + protected static function get_block_element_selectors($root_selector) + { + } + /** + * Generates style declarations for a node's features e.g., color, border, + * typography etc. that have custom selectors in their related block's + * metadata. + * + * @since 6.3.0 + * + * @param object $metadata The related block metadata containing selectors. + * @param object $node A merged theme.json node for block or variation. + * @return array The style declarations for the node's features with custom + * selectors. + */ + protected function get_feature_declarations_for_node($metadata, &$node) + { + } + /** + * Resolves the values of CSS variables in the given styles. + * + * @since 6.3.0 + * + * @param WP_Theme_JSON $theme_json The theme json resolver. + * @return WP_Theme_JSON The $theme_json with resolved variables. + */ + public static function resolve_variables($theme_json) + { + } + /** + * Generates a selector for a block style variation. + * + * @since 6.5.0 + * + * @param string $variation_name Name of the block style variation. + * @param string $block_selector CSS selector for the block. + * @return string Block selector with block style variation selector added to it. + */ + protected static function get_block_style_variation_selector($variation_name, $block_selector) + { + } + /** + * Collects valid block style variations keyed by block type. + * + * @since 6.6.0 + * @since 6.8.0 Added the `$blocks_metadata` parameter. + * + * @param array $blocks_metadata Optional. List of metadata per block. Default is the metadata for all blocks. + * @return array Valid block style variations by block type. + */ + protected static function get_valid_block_style_variations($blocks_metadata = array()) + { + } + } + /** + * WP_Theme Class + * + * @package WordPress + * @subpackage Theme + * @since 3.4.0 + * @phpstan-type ThemeKey 'Name'|'Version'|'Status'|'Title'|'Author'|'Author Name'|'Author URI'|'Description'|'Template'|'Stylesheet'|'Template Files'|'Stylesheet Files'|'Template Dir'|'Stylesheet Dir'|'Screenshot'|'Tags'|'Theme Root'|'Theme Root URI'|'Parent Theme' + * @phpstan-property-read string $name + * @phpstan-property-read string $title + * @phpstan-property-read string $version + * @phpstan-property-read string $parent_theme + * @phpstan-property-read string $template_dir + * @phpstan-property-read string $stylesheet_dir + * @phpstan-property-read string $template + * @phpstan-property-read string $stylesheet + * @phpstan-property-read string $screenshot + * @phpstan-property-read string $description + * @phpstan-property-read string $author + * @phpstan-property-read list<string> $tags + * @phpstan-property-read string $theme_root + * @phpstan-property-read string $theme_root_uri + */ + #[\AllowDynamicProperties] + final class WP_Theme implements \ArrayAccess + { + /** + * Whether the theme has been marked as updateable. + * + * @since 4.4.0 + * @var bool + * + * @see WP_MS_Themes_List_Table + */ + public $update = \false; + /** + * Constructor for WP_Theme. + * + * @since 3.4.0 + * + * @global string[] $wp_theme_directories + * + * @param string $theme_dir Directory of the theme within the theme_root. + * @param string $theme_root Theme root. + * @param WP_Theme|null $_child If this theme is a parent theme, the child may be passed for validation purposes. + * @phpstan-return void + */ + public function __construct($theme_dir, $theme_root, $_child = \null) + { + } + /** + * When converting the object to a string, the theme name is returned. + * + * @since 3.4.0 + * + * @return string Theme name, ready for display (translated) + */ + public function __toString() + { + } + /** + * __isset() magic method for properties formerly returned by current_theme_info() + * + * @since 3.4.0 + * + * @param string $offset Property to check if set. + * @return bool Whether the given property is set. + */ + public function __isset($offset) + { + } + /** + * __get() magic method for properties formerly returned by current_theme_info() + * + * @since 3.4.0 + * + * @param string $offset Property to get. + * @return mixed Property value. + */ + public function __get($offset) + { + } + /** + * Method to implement ArrayAccess for keys formerly returned by get_themes() + * + * @since 3.4.0 + * + * @param mixed $offset + * @param mixed $value + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + } + /** + * Method to implement ArrayAccess for keys formerly returned by get_themes() + * + * @since 3.4.0 + * + * @param mixed $offset + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + } + /** + * Method to implement ArrayAccess for keys formerly returned by get_themes() + * + * @since 3.4.0 + * + * @param mixed $offset + * @return bool + * @phpstan-return ($offset is ThemeKey ? true : false) + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + } + /** + * Method to implement ArrayAccess for keys formerly returned by get_themes(). + * + * Author, Author Name, Author URI, and Description did not previously return + * translated data. We are doing so now as it is safe to do. However, as + * Name and Title could have been used as the key for get_themes(), both remain + * untranslated for back compatibility. This means that ['Name'] is not ideal, + * and care should be taken to use `$theme::display( 'Name' )` to get a properly + * translated header. + * + * @since 3.4.0 + * + * @param mixed $offset + * @return mixed + * @phpstan-return ($offset is ThemeKey ? mixed : null) + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + } + /** + * Returns errors property. + * + * @since 3.4.0 + * + * @return WP_Error|false WP_Error if there are errors, or false. + */ + public function errors() + { + } + /** + * Determines whether the theme exists. + * + * A theme with errors exists. A theme with the error of 'theme_not_found', + * meaning that the theme's directory was not found, does not exist. + * + * @since 3.4.0 + * + * @return bool Whether the theme exists. + */ + public function exists() + { + } + /** + * Returns reference to the parent theme. + * + * @since 3.4.0 + * + * @return WP_Theme|false Parent theme, or false if the active theme is not a child theme. + */ + public function parent() + { + } + /** + * Perform reinitialization tasks. + * + * Prevents a callback from being injected during unserialization of an object. + */ + public function __wakeup() + { + } + /** + * Clears the cache for the theme. + * + * @since 3.4.0 + */ + public function cache_delete() + { + } + /** + * Gets a raw, unformatted theme header. + * + * The header is sanitized, but is not translated, and is not marked up for display. + * To get a theme header for display, use the display() method. + * + * Use the get_template() method, not the 'Template' header, for finding the template. + * The 'Template' header is only good for what was written in the style.css, while + * get_template() takes into account where WordPress actually located the theme and + * whether it is actually valid. + * + * @since 3.4.0 + * + * @param string $header Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status, Tags. + * @return string|array|false String or array (for Tags header) on success, false on failure. + * @phpstan-return ($header is 'Name'|'ThemeURI'|'Description'|'Author'|'AuthorURI'|'Version'|'Template'|'Status'|'Tags'|'TextDomain'|'DomainPath'|'RequiresWP'|'RequiresPHP'|'UpdateURI' ? ($header is 'Tags' ? string[] : string) : false) + */ + public function get($header) + { + } + /** + * Gets a theme header, formatted and translated for display. + * + * @since 3.4.0 + * + * @param string $header Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status, Tags. + * @param bool $markup Optional. Whether to mark up the header. Defaults to true. + * @param bool $translate Optional. Whether to translate the header. Defaults to true. + * @return string|array|false Processed header. An array for Tags if `$markup` is false, string otherwise. + * False on failure. + */ + public function display($header, $markup = \true, $translate = \true) + { + } + /** + * Returns the directory name of the theme's "stylesheet" files, inside the theme root. + * + * In the case of a child theme, this is directory name of the child theme. + * Otherwise, get_stylesheet() is the same as get_template(). + * + * @since 3.4.0 + * + * @return string Stylesheet + */ + public function get_stylesheet() + { + } + /** + * Returns the directory name of the theme's "template" files, inside the theme root. + * + * In the case of a child theme, this is the directory name of the parent theme. + * Otherwise, the get_template() is the same as get_stylesheet(). + * + * @since 3.4.0 + * + * @return string Template + */ + public function get_template() + { + } + /** + * Returns the absolute path to the directory of a theme's "stylesheet" files. + * + * In the case of a child theme, this is the absolute path to the directory + * of the child theme's files. + * + * @since 3.4.0 + * + * @return string Absolute path of the stylesheet directory. + */ + public function get_stylesheet_directory() + { + } + /** + * Returns the absolute path to the directory of a theme's "template" files. + * + * In the case of a child theme, this is the absolute path to the directory + * of the parent theme's files. + * + * @since 3.4.0 + * + * @return string Absolute path of the template directory. + */ + public function get_template_directory() + { + } + /** + * Returns the URL to the directory of a theme's "stylesheet" files. + * + * In the case of a child theme, this is the URL to the directory of the + * child theme's files. + * + * @since 3.4.0 + * + * @return string URL to the stylesheet directory. + */ + public function get_stylesheet_directory_uri() + { + } + /** + * Returns the URL to the directory of a theme's "template" files. + * + * In the case of a child theme, this is the URL to the directory of the + * parent theme's files. + * + * @since 3.4.0 + * + * @return string URL to the template directory. + */ + public function get_template_directory_uri() + { + } + /** + * Returns the absolute path to the directory of the theme root. + * + * This is typically the absolute path to wp-content/themes. + * + * @since 3.4.0 + * + * @return string Theme root. + */ + public function get_theme_root() + { + } + /** + * Returns the URL to the directory of the theme root. + * + * This is typically the absolute URL to wp-content/themes. This forms the basis + * for all other URLs returned by WP_Theme, so we pass it to the public function + * get_theme_root_uri() and allow it to run the {@see 'theme_root_uri'} filter. + * + * @since 3.4.0 + * + * @return string Theme root URI. + */ + public function get_theme_root_uri() + { + } + /** + * Returns the main screenshot file for the theme. + * + * The main screenshot is called screenshot.png. gif and jpg extensions are also allowed. + * + * Screenshots for a theme must be in the stylesheet directory. (In the case of child + * themes, parent theme screenshots are not inherited.) + * + * @since 3.4.0 + * + * @param string $uri Type of URL to return, either 'relative' or an absolute URI. Defaults to absolute URI. + * @return string|false Screenshot file. False if the theme does not have a screenshot. + */ + public function get_screenshot($uri = 'uri') + { + } + /** + * Returns files in the theme's directory. + * + * @since 3.4.0 + * + * @param string[]|string $type Optional. Array of extensions to find, string of a single extension, + * or null for all extensions. Default null. + * @param int $depth Optional. How deep to search for files. Defaults to a flat scan (0 depth). + * -1 depth is infinite. + * @param bool $search_parent Optional. Whether to return parent files. Default false. + * @return string[] Array of files, keyed by the path to the file relative to the theme's directory, with the values + * being absolute paths. + */ + public function get_files($type = \null, $depth = 0, $search_parent = \false) + { + } + /** + * Returns the theme's post templates. + * + * @since 4.7.0 + * @since 5.8.0 Include block templates. + * + * @return array[] Array of page template arrays, keyed by post type and filename, + * with the value of the translated header name. + */ + public function get_post_templates() + { + } + /** + * Returns the theme's post templates for a given post type. + * + * @since 3.4.0 + * @since 4.7.0 Added the `$post_type` parameter. + * + * @param WP_Post|null $post Optional. The post being edited, provided for context. + * @param string $post_type Optional. Post type to get the templates for. Default 'page'. + * If a post is provided, its post type is used. + * @return string[] Array of template header names keyed by the template file name. + */ + public function get_page_templates($post = \null, $post_type = 'page') + { + } + /** + * Loads the theme's textdomain. + * + * Translation files are not inherited from the parent theme. TODO: If this fails for the + * child theme, it should probably try to load the parent theme's translations. + * + * @since 3.4.0 + * + * @return bool True if the textdomain was successfully loaded or has already been loaded. + * False if no textdomain was specified in the file headers, or if the domain could not be loaded. + */ + public function load_textdomain() + { + } + /** + * Determines whether the theme is allowed (multisite only). + * + * @since 3.4.0 + * + * @param string $check Optional. Whether to check only the 'network'-wide settings, the 'site' + * settings, or 'both'. Defaults to 'both'. + * @param int $blog_id Optional. Ignored if only network-wide settings are checked. Defaults to current site. + * @return bool Whether the theme is allowed for the network. Returns true in single-site. + */ + public function is_allowed($check = 'both', $blog_id = \null) + { + } + /** + * Returns whether this theme is a block-based theme or not. + * + * @since 5.9.0 + * + * @return bool + */ + public function is_block_theme() + { + } + /** + * Retrieves the path of a file in the theme. + * + * Searches in the stylesheet directory before the template directory so themes + * which inherit from a parent theme can just override one file. + * + * @since 5.9.0 + * + * @param string $file Optional. File to search for in the stylesheet directory. + * @return string The path of the file. + */ + public function get_file_path($file = '') + { + } + /** + * Determines the latest WordPress default theme that is installed. + * + * This hits the filesystem. + * + * @since 4.4.0 + * + * @return WP_Theme|false Object, or false if no theme is installed, which would be bad. + */ + public static function get_core_default_theme() + { + } + /** + * Returns array of stylesheet names of themes allowed on the site or network. + * + * @since 3.4.0 + * + * @param int $blog_id Optional. ID of the site. Defaults to the current site. + * @return string[] Array of stylesheet names. + */ + public static function get_allowed($blog_id = \null) + { + } + /** + * Returns array of stylesheet names of themes allowed on the network. + * + * @since 3.4.0 + * + * @return string[] Array of stylesheet names. + */ + public static function get_allowed_on_network() + { + } + /** + * Returns array of stylesheet names of themes allowed on the site. + * + * @since 3.4.0 + * + * @param int $blog_id Optional. ID of the site. Defaults to the current site. + * @return string[] Array of stylesheet names. + */ + public static function get_allowed_on_site($blog_id = \null) + { + } + /** + * Returns the folder names of the block template directories. + * + * @since 6.4.0 + * + * @return string[] { + * Folder names used by block themes. + * + * @type string $wp_template Theme-relative directory name for block templates. + * @type string $wp_template_part Theme-relative directory name for block template parts. + * } + * @phpstan-return array{ + * wp_template: string, + * wp_template_part: string, + * } + */ + public function get_block_template_folders() + { + } + /** + * Gets block pattern data for a specified theme. + * Each pattern is defined as a PHP file and defines + * its metadata using plugin-style headers. The minimum required definition is: + * + * /** + * * Title: My Pattern + * * Slug: my-theme/my-pattern + * * + * + * The output of the PHP source corresponds to the content of the pattern, e.g.: + * + * <main><p><?php echo "Hello"; ?></p></main> + * + * If applicable, this will collect from both parent and child theme. + * + * Other settable fields include: + * + * - Description + * - Viewport Width + * - Inserter (yes/no) + * - Categories (comma-separated values) + * - Keywords (comma-separated values) + * - Block Types (comma-separated values) + * - Post Types (comma-separated values) + * - Template Types (comma-separated values) + * + * @since 6.4.0 + * + * @return array Block pattern data. + */ + public function get_block_patterns() + { + } + /** + * Clears block pattern cache. + * + * @since 6.4.0 + * @since 6.6.0 Uses transients to cache regardless of site environment. + */ + public function delete_pattern_cache() + { + } + /** + * Enables a theme for all sites on the current network. + * + * @since 4.6.0 + * + * @param string|string[] $stylesheets Stylesheet name or array of stylesheet names. + * @phpstan-return void + */ + public static function network_enable_theme($stylesheets) + { + } + /** + * Disables a theme for all sites on the current network. + * + * @since 4.6.0 + * + * @param string|string[] $stylesheets Stylesheet name or array of stylesheet names. + * @phpstan-return void + */ + public static function network_disable_theme($stylesheets) + { + } + /** + * Sorts themes by name. + * + * @since 3.4.0 + * + * @param WP_Theme[] $themes Array of theme objects to sort (passed by reference). + */ + public static function sort_by_name(&$themes) + { + } + } + /** + * WP_Token_Map class. + * + * Use this class in specific circumstances with a static set of lookup keys which map to + * a static set of transformed values. For example, this class is used to map HTML named + * character references to their equivalent UTF-8 values. + * + * This class works differently than code calling `in_array()` and other methods. It + * internalizes lookup logic and provides helper interfaces to optimize lookup and + * transformation. It provides a method for precomputing the lookup tables and storing + * them as PHP source code. + * + * All tokens and substitutions must be shorter than 256 bytes. + * + * Example: + * + * $smilies = WP_Token_Map::from_array( array( + * '8O' => '😯', + * ':(' => '🙁', + * ':)' => '🙂', + * ':?' => '😕', + * ) ); + * + * true === $smilies->contains( ':)' ); + * false === $smilies->contains( 'simile' ); + * + * '😕' === $smilies->read_token( 'Not sure :?.', 9, $length_of_smily_syntax ); + * 2 === $length_of_smily_syntax; + * + * ## Precomputing the Token Map. + * + * Creating the class involves some work sorting and organizing the tokens and their + * replacement values. In order to skip this, it's possible for the class to export + * its state and be used as actual PHP source code. + * + * Example: + * + * // Export with four spaces as the indent, only for the sake of this docblock. + * // The default indent is a tab character. + * $indent = ' '; + * echo $smilies->precomputed_php_source_table( $indent ); + * + * // Output, to be pasted into a PHP source file: + * WP_Token_Map::from_precomputed_table( + * array( + * "storage_version" => "6.6.0", + * "key_length" => 2, + * "groups" => "", + * "long_words" => array(), + * "small_words" => "8O\x00:)\x00:(\x00:?\x00", + * "small_mappings" => array( "😯", "🙂", "🙁", "😕" ) + * ) + * ); + * + * ## Large vs. small words. + * + * This class uses a short prefix called the "key" to optimize lookup of its tokens. + * This means that some tokens may be shorter than or equal in length to that key. + * Those words that are longer than the key are called "large" while those shorter + * than or equal to the key length are called "small." + * + * This separation of large and small words is incidental to the way this class + * optimizes lookup, and should be considered an internal implementation detail + * of the class. It may still be important to be aware of it, however. + * + * ## Determining Key Length. + * + * The choice of the size of the key length should be based on the data being stored in + * the token map. It should divide the data as evenly as possible, but should not create + * so many groups that a large fraction of the groups only contain a single token. + * + * For the HTML5 named character references, a key length of 2 was found to provide a + * sufficient spread and should be a good default for relatively large sets of tokens. + * + * However, for some data sets this might be too long. For example, a list of smilies + * may be too small for a key length of 2. Perhaps 1 would be more appropriate. It's + * best to experiment and determine empirically which values are appropriate. + * + * ## Generate Pre-Computed Source Code. + * + * Since the `WP_Token_Map` is designed for relatively static lookups, it can be + * advantageous to precompute the values and instantiate a table that has already + * sorted and grouped the tokens and built the lookup strings. + * + * This can be done with `WP_Token_Map::precomputed_php_source_table()`. + * + * Note that if there is a leading character that all tokens need, such as `&` for + * HTML named character references, it can be beneficial to exclude this from the + * token map. Instead, find occurrences of the leading character and then use the + * token map to see if the following characters complete the token. + * + * Example: + * + * $map = WP_Token_Map::from_array( array( 'simple_smile:' => '🙂', 'sob:' => '😭', 'soba:' => '🍜' ) ); + * echo $map->precomputed_php_source_table(); + * // Output + * WP_Token_Map::from_precomputed_table( + * array( + * "storage_version" => "6.6.0", + * "key_length" => 2, + * "groups" => "si\x00so\x00", + * "long_words" => array( + * // simple_smile:[🙂]. + * "\x0bmple_smile:\x04🙂", + * // soba:[🍜] sob:[😭]. + * "\x03ba:\x04🍜\x02b:\x04😭", + * ), + * "short_words" => "", + * "short_mappings" => array() + * } + * ); + * + * This precomputed value can be stored directly in source code and will skip the + * startup cost of generating the lookup strings. See `$html5_named_character_entities`. + * + * Note that any updates to the precomputed format should update the storage version + * constant. It would also be best to provide an update function to take older known + * versions and upgrade them in place when loading into `from_precomputed_table()`. + * + * ## Future Direction. + * + * It may be viable to dynamically increase the length limits such that there's no need to impose them. + * The limit appears because of the packing structure, which indicates how many bytes each segment of + * text in the lookup tables spans. If, however, care were taken to track the longest word length, then + * the packing structure could change its representation to allow for that. Each additional byte storing + * length, however, increases the memory overhead and lookup runtime. + * + * An alternative approach could be to borrow the UTF-8 variable-length encoding and store lengths of less + * than 127 as a single byte with the high bit unset, storing longer lengths as the combination of + * continuation bytes. + * + * Since it has not been shown during the development of this class that longer strings are required, this + * update is deferred until such a need is clear. + * + * @since 6.6.0 + */ + class WP_Token_Map + { + /** + * Denotes the version of the code which produces pre-computed source tables. + * + * This version will be used not only to verify pre-computed data, but also + * to upgrade pre-computed data from older versions. Choosing a name that + * corresponds to the WordPress release will help people identify where an + * old copy of data came from. + */ + const STORAGE_VERSION = '6.6.0-trunk'; + /** + * Maximum length for each key and each transformed value in the table (in bytes). + * + * @since 6.6.0 + */ + const MAX_LENGTH = 256; + /** + * Create a token map using an associative array of key/value pairs as the input. + * + * Example: + * + * $smilies = WP_Token_Map::from_array( array( + * '8O' => '😯', + * ':(' => '🙁', + * ':)' => '🙂', + * ':?' => '😕', + * ) ); + * + * @since 6.6.0 + * + * @param array $mappings The keys transform into the values, both are strings. + * @param int $key_length Determines the group key length. Leave at the default value + * of 2 unless there's an empirical reason to change it. + * + * @return WP_Token_Map|null Token map, unless unable to create it. + */ + public static function from_array(array $mappings, int $key_length = 2): ?\WP_Token_Map + { + } + /** + * Creates a token map from a pre-computed table. + * This skips the initialization cost of generating the table. + * + * This function should only be used to load data created with + * WP_Token_Map::precomputed_php_source_tag(). + * + * @since 6.6.0 + * + * @param array $state { + * Stores pre-computed state for directly loading into a Token Map. + * + * @type string $storage_version Which version of the code produced this state. + * @type int $key_length Group key length. + * @type string $groups Group lookup index. + * @type array $large_words Large word groups and packed strings. + * @type string $small_words Small words packed string. + * @type array $small_mappings Small word mappings. + * } + * + * @return WP_Token_Map Map with precomputed data loaded. + * @phpstan-param array{ + * storage_version?: string, + * key_length?: int, + * groups?: string, + * large_words?: array, + * small_words?: string, + * small_mappings?: array, + * } $state + */ + public static function from_precomputed_table($state): ?\WP_Token_Map + { + } + /** + * Indicates if a given word is a lookup key in the map. + * + * Example: + * + * true === $smilies->contains( ':)' ); + * false === $smilies->contains( 'simile' ); + * + * @since 6.6.0 + * + * @param string $word Determine if this word is a lookup key in the map. + * @param string $case_sensitivity Optional. Pass 'ascii-case-insensitive' to ignore ASCII case when matching. Default 'case-sensitive'. + * @return bool Whether there's an entry for the given word in the map. + */ + public function contains(string $word, string $case_sensitivity = 'case-sensitive'): bool + { + } + /** + * If the text starting at a given offset is a lookup key in the map, + * return the corresponding transformation from the map, else `false`. + * + * This function returns the translated string, but accepts an optional + * parameter `$matched_token_byte_length`, which communicates how many + * bytes long the lookup key was, if it found one. This can be used to + * advance a cursor in calling code if a lookup key was found. + * + * Example: + * + * false === $smilies->read_token( 'Not sure :?.', 0, $token_byte_length ); + * '😕' === $smilies->read_token( 'Not sure :?.', 9, $token_byte_length ); + * 2 === $token_byte_length; + * + * Example: + * + * while ( $at < strlen( $input ) ) { + * $next_at = strpos( $input, ':', $at ); + * if ( false === $next_at ) { + * break; + * } + * + * $smily = $smilies->read_token( $input, $next_at, $token_byte_length ); + * if ( false === $next_at ) { + * ++$at; + * continue; + * } + * + * $prefix = substr( $input, $at, $next_at - $at ); + * $at += $token_byte_length; + * $output .= "{$prefix}{$smily}"; + * } + * + * @since 6.6.0 + * + * @param string $text String in which to search for a lookup key. + * @param int $offset Optional. How many bytes into the string where the lookup key ought to start. Default 0. + * @param int|null &$matched_token_byte_length Optional. Holds byte-length of found token matched, otherwise not set. Default null. + * @param string $case_sensitivity Optional. Pass 'ascii-case-insensitive' to ignore ASCII case when matching. Default 'case-sensitive'. + * + * @return string|null Mapped value of lookup key if found, otherwise `null`. + */ + public function read_token(string $text, int $offset = 0, &$matched_token_byte_length = \null, $case_sensitivity = 'case-sensitive'): ?string + { + } + /** + * Exports the token map into an associate array of key/value pairs. + * + * Example: + * + * $smilies->to_array() === array( + * '8O' => '😯', + * ':(' => '🙁', + * ':)' => '🙂', + * ':?' => '😕', + * ); + * + * @return array The lookup key/substitution values as an associate array. + */ + public function to_array(): array + { + } + /** + * Export the token map for quick loading in PHP source code. + * + * This function has a specific purpose, to make loading of static token maps fast. + * It's used to ensure that the HTML character reference lookups add a minimal cost + * to initializing the PHP process. + * + * Example: + * + * echo $smilies->precomputed_php_source_table(); + * + * // Output. + * WP_Token_Map::from_precomputed_table( + * array( + * "storage_version" => "6.6.0", + * "key_length" => 2, + * "groups" => "", + * "long_words" => array(), + * "small_words" => "8O\x00:)\x00:(\x00:?\x00", + * "small_mappings" => array( "😯", "🙂", "🙁", "😕" ) + * ) + * ); + * + * @since 6.6.0 + * + * @param string $indent Optional. Use this string for indentation, or rely on the default horizontal tab character. Default "\t". + * @return string Value which can be pasted into a PHP source file for quick loading of table. + */ + public function precomputed_php_source_table(string $indent = "\t"): string + { + } + } + /** + * Class for prefixing URL patterns. + * + * This class is intended primarily for use as part of the speculative loading feature. + * + * @since 6.8.0 + * @access private + */ + class WP_URL_Pattern_Prefixer + { + /** + * Constructor. + * + * @since 6.8.0 + * + * @param array<string, string> $contexts Optional. Map of `$context_string => $base_path` pairs. Default is the + * contexts returned by the + * {@see WP_URL_Pattern_Prefixer::get_default_contexts()} method. + */ + public function __construct(array $contexts = array()) + { + } + /** + * Prefixes the given URL path pattern with the base path for the given context. + * + * This ensures that these path patterns work correctly on WordPress subdirectory sites, for example in a multisite + * network, or when WordPress itself is installed in a subdirectory of the hostname. + * + * The given URL path pattern is only prefixed if it does not already include the expected prefix. + * + * @since 6.8.0 + * + * @param string $path_pattern URL pattern starting with the path segment. + * @param string $context Optional. Context to use for prefixing the path pattern. Default 'home'. + * @return string URL pattern, prefixed as necessary. + */ + public function prefix_path_pattern(string $path_pattern, string $context = 'home'): string + { + } + /** + * Returns the default contexts used by the class. + * + * @since 6.8.0 + * + * @return array<string, string> Map of `$context_string => $base_path` pairs. + */ + public static function get_default_contexts(): array + { + } + } + /** + * Meta-based user sessions token manager. + * + * @since 4.0.0 + * + * @see WP_Session_Tokens + */ + class WP_User_Meta_Session_Tokens extends \WP_Session_Tokens + { + /** + * Retrieves all sessions of the user. + * + * @since 4.0.0 + * + * @return array Sessions of the user. + */ + protected function get_sessions() + { + } + /** + * Converts an expiration to an array of session information. + * + * @since 4.0.0 + * + * @param mixed $session Session or expiration. + * @return array Session. + */ + protected function prepare_session($session) + { + } + /** + * Retrieves a session based on its verifier (token hash). + * + * @since 4.0.0 + * + * @param string $verifier Verifier for the session to retrieve. + * @return array|null The session, or null if it does not exist + */ + protected function get_session($verifier) + { + } + /** + * Updates a session based on its verifier (token hash). + * + * @since 4.0.0 + * + * @param string $verifier Verifier for the session to update. + * @param array $session Optional. Session. Omitting this argument destroys the session. + */ + protected function update_session($verifier, $session = \null) + { + } + /** + * Updates the user's sessions in the usermeta table. + * + * @since 4.0.0 + * + * @param array $sessions Sessions. + */ + protected function update_sessions($sessions) + { + } + /** + * Destroys all sessions for this user, except the single session with the given verifier. + * + * @since 4.0.0 + * + * @param string $verifier Verifier of the session to keep. + */ + protected function destroy_other_sessions($verifier) + { + } + /** + * Destroys all session tokens for the user. + * + * @since 4.0.0 + */ + protected function destroy_all_sessions() + { + } + /** + * Destroys all sessions for all users. + * + * @since 4.0.0 + */ + public static function drop_sessions() + { + } + } + /** + * Core class used for querying users. + * + * @since 3.1.0 + * + * @see WP_User_Query::prepare_query() for information on accepted arguments. + */ + #[\AllowDynamicProperties] + class WP_User_Query + { + /** + * Query vars, after parsing + * + * @since 3.5.0 + * @var array + */ + public $query_vars = array(); + /** + * Metadata query container. + * + * @since 4.2.0 + * @var WP_Meta_Query + */ + public $meta_query = \false; + /** + * The SQL query used to fetch matching users. + * + * @since 4.4.0 + * @var string + */ + public $request; + public $query_fields; + public $query_from; + public $query_where; + public $query_orderby; + public $query_limit; + /** + * Constructor. + * + * @since 3.1.0 + * + * @param null|string|array $query Optional. The query variables. + * See WP_User_Query::prepare_query() for information on accepted arguments. + * @phpstan-param array{ + * blog_id?: int, + * role?: string|string[], + * role__in?: string[], + * role__not_in?: string[], + * meta_key?: string|string[], + * meta_value?: string|string[], + * meta_compare?: string, + * meta_compare_key?: string, + * meta_type?: string, + * meta_type_key?: string, + * meta_query?: array, + * capability?: string|string[], + * capability__in?: string[], + * capability__not_in?: string[], + * include?: int[], + * exclude?: int[], + * search?: string, + * search_columns?: string[], + * orderby?: string|array, + * order?: string, + * offset?: int, + * number?: int, + * paged?: int, + * count_total?: bool, + * fields?: string|string[], + * who?: string, + * has_published_posts?: bool|string[], + * nicename?: string, + * nicename__in?: string[], + * nicename__not_in?: string[], + * login?: string, + * login__in?: string[], + * login__not_in?: string[], + * cache_results?: bool, + * } $query See WP_User_Query::prepare_query() + */ + public function __construct($query = \null) + { + } + /** + * Fills in missing query variables with default values. + * + * @since 4.4.0 + * + * @param string|array $args Query vars, as passed to `WP_User_Query`. + * @return array Complete query variables with undefined ones filled in with defaults. + */ + public static function fill_query_vars($args) + { + } + /** + * Prepares the query variables. + * + * @since 3.1.0 + * @since 4.1.0 Added the ability to order by the `include` value. + * @since 4.2.0 Added 'meta_value_num' support for `$orderby` parameter. Added multi-dimensional array syntax + * for `$orderby` parameter. + * @since 4.3.0 Added 'has_published_posts' parameter. + * @since 4.4.0 Added 'paged', 'role__in', and 'role__not_in' parameters. The 'role' parameter was updated to + * permit an array or comma-separated list of values. The 'number' parameter was updated to support + * querying for all users with using -1. + * @since 4.7.0 Added 'nicename', 'nicename__in', 'nicename__not_in', 'login', 'login__in', + * and 'login__not_in' parameters. + * @since 5.1.0 Introduced the 'meta_compare_key' parameter. + * @since 5.3.0 Introduced the 'meta_type_key' parameter. + * @since 5.9.0 Added 'capability', 'capability__in', and 'capability__not_in' parameters. + * Deprecated the 'who' parameter. + * @since 6.3.0 Added 'cache_results' parameter. + * + * @global wpdb $wpdb WordPress database abstraction object. + * @global WP_Roles $wp_roles WordPress role management object. + * + * @param string|array $query { + * Optional. Array or string of query parameters. + * + * @type int $blog_id The site ID. Default is the current site. + * @type string|string[] $role An array or a comma-separated list of role names that users + * must match to be included in results. Note that this is + * an inclusive list: users must match *each* role. Default empty. + * @type string[] $role__in An array of role names. Matched users must have at least one + * of these roles. Default empty array. + * @type string[] $role__not_in An array of role names to exclude. Users matching one or more + * of these roles will not be included in results. Default empty array. + * @type string|string[] $meta_key Meta key or keys to filter by. + * @type string|string[] $meta_value Meta value or values to filter by. + * @type string $meta_compare MySQL operator used for comparing the meta value. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type string $meta_compare_key MySQL operator used for comparing the meta key. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type string $meta_type MySQL data type that the meta_value column will be CAST to for comparisons. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type string $meta_type_key MySQL data type that the meta_key column will be CAST to for comparisons. + * See WP_Meta_Query::__construct() for accepted values and default value. + * @type array $meta_query An associative array of WP_Meta_Query arguments. + * See WP_Meta_Query::__construct() for accepted values. + * @type string|string[] $capability An array or a comma-separated list of capability names that users + * must match to be included in results. Note that this is + * an inclusive list: users must match *each* capability. + * Does NOT work for capabilities not in the database or filtered + * via {@see 'map_meta_cap'}. Default empty. + * @type string[] $capability__in An array of capability names. Matched users must have at least one + * of these capabilities. + * Does NOT work for capabilities not in the database or filtered + * via {@see 'map_meta_cap'}. Default empty array. + * @type string[] $capability__not_in An array of capability names to exclude. Users matching one or more + * of these capabilities will not be included in results. + * Does NOT work for capabilities not in the database or filtered + * via {@see 'map_meta_cap'}. Default empty array. + * @type int[] $include An array of user IDs to include. Default empty array. + * @type int[] $exclude An array of user IDs to exclude. Default empty array. + * @type string $search Search keyword. Searches for possible string matches on columns. + * When `$search_columns` is left empty, it tries to determine which + * column to search in based on search string. Default empty. + * @type string[] $search_columns Array of column names to be searched. Accepts 'ID', 'user_login', + * 'user_email', 'user_url', 'user_nicename', 'display_name'. + * Default empty array. + * @type string|array $orderby Field(s) to sort the retrieved users by. May be a single value, + * an array of values, or a multi-dimensional array with fields as + * keys and orders ('ASC' or 'DESC') as values. Accepted values are: + * - 'ID' + * - 'display_name' (or 'name') + * - 'include' + * - 'user_login' (or 'login') + * - 'login__in' + * - 'user_nicename' (or 'nicename') + * - 'nicename__in' + * - 'user_email' (or 'email') + * - 'user_url' (or 'url') + * - 'user_registered' (or 'registered') + * - 'post_count' + * - 'meta_value' + * - 'meta_value_num' + * - The value of `$meta_key` + * - An array key of `$meta_query` + * To use 'meta_value' or 'meta_value_num', `$meta_key` + * must be also be defined. Default 'user_login'. + * @type string $order Designates ascending or descending order of users. Order values + * passed as part of an `$orderby` array take precedence over this + * parameter. Accepts 'ASC', 'DESC'. Default 'ASC'. + * @type int $offset Number of users to offset in retrieved results. Can be used in + * conjunction with pagination. Default 0. + * @type int $number Number of users to limit the query for. Can be used in + * conjunction with pagination. Value -1 (all) is supported, but + * should be used with caution on larger sites. + * Default -1 (all users). + * @type int $paged When used with number, defines the page of results to return. + * Default 1. + * @type bool $count_total Whether to count the total number of users found. If pagination + * is not needed, setting this to false can improve performance. + * Default true. + * @type string|string[] $fields Which fields to return. Single or all fields (string), or array + * of fields. Accepts: + * - 'ID' + * - 'display_name' + * - 'user_login' + * - 'user_nicename' + * - 'user_email' + * - 'user_url' + * - 'user_registered' + * - 'user_pass' + * - 'user_activation_key' + * - 'user_status' + * - 'spam' (only available on multisite installs) + * - 'deleted' (only available on multisite installs) + * - 'all' for all fields and loads user meta. + * - 'all_with_meta' Deprecated. Use 'all'. + * Default 'all'. + * @type string $who Deprecated, use `$capability` instead. + * Type of users to query. Accepts 'authors'. + * Default empty (all users). + * @type bool|string[] $has_published_posts Pass an array of post types to filter results to users who have + * published posts in those post types. `true` is an alias for all + * public post types. + * @type string $nicename The user nicename. Default empty. + * @type string[] $nicename__in An array of nicenames to include. Users matching one of these + * nicenames will be included in results. Default empty array. + * @type string[] $nicename__not_in An array of nicenames to exclude. Users matching one of these + * nicenames will not be included in results. Default empty array. + * @type string $login The user login. Default empty. + * @type string[] $login__in An array of logins to include. Users matching one of these + * logins will be included in results. Default empty array. + * @type string[] $login__not_in An array of logins to exclude. Users matching one of these + * logins will not be included in results. Default empty array. + * @type bool $cache_results Whether to cache user information. Default true. + * } + * @phpstan-param array{ + * blog_id?: int, + * role?: string|string[], + * role__in?: string[], + * role__not_in?: string[], + * meta_key?: string|string[], + * meta_value?: string|string[], + * meta_compare?: string, + * meta_compare_key?: string, + * meta_type?: string, + * meta_type_key?: string, + * meta_query?: array, + * capability?: string|string[], + * capability__in?: string[], + * capability__not_in?: string[], + * include?: int[], + * exclude?: int[], + * search?: string, + * search_columns?: string[], + * orderby?: string|array, + * order?: string, + * offset?: int, + * number?: int, + * paged?: int, + * count_total?: bool, + * fields?: string|string[], + * who?: string, + * has_published_posts?: bool|string[], + * nicename?: string, + * nicename__in?: string[], + * nicename__not_in?: string[], + * login?: string, + * login__in?: string[], + * login__not_in?: string[], + * cache_results?: bool, + * } $query + */ + public function prepare_query($query = array()) + { + } + /** + * Executes the query, with the current variables. + * + * @since 3.1.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * @phpstan-return void + */ + public function query() + { + } + /** + * Retrieves query variable. + * + * @since 3.5.0 + * + * @param string $query_var Query variable key. + * @return mixed + */ + public function get($query_var) + { + } + /** + * Sets query variable. + * + * @since 3.5.0 + * + * @param string $query_var Query variable key. + * @param mixed $value Query variable value. + */ + public function set($query_var, $value) + { + } + /** + * Used internally to generate an SQL string for searching across multiple columns. + * + * @since 3.1.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $search Search string. + * @param string[] $columns Array of columns to search. + * @param bool $wild Whether to allow wildcard searches. Default is false for Network Admin, true for single site. + * Single site allows leading and trailing wildcards, Network Admin only trailing. + * @return string + */ + protected function get_search_sql($search, $columns, $wild = \false) + { + } + /** + * Returns the list of users. + * + * @since 3.1.0 + * + * @return array Array of results. + */ + public function get_results() + { + } + /** + * Returns the total number of users for the current query. + * + * @since 3.1.0 + * + * @return int Number of total users. + */ + public function get_total() + { + } + /** + * Parses and sanitizes 'orderby' keys passed to the user query. + * + * @since 4.2.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $orderby Alias for the field to order by. + * @return string Value to used in the ORDER clause, if `$orderby` is valid. + */ + protected function parse_orderby($orderby) + { + } + /** + * Generate cache key. + * + * @since 6.3.0 + * @since 6.9.0 The `$args` parameter was deprecated and renamed to `$deprecated`. + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param array $deprecated Unused. + * @param string $sql SQL statement. + * @return string Cache key. + */ + protected function generate_cache_key(array $deprecated, $sql) + { + } + /** + * Retrieves the last changed cache timestamp for users and optionally posts. + * + * @since 6.9.0 + * + * @param array $args Query arguments. + * @return string[] The last changed timestamp string for the relevant cache groups. + */ + protected function get_cache_last_changed(array $args) + { + } + /** + * Parses an 'order' query variable and casts it to ASC or DESC as necessary. + * + * @since 4.2.0 + * + * @param string $order The 'order' query variable. + * @return string The sanitized 'order' query variable. + */ + protected function parse_order($order) + { + } + /** + * Makes private properties readable for backward compatibility. + * + * @since 4.0.0 + * @since 6.4.0 Getting a dynamic property is deprecated. + * + * @param string $name Property to get. + * @return mixed Property. + */ + public function __get($name) + { + } + /** + * Makes private properties settable for backward compatibility. + * + * @since 4.0.0 + * @since 6.4.0 Setting a dynamic property is deprecated. + * + * @param string $name Property to check if set. + * @param mixed $value Property value. + * @phpstan-return void + */ + public function __set($name, $value) + { + } + /** + * Makes private properties checkable for backward compatibility. + * + * @since 4.0.0 + * @since 6.4.0 Checking a dynamic property is deprecated. + * + * @param string $name Property to check if set. + * @return bool Whether the property is set. + */ + public function __isset($name) + { + } + /** + * Makes private properties un-settable for backward compatibility. + * + * @since 4.0.0 + * @since 6.4.0 Unsetting a dynamic property is deprecated. + * + * @param string $name Property to unset. + * @phpstan-return void + */ + public function __unset($name) + { + } + /** + * Makes private/protected methods readable for backward compatibility. + * + * @since 4.0.0 + * + * @param string $name Method to call. + * @param array $arguments Arguments to pass when calling. + * @return mixed Return value of the callback, false otherwise. + */ + public function __call($name, $arguments) + { + } + } + /** + * WP_User_Request class. + * + * Represents user request data loaded from a WP_Post object. + * + * @since 4.9.6 + */ + #[\AllowDynamicProperties] + final class WP_User_Request + { + /** + * Request ID. + * + * @since 4.9.6 + * @var int + */ + public $ID = 0; + /** + * User ID. + * + * @since 4.9.6 + * @var int + */ + public $user_id = 0; + /** + * User email. + * + * @since 4.9.6 + * @var string + */ + public $email = ''; + /** + * Action name. + * + * @since 4.9.6 + * @var string + */ + public $action_name = ''; + /** + * Current status. + * + * @since 4.9.6 + * @var string + */ + public $status = ''; + /** + * Timestamp this request was created. + * + * @since 4.9.6 + * @var int|null + */ + public $created_timestamp = \null; + /** + * Timestamp this request was last modified. + * + * @since 4.9.6 + * @var int|null + */ + public $modified_timestamp = \null; + /** + * Timestamp this request was confirmed. + * + * @since 4.9.6 + * @var int|null + */ + public $confirmed_timestamp = \null; + /** + * Timestamp this request was completed. + * + * @since 4.9.6 + * @var int|null + */ + public $completed_timestamp = \null; + /** + * Misc data assigned to this request. + * + * @since 4.9.6 + * @var array + */ + public $request_data = array(); + /** + * Key used to confirm this request. + * + * @since 4.9.6 + * @since 6.8.0 The key is now hashed using wp_fast_hash() instead of phpass. + * + * @var string + */ + public $confirm_key = ''; + /** + * Constructor. + * + * @since 4.9.6 + * + * @param WP_Post|object $post Post object. + */ + public function __construct($post) + { + } + } + /** + * Core class used to implement the WP_User object. + * + * @since 2.0.0 + * @since 6.8.0 The `user_pass` property is now hashed using bcrypt by default instead of phpass. + * Existing passwords may still be hashed using phpass. + * + * @property string $nickname + * @property string $description + * @property string $user_description + * @property string $first_name + * @property string $user_firstname + * @property string $last_name + * @property string $user_lastname + * @property string $user_login + * @property string $user_pass + * @property string $user_nicename + * @property string $user_email + * @property string $user_url + * @property string $user_registered + * @property string $user_activation_key + * @property string $user_status + * @property int $user_level + * @property string $display_name + * @property string $spam + * @property string $deleted + * @property string $locale + * @property string $rich_editing + * @property string $syntax_highlighting + * @property string $use_ssl + */ + #[\AllowDynamicProperties] + class WP_User + { + /** + * User data container. + * + * @since 2.0.0 + * @var stdClass + */ + public $data; + /** + * The user's ID. + * + * @since 2.1.0 + * @var int + */ + public $ID = 0; + /** + * Capabilities that the individual user has been granted outside of those inherited from their role. + * + * @since 2.0.0 + * @var bool[] Array of key/value pairs where keys represent a capability name + * and boolean values represent whether the user has that capability. + */ + public $caps = array(); + /** + * User metadata option name. + * + * @since 2.0.0 + * @var string + */ + public $cap_key; + /** + * The roles the user is part of. + * + * @since 2.0.0 + * @var string[] + */ + public $roles = array(); + /** + * All capabilities the user has, including individual and role based. + * + * @since 2.0.0 + * @var bool[] Array of key/value pairs where keys represent a capability name + * and boolean values represent whether the user has that capability. + */ + public $allcaps = array(); + /** + * The filter context applied to user data fields. + * + * @since 2.9.0 + * @var string + */ + public $filter = \null; + /** + * Constructor. + * + * Retrieves the userdata and passes it to WP_User::init(). + * + * @since 2.0.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param int|string|stdClass|WP_User $id User's ID, a WP_User object, or a user object from the DB. + * @param string $name Optional. User's username + * @param int $site_id Optional Site ID, defaults to current site. + * @phpstan-return void + */ + public function __construct($id = 0, $name = '', $site_id = 0) + { + } + /** + * Sets up object properties, including capabilities. + * + * @since 3.3.0 + * + * @param object $data User DB row object. + * @param int $site_id Optional. The site ID to initialize for. + */ + public function init($data, $site_id = 0) + { + } + /** + * Returns only the main user fields. + * + * @since 3.3.0 + * @since 4.4.0 Added 'ID' as an alias of 'id' for the `$field` parameter. + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $field The field to query against: Accepts 'id', 'ID', 'slug', 'email' or 'login'. + * @param string|int $value The field value. + * @return object|false Raw user object. + * @phpstan-param 'id'|'ID'|'slug'|'email'|'login' $field + */ + public static function get_data_by($field, $value) + { + } + /** + * Magic method for checking the existence of a certain custom field. + * + * @since 3.3.0 + * + * @param string $key User meta key to check if set. + * @return bool Whether the given user meta key is set. + */ + public function __isset($key) + { + } + /** + * Magic method for accessing custom fields. + * + * @since 3.3.0 + * + * @param string $key User meta key to retrieve. + * @return mixed Value of the given user meta key (if set). If `$key` is 'id', the user ID. + */ + public function __get($key) + { + } + /** + * Magic method for setting custom user fields. + * + * This method does not update custom fields in the database. It only stores + * the value on the WP_User instance. + * + * @since 3.3.0 + * + * @param string $key User meta key. + * @param mixed $value User meta value. + * @phpstan-return void + */ + public function __set($key, $value) + { + } + /** + * Magic method for unsetting a certain custom field. + * + * @since 4.4.0 + * + * @param string $key User meta key to unset. + */ + public function __unset($key) + { + } + /** + * Determines whether the user exists in the database. + * + * @since 3.4.0 + * + * @return bool True if user exists in the database, false if not. + */ + public function exists() + { + } + /** + * Retrieves the value of a property or meta key. + * + * Retrieves from the users and usermeta table. + * + * @since 3.3.0 + * + * @param string $key Property + * @return mixed + */ + public function get($key) + { + } + /** + * Determines whether a property or meta key is set. + * + * Consults the users and usermeta tables. + * + * @since 3.3.0 + * + * @param string $key Property. + * @return bool + */ + public function has_prop($key) + { + } + /** + * Returns an array representation. + * + * @since 3.5.0 + * + * @return array Array representation. + */ + public function to_array() + { + } + /** + * Makes private/protected methods readable for backward compatibility. + * + * @since 4.3.0 + * + * @param string $name Method to call. + * @param array $arguments Arguments to pass when calling. + * @return mixed|false Return value of the callback, false otherwise. + */ + public function __call($name, $arguments) + { + } + /** + * Sets up capability object properties. + * + * Will set the value for the 'cap_key' property to current database table + * prefix, followed by 'capabilities'. Will then check to see if the + * property matching the 'cap_key' exists and is an array. If so, it will be + * used. + * + * @since 2.1.0 + * @deprecated 4.9.0 Use WP_User::for_site() + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $cap_key Optional capability key + */ + protected function _init_caps($cap_key = '') + { + } + /** + * Retrieves all of the capabilities of the user's roles, and merges them with + * individual user capabilities. + * + * All of the capabilities of the user's roles are merged with the user's individual + * capabilities. This means that the user can be denied specific capabilities that + * their role might have, but the user is specifically denied. + * + * @since 2.0.0 + * + * @return bool[] Array of key/value pairs where keys represent a capability name + * and boolean values represent whether the user has that capability. + */ + public function get_role_caps() + { + } + /** + * Adds role to user. + * + * Updates the user's meta data option with capabilities and roles. + * + * @since 2.0.0 + * + * @param string $role Role name. + * @phpstan-return void + */ + public function add_role($role) + { + } + /** + * Removes role from user. + * + * @since 2.0.0 + * + * @param string $role Role name. + * @phpstan-return void + */ + public function remove_role($role) + { + } + /** + * Sets the role of the user. + * + * This will remove the previous roles of the user and assign the user the + * new one. You can set the role to an empty string and it will remove all + * of the roles from the user. + * + * @since 2.0.0 + * + * @param string $role Role name. + * @phpstan-return void + */ + public function set_role($role) + { + } + /** + * Chooses the maximum level the user has. + * + * Will compare the level from the $item parameter against the $max + * parameter. If the item is incorrect, then just the $max parameter value + * will be returned. + * + * Used to get the max level based on the capabilities the user has. This + * is also based on roles, so if the user is assigned the Administrator role + * then the capability 'level_10' will exist and the user will get that + * value. + * + * @since 2.0.0 + * + * @param int $max Max level of user. + * @param string $item Level capability name. + * @return int Max Level. + */ + public function level_reduction($max, $item) + { + } + /** + * Updates the maximum user level for the user. + * + * Updates the 'user_level' user metadata (includes prefix that is the + * database table prefix) with the maximum user level. Gets the value from + * the all of the capabilities that the user has. + * + * @since 2.0.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + */ + public function update_user_level_from_caps() + { + } + /** + * Adds capability and grant or deny access to capability. + * + * @since 2.0.0 + * + * @param string $cap Capability name. + * @param bool $grant Whether to grant capability to user. + */ + public function add_cap($cap, $grant = \true) + { + } + /** + * Removes capability from user. + * + * @since 2.0.0 + * + * @param string $cap Capability name. + * @phpstan-return void + */ + public function remove_cap($cap) + { + } + /** + * Removes all of the capabilities of the user. + * + * @since 2.1.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + */ + public function remove_all_caps() + { + } + /** + * Returns whether the user has the specified capability. + * + * This function also accepts an ID of an object to check against if the capability is a meta capability. Meta + * capabilities such as `edit_post` and `edit_user` are capabilities used by the `map_meta_cap()` function to + * map to primitive capabilities that a user or role has, such as `edit_posts` and `edit_others_posts`. + * + * Example usage: + * + * $user->has_cap( 'edit_posts' ); + * $user->has_cap( 'edit_post', $post->ID ); + * $user->has_cap( 'edit_post_meta', $post->ID, $meta_key ); + * + * While checking against a role in place of a capability is supported in part, this practice is discouraged as it + * may produce unreliable results. + * + * @since 2.0.0 + * @since 5.3.0 Formalized the existing and already documented `...$args` parameter + * by adding it to the function signature. + * + * @see map_meta_cap() + * + * @param string $cap Capability name. + * @param mixed ...$args Optional further parameters, typically starting with an object ID. + * @return bool Whether the user has the given capability, or, if an object ID is passed, whether the user has + * the given capability for that object. + */ + public function has_cap($cap, ...$args) + { + } + /** + * Converts numeric level to level capability name. + * + * Prepends 'level_' to level number. + * + * @since 2.0.0 + * + * @param int $level Level number, 1 to 10. + * @return string + */ + public function translate_level_to_cap($level) + { + } + /** + * Sets the site to operate on. Defaults to the current site. + * + * @since 3.0.0 + * @deprecated 4.9.0 Use WP_User::for_site() + * + * @param int $blog_id Optional. Site ID, defaults to current site. + */ + public function for_blog($blog_id = 0) + { + } + /** + * Sets the site to operate on. Defaults to the current site. + * + * @since 4.9.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param int $site_id Site ID to initialize user capabilities for. Default is the current site. + */ + public function for_site($site_id = 0) + { + } + /** + * Gets the ID of the site for which the user's capabilities are currently initialized. + * + * @since 4.9.0 + * + * @return int Site ID. + */ + public function get_site_id() + { + } + } + /** + * Singleton that registers and instantiates WP_Widget classes. + * + * @since 2.8.0 + * @since 4.4.0 Moved to its own file from wp-includes/widgets.php + */ + #[\AllowDynamicProperties] + class WP_Widget_Factory + { + /** + * Widgets array. + * + * @since 2.8.0 + * @var array + * @phpstan-var array<string, \WP_Widget> + */ + public $widgets = array(); + /** + * PHP5 constructor. + * + * @since 4.3.0 + */ + public function __construct() + { + } + /** + * PHP4 constructor. + * + * @since 2.8.0 + * @deprecated 4.3.0 Use __construct() instead. + * + * @see WP_Widget_Factory::__construct() + */ + public function WP_Widget_Factory() + { + } + /** + * Registers a widget subclass. + * + * @since 2.8.0 + * @since 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object + * instead of simply a `WP_Widget` subclass name. + * + * @param string|WP_Widget $widget Either the name of a `WP_Widget` subclass or an instance of a `WP_Widget` subclass. + * @phpstan-param class-string<\WP_Widget>|\WP_Widget $widget + */ + public function register($widget) + { + } + /** + * Un-registers a widget subclass. + * + * @since 2.8.0 + * @since 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object + * instead of simply a `WP_Widget` subclass name. + * + * @param string|WP_Widget $widget Either the name of a `WP_Widget` subclass or an instance of a `WP_Widget` subclass. + * @phpstan-param class-string<\WP_Widget>|\WP_Widget $widget + */ + public function unregister($widget) + { + } + /** + * Serves as a utility method for adding widgets to the registered widgets global. + * + * @since 2.8.0 + * + * @global array $wp_registered_widgets + */ + public function _register_widgets() + { + } + /** + * Returns the registered WP_Widget object for the given widget type. + * + * @since 5.8.0 + * + * @param string $id_base Widget type ID. + * @return WP_Widget|null + */ + public function get_widget_object($id_base) + { + } + /** + * Returns the registered key for the given widget type. + * + * @since 5.8.0 + * + * @param string $id_base Widget type ID. + * @return string + */ + public function get_widget_key($id_base) + { + } + } + /** + * Core base class extended to register widgets. + * + * This class must be extended for each widget, and WP_Widget::widget() must be overridden. + * + * If adding widget options, WP_Widget::update() and WP_Widget::form() should also be overridden. + * + * @since 2.8.0 + * @since 4.4.0 Moved to its own file from wp-includes/widgets.php + * @phpstan-template T of array = array<string, mixed> + */ + #[\AllowDynamicProperties] + class WP_Widget + { + /** + * Root ID for all widgets of this type. + * + * @since 2.8.0 + * @var mixed|string + */ + public $id_base; + /** + * Name for this widget type. + * + * @since 2.8.0 + * @var string + */ + public $name; + /** + * Option name for this widget type. + * + * @since 2.8.0 + * @var string + */ + public $option_name; + /** + * Alt option name for this widget type. + * + * @since 2.8.0 + * @var string + */ + public $alt_option_name; + /** + * Option array passed to wp_register_sidebar_widget(). + * + * @since 2.8.0 + * @var array + */ + public $widget_options; + /** + * Option array passed to wp_register_widget_control(). + * + * @since 2.8.0 + * @var array + */ + public $control_options; + /** + * Unique ID number of the current instance. + * + * @since 2.8.0 + * @var bool|int + */ + public $number = \false; + /** + * Unique ID string of the current instance (id_base-number). + * + * @since 2.8.0 + * @var bool|string + */ + public $id = \false; + /** + * Whether the widget data has been updated. + * + * Set to true when the data is updated after a POST submit - ensures it does + * not happen twice. + * + * @since 2.8.0 + * @var bool + */ + public $updated = \false; + /** + * Echoes the widget content. + * + * Subclasses should override this function to generate their widget code. + * + * @since 2.8.0 + * + * @param array $args Display arguments including 'before_title', 'after_title', + * 'before_widget', and 'after_widget'. + * @param array $instance The settings for the particular instance of the widget. + * @phpstan-param T $instance + * @phpstan-param array{name:string,id:string,description:string,class:string,before_widget:string,after_widget:string,before_title:string,after_title:string,before_sidebar:string,after_sidebar:string,show_in_rest:boolean,widget_id:string,widget_name:string} $args + */ + public function widget($args, $instance) + { + } + /** + * Updates a particular instance of a widget. + * + * This function should check that `$new_instance` is set correctly. The newly-calculated + * value of `$instance` should be returned. If false is returned, the instance won't be + * saved/updated. + * + * @since 2.8.0 + * + * @param array $new_instance New settings for this instance as input by the user via + * WP_Widget::form(). + * @param array $old_instance Old settings for this instance. + * @return array Settings to save or bool false to cancel saving. + * @phpstan-param T $new_instance + * @phpstan-param T $old_instance + */ + public function update($new_instance, $old_instance) + { + } + /** + * Outputs the settings update form. + * + * @since 2.8.0 + * + * @param array $instance The settings for the particular instance of the widget. + * @return string|void Default return is 'noform'. + * @phpstan-param T $instance + */ + public function form($instance) + { + } + /** + * PHP5 constructor. + * + * @since 2.8.0 + * + * @param string $id_base Base ID for the widget, lowercase and unique. If left empty, + * a portion of the widget's PHP class name will be used. Has to be unique. + * @param string $name Name for the widget displayed on the configuration page. + * @param array $widget_options Optional. Widget options. See wp_register_sidebar_widget() for + * information on accepted arguments. Default empty array. + * @param array $control_options Optional. Widget control options. See wp_register_widget_control() for + * information on accepted arguments. Default empty array. + * @phpstan-param array{ + * classname?: string, + * description?: string, + * show_instance_in_rest?: bool, + * } $widget_options See wp_register_sidebar_widget() + * @phpstan-param array{ + * height?: int, + * width?: int, + * id_base?: int|string, + * } $control_options See wp_register_widget_control() + */ + public function __construct($id_base, $name, $widget_options = array(), $control_options = array()) + { + } + /** + * PHP4 constructor. + * + * @since 2.8.0 + * @deprecated 4.3.0 Use __construct() instead. + * + * @see WP_Widget::__construct() + * + * @param string $id_base Base ID for the widget, lowercase and unique. If left empty, + * a portion of the widget's PHP class name will be used. Has to be unique. + * @param string $name Name for the widget displayed on the configuration page. + * @param array $widget_options Optional. Widget options. See wp_register_sidebar_widget() for + * information on accepted arguments. Default empty array. + * @param array $control_options Optional. Widget control options. See wp_register_widget_control() for + * information on accepted arguments. Default empty array. + * @phpstan-param array{ + * classname?: string, + * description?: string, + * show_instance_in_rest?: bool, + * } $widget_options See wp_register_sidebar_widget() + * @phpstan-param array{ + * height?: int, + * width?: int, + * id_base?: int|string, + * } $control_options See wp_register_widget_control() + */ + public function WP_Widget($id_base, $name, $widget_options = array(), $control_options = array()) + { + } + /** + * Constructs name attributes for use in form() fields + * + * This function should be used in form() methods to create name attributes for fields + * to be saved by update() + * + * @since 2.8.0 + * @since 4.4.0 Array format field names are now accepted. + * + * @param string $field_name Field name. + * @return string Name attribute for `$field_name`. + * @phpstan-return non-falsy-string + */ + public function get_field_name($field_name) + { + } + /** + * Constructs id attributes for use in WP_Widget::form() fields. + * + * This function should be used in form() methods to create id attributes + * for fields to be saved by WP_Widget::update(). + * + * @since 2.8.0 + * @since 4.4.0 Array format field IDs are now accepted. + * + * @param string $field_name Field name. + * @return string ID attribute for `$field_name`. + * @phpstan-return non-falsy-string + */ + public function get_field_id($field_name) + { + } + /** + * Register all widget instances of this widget class. + * + * @since 2.8.0 + */ + public function _register() + { + } + /** + * Sets the internal order number for the widget instance. + * + * @since 2.8.0 + * + * @param int $number The unique order number of this widget instance compared to other + * instances of the same class. + */ + public function _set($number) + { + } + /** + * Retrieves the widget display callback. + * + * @since 2.8.0 + * + * @return callable Display callback. + */ + public function _get_display_callback() + { + } + /** + * Retrieves the widget update callback. + * + * @since 2.8.0 + * + * @return callable Update callback. + */ + public function _get_update_callback() + { + } + /** + * Retrieves the form callback. + * + * @since 2.8.0 + * + * @return callable Form callback. + */ + public function _get_form_callback() + { + } + /** + * Determines whether the current request is inside the Customizer preview. + * + * If true -- the current request is inside the Customizer preview, then + * the object cache gets suspended and widgets should check this to decide + * whether they should store anything persistently to the object cache, + * to transients, or anywhere else. + * + * @since 3.9.0 + * + * @global WP_Customize_Manager $wp_customize + * + * @return bool True if within the Customizer preview, false if not. + */ + public function is_preview() + { + } + /** + * Generates the actual widget content (Do NOT override). + * + * Finds the instance and calls WP_Widget::widget(). + * + * @since 2.8.0 + * + * @param array $args Display arguments. See WP_Widget::widget() for information + * on accepted arguments. + * @param int|array $widget_args { + * Optional. Internal order number of the widget instance, or array of multi-widget arguments. + * Default 1. + * + * @type int $number Number increment used for multiples of the same widget. + * } + * @phpstan-param int|array{ + * number?: int, + * } $widget_args + * @final + * @phpstan-return void + */ + public function display_callback($args, $widget_args = 1) + { + } + /** + * Handles changed settings (Do NOT override). + * + * @since 2.8.0 + * + * @global array $wp_registered_widgets + * + * @param int $deprecated Not used. + * @final + * @phpstan-return void + */ + public function update_callback($deprecated = 1) + { + } + /** + * Generates the widget control form (Do NOT override). + * + * @since 2.8.0 + * + * @param int|array $widget_args { + * Optional. Internal order number of the widget instance, or array of multi-widget arguments. + * Default 1. + * + * @type int $number Number increment used for multiples of the same widget. + * } + * @return string|null + * @phpstan-param int|array{ + * number?: int, + * } $widget_args + * @final + */ + public function form_callback($widget_args = 1) + { + } + /** + * Registers an instance of the widget class. + * + * @since 2.8.0 + * + * @param int $number Optional. The unique order number of this widget instance + * compared to other instances of the same class. Default -1. + */ + public function _register_one($number = -1) + { + } + /** + * Saves the settings for all instances of the widget class. + * + * @since 2.8.0 + * + * @param array $settings Multi-dimensional array of widget instance settings. + */ + public function save_settings($settings) + { + } + /** + * Retrieves the settings for all instances of the widget class. + * + * @since 2.8.0 + * + * @return array Multi-dimensional array of widget instance settings. + */ + public function get_settings() + { + } + } + /** + * WordPress XMLRPC server implementation. + * + * Implements compatibility for Blogger API, MetaWeblog API, MovableType, and + * pingback. Additional WordPress API for managing comments, pages, posts, + * options, etc. + * + * As of WordPress 3.5.0, XML-RPC is enabled by default. It can be disabled + * via the {@see 'xmlrpc_enabled'} filter found in wp_xmlrpc_server::set_is_enabled(). + * + * @since 1.5.0 + * + * @see IXR_Server + */ + #[\AllowDynamicProperties] + class wp_xmlrpc_server extends \IXR_Server + { + /** + * Methods. + * + * @var array + */ + public $methods; + /** + * Blog options. + * + * @var array + */ + public $blog_options; + /** + * IXR_Error instance. + * + * @var IXR_Error + */ + public $error; + /** + * Flags that the user authentication has failed in this instance of wp_xmlrpc_server. + * + * @var bool + */ + protected $auth_failed = \false; + /** + * Registers all of the XMLRPC methods that XMLRPC server understands. + * + * Sets up server and method property. Passes XMLRPC methods through the + * {@see 'xmlrpc_methods'} filter to allow plugins to extend or replace + * XML-RPC methods. + * + * @since 1.5.0 + */ + public function __construct() + { + } + /** + * Makes private/protected methods readable for backward compatibility. + * + * @since 4.0.0 + * + * @param string $name Method to call. + * @param array $arguments Arguments to pass when calling. + * @return array|IXR_Error|false Return value of the callback, false otherwise. + */ + public function __call($name, $arguments) + { + } + /** + * Serves the XML-RPC request. + * + * @since 2.9.0 + */ + public function serve_request() + { + } + /** + * Tests XMLRPC API by saying, "Hello!" to client. + * + * @since 1.5.0 + * + * @return string Hello string response. + */ + public function sayHello() + { + } + /** + * Tests XMLRPC API by adding two numbers for client. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 A number to add. + * @type int $1 A second number to add. + * } + * @return int Sum of the two given numbers. + * @phpstan-param array{ + * 0: int, + * 1: int, + * } $args + */ + public function addTwoNumbers($args) + { + } + /** + * Logs user in. + * + * @since 2.8.0 + * + * @param string $username User's username. + * @param string $password User's password. + * @return WP_User|false WP_User object if authentication passed, false otherwise. + */ + public function login( + $username, + #[\SensitiveParameter] + $password + ) + { + } + /** + * Checks user's credentials. Deprecated. + * + * @since 1.5.0 + * @deprecated 2.8.0 Use wp_xmlrpc_server::login() + * @see wp_xmlrpc_server::login() + * + * @param string $username User's username. + * @param string $password User's password. + * @return bool Whether authentication passed. + */ + public function login_pass_ok( + $username, + #[\SensitiveParameter] + $password + ) + { + } + /** + * Escapes string or array of strings for database. + * + * @since 1.5.2 + * + * @param string|array $data Escape single string or array of strings. + * @return string|void Returns with string is passed, alters by-reference + * when array is passed. + */ + public function escape(&$data) + { + } + /** + * Sends error response to client. + * + * Sends an XML error response to the client. If the endpoint is enabled + * an HTTP 200 response is always sent per the XML-RPC specification. + * + * @since 5.7.3 + * + * @param IXR_Error|string $error Error code or an error object. + * @param false $message Error message. Optional. + */ + public function error($error, $message = \false) + { + } + /** + * Retrieves custom fields for post. + * + * @since 2.5.0 + * + * @param int $post_id Post ID. + * @return array Custom fields, if exist. + */ + public function get_custom_fields($post_id) + { + } + /** + * Sets custom fields for post. + * + * @since 2.5.0 + * + * @param int $post_id Post ID. + * @param array $fields Custom fields. + */ + public function set_custom_fields($post_id, $fields) + { + } + /** + * Retrieves custom fields for a term. + * + * @since 4.9.0 + * + * @param int $term_id Term ID. + * @return array Array of custom fields, if they exist. + */ + public function get_term_custom_fields($term_id) + { + } + /** + * Sets custom fields for a term. + * + * @since 4.9.0 + * + * @param int $term_id Term ID. + * @param array $fields Custom fields. + */ + public function set_term_custom_fields($term_id, $fields) + { + } + /** + * Sets up blog options property. + * + * Passes property through {@see 'xmlrpc_blog_options'} filter. + * + * @since 2.6.0 + */ + public function initialise_blog_option_info() + { + } + /** + * Retrieves the blogs of the user. + * + * @since 2.6.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type string $0 Username. + * @type string $1 Password. + * } + * @return array|IXR_Error Array contains: + * - 'isAdmin' + * - 'isPrimary' - whether the blog is the user's primary blog + * - 'url' + * - 'blogid' + * - 'blogName' + * - 'xmlrpc' - url of xmlrpc endpoint + * @phpstan-param array{ + * 0: string, + * 1: string, + * } $args + */ + public function wp_getUsersBlogs($args) + { + } + /** + * Checks if the method received at least the minimum number of arguments. + * + * @since 3.4.0 + * + * @param array $args An array of arguments to check. + * @param int $count Minimum number of arguments. + * @return bool True if `$args` contains at least `$count` arguments, false otherwise. + */ + protected function minimum_args($args, $count) + { + } + /** + * Prepares taxonomy data for return in an XML-RPC object. + * + * @param WP_Taxonomy $taxonomy The unprepared taxonomy data. + * @param array $fields The subset of taxonomy fields to return. + * @return array The prepared taxonomy data. + */ + protected function _prepare_taxonomy($taxonomy, $fields) + { + } + /** + * Prepares term data for return in an XML-RPC object. + * + * @param array|object $term The unprepared term data. + * @return array The prepared term data. + */ + protected function _prepare_term($term) + { + } + /** + * Converts a WordPress date string to an IXR_Date object. + * + * @param string $date Date string to convert. + * @return IXR_Date IXR_Date object. + */ + protected function _convert_date($date) + { + } + /** + * Converts a WordPress GMT date string to an IXR_Date object. + * + * @param string $date_gmt WordPress GMT date string. + * @param string $date Date string. + * @return IXR_Date IXR_Date object. + */ + protected function _convert_date_gmt($date_gmt, $date) + { + } + /** + * Prepares post data for return in an XML-RPC object. + * + * @param array $post The unprepared post data. + * @param array $fields The subset of post type fields to return. + * @return array The prepared post data. + */ + protected function _prepare_post($post, $fields) + { + } + /** + * Prepares post data for return in an XML-RPC object. + * + * @since 3.4.0 + * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object. + * + * @param WP_Post_Type $post_type Post type object. + * @param array $fields The subset of post fields to return. + * @return array The prepared post type data. + */ + protected function _prepare_post_type($post_type, $fields) + { + } + /** + * Prepares media item data for return in an XML-RPC object. + * + * @param WP_Post $media_item The unprepared media item data. + * @param string $thumbnail_size The image size to use for the thumbnail URL. + * @return array The prepared media item data. + */ + protected function _prepare_media_item($media_item, $thumbnail_size = 'thumbnail') + { + } + /** + * Prepares page data for return in an XML-RPC object. + * + * @param WP_Post $page The unprepared page data. + * @return array The prepared page data. + */ + protected function _prepare_page($page) + { + } + /** + * Prepares comment data for return in an XML-RPC object. + * + * @param WP_Comment $comment The unprepared comment data. + * @return array The prepared comment data. + */ + protected function _prepare_comment($comment) + { + } + /** + * Prepares user data for return in an XML-RPC object. + * + * @param WP_User $user The unprepared user object. + * @param array $fields The subset of user fields to return. + * @return array The prepared user data. + */ + protected function _prepare_user($user, $fields) + { + } + /** + * Creates a new post for any registered post type. + * + * @since 3.4.0 + * + * @link https://en.wikipedia.org/wiki/RSS_enclosure for information on RSS enclosures. + * + * @param array $args { + * Method arguments. Note: top-level arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 { + * Content struct for adding a new post. See wp_insert_post() for information on + * additional post fields + * + * @type string $post_type Post type. Default 'post'. + * @type string $post_status Post status. Default 'draft' + * @type string $post_title Post title. + * @type int $post_author Post author ID. + * @type string $post_excerpt Post excerpt. + * @type string $post_content Post content. + * @type string $post_date_gmt Post date in GMT. + * @type string $post_date Post date. + * @type string $post_password Post password (20-character limit). + * @type string $comment_status Post comment enabled status. Accepts 'open' or 'closed'. + * @type string $ping_status Post ping status. Accepts 'open' or 'closed'. + * @type bool $sticky Whether the post should be sticky. Automatically false if + * `$post_status` is 'private'. + * @type int $post_thumbnail ID of an image to use as the post thumbnail/featured image. + * @type array $custom_fields Array of meta key/value pairs to add to the post. + * @type array $terms Associative array with taxonomy names as keys and arrays + * of term IDs as values. + * @type array $terms_names Associative array with taxonomy names as keys and arrays + * of term names as values. + * @type array $enclosure { + * Array of feed enclosure data to add to post meta. + * + * @type string $url URL for the feed enclosure. + * @type int $length Size in bytes of the enclosure. + * @type string $type Mime-type for the enclosure. + * } + * } + * } + * @return int|IXR_Error Post ID on success, IXR_Error instance otherwise. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array{ + * post_type?: string, + * post_status?: string, + * post_title: string, + * post_author: int, + * post_excerpt: string, + * post_content: string, + * post_date_gmt: string, + * post_date: string, + * post_password: string, + * comment_status: string, + * ping_status: string, + * sticky: bool, + * post_thumbnail: int, + * custom_fields: array, + * terms: array, + * terms_names: array, + * enclosure: array{ + * url: string, + * length: int, + * type: string, + * }, + * }, + * } $args + */ + public function wp_newPost($args) + { + } + /** + * Helper method for wp_newPost() and wp_editPost(), containing shared logic. + * + * @since 3.4.0 + * + * @see wp_insert_post() + * + * @param WP_User $user The post author if post_author isn't set in $content_struct. + * @param array|IXR_Error $content_struct Post data to insert. + * @return IXR_Error|string + */ + protected function _insert_post($user, $content_struct) + { + } + /** + * Edits a post for any registered post type. + * + * The $content_struct parameter only needs to contain fields that + * should be changed. All other fields will retain their existing values. + * + * @since 3.4.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Post ID. + * @type array $4 Extra content arguments. + * } + * @return true|IXR_Error True on success, IXR_Error on failure. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * 4: array, + * } $args + */ + public function wp_editPost($args) + { + } + /** + * Deletes a post for any registered post type. + * + * @since 3.4.0 + * + * @see wp_delete_post() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Post ID. + * } + * @return true|IXR_Error True on success, IXR_Error instance on failure. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * } $args + */ + public function wp_deletePost($args) + { + } + /** + * Retrieves a post. + * + * @since 3.4.0 + * + * The optional $fields parameter specifies what fields will be included + * in the response array. This should be a list of field names. 'post_id' will + * always be included in the response regardless of the value of $fields. + * + * Instead of, or in addition to, individual field names, conceptual group + * names can be used to specify multiple fields. The available conceptual + * groups are 'post' (all basic fields), 'taxonomies', 'custom_fields', + * and 'enclosure'. + * + * @see get_post() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Post ID. + * @type array $4 Optional. The subset of post type fields to return. + * } + * @return array|IXR_Error Array contains (based on $fields parameter): + * - 'post_id' + * - 'post_title' + * - 'post_date' + * - 'post_date_gmt' + * - 'post_modified' + * - 'post_modified_gmt' + * - 'post_status' + * - 'post_type' + * - 'post_name' + * - 'post_author' + * - 'post_password' + * - 'post_excerpt' + * - 'post_content' + * - 'link' + * - 'comment_status' + * - 'ping_status' + * - 'sticky' + * - 'custom_fields' + * - 'terms' + * - 'categories' + * - 'tags' + * - 'enclosure' + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * 4: array, + * } $args + */ + public function wp_getPost($args) + { + } + /** + * Retrieves posts. + * + * @since 3.4.0 + * + * @see wp_get_recent_posts() + * @see wp_getPost() for more on `$fields` + * @see get_posts() for more on `$filter` values + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Optional. Modifies the query used to retrieve posts. Accepts 'post_type', + * 'post_status', 'number', 'offset', 'orderby', 's', and 'order'. + * Default empty array. + * @type array $4 Optional. The subset of post type fields to return in the response array. + * } + * @return array|IXR_Error Array containing a collection of posts. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * 4: array, + * } $args + */ + public function wp_getPosts($args) + { + } + /** + * Creates a new term. + * + * @since 3.4.0 + * + * @see wp_insert_term() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Content struct for adding a new term. The struct must contain + * the term 'name' and 'taxonomy'. Optional accepted values include + * 'parent', 'description', and 'slug'. + * } + * @return int|IXR_Error The term ID on success, or an IXR_Error object on failure. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * } $args + */ + public function wp_newTerm($args) + { + } + /** + * Edits a term. + * + * @since 3.4.0 + * + * @see wp_update_term() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Term ID. + * @type array $4 Content struct for editing a term. The struct must contain the + * term 'taxonomy'. Optional accepted values include 'name', 'parent', + * 'description', and 'slug'. + * } + * @return true|IXR_Error True on success, IXR_Error instance on failure. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * 4: array, + * } $args + */ + public function wp_editTerm($args) + { + } + /** + * Deletes a term. + * + * @since 3.4.0 + * + * @see wp_delete_term() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type string $3 Taxonomy name. + * @type int $4 Term ID. + * } + * @return true|IXR_Error True on success, IXR_Error instance on failure. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: string, + * 4: int, + * } $args + */ + public function wp_deleteTerm($args) + { + } + /** + * Retrieves a term. + * + * @since 3.4.0 + * + * @see get_term() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type string $3 Taxonomy name. + * @type int $4 Term ID. + * } + * @return array|IXR_Error IXR_Error on failure, array on success, containing: + * - 'term_id' + * - 'name' + * - 'slug' + * - 'term_group' + * - 'term_taxonomy_id' + * - 'taxonomy' + * - 'description' + * - 'parent' + * - 'count' + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: string, + * 4: int, + * } $args + */ + public function wp_getTerm($args) + { + } + /** + * Retrieves all terms for a taxonomy. + * + * @since 3.4.0 + * + * The optional $filter parameter modifies the query used to retrieve terms. + * Accepted keys are 'number', 'offset', 'orderby', 'order', 'hide_empty', and 'search'. + * + * @see get_terms() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type string $3 Taxonomy name. + * @type array $4 Optional. Modifies the query used to retrieve posts. Accepts 'number', + * 'offset', 'orderby', 'order', 'hide_empty', and 'search'. Default empty array. + * } + * @return array|IXR_Error An associative array of terms data on success, IXR_Error instance otherwise. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: string, + * 4: array, + * } $args + */ + public function wp_getTerms($args) + { + } + /** + * Retrieves a taxonomy. + * + * @since 3.4.0 + * + * @see get_taxonomy() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type string $3 Taxonomy name. + * @type array $4 Optional. Array of taxonomy fields to limit to in the return. + * Accepts 'labels', 'cap', 'menu', and 'object_type'. + * Default empty array. + * } + * @return array|IXR_Error An array of taxonomy data on success, IXR_Error instance otherwise. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: string, + * 4: array, + * } $args + */ + public function wp_getTaxonomy($args) + { + } + /** + * Retrieves all taxonomies. + * + * @since 3.4.0 + * + * @see get_taxonomies() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Optional. An array of arguments for retrieving taxonomies. + * @type array $4 Optional. The subset of taxonomy fields to return. + * } + * @return array|IXR_Error An associative array of taxonomy data with returned fields determined + * by `$fields`, or an IXR_Error instance on failure. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * 4: array, + * } $args + */ + public function wp_getTaxonomies($args) + { + } + /** + * Retrieves a user. + * + * The optional $fields parameter specifies what fields will be included + * in the response array. This should be a list of field names. 'user_id' will + * always be included in the response regardless of the value of $fields. + * + * Instead of, or in addition to, individual field names, conceptual group + * names can be used to specify multiple fields. The available conceptual + * groups are 'basic' and 'all'. + * + * @uses get_userdata() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 User ID. + * @type array $4 Optional. Array of fields to return. + * } + * @return array|IXR_Error Array contains (based on $fields parameter): + * - 'user_id' + * - 'username' + * - 'first_name' + * - 'last_name' + * - 'registered' + * - 'bio' + * - 'email' + * - 'nickname' + * - 'nicename' + * - 'url' + * - 'display_name' + * - 'roles' + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * 4: array, + * } $args + */ + public function wp_getUser($args) + { + } + /** + * Retrieves users. + * + * The optional $filter parameter modifies the query used to retrieve users. + * Accepted keys are 'number' (default: 50), 'offset' (default: 0), 'role', + * 'who', 'orderby', and 'order'. + * + * The optional $fields parameter specifies what fields will be included + * in the response array. + * + * @uses get_users() + * @see wp_getUser() for more on $fields and return values + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Optional. Arguments for the user query. + * @type array $4 Optional. Fields to return. + * } + * @return array|IXR_Error users data + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * 4: array, + * } $args + */ + public function wp_getUsers($args) + { + } + /** + * Retrieves information about the requesting user. + * + * @uses get_userdata() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username + * @type string $2 Password + * @type array $3 Optional. Fields to return. + * } + * @return array|IXR_Error (@see wp_getUser) + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * } $args + */ + public function wp_getProfile($args) + { + } + /** + * Edits user's profile. + * + * @uses wp_update_user() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Content struct. It can optionally contain: + * - 'first_name' + * - 'last_name' + * - 'website' + * - 'display_name' + * - 'nickname' + * - 'nicename' + * - 'bio' + * } + * @return true|IXR_Error True, on success. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * } $args + */ + public function wp_editProfile($args) + { + } + /** + * Retrieves a page. + * + * @since 2.2.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type int $1 Page ID. + * @type string $2 Username. + * @type string $3 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: int, + * 2: string, + * 3: string, + * } $args + */ + public function wp_getPage($args) + { + } + /** + * Retrieves Pages. + * + * @since 2.2.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Optional. Number of pages. Default 10. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * } $args + */ + public function wp_getPages($args) + { + } + /** + * Creates a new page. + * + * @since 2.2.0 + * + * @see wp_xmlrpc_server::mw_newPost() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Content struct. + * } + * @return int|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * } $args + */ + public function wp_newPage($args) + { + } + /** + * Deletes a page. + * + * @since 2.2.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Page ID. + * } + * @return true|IXR_Error True, if success. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * } $args + */ + public function wp_deletePage($args) + { + } + /** + * Edits a page. + * + * @since 2.2.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type int $1 Page ID. + * @type string $2 Username. + * @type string $3 Password. + * @type string $4 Content. + * @type int $5 Publish flag. 0 for draft, 1 for publish. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: int, + * 2: string, + * 3: string, + * 4: string, + * 5: int, + * } $args + */ + public function wp_editPage($args) + { + } + /** + * Retrieves page list. + * + * @since 2.2.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + public function wp_getPageList($args) + { + } + /** + * Retrieves authors list. + * + * @since 2.2.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + public function wp_getAuthors($args) + { + } + /** + * Gets the list of all tags. + * + * @since 2.7.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + public function wp_getTags($args) + { + } + /** + * Creates a new category. + * + * @since 2.2.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Category. + * } + * @return int|IXR_Error Category ID. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * } $args + */ + public function wp_newCategory($args) + { + } + /** + * Deletes a category. + * + * @since 2.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Category ID. + * } + * @return bool|IXR_Error See wp_delete_term() for return info. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * } $args + */ + public function wp_deleteCategory($args) + { + } + /** + * Retrieves category list. + * + * @since 2.2.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Category + * @type int $4 Max number of results. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * 4: int, + * } $args + */ + public function wp_suggestCategories($args) + { + } + /** + * Retrieves a comment. + * + * @since 2.7.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Comment ID. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * } $args + */ + public function wp_getComment($args) + { + } + /** + * Retrieves comments. + * + * Besides the common blog_id (unused), username, and password arguments, + * it takes a filter array as the last argument. + * + * Accepted 'filter' keys are 'status', 'post_id', 'offset', and 'number'. + * + * The defaults are as follows: + * - 'status' - Default is ''. Filter by status (e.g., 'approve', 'hold') + * - 'post_id' - Default is ''. The post where the comment is posted. + * Empty string shows all comments. + * - 'number' - Default is 10. Total number of media items to retrieve. + * - 'offset' - Default is 0. See WP_Query::query() for more. + * + * @since 2.7.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Optional. Query arguments. + * } + * @return array|IXR_Error Array containing a collection of comments. + * See wp_xmlrpc_server::wp_getComment() for a description + * of each item contents. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * } $args + */ + public function wp_getComments($args) + { + } + /** + * Deletes a comment. + * + * By default, the comment will be moved to the Trash instead of deleted. + * See wp_delete_comment() for more information on this behavior. + * + * @since 2.7.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Comment ID. + * } + * @return bool|IXR_Error See wp_delete_comment(). + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * } $args + */ + public function wp_deleteComment($args) + { + } + /** + * Edits a comment. + * + * Besides the common blog_id (unused), username, and password arguments, + * it takes a comment_id integer and a content_struct array as the last argument. + * + * The allowed keys in the content_struct array are: + * - 'author' + * - 'author_url' + * - 'author_email' + * - 'content' + * - 'date_created_gmt' + * - 'status'. Common statuses are 'approve', 'hold', 'spam'. See get_comment_statuses() for more details. + * + * @since 2.7.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Comment ID. + * @type array $4 Content structure. + * } + * @return true|IXR_Error True, on success. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * 4: array, + * } $args + */ + public function wp_editComment($args) + { + } + /** + * Creates a new comment. + * + * @since 2.7.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type string|int $3 Post ID or URL. + * @type array $4 Content structure. + * } + * @return int|IXR_Error See wp_new_comment(). + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: string|int, + * 4: array, + * } $args + */ + public function wp_newComment($args) + { + } + /** + * Retrieves all of the comment status. + * + * @since 2.7.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + public function wp_getCommentStatusList($args) + { + } + /** + * Retrieves comment counts. + * + * @since 2.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Post ID. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * } $args + */ + public function wp_getCommentCount($args) + { + } + /** + * Retrieves post statuses. + * + * @since 2.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + public function wp_getPostStatusList($args) + { + } + /** + * Retrieves page statuses. + * + * @since 2.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + public function wp_getPageStatusList($args) + { + } + /** + * Retrieves page templates. + * + * @since 2.6.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + public function wp_getPageTemplates($args) + { + } + /** + * Retrieves blog options. + * + * @since 2.6.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Optional. Options. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * } $args + */ + public function wp_getOptions($args) + { + } + /** + * Retrieves blog options value from list. + * + * @since 2.6.0 + * + * @param array $options Options to retrieve. + * @return array + */ + public function _getOptions($options) + { + } + /** + * Updates blog options. + * + * @since 2.6.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Options. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * } $args + */ + public function wp_setOptions($args) + { + } + /** + * Retrieves a media item by ID. + * + * @since 3.1.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Attachment ID. + * } + * @return array|IXR_Error Associative array contains: + * - 'date_created_gmt' + * - 'parent' + * - 'link' + * - 'thumbnail' + * - 'title' + * - 'caption' + * - 'description' + * - 'metadata' + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * } $args + */ + public function wp_getMediaItem($args) + { + } + /** + * Retrieves a collection of media library items (or attachments). + * + * Besides the common blog_id (unused), username, and password arguments, + * it takes a filter array as the last argument. + * + * Accepted 'filter' keys are 'parent_id', 'mime_type', 'offset', and 'number'. + * + * The defaults are as follows: + * - 'number' - Default is 5. Total number of media items to retrieve. + * - 'offset' - Default is 0. See WP_Query::query() for more. + * - 'parent_id' - Default is ''. The post where the media item is attached. + * Empty string shows all media items. 0 shows unattached media items. + * - 'mime_type' - Default is ''. Filter by mime type (e.g., 'image/jpeg', 'application/pdf') + * + * @since 3.1.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Optional. Query arguments. + * } + * @return array|IXR_Error Array containing a collection of media items. + * See wp_xmlrpc_server::wp_getMediaItem() for a description + * of each item contents. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * } $args + */ + public function wp_getMediaLibrary($args) + { + } + /** + * Retrieves a list of post formats used by the site. + * + * @since 3.1.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * } + * @return array|IXR_Error List of post formats, otherwise IXR_Error object. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + public function wp_getPostFormats($args) + { + } + /** + * Retrieves a post type. + * + * @since 3.4.0 + * + * @see get_post_type_object() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type string $3 Post type name. + * @type array $4 Optional. Fields to fetch. + * } + * @return array|IXR_Error Array contains: + * - 'labels' + * - 'description' + * - 'capability_type' + * - 'cap' + * - 'map_meta_cap' + * - 'hierarchical' + * - 'menu_position' + * - 'taxonomies' + * - 'supports' + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: string, + * 4: array, + * } $args + */ + public function wp_getPostType($args) + { + } + /** + * Retrieves post types. + * + * @since 3.4.0 + * + * @see get_post_types() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Optional. Query arguments. + * @type array $4 Optional. Fields to fetch. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * 4: array, + * } $args + */ + public function wp_getPostTypes($args) + { + } + /** + * Retrieves revisions for a specific post. + * + * @since 3.5.0 + * + * The optional $fields parameter specifies what fields will be included + * in the response array. + * + * @uses wp_get_post_revisions() + * @see wp_getPost() for more on $fields + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Post ID. + * @type array $4 Optional. Fields to fetch. + * } + * @return array|IXR_Error Array containing a collection of posts. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * 4: array, + * } $args + */ + public function wp_getRevisions($args) + { + } + /** + * Restores a post revision. + * + * @since 3.5.0 + * + * @uses wp_restore_post_revision() + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Revision ID. + * } + * @return bool|IXR_Error false if there was an error restoring, true if success. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * } $args + */ + public function wp_restoreRevision($args) + { + } + /** + * Retrieves blogs that user owns. + * + * Will make more sense once we support multiple blogs. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + public function blogger_getUsersBlogs($args) + { + } + /** + * Private function for retrieving a users blogs for multisite setups. + * + * @since 3.0.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + protected function _multisite_getUsersBlogs($args) + { + } + /** + * Retrieves user's data. + * + * Gives your client some info about you, so you don't have to. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + public function blogger_getUserInfo($args) + { + } + /** + * Retrieves a post. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type int $1 Post ID. + * @type string $2 Username. + * @type string $3 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: int, + * 2: string, + * 3: string, + * } $args + */ + public function blogger_getPost($args) + { + } + /** + * Retrieves the list of recent posts. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type string $0 App key (unused). + * @type int $1 Blog ID (unused). + * @type string $2 Username. + * @type string $3 Password. + * @type int $4 Optional. Number of posts. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: string, + * 1: int, + * 2: string, + * 3: string, + * 4: int, + * } $args + */ + public function blogger_getRecentPosts($args) + { + } + /** + * Deprecated. + * + * @since 1.5.0 + * @deprecated 3.5.0 + * + * @param array $args Unused. + * @return IXR_Error Error object. + */ + public function blogger_getTemplate($args) + { + } + /** + * Deprecated. + * + * @since 1.5.0 + * @deprecated 3.5.0 + * + * @param array $args Unused. + * @return IXR_Error Error object. + */ + public function blogger_setTemplate($args) + { + } + /** + * Creates a new post. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type string $0 App key (unused). + * @type int $1 Blog ID (unused). + * @type string $2 Username. + * @type string $3 Password. + * @type string $4 Content. + * @type int $5 Publish flag. 0 for draft, 1 for publish. + * } + * @return int|IXR_Error + * @phpstan-param array{ + * 0: string, + * 1: int, + * 2: string, + * 3: string, + * 4: string, + * 5: int, + * } $args + */ + public function blogger_newPost($args) + { + } + /** + * Edits a post. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type int $1 Post ID. + * @type string $2 Username. + * @type string $3 Password. + * @type string $4 Content + * @type int $5 Publish flag. 0 for draft, 1 for publish. + * } + * @return true|IXR_Error true when done. + * @phpstan-param array{ + * 0: int, + * 1: int, + * 2: string, + * 3: string, + * 4: string, + * 5: int, + * } $args + */ + public function blogger_editPost($args) + { + } + /** + * Deletes a post. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type int $1 Post ID. + * @type string $2 Username. + * @type string $3 Password. + * } + * @return true|IXR_Error True when post is deleted. + * @phpstan-param array{ + * 0: int, + * 1: int, + * 2: string, + * 3: string, + * } $args + */ + public function blogger_deletePost($args) + { + } + /** + * Creates a new post. + * + * The 'content_struct' argument must contain: + * - title + * - description + * - mt_excerpt + * - mt_text_more + * - mt_keywords + * - mt_tb_ping_urls + * - categories + * + * Also, it can optionally contain: + * - wp_slug + * - wp_password + * - wp_page_parent_id + * - wp_page_order + * - wp_author_id + * - post_status | page_status - can be 'draft', 'private', 'publish', or 'pending' + * - mt_allow_comments - can be 'open' or 'closed' + * - mt_allow_pings - can be 'open' or 'closed' + * - date_created_gmt + * - dateCreated + * - wp_post_thumbnail + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Content structure. + * @type int $4 Optional. Publish flag. 0 for draft, 1 for publish. Default 0. + * } + * @return int|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * 4: int, + * } $args + */ + public function mw_newPost($args) + { + } + /** + * Adds an enclosure to a post if it's new. + * + * @since 2.8.0 + * + * @param int $post_id Post ID. + * @param array $enclosure Enclosure data. + */ + public function add_enclosure_if_new($post_id, $enclosure) + { + } + /** + * Attaches an upload to a post. + * + * @since 2.1.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param int $post_id Post ID. + * @param string $post_content Post Content for attachment. + */ + public function attach_uploads($post_id, $post_content) + { + } + /** + * Edits a post. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Post ID. + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Content structure. + * @type int $4 Optional. Publish flag. 0 for draft, 1 for publish. Default 0. + * } + * @return true|IXR_Error True on success. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * 4: int, + * } $args + */ + public function mw_editPost($args) + { + } + /** + * Retrieves a post. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Post ID. + * @type string $1 Username. + * @type string $2 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + public function mw_getPost($args) + { + } + /** + * Retrieves list of recent posts. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Optional. Number of posts. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * } $args + */ + public function mw_getRecentPosts($args) + { + } + /** + * Retrieves the list of categories on a given blog. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + public function mw_getCategories($args) + { + } + /** + * Uploads a file, following your settings. + * + * Adapted from a patch by Johann Richard. + * + * @link http://mycvs.org/archives/2004/06/30/file-upload-to-wordpress-in-ecto/ + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Data. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * } $args + */ + public function mw_newMediaObject($args) + { + } + /** + * Retrieves the post titles of recent posts. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * @type int $3 Optional. Number of posts. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: int, + * } $args + */ + public function mt_getRecentPostTitles($args) + { + } + /** + * Retrieves the list of all categories on a blog. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Blog ID (unused). + * @type string $1 Username. + * @type string $2 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + public function mt_getCategoryList($args) + { + } + /** + * Retrieves post categories. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Post ID. + * @type string $1 Username. + * @type string $2 Password. + * } + * @return array|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + public function mt_getPostCategories($args) + { + } + /** + * Sets categories for a post. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Post ID. + * @type string $1 Username. + * @type string $2 Password. + * @type array $3 Categories. + * } + * @return true|IXR_Error True on success. + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * 3: array, + * } $args + */ + public function mt_setPostCategories($args) + { + } + /** + * Retrieves an array of methods supported by this server. + * + * @since 1.5.0 + * + * @return array + */ + public function mt_supportedMethods() + { + } + /** + * Retrieves an empty array because we don't support per-post text filters. + * + * @since 1.5.0 + */ + public function mt_supportedTextFilters() + { + } + /** + * Retrieves trackbacks sent to a given post. + * + * @since 1.5.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param int $post_id + * @return array|IXR_Error + */ + public function mt_getTrackbackPings($post_id) + { + } + /** + * Sets a post's publish status to 'publish'. + * + * @since 1.5.0 + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type int $0 Post ID. + * @type string $1 Username. + * @type string $2 Password. + * } + * @return int|IXR_Error + * @phpstan-param array{ + * 0: int, + * 1: string, + * 2: string, + * } $args + */ + public function mt_publishPost($args) + { + } + /** + * Retrieves a pingback and registers it. + * + * @since 1.5.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param array $args { + * Method arguments. Note: arguments must be ordered as documented. + * + * @type string $0 URL of page linked from. + * @type string $1 URL of page linked to. + * } + * @return string|IXR_Error + * @phpstan-param array{ + * 0: string, + * 1: string, + * } $args + */ + public function pingback_ping($args) + { + } + /** + * Retrieves an array of URLs that pingbacked the given URL. + * + * Specs on http://www.aquarionics.com/misc/archives/blogite/0198.html + * + * @since 1.5.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + * + * @param string $url + * @return array|IXR_Error + */ + public function pingback_extensions_getPingbacks($url) + { + } + /** + * Sends a pingback error based on the given error code and message. + * + * @since 3.6.0 + * + * @param int $code Error code. + * @param string $message Error message. + * @return IXR_Error Error object. + */ + protected function pingback_error($code, $message) + { + } + } + /** + * WordPress environment setup class. + * + * @package WordPress + * @since 2.0.0 + */ + #[\AllowDynamicProperties] + class WP + { + /** + * Public query variables. + * + * Long list of public query variables. + * + * @since 2.0.0 + * @var string[] + */ + public $public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'tag', 'feed', 'author_name', 'pagename', 'page_id', 'error', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots', 'favicon', 'taxonomy', 'term', 'cpage', 'post_type', 'embed'); + /** + * Private query variables. + * + * Long list of private query variables. + * + * @since 2.0.0 + * @var string[] + */ + public $private_query_vars = array('offset', 'posts_per_page', 'posts_per_archive_page', 'showposts', 'nopaging', 'post_type', 'post_status', 'category__in', 'category__not_in', 'category__and', 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'tag_id', 'post_mime_type', 'perm', 'comments_per_page', 'post__in', 'post__not_in', 'post_parent', 'post_parent__in', 'post_parent__not_in', 'title', 'fields'); + /** + * Extra query variables set by the user. + * + * @since 2.1.0 + * @var array + */ + public $extra_query_vars = array(); + /** + * Query variables for setting up the WordPress Query Loop. + * + * @since 2.0.0 + * @var array + */ + public $query_vars = array(); + /** + * String parsed to set the query variables. + * + * @since 2.0.0 + * @var string + */ + public $query_string = ''; + /** + * The request path, e.g. 2015/05/06. + * + * @since 2.0.0 + * @var string + */ + public $request = ''; + /** + * Rewrite rule the request matched. + * + * @since 2.0.0 + * @var string + */ + public $matched_rule = ''; + /** + * Rewrite query the request matched. + * + * @since 2.0.0 + * @var string + */ + public $matched_query = ''; + /** + * Whether already did the permalink. + * + * @since 2.0.0 + * @var bool + */ + public $did_permalink = \false; + /** + * Adds a query variable to the list of public query variables. + * + * @since 2.1.0 + * + * @param string $qv Query variable name. + */ + public function add_query_var($qv) + { + } + /** + * Removes a query variable from a list of public query variables. + * + * @since 4.5.0 + * + * @param string $name Query variable name. + */ + public function remove_query_var($name) + { + } + /** + * Sets the value of a query variable. + * + * @since 2.3.0 + * + * @param string $key Query variable name. + * @param mixed $value Query variable value. + */ + public function set_query_var($key, $value) + { + } + /** + * Parses the request to find the correct WordPress query. + * + * Sets up the query variables based on the request. There are also many + * filters and actions that can be used to further manipulate the result. + * + * @since 2.0.0 + * @since 6.0.0 A return value was added. + * + * @global WP_Rewrite $wp_rewrite WordPress rewrite component. + * + * @param array|string $extra_query_vars Set the extra query variables. + * @return bool Whether the request was parsed. + */ + public function parse_request($extra_query_vars = '') + { + } + /** + * Sends additional HTTP headers for caching, content type, etc. + * + * Sets the Content-Type header. Sets the 'error' status (if passed) and optionally exits. + * If showing a feed, it will also send Last-Modified, ETag, and 304 status if needed. + * + * @since 2.0.0 + * @since 4.4.0 `X-Pingback` header is added conditionally for single posts that allow pings. + * @since 6.1.0 Runs after posts have been queried. + * + * @global WP_Query $wp_query WordPress Query object. + */ + public function send_headers() + { + } + /** + * Sets the query string property based off of the query variable property. + * + * The {@see 'query_string'} filter is deprecated, but still works. Plugins should + * use the {@see 'request'} filter instead. + * + * @since 2.0.0 + */ + public function build_query_string() + { + } + /** + * Set up the WordPress Globals. + * + * The query_vars property will be extracted to the GLOBALS. So care should + * be taken when naming global variables that might interfere with the + * WordPress environment. + * + * @since 2.0.0 + * + * @global WP_Query $wp_query WordPress Query object. + * @global string $query_string Query string for the loop. + * @global array $posts The found posts. + * @global WP_Post|null $post The current post, if available. + * @global string $request The SQL statement for the request. + * @global int $more Only set, if single page or post. + * @global int $single If single page or post. Only set, if single page or post. + * @global WP_User $authordata Only set, if author archive. + */ + public function register_globals() + { + } + /** + * Set up the current user. + * + * @since 2.0.0 + */ + public function init() + { + } + /** + * Set up the Loop based on the query variables. + * + * @since 2.0.0 + * + * @global WP_Query $wp_the_query WordPress Query object. + */ + public function query_posts() + { + } + /** + * Set the Headers for 404, if nothing is found for requested URL. + * + * Issue a 404 if a request doesn't match any posts and doesn't match any object + * (e.g. an existing-but-empty category, tag, author) and a 404 was not already issued, + * and if the request was not a search or the homepage. + * + * Otherwise, issue a 200. + * + * This sets headers after posts have been queried. handle_404() really means "handle status". + * By inspecting the result of querying posts, seemingly successful requests can be switched to + * a 404 so that canonical redirection logic can kick in. + * + * @since 2.0.0 + * + * @global WP_Query $wp_query WordPress Query object. + * @phpstan-return void + */ + public function handle_404() + { + } + /** + * Sets up all of the variables required by the WordPress environment. + * + * The action {@see 'wp'} has one parameter that references the WP object. It + * allows for accessing the properties and methods to further manipulate the + * object. + * + * @since 2.0.0 + * + * @param string|array $query_args Passed to parse_request(). + */ + public function main($query_args = '') + { + } + } + /** + * WordPress database access abstraction class. + * + * This class is used to interact with a database without needing to use raw SQL statements. + * By default, WordPress uses this class to instantiate the global $wpdb object, providing + * access to the WordPress database. + * + * It is possible to replace the global instance with your own by setting the $wpdb global variable + * in wp-content/db.php file to your class. The wpdb class will still be included, so you can + * extend it or simply use your own. + * + * @link https://developer.wordpress.org/reference/classes/wpdb/ + * + * @since 0.71 + */ + #[\AllowDynamicProperties] + class wpdb + { + /** + * Whether to show SQL/DB errors. + * + * Default is to show errors if both WP_DEBUG and WP_DEBUG_DISPLAY evaluate to true. + * + * @since 0.71 + * + * @var bool + */ + public $show_errors = \false; + /** + * Whether to suppress errors during the DB bootstrapping. Default false. + * + * @since 2.5.0 + * + * @var bool + */ + public $suppress_errors = \false; + /** + * The error encountered during the last query. + * + * @since 2.5.0 + * + * @var string + */ + public $last_error = ''; + /** + * The number of queries made. + * + * @since 1.2.0 + * + * @var int + */ + public $num_queries = 0; + /** + * Count of rows returned by the last query. + * + * @since 0.71 + * + * @var int + */ + public $num_rows = 0; + /** + * Count of rows affected by the last query. + * + * @since 0.71 + * + * @var int + */ + public $rows_affected = 0; + /** + * The ID generated for an AUTO_INCREMENT column by the last query (usually INSERT). + * + * @since 0.71 + * + * @var int + */ + public $insert_id = 0; + /** + * The last query made. + * + * @since 0.71 + * + * @var string + */ + public $last_query; + /** + * Results of the last query. + * + * @since 0.71 + * + * @var stdClass[]|null + */ + public $last_result; + /** + * Database query result. + * + * Possible values: + * + * - `mysqli_result` instance for successful SELECT, SHOW, DESCRIBE, or EXPLAIN queries + * - `true` for other query types that were successful + * - `null` if a query is yet to be made or if the result has since been flushed + * - `false` if the query returned an error + * + * @since 0.71 + * + * @var mysqli_result|bool|null + */ + protected $result; + /** + * Cached column info, for confidence checking data before inserting. + * + * @since 4.2.0 + * + * @var array + */ + protected $col_meta = array(); + /** + * Calculated character sets keyed by table name. + * + * @since 4.2.0 + * + * @var string[] + */ + protected $table_charset = array(); + /** + * Whether text fields in the current query need to be confidence checked. + * + * @since 4.2.0 + * + * @var bool + */ + protected $check_current_query = \true; + /** + * Saved info on the table column. + * + * @since 0.71 + * + * @var array + */ + protected $col_info; + /** + * Log of queries that were executed, for debugging purposes. + * + * @since 1.5.0 + * @since 2.5.0 The third element in each query log was added to record the calling functions. + * @since 5.1.0 The fourth element in each query log was added to record the start time. + * @since 5.3.0 The fifth element in each query log was added to record custom data. + * + * @var array[] { + * Array of arrays containing information about queries that were executed. + * + * @type array ...$0 { + * Data for each query. + * + * @type string $0 The query's SQL. + * @type float $1 Total time spent on the query, in seconds. + * @type string $2 Comma-separated list of the calling functions. + * @type float $3 Unix timestamp of the time at the start of the query. + * @type array $4 Custom query data. + * } + * } + * @phpstan-var array<int|string, array{ + * 0: string, + * 1: float, + * 2: string, + * 3: float, + * 4: array, + * }> + */ + public $queries; + /** + * The number of times to retry reconnecting before dying. Default 5. + * + * @since 3.9.0 + * + * @see wpdb::check_connection() + * @var int + */ + protected $reconnect_retries = 5; + /** + * WordPress table prefix. + * + * You can set this to have multiple WordPress installations in a single database. + * + * @since 2.5.0 + * + * @var string + */ + public $prefix = ''; + /** + * WordPress base table prefix. + * + * @since 3.0.0 + * + * @var string + */ + public $base_prefix; + /** + * Whether the database queries are ready to start executing. + * + * @since 2.3.2 + * + * @var bool + */ + public $ready = \false; + /** + * Blog ID. + * + * @since 3.0.0 + * + * @var int + */ + public $blogid = 0; + /** + * Site ID. + * + * @since 3.0.0 + * + * @var int + */ + public $siteid = 0; + /** + * List of WordPress per-site tables. + * + * @since 2.5.0 + * + * @see wpdb::tables() + * @var string[] + */ + public $tables = array('posts', 'comments', 'links', 'options', 'postmeta', 'terms', 'term_taxonomy', 'term_relationships', 'termmeta', 'commentmeta'); + /** + * List of deprecated WordPress tables. + * + * 'categories', 'post2cat', and 'link2cat' were deprecated in 2.3.0, db version 5539. + * + * @since 2.9.0 + * + * @see wpdb::tables() + * @var string[] + */ + public $old_tables = array('categories', 'post2cat', 'link2cat'); + /** + * List of WordPress global tables. + * + * @since 3.0.0 + * + * @see wpdb::tables() + * @var string[] + */ + public $global_tables = array('users', 'usermeta'); + /** + * List of Multisite global tables. + * + * @since 3.0.0 + * + * @see wpdb::tables() + * @var string[] + */ + public $ms_global_tables = array('blogs', 'blogmeta', 'signups', 'site', 'sitemeta', 'registration_log'); + /** + * List of deprecated WordPress Multisite global tables. + * + * @since 6.1.0 + * + * @see wpdb::tables() + * @var string[] + */ + public $old_ms_global_tables = array('sitecategories'); + /** + * WordPress Comments table. + * + * @since 1.5.0 + * + * @var string + */ + public $comments; + /** + * WordPress Comment Metadata table. + * + * @since 2.9.0 + * + * @var string + */ + public $commentmeta; + /** + * WordPress Links table. + * + * @since 1.5.0 + * + * @var string + */ + public $links; + /** + * WordPress Options table. + * + * @since 1.5.0 + * + * @var string + */ + public $options; + /** + * WordPress Post Metadata table. + * + * @since 1.5.0 + * + * @var string + */ + public $postmeta; + /** + * WordPress Posts table. + * + * @since 1.5.0 + * + * @var string + */ + public $posts; + /** + * WordPress Terms table. + * + * @since 2.3.0 + * + * @var string + */ + public $terms; + /** + * WordPress Term Relationships table. + * + * @since 2.3.0 + * + * @var string + */ + public $term_relationships; + /** + * WordPress Term Taxonomy table. + * + * @since 2.3.0 + * + * @var string + */ + public $term_taxonomy; + /** + * WordPress Term Meta table. + * + * @since 4.4.0 + * + * @var string + */ + public $termmeta; + /** + * WordPress User Metadata table. + * + * @since 2.3.0 + * + * @var string + */ + public $usermeta; + /** + * WordPress Users table. + * + * @since 1.5.0 + * + * @var string + */ + public $users; + /** + * Multisite Blogs table. + * + * @since 3.0.0 + * + * @var string|null + */ + public $blogs; + /** + * Multisite Blog Metadata table. + * + * @since 5.1.0 + * + * @var string|null + */ + public $blogmeta; + /** + * Multisite Registration Log table. + * + * @since 3.0.0 + * + * @var string|null + */ + public $registration_log; + /** + * Multisite Signups table. + * + * @since 3.0.0 + * + * @var string|null + */ + public $signups; + /** + * Multisite Sites table. + * + * @since 3.0.0 + * + * @var string|null + */ + public $site; + /** + * Multisite Sitewide Terms table. + * + * @since 3.0.0 + * + * @var string|null + */ + public $sitecategories; + /** + * Multisite Site Metadata table. + * + * @since 3.0.0 + * + * @var string|null + */ + public $sitemeta; + /** + * Format specifiers for DB columns. + * + * Columns not listed here default to %s. Initialized during WP load. + * Keys are column names, values are format types: 'ID' => '%d'. + * + * @since 2.8.0 + * + * @see wpdb::prepare() + * @see wpdb::insert() + * @see wpdb::update() + * @see wpdb::delete() + * @see wp_set_wpdb_vars() + * @var array + */ + public $field_types = array(); + /** + * Database table columns charset. + * + * @since 2.2.0 + * + * @var string + */ + public $charset; + /** + * Database table columns collate. + * + * @since 2.2.0 + * + * @var string + */ + public $collate; + /** + * Database Username. + * + * @since 2.9.0 + * + * @var string + */ + protected $dbuser; + /** + * Database Password. + * + * @since 3.1.0 + * + * @var string + */ + protected $dbpassword; + /** + * Database Name. + * + * @since 3.1.0 + * + * @var string + */ + protected $dbname; + /** + * Database Host. + * + * @since 3.1.0 + * + * @var string + */ + protected $dbhost; + /** + * Database handle. + * + * Possible values: + * + * - `mysqli` instance during normal operation + * - `null` if the connection is yet to be made or has been closed + * - `false` if the connection has failed + * + * @since 0.71 + * + * @var mysqli|false|null + */ + protected $dbh; + /** + * A textual description of the last query/get_row/get_var call. + * + * @since 3.0.0 + * + * @var string + */ + public $func_call; + /** + * Whether MySQL is used as the database engine. + * + * Set in wpdb::db_connect() to true, by default. This is used when checking + * against the required MySQL version for WordPress. Normally, a replacement + * database drop-in (db.php) will skip these checks, but setting this to true + * will force the checks to occur. + * + * @since 3.3.0 + * + * @var bool + */ + public $is_mysql = \null; + /** + * A list of incompatible SQL modes. + * + * @since 3.9.0 + * + * @var string[] + */ + protected $incompatible_modes = array('NO_ZERO_DATE', 'ONLY_FULL_GROUP_BY', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'TRADITIONAL', 'ANSI'); + /** + * Time when the last query was performed. + * + * Only set when `SAVEQUERIES` is defined and truthy. + * + * @since 1.5.0 + * + * @var float + */ + public $time_start = \null; + /** + * The last SQL error that was encountered. + * + * @since 2.5.0 + * + * @var WP_Error|string + */ + public $error = \null; + /** + * Connects to the database server and selects a database. + * + * Does the actual setting up + * of the class properties and connection to the database. + * + * @since 2.0.8 + * + * @link https://core.trac.wordpress.org/ticket/3354 + * + * @param string $dbuser Database user. + * @param string $dbpassword Database password. + * @param string $dbname Database name. + * @param string $dbhost Database host. + * @phpstan-return void + */ + public function __construct( + $dbuser, + #[\SensitiveParameter] + $dbpassword, + $dbname, + $dbhost + ) + { + } + /** + * Makes private properties readable for backward compatibility. + * + * @since 3.5.0 + * + * @param string $name The private member to get, and optionally process. + * @return mixed The private member. + */ + public function __get($name) + { + } + /** + * Makes private properties settable for backward compatibility. + * + * @since 3.5.0 + * + * @param string $name The private member to set. + * @param mixed $value The value to set. + * @phpstan-return void + */ + public function __set($name, $value) + { + } + /** + * Makes private properties check-able for backward compatibility. + * + * @since 3.5.0 + * + * @param string $name The private member to check. + * @return bool If the member is set or not. + */ + public function __isset($name) + { + } + /** + * Makes private properties un-settable for backward compatibility. + * + * @since 3.5.0 + * + * @param string $name The private member to unset. + */ + public function __unset($name) + { + } + /** + * Sets $this->charset and $this->collate. + * + * @since 3.1.0 + */ + public function init_charset() + { + } + /** + * Determines the best charset and collation to use given a charset and collation. + * + * For example, when able, utf8mb4 should be used instead of utf8. + * + * @since 4.6.0 + * + * @param string $charset The character set to check. + * @param string $collate The collation to check. + * @return array { + * The most appropriate character set and collation to use. + * + * @type string $charset Character set. + * @type string $collate Collation. + * } + * @phpstan-return array{ + * charset: string, + * collate: string, + * } + */ + public function determine_charset($charset, $collate) + { + } + /** + * Sets the connection's character set. + * + * @since 3.1.0 + * + * @param mysqli $dbh The connection returned by `mysqli_connect()`. + * @param string $charset Optional. The character set. Default null. + * @param string $collate Optional. The collation. Default null. + */ + public function set_charset($dbh, $charset = \null, $collate = \null) + { + } + /** + * Changes the current SQL mode, and ensures its WordPress compatibility. + * + * If no modes are passed, it will ensure the current SQL server modes are compatible. + * + * @since 3.9.0 + * + * @param array $modes Optional. A list of SQL modes to set. Default empty array. + * @phpstan-return void + */ + public function set_sql_mode($modes = array()) + { + } + /** + * Sets the table prefix for the WordPress tables. + * + * @since 2.5.0 + * + * @param string $prefix Alphanumeric name for the new prefix. + * @param bool $set_table_names Optional. Whether the table names, e.g. wpdb::$posts, + * should be updated or not. Default true. + * @return string|WP_Error Old prefix or WP_Error on error. + */ + public function set_prefix($prefix, $set_table_names = \true) + { + } + /** + * Sets blog ID. + * + * @since 3.0.0 + * + * @param int $blog_id + * @param int $network_id Optional. Network ID. Default 0. + * @return int Previous blog ID. + */ + public function set_blog_id($blog_id, $network_id = 0) + { + } + /** + * Gets blog prefix. + * + * @since 3.0.0 + * + * @param int $blog_id Optional. Blog ID to retrieve the table prefix for. + * Defaults to the current blog ID. + * @return string Blog prefix. + */ + public function get_blog_prefix($blog_id = \null) + { + } + /** + * Returns an array of WordPress tables. + * + * Also allows for the `CUSTOM_USER_TABLE` and `CUSTOM_USER_META_TABLE` to override the WordPress users + * and usermeta tables that would otherwise be determined by the prefix. + * + * The `$scope` argument can take one of the following: + * + * - 'all' - returns 'all' and 'global' tables. No old tables are returned. + * - 'blog' - returns the blog-level tables for the queried blog. + * - 'global' - returns the global tables for the installation, returning multisite tables only on multisite. + * - 'ms_global' - returns the multisite global tables, regardless if current installation is multisite. + * - 'old' - returns tables which are deprecated. + * + * @since 3.0.0 + * @since 6.1.0 `old` now includes deprecated multisite global tables only on multisite. + * + * @uses wpdb::$tables + * @uses wpdb::$old_tables + * @uses wpdb::$global_tables + * @uses wpdb::$ms_global_tables + * @uses wpdb::$old_ms_global_tables + * + * @param string $scope Optional. Possible values include 'all', 'global', 'ms_global', 'blog', + * or 'old' tables. Default 'all'. + * @param bool $prefix Optional. Whether to include table prefixes. If blog prefix is requested, + * then the custom users and usermeta tables will be mapped. Default true. + * @param int $blog_id Optional. The blog_id to prefix. Used only when prefix is requested. + * Defaults to `wpdb::$blogid`. + * @return string[] Table names. When a prefix is requested, the key is the unprefixed table name. + */ + public function tables($scope = 'all', $prefix = \true, $blog_id = 0) + { + } + /** + * Selects a database using the current or provided database connection. + * + * The database name will be changed based on the current database connection. + * On failure, the execution will bail and display a DB error. + * + * @since 0.71 + * + * @param string $db Database name. + * @param mysqli $dbh Optional. Database connection. + * Defaults to the current database handle. + */ + public function select($db, $dbh = \null) + { + } + /** + * Do not use, deprecated. + * + * Use esc_sql() or wpdb::prepare() instead. + * + * @since 2.8.0 + * @deprecated 3.6.0 Use wpdb::prepare() + * @see wpdb::prepare() + * @see esc_sql() + * + * @param string $data + * @return string + */ + public function _weak_escape($data) + { + } + /** + * Real escape using mysqli_real_escape_string(). + * + * @since 2.8.0 + * + * @see mysqli_real_escape_string() + * + * @param string $data String to escape. + * @return string Escaped string. + */ + public function _real_escape($data) + { + } + /** + * Escapes data. Works on arrays. + * + * @since 2.8.0 + * + * @uses wpdb::_real_escape() + * + * @param string|array $data Data to escape. + * @return string|array Escaped data, in the same type as supplied. + */ + public function _escape($data) + { + } + /** + * Do not use, deprecated. + * + * Use esc_sql() or wpdb::prepare() instead. + * + * @since 0.71 + * @deprecated 3.6.0 Use wpdb::prepare() + * @see wpdb::prepare() + * @see esc_sql() + * + * @param string|array $data Data to escape. + * @return string|array Escaped data, in the same type as supplied. + */ + public function escape($data) + { + } + /** + * Escapes content by reference for insertion into the database, for security. + * + * @uses wpdb::_real_escape() + * + * @since 2.3.0 + * + * @param string $data String to escape. + */ + public function escape_by_ref(&$data) + { + } + /** + * Quotes an identifier such as a table or field name. + * + * @since 6.2.0 + * + * @param string $identifier Identifier to escape. + * @return string Escaped identifier. + */ + public function quote_identifier($identifier) + { + } + /** + * Prepares a SQL query for safe execution. + * + * Uses `sprintf()`-like syntax. The following placeholders can be used in the query string: + * + * - `%d` (integer) + * - `%f` (float) + * - `%s` (string) + * - `%i` (identifier, e.g. table/field names) + * + * All placeholders MUST be left unquoted in the query string. A corresponding argument + * MUST be passed for each placeholder. + * + * Note: There is one exception to the above: for compatibility with old behavior, + * numbered or formatted string placeholders (eg, `%1$s`, `%5s`) will not have quotes + * added by this function, so should be passed with appropriate quotes around them. + * + * Literal percentage signs (`%`) in the query string must be written as `%%`. Percentage wildcards + * (for example, to use in LIKE syntax) must be passed via a substitution argument containing + * the complete LIKE string, these cannot be inserted directly in the query string. + * Also see wpdb::esc_like(). + * + * Arguments may be passed as individual arguments to the method, or as a single array + * containing all arguments. A combination of the two is not supported. + * + * Examples: + * + * $wpdb->prepare( + * "SELECT * FROM `table` WHERE `column` = %s AND `field` = %d OR `other_field` LIKE %s", + * array( 'foo', 1337, '%bar' ) + * ); + * + * $wpdb->prepare( + * "SELECT DATE_FORMAT(`field`, '%%c') FROM `table` WHERE `column` = %s", + * 'foo' + * ); + * + * $wpdb->prepare( + * "SELECT * FROM %i WHERE %i = %s", + * $table, + * $field, + * $value + * ); + * + * @since 2.3.0 + * @since 5.3.0 Formalized the existing and already documented `...$args` parameter + * by updating the function signature. The second parameter was changed + * from `$args` to `...$args`. + * @since 6.2.0 Added `%i` for identifiers, e.g. table or field names. + * Check support via `wpdb::has_cap( 'identifier_placeholders' )`. + * This preserves compatibility with `sprintf()`, as the C version uses + * `%d` and `$i` as a signed integer, whereas PHP only supports `%d`. + * + * @link https://www.php.net/sprintf Description of syntax. + * + * @param string $query Query statement with `sprintf()`-like placeholders. + * @param array|mixed $args The array of variables to substitute into the query's placeholders + * if being called with an array of arguments, or the first variable + * to substitute into the query's placeholders if being called with + * individual arguments. + * @param mixed ...$args Further variables to substitute into the query's placeholders + * if being called with individual arguments. + * @return string|void Sanitized query string, if there is a query to prepare. + * @phpstan-param literal-string $query + */ + public function prepare($query, ...$args) + { + } + /** + * First half of escaping for `LIKE` special characters `%` and `_` before preparing for SQL. + * + * Use this only before wpdb::prepare() or esc_sql(). Reversing the order is very bad for security. + * + * Example Prepared Statement: + * + * $wild = '%'; + * $find = 'only 43% of planets'; + * $like = $wild . $wpdb->esc_like( $find ) . $wild; + * $sql = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_content LIKE %s", $like ); + * + * Example Escape Chain: + * + * $sql = esc_sql( $wpdb->esc_like( $input ) ); + * + * @since 4.0.0 + * + * @param string $text The raw text to be escaped. The input typed by the user + * should have no extra or deleted slashes. + * @return string Text in the form of a LIKE phrase. The output is not SQL safe. + * Call wpdb::prepare() or wpdb::_real_escape() next. + */ + public function esc_like($text) + { + } + /** + * Prints SQL/DB error. + * + * @since 0.71 + * + * @global array $EZSQL_ERROR Stores error information of query and error string. + * + * @param string $str The error to display. + * @return void|false Void if the showing of errors is enabled, false if disabled. + */ + public function print_error($str = '') + { + } + /** + * Enables showing of database errors. + * + * This function should be used only to enable showing of errors. + * wpdb::hide_errors() should be used instead for hiding errors. + * + * @since 0.71 + * + * @see wpdb::hide_errors() + * + * @param bool $show Optional. Whether to show errors. Default true. + * @return bool Whether showing of errors was previously active. + */ + public function show_errors($show = \true) + { + } + /** + * Disables showing of database errors. + * + * By default database errors are not shown. + * + * @since 0.71 + * + * @see wpdb::show_errors() + * + * @return bool Whether showing of errors was previously active. + */ + public function hide_errors() + { + } + /** + * Enables or disables suppressing of database errors. + * + * By default database errors are suppressed. + * + * @since 2.5.0 + * + * @see wpdb::hide_errors() + * + * @param bool $suppress Optional. Whether to suppress errors. Default true. + * @return bool Whether suppressing of errors was previously active. + */ + public function suppress_errors($suppress = \true) + { + } + /** + * Kills cached query results. + * + * @since 0.71 + * @phpstan-return void + */ + public function flush() + { + } + /** + * Connects to and selects database. + * + * If `$allow_bail` is false, the lack of database connection will need to be handled manually. + * + * @since 3.0.0 + * @since 3.9.0 $allow_bail parameter added. + * + * @param bool $allow_bail Optional. Allows the function to bail. Default true. + * @return bool True with a successful connection, false on failure. + */ + public function db_connect($allow_bail = \true) + { + } + /** + * Parses the DB_HOST setting to interpret it for mysqli_real_connect(). + * + * mysqli_real_connect() doesn't support the host param including a port or socket + * like mysql_connect() does. This duplicates how mysql_connect() detects a port + * and/or socket file. + * + * @since 4.9.0 + * + * @param string $host The DB_HOST setting to parse. + * @return array|false { + * Array containing the host, the port, the socket and + * whether it is an IPv6 address, in that order. + * False if the host couldn't be parsed. + * + * @type string $0 Host name. + * @type string|null $1 Port. + * @type string|null $2 Socket. + * @type bool $3 Whether it is an IPv6 address. + * } + * @phpstan-return false|array{ + * 0: string, + * 1: string|null, + * 2: string|null, + * 3: bool, + * } + */ + public function parse_db_host($host) + { + } + /** + * Checks that the connection to the database is still up. If not, try to reconnect. + * + * If this function is unable to reconnect, it will forcibly die, or if called + * after the {@see 'template_redirect'} hook has been fired, return false instead. + * + * If `$allow_bail` is false, the lack of database connection will need to be handled manually. + * + * @since 3.9.0 + * + * @param bool $allow_bail Optional. Allows the function to bail. Default true. + * @return bool|void True if the connection is up. + */ + public function check_connection($allow_bail = \true) + { + } + /** + * Performs a database query, using current database connection. + * + * More information can be found on the documentation page. + * + * @since 0.71 + * + * @link https://developer.wordpress.org/reference/classes/wpdb/ + * + * @param string $query Database query. + * @return int|bool Boolean true for CREATE, ALTER, TRUNCATE and DROP queries. Number of rows + * affected/selected for all other queries. Boolean false on error. + */ + public function query($query) + { + } + /** + * Logs query data. + * + * @since 5.3.0 + * + * @param string $query The query's SQL. + * @param float $query_time Total time spent on the query, in seconds. + * @param string $query_callstack Comma-separated list of the calling functions. + * @param float $query_start Unix timestamp of the time at the start of the query. + * @param array $query_data Custom query data. + */ + public function log_query($query, $query_time, $query_callstack, $query_start, $query_data) + { + } + /** + * Generates and returns a placeholder escape string for use in queries returned by ::prepare(). + * + * @since 4.8.3 + * + * @return string String to escape placeholders. + */ + public function placeholder_escape() + { + } + /** + * Adds a placeholder escape string, to escape anything that resembles a printf() placeholder. + * + * @since 4.8.3 + * + * @param string $query The query to escape. + * @return string The query with the placeholder escape string inserted where necessary. + */ + public function add_placeholder_escape($query) + { + } + /** + * Removes the placeholder escape strings from a query. + * + * @since 4.8.3 + * + * @param string $query The query from which the placeholder will be removed. + * @return string The query with the placeholder removed. + */ + public function remove_placeholder_escape($query) + { + } + /** + * Inserts a row into the table. + * + * Examples: + * + * $wpdb->insert( + * 'table', + * array( + * 'column1' => 'foo', + * 'column2' => 'bar', + * ) + * ); + * $wpdb->insert( + * 'table', + * array( + * 'column1' => 'foo', + * 'column2' => 1337, + * ), + * array( + * '%s', + * '%d', + * ) + * ); + * + * @since 2.5.0 + * + * @see wpdb::prepare() + * @see wpdb::$field_types + * @see wp_set_wpdb_vars() + * + * @param string $table Table name. + * @param array $data Data to insert (in column => value pairs). + * Both `$data` columns and `$data` values should be "raw" (neither should be SQL escaped). + * Sending a null value will cause the column to be set to NULL - the corresponding + * format is ignored in this case. + * @param string[]|string $format Optional. An array of formats to be mapped to each of the value in `$data`. + * If string, that format will be used for all of the values in `$data`. + * A format is one of '%d', '%f', '%s' (integer, float, string). + * If omitted, all values in `$data` will be treated as strings unless otherwise + * specified in wpdb::$field_types. Default null. + * @return int|false The number of rows inserted, or false on error. + */ + public function insert($table, $data, $format = \null) + { + } + /** + * Replaces a row in the table or inserts it if it does not exist, based on a PRIMARY KEY or a UNIQUE index. + * + * A REPLACE works exactly like an INSERT, except that if an old row in the table has the same value as a new row + * for a PRIMARY KEY or a UNIQUE index, the old row is deleted before the new row is inserted. + * + * Examples: + * + * $wpdb->replace( + * 'table', + * array( + * 'ID' => 123, + * 'column1' => 'foo', + * 'column2' => 'bar', + * ) + * ); + * $wpdb->replace( + * 'table', + * array( + * 'ID' => 456, + * 'column1' => 'foo', + * 'column2' => 1337, + * ), + * array( + * '%d', + * '%s', + * '%d', + * ) + * ); + * + * @since 3.0.0 + * + * @see wpdb::prepare() + * @see wpdb::$field_types + * @see wp_set_wpdb_vars() + * + * @param string $table Table name. + * @param array $data Data to insert (in column => value pairs). + * Both `$data` columns and `$data` values should be "raw" (neither should be SQL escaped). + * A primary key or unique index is required to perform a replace operation. + * Sending a null value will cause the column to be set to NULL - the corresponding + * format is ignored in this case. + * @param string[]|string $format Optional. An array of formats to be mapped to each of the value in `$data`. + * If string, that format will be used for all of the values in `$data`. + * A format is one of '%d', '%f', '%s' (integer, float, string). + * If omitted, all values in `$data` will be treated as strings unless otherwise + * specified in wpdb::$field_types. Default null. + * @return int|false The number of rows affected, or false on error. + */ + public function replace($table, $data, $format = \null) + { + } + /** + * Helper function for insert and replace. + * + * Runs an insert or replace query based on `$type` argument. + * + * @since 3.0.0 + * + * @see wpdb::prepare() + * @see wpdb::$field_types + * @see wp_set_wpdb_vars() + * + * @param string $table Table name. + * @param array $data Data to insert (in column => value pairs). + * Both `$data` columns and `$data` values should be "raw" (neither should be SQL escaped). + * Sending a null value will cause the column to be set to NULL - the corresponding + * format is ignored in this case. + * @param string[]|string $format Optional. An array of formats to be mapped to each of the value in `$data`. + * If string, that format will be used for all of the values in `$data`. + * A format is one of '%d', '%f', '%s' (integer, float, string). + * If omitted, all values in `$data` will be treated as strings unless otherwise + * specified in wpdb::$field_types. Default null. + * @param string $type Optional. Type of operation. Either 'INSERT' or 'REPLACE'. + * Default 'INSERT'. + * @return int|false The number of rows affected, or false on error. + * @phpstan-param 'INSERT'|'REPLACE' $type + */ + public function _insert_replace_helper($table, $data, $format = \null, $type = 'INSERT') + { + } + /** + * Updates a row in the table. + * + * Examples: + * + * $wpdb->update( + * 'table', + * array( + * 'column1' => 'foo', + * 'column2' => 'bar', + * ), + * array( + * 'ID' => 1, + * ) + * ); + * $wpdb->update( + * 'table', + * array( + * 'column1' => 'foo', + * 'column2' => 1337, + * ), + * array( + * 'ID' => 1, + * ), + * array( + * '%s', + * '%d', + * ), + * array( + * '%d', + * ) + * ); + * + * @since 2.5.0 + * + * @see wpdb::prepare() + * @see wpdb::$field_types + * @see wp_set_wpdb_vars() + * + * @param string $table Table name. + * @param array $data Data to update (in column => value pairs). + * Both $data columns and $data values should be "raw" (neither should be SQL escaped). + * Sending a null value will cause the column to be set to NULL - the corresponding + * format is ignored in this case. + * @param array $where A named array of WHERE clauses (in column => value pairs). + * Multiple clauses will be joined with ANDs. + * Both $where columns and $where values should be "raw". + * Sending a null value will create an IS NULL comparison - the corresponding + * format will be ignored in this case. + * @param string[]|string $format Optional. An array of formats to be mapped to each of the values in $data. + * If string, that format will be used for all of the values in $data. + * A format is one of '%d', '%f', '%s' (integer, float, string). + * If omitted, all values in $data will be treated as strings unless otherwise + * specified in wpdb::$field_types. Default null. + * @param string[]|string $where_format Optional. An array of formats to be mapped to each of the values in $where. + * If string, that format will be used for all of the items in $where. + * A format is one of '%d', '%f', '%s' (integer, float, string). + * If omitted, all values in $where will be treated as strings unless otherwise + * specified in wpdb::$field_types. Default null. + * @return int|false The number of rows updated, or false on error. + */ + public function update($table, $data, $where, $format = \null, $where_format = \null) + { + } + /** + * Deletes a row in the table. + * + * Examples: + * + * $wpdb->delete( + * 'table', + * array( + * 'ID' => 1, + * ) + * ); + * $wpdb->delete( + * 'table', + * array( + * 'ID' => 1, + * ), + * array( + * '%d', + * ) + * ); + * + * @since 3.4.0 + * + * @see wpdb::prepare() + * @see wpdb::$field_types + * @see wp_set_wpdb_vars() + * + * @param string $table Table name. + * @param array $where A named array of WHERE clauses (in column => value pairs). + * Multiple clauses will be joined with ANDs. + * Both $where columns and $where values should be "raw". + * Sending a null value will create an IS NULL comparison - the corresponding + * format will be ignored in this case. + * @param string[]|string $where_format Optional. An array of formats to be mapped to each of the values in $where. + * If string, that format will be used for all of the items in $where. + * A format is one of '%d', '%f', '%s' (integer, float, string). + * If omitted, all values in $data will be treated as strings unless otherwise + * specified in wpdb::$field_types. Default null. + * @return int|false The number of rows deleted, or false on error. + */ + public function delete($table, $where, $where_format = \null) + { + } + /** + * Processes arrays of field/value pairs and field formats. + * + * This is a helper method for wpdb's CRUD methods, which take field/value pairs + * for inserts, updates, and where clauses. This method first pairs each value + * with a format. Then it determines the charset of that field, using that + * to determine if any invalid text would be stripped. If text is stripped, + * then field processing is rejected and the query fails. + * + * @since 4.2.0 + * + * @param string $table Table name. + * @param array $data Array of values keyed by their field names. + * @param string[]|string $format Formats or format to be mapped to the values in the data. + * @return array|false An array of fields that contain paired value and formats. + * False for invalid values. + */ + protected function process_fields($table, $data, $format) + { + } + /** + * Prepares arrays of value/format pairs as passed to wpdb CRUD methods. + * + * @since 4.2.0 + * + * @param array $data Array of values keyed by their field names. + * @param string[]|string $format Formats or format to be mapped to the values in the data. + * @return array { + * Array of values and formats keyed by their field names. + * + * @type array ...$0 { + * Value and format for this field. + * + * @type mixed $value The value to be formatted. + * @type string $format The format to be mapped to the value. + * } + * } + * @phpstan-return array<int|string, array{ + * value: mixed, + * format: string, + * }> + */ + protected function process_field_formats($data, $format) + { + } + /** + * Adds field charsets to field/value/format arrays generated by wpdb::process_field_formats(). + * + * @since 4.2.0 + * + * @param array $data { + * Array of values and formats keyed by their field names, + * as it comes from the wpdb::process_field_formats() method. + * + * @type array ...$0 { + * Value and format for this field. + * + * @type mixed $value The value to be formatted. + * @type string $format The format to be mapped to the value. + * } + * } + * @param string $table Table name. + * @return array|false { + * The same array of data with additional 'charset' keys, or false if + * the charset for the table cannot be found. + * + * @type array ...$0 { + * Value, format, and charset for this field. + * + * @type mixed $value The value to be formatted. + * @type string $format The format to be mapped to the value. + * @type string|false $charset The charset to be used for the value. + * } + * } + * @phpstan-param array<int|string, array{ + * value: mixed, + * format: string, + * }> $data + * @phpstan-return false|array<int|string, array{ + * value: mixed, + * format: string, + * charset: string|false, + * }> + */ + protected function process_field_charsets($data, $table) + { + } + /** + * For string fields, records the maximum string length that field can safely save. + * + * @since 4.2.1 + * + * @param array $data { + * Array of values, formats, and charsets keyed by their field names, + * as it comes from the wpdb::process_field_charsets() method. + * + * @type array ...$0 { + * Value, format, and charset for this field. + * + * @type mixed $value The value to be formatted. + * @type string $format The format to be mapped to the value. + * @type string|false $charset The charset to be used for the value. + * } + * } + * @param string $table Table name. + * @return array|false { + * The same array of data with additional 'length' keys, or false if + * information for the table cannot be found. + * + * @type array ...$0 { + * Value, format, charset, and length for this field. + * + * @type mixed $value The value to be formatted. + * @type string $format The format to be mapped to the value. + * @type string|false $charset The charset to be used for the value. + * @type array|false $length { + * Information about the maximum length of the value. + * False if the column has no length. + * + * @type string $type One of 'byte' or 'char'. + * @type int $length The column length. + * } + * } + * } + * @phpstan-param array<int|string, array{ + * value: mixed, + * format: string, + * charset: string|false, + * }> $data + * @phpstan-return false|array<int|string, array{ + * value: mixed, + * format: string, + * charset: string|false, + * length: false|array{ + * type: string, + * length: int, + * }, + * }> + */ + protected function process_field_lengths($data, $table) + { + } + /** + * Retrieves one value from the database. + * + * Executes a SQL query and returns the value from the SQL result. + * If the SQL result contains more than one column and/or more than one row, + * the value in the column and row specified is returned. If $query is null, + * the value in the specified column and row from the previous SQL result is returned. + * + * @since 0.71 + * + * @param string|null $query Optional. SQL query. Defaults to null, use the result from the previous query. + * @param int $x Optional. Column of value to return. Indexed from 0. Default 0. + * @param int $y Optional. Row of value to return. Indexed from 0. Default 0. + * @return string|null Database query result (as string), or null on failure. + */ + public function get_var($query = \null, $x = 0, $y = 0) + { + } + /** + * Retrieves one row from the database. + * + * Executes a SQL query and returns the row from the SQL result. + * + * @since 0.71 + * + * @param string|null $query SQL query. + * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which + * correspond to an stdClass object, an associative array, or a numeric array, + * respectively. Default OBJECT. + * @param int $y Optional. Row to return. Indexed from 0. Default 0. + * @return array|object|null|void Database query result in format specified by $output or null on failure. + * @phpstan-param 'OBJECT'|'ARRAY_A'|'ARRAY_N' $output + * @phpstan-param int<0, max> $y + * @phpstan-return null|void|($output is 'ARRAY_A' ? array<array-key, mixed> : ($output is 'ARRAY_N' ? list<mixed> : \stdClass)) + */ + public function get_row($query = \null, $output = \OBJECT, $y = 0) + { + } + /** + * Retrieves one column from the database. + * + * Executes a SQL query and returns the column from the SQL result. + * If the SQL result contains more than one column, the column specified is returned. + * If $query is null, the specified column from the previous SQL result is returned. + * + * @since 0.71 + * + * @param string|null $query Optional. SQL query. Defaults to previous query. + * @param int $x Optional. Column to return. Indexed from 0. Default 0. + * @return array Database query result. Array indexed from 0 by SQL result row number. + */ + public function get_col($query = \null, $x = 0) + { + } + /** + * Retrieves an entire SQL result set from the database (i.e., many rows). + * + * Executes a SQL query and returns the entire SQL result. + * + * @since 0.71 + * + * @param string $query SQL query. + * @param string $output Optional. Any of ARRAY_A | ARRAY_N | OBJECT | OBJECT_K constants. + * With one of the first three, return an array of rows indexed + * from 0 by SQL result row number. Each row is an associative array + * (column => value, ...), a numerically indexed array (0 => value, ...), + * or an object ( ->column = value ), respectively. With OBJECT_K, + * return an associative array of row objects keyed by the value + * of each row's first column's value. Duplicate keys are discarded. + * Default OBJECT. + * @return array|object|null Database query results. + * @phpstan-param 'OBJECT'|'OBJECT_K'|'ARRAY_A'|'ARRAY_N' $output + * @phpstan-return null|($output is 'ARRAY_A' ? list<array<array-key, mixed>> : ($output is 'ARRAY_N' ? list<array<int, mixed>> : ($output is 'OBJECT_K' ? array<array-key, \stdClass> : list<\stdClass>))) + */ + public function get_results($query = \null, $output = \OBJECT) + { + } + /** + * Retrieves the character set for the given table. + * + * @since 4.2.0 + * + * @param string $table Table name. + * @return string|WP_Error Table character set, WP_Error object if it couldn't be found. + */ + protected function get_table_charset($table) + { + } + /** + * Retrieves the character set for the given column. + * + * @since 4.2.0 + * + * @param string $table Table name. + * @param string $column Column name. + * @return string|false|WP_Error Column character set as a string. False if the column has + * no character set. WP_Error object if there was an error. + */ + public function get_col_charset($table, $column) + { + } + /** + * Retrieves the maximum string length allowed in a given column. + * + * The length may either be specified as a byte length or a character length. + * + * @since 4.2.1 + * + * @param string $table Table name. + * @param string $column Column name. + * @return array|false|WP_Error { + * Array of column length information, false if the column has no length (for + * example, numeric column), WP_Error object if there was an error. + * + * @type string $type One of 'byte' or 'char'. + * @type int $length The column length. + * } + * @phpstan-return false|\WP_Error|array{ + * type: string, + * length: int, + * } + */ + public function get_col_length($table, $column) + { + } + /** + * Checks if a string is ASCII. + * + * The negative regex is faster for non-ASCII strings, as it allows + * the search to finish as soon as it encounters a non-ASCII character. + * + * @since 4.2.0 + * + * @param string $input_string String to check. + * @return bool True if ASCII, false if not. + */ + protected function check_ascii($input_string) + { + } + /** + * Checks if the query is accessing a collation considered safe. + * + * @since 4.2.0 + * + * @param string $query The query to check. + * @return bool True if the collation is safe, false if it isn't. + */ + protected function check_safe_collation($query) + { + } + /** + * Strips any invalid characters based on value/charset pairs. + * + * @since 4.2.0 + * + * @param array $data Array of value arrays. Each value array has the keys 'value', 'charset', and 'length'. + * An optional 'ascii' key can be set to false to avoid redundant ASCII checks. + * @return array|WP_Error The $data parameter, with invalid characters removed from each value. + * This works as a passthrough: any additional keys such as 'field' are + * retained in each value array. If we cannot remove invalid characters, + * a WP_Error object is returned. + */ + protected function strip_invalid_text($data) + { + } + /** + * Strips any invalid characters from the query. + * + * @since 4.2.0 + * + * @param string $query Query to convert. + * @return string|WP_Error The converted query, or a WP_Error object if the conversion fails. + */ + protected function strip_invalid_text_from_query($query) + { + } + /** + * Strips any invalid characters from the string for a given table and column. + * + * @since 4.2.0 + * + * @param string $table Table name. + * @param string $column Column name. + * @param string $value The text to check. + * @return string|WP_Error The converted string, or a WP_Error object if the conversion fails. + */ + public function strip_invalid_text_for_column($table, $column, $value) + { + } + /** + * Finds the first table name referenced in a query. + * + * @since 4.2.0 + * + * @param string $query The query to search. + * @return string|false The table name found, or false if a table couldn't be found. + */ + protected function get_table_from_query($query) + { + } + /** + * Loads the column metadata from the last query. + * + * @since 3.5.0 + * @phpstan-return void + */ + protected function load_col_info() + { + } + /** + * Retrieves column metadata from the last query. + * + * @since 0.71 + * + * @param string $info_type Optional. Possible values include 'name', 'table', 'def', 'max_length', + * 'not_null', 'primary_key', 'multiple_key', 'unique_key', 'numeric', + * 'blob', 'type', 'unsigned', 'zerofill'. Default 'name'. + * @param int $col_offset Optional. 0: col name. 1: which table the col's in. 2: col's max length. + * 3: if the col is numeric. 4: col's type. Default -1. + * @return mixed Column results. + */ + public function get_col_info($info_type = 'name', $col_offset = -1) + { + } + /** + * Starts the timer, for debugging purposes. + * + * @since 1.5.0 + * + * @return true + */ + public function timer_start() + { + } + /** + * Stops the debugging timer. + * + * @since 1.5.0 + * + * @return float Total time spent on the query, in seconds. + */ + public function timer_stop() + { + } + /** + * Wraps errors in a nice header and footer and dies. + * + * Will not die if wpdb::$show_errors is false. + * + * @since 1.5.0 + * + * @param string $message The error message. + * @param string $error_code Optional. A computer-readable string to identify the error. + * Default '500'. + * @return void|false Void if the showing of errors is enabled, false if disabled. + */ + public function bail($message, $error_code = '500') + { + } + /** + * Closes the current database connection. + * + * @since 4.5.0 + * + * @return bool True if the connection was successfully closed, + * false if it wasn't, or if the connection doesn't exist. + */ + public function close() + { + } + /** + * Determines whether the database server is at least the required minimum version. + * + * @since 2.5.0 + * + * @global string $required_mysql_version The minimum required MySQL version string. + * @return void|WP_Error + */ + public function check_database_version() + { + } + /** + * Determines whether the database supports collation. + * + * Called when WordPress is generating the table scheme. + * + * Use `wpdb::has_cap( 'collation' )`. + * + * @since 2.5.0 + * @deprecated 3.5.0 Use wpdb::has_cap() + * + * @return bool True if collation is supported, false if not. + */ + public function supports_collation() + { + } + /** + * Retrieves the database character collate. + * + * @since 3.5.0 + * + * @return string The database character collate. + */ + public function get_charset_collate() + { + } + /** + * Determines whether the database or WPDB supports a particular feature. + * + * Capability sniffs for the database server and current version of WPDB. + * + * Database sniffs are based on the version of the database server in use. + * + * WPDB sniffs are added as new features are introduced to allow theme and plugin + * developers to determine feature support. This is to account for drop-ins which may + * introduce feature support at a different time to WordPress. + * + * @since 2.7.0 + * @since 4.1.0 Added support for the 'utf8mb4' feature. + * @since 4.6.0 Added support for the 'utf8mb4_520' feature. + * @since 6.2.0 Added support for the 'identifier_placeholders' feature. + * @since 6.6.0 The `utf8mb4` feature now always returns true. + * + * @see wpdb::db_version() + * + * @param string $db_cap The feature to check for. Accepts 'collation', 'group_concat', + * 'subqueries', 'set_charset', 'utf8mb4', 'utf8mb4_520', + * or 'identifier_placeholders'. + * @return bool True when the database feature is supported, false otherwise. + * @phpstan-param 'collation'|'group_concat'|'subqueries'|'set_charset'|'utf8mb4'|'utf8mb4_520'|'identifier_placeholders' $db_cap + */ + public function has_cap($db_cap) + { + } + /** + * Retrieves a comma-separated list of the names of the functions that called wpdb. + * + * @since 2.5.0 + * + * @return string Comma-separated list of the calling functions. + */ + public function get_caller() + { + } + /** + * Retrieves the database server version number. + * + * @since 2.7.0 + * + * @return string|null Version number on success, null on failure. + */ + public function db_version() + { + } + /** + * Returns the raw version string of the database server. + * + * @since 5.5.0 + * + * @return string Database server version as a string. + */ + public function db_server_info() + { + } + } + /** + * Customize Media Control class. + * + * @since 4.2.0 + * + * @see WP_Customize_Control + */ + class WP_Customize_Media_Control extends \WP_Customize_Control + { + /** + * Control type. + * + * @since 4.2.0 + * @var string + */ + public $type = 'media'; + /** + * Media control mime type. + * + * @since 4.2.0 + * @var string + */ + public $mime_type = ''; + /** + * Button labels. + * + * @since 4.2.0 + * @var array + */ + public $button_labels = array(); + /** + * Constructor. + * + * @since 4.1.0 + * @since 4.2.0 Moved from WP_Customize_Upload_Control. + * + * @see WP_Customize_Control::__construct() + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @param string $id Control ID. + * @param array $args Optional. Arguments to override class property defaults. + * See WP_Customize_Control::__construct() for information + * on accepted arguments. Default empty array. + * @phpstan-param array{ + * instance_number?: int, + * manager?: WP_Customize_Manager, + * id?: string, + * settings?: array, + * setting?: string, + * capability?: string, + * priority?: int, + * section?: string, + * label?: string, + * description?: string, + * choices?: array, + * input_attrs?: array, + * allow_addition?: bool, + * json?: array, + * type?: string, + * active_callback?: callable, + * } $args See WP_Customize_Control::__construct() + */ + public function __construct($manager, $id, $args = array()) + { + } + /** + * Enqueue control related scripts/styles. + * + * @since 3.4.0 + * @since 4.2.0 Moved from WP_Customize_Upload_Control. + */ + public function enqueue() + { + } + /** + * Refresh the parameters passed to the JavaScript via JSON. + * + * @since 3.4.0 + * @since 4.2.0 Moved from WP_Customize_Upload_Control. + * + * @see WP_Customize_Control::to_json() + */ + public function to_json() + { + } + /** + * Don't render any content for this control from PHP. + * + * @since 3.4.0 + * @since 4.2.0 Moved from WP_Customize_Upload_Control. + * + * @see WP_Customize_Media_Control::content_template() + */ + public function render_content() + { + } + /** + * Render a JS template for the content of the media control. + * + * @since 4.1.0 + * @since 4.2.0 Moved from WP_Customize_Upload_Control. + */ + public function content_template() + { + } + /** + * Get default button labels. + * + * Provides an array of the default button labels based on the mime type of the current control. + * + * @since 4.9.0 + * + * @return string[] An associative array of default button labels keyed by the button name. + */ + public function get_default_button_labels() + { + } + } + /** + * Customize Upload Control Class. + * + * @since 3.4.0 + * + * @see WP_Customize_Media_Control + */ + class WP_Customize_Upload_Control extends \WP_Customize_Media_Control + { + /** + * Control type. + * + * @since 3.4.0 + * @var string + */ + public $type = 'upload'; + /** + * Media control mime type. + * + * @since 4.1.0 + * @var string + */ + public $mime_type = ''; + /** + * Button labels. + * + * @since 4.1.0 + * @var array + */ + public $button_labels = array(); + public $removed = ''; + public $context; + public $extensions = array(); + /** + * Refresh the parameters passed to the JavaScript via JSON. + * + * @since 3.4.0 + * + * @uses WP_Customize_Media_Control::to_json() + */ + public function to_json() + { + } + } + /** + * Customize Image Control class. + * + * @since 3.4.0 + * + * @see WP_Customize_Upload_Control + */ + class WP_Customize_Image_Control extends \WP_Customize_Upload_Control + { + /** + * Control type. + * + * @since 3.4.0 + * @var string + */ + public $type = 'image'; + /** + * Media control mime type. + * + * @since 4.1.0 + * @var string + */ + public $mime_type = 'image'; + /** + * @since 3.4.2 + * @deprecated 4.1.0 + */ + public function prepare_control() + { + } + /** + * @since 3.4.0 + * @deprecated 4.1.0 + * + * @param string $id + * @param string $label + * @param mixed $callback + */ + public function add_tab($id, $label, $callback) + { + } + /** + * @since 3.4.0 + * @deprecated 4.1.0 + * + * @param string $id + */ + public function remove_tab($id) + { + } + /** + * @since 3.4.0 + * @deprecated 4.1.0 + * + * @param string $url + * @param string $thumbnail_url + */ + public function print_tab_image($url, $thumbnail_url = \null) + { + } + } + /** + * Customize Background Image Control class. + * + * @since 3.4.0 + * + * @see WP_Customize_Image_Control + */ + class WP_Customize_Background_Image_Control extends \WP_Customize_Image_Control + { + /** + * Customize control type. + * + * @since 4.1.0 + * @var string + */ + public $type = 'background'; + /** + * Constructor. + * + * @since 3.4.0 + * @uses WP_Customize_Image_Control::__construct() + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + */ + public function __construct($manager) + { + } + /** + * Enqueue control related scripts/styles. + * + * @since 4.1.0 + */ + public function enqueue() + { + } + } + /** + * Customizer Background Image Setting class. + * + * @since 3.4.0 + * + * @see WP_Customize_Setting + */ + final class WP_Customize_Background_Image_Setting extends \WP_Customize_Setting + { + /** + * Unique string identifier for the setting. + * + * @since 3.4.0 + * @var string + */ + public $id = 'background_image_thumb'; + /** + * @since 3.4.0 + * + * @param mixed $value The value to update. Not used. + */ + public function update($value) + { + } + } + /** + * Customize Background Position Control class. + * + * @since 4.7.0 + * + * @see WP_Customize_Control + */ + class WP_Customize_Background_Position_Control extends \WP_Customize_Control + { + /** + * Type. + * + * @since 4.7.0 + * @var string + */ + public $type = 'background_position'; + /** + * Don't render the control content from PHP, as it's rendered via JS on load. + * + * @since 4.7.0 + */ + public function render_content() + { + } + /** + * Render a JS template for the content of the position control. + * + * @since 4.7.0 + */ + public function content_template() + { + } + } + /** + * Customize Code Editor Control class. + * + * @since 4.9.0 + * + * @see WP_Customize_Control + */ + class WP_Customize_Code_Editor_Control extends \WP_Customize_Control + { + /** + * Customize control type. + * + * @since 4.9.0 + * @var string + */ + public $type = 'code_editor'; + /** + * Type of code that is being edited. + * + * @since 4.9.0 + * @var string + */ + public $code_type = ''; + /** + * Code editor settings. + * + * @see wp_enqueue_code_editor() + * @since 4.9.0 + * @var array|false + */ + public $editor_settings = array(); + /** + * Enqueue control related scripts/styles. + * + * @since 4.9.0 + */ + public function enqueue() + { + } + /** + * Refresh the parameters passed to the JavaScript via JSON. + * + * @since 4.9.0 + * + * @see WP_Customize_Control::json() + * + * @return array Array of parameters passed to the JavaScript. + */ + public function json() + { + } + /** + * Don't render the control content from PHP, as it's rendered via JS on load. + * + * @since 4.9.0 + */ + public function render_content() + { + } + /** + * Render a JS template for control display. + * + * @since 4.9.0 + */ + public function content_template() + { + } + } + /** + * Customize Color Control class. + * + * @since 3.4.0 + * + * @see WP_Customize_Control + */ + class WP_Customize_Color_Control extends \WP_Customize_Control + { + /** + * Type. + * + * @var string + */ + public $type = 'color'; + /** + * Statuses. + * + * @var array + */ + public $statuses; + /** + * Mode. + * + * @since 4.7.0 + * @var string + */ + public $mode = 'full'; + /** + * Constructor. + * + * @since 3.4.0 + * + * @see WP_Customize_Control::__construct() + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @param string $id Control ID. + * @param array $args Optional. Arguments to override class property defaults. + * See WP_Customize_Control::__construct() for information + * on accepted arguments. Default empty array. + * @phpstan-param array{ + * instance_number?: int, + * manager?: WP_Customize_Manager, + * id?: string, + * settings?: array, + * setting?: string, + * capability?: string, + * priority?: int, + * section?: string, + * label?: string, + * description?: string, + * choices?: array, + * input_attrs?: array, + * allow_addition?: bool, + * json?: array, + * type?: string, + * active_callback?: callable, + * } $args See WP_Customize_Control::__construct() + */ + public function __construct($manager, $id, $args = array()) + { + } + /** + * Enqueue scripts/styles for the color picker. + * + * @since 3.4.0 + */ + public function enqueue() + { + } + /** + * Refresh the parameters passed to the JavaScript via JSON. + * + * @since 3.4.0 + * @uses WP_Customize_Control::to_json() + */ + public function to_json() + { + } + /** + * Don't render the control content from PHP, as it's rendered via JS on load. + * + * @since 3.4.0 + */ + public function render_content() + { + } + /** + * Render a JS template for the content of the color picker control. + * + * @since 4.1.0 + */ + public function content_template() + { + } + } + /** + * Customize Cropped Image Control class. + * + * @since 4.3.0 + * + * @see WP_Customize_Image_Control + */ + class WP_Customize_Cropped_Image_Control extends \WP_Customize_Image_Control + { + /** + * Control type. + * + * @since 4.3.0 + * @var string + */ + public $type = 'cropped_image'; + /** + * Suggested width for cropped image. + * + * @since 4.3.0 + * @var int + */ + public $width = 150; + /** + * Suggested height for cropped image. + * + * @since 4.3.0 + * @var int + */ + public $height = 150; + /** + * Whether the width is flexible. + * + * @since 4.3.0 + * @var bool + */ + public $flex_width = \false; + /** + * Whether the height is flexible. + * + * @since 4.3.0 + * @var bool + */ + public $flex_height = \false; + /** + * Enqueue control related scripts/styles. + * + * @since 4.3.0 + */ + public function enqueue() + { + } + /** + * Refresh the parameters passed to the JavaScript via JSON. + * + * @since 4.3.0 + * + * @see WP_Customize_Control::to_json() + */ + public function to_json() + { + } + } + /** + * Custom Setting to handle WP Custom CSS. + * + * @since 4.7.0 + * + * @see WP_Customize_Setting + */ + final class WP_Customize_Custom_CSS_Setting extends \WP_Customize_Setting + { + /** + * The setting type. + * + * @since 4.7.0 + * @var string + */ + public $type = 'custom_css'; + /** + * Setting Transport + * + * @since 4.7.0 + * @var string + */ + public $transport = 'postMessage'; + /** + * Capability required to edit this setting. + * + * @since 4.7.0 + * @var string + */ + public $capability = 'edit_css'; + /** + * Stylesheet + * + * @since 4.7.0 + * @var string + */ + public $stylesheet = ''; + /** + * WP_Customize_Custom_CSS_Setting constructor. + * + * @since 4.7.0 + * + * @throws Exception If the setting ID does not match the pattern `custom_css[$stylesheet]`. + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @param string $id A specific ID of the setting. + * Can be a theme mod or option name. + * @param array $args Setting arguments. + */ + public function __construct($manager, $id, $args = array()) + { + } + /** + * Add filter to preview post value. + * + * @since 4.7.9 + * + * @return bool False when preview short-circuits due no change needing to be previewed. + */ + public function preview() + { + } + /** + * Filters `wp_get_custom_css` for applying the customized value. + * + * This is used in the preview when `wp_get_custom_css()` is called for rendering the styles. + * + * @since 4.7.0 + * + * @see wp_get_custom_css() + * + * @param string $css Original CSS. + * @param string $stylesheet Current stylesheet. + * @return string CSS. + */ + public function filter_previewed_wp_get_custom_css($css, $stylesheet) + { + } + /** + * Fetch the value of the setting. Will return the previewed value when `preview()` is called. + * + * @since 4.7.0 + * + * @see WP_Customize_Setting::value() + * + * @return string + */ + public function value() + { + } + /** + * Validate a received value for being valid CSS. + * + * Checks for imbalanced braces, brackets, and comments. + * Notifications are rendered when the customizer state is saved. + * + * @since 4.7.0 + * @since 4.9.0 Checking for balanced characters has been moved client-side via linting in code editor. + * @since 5.9.0 Renamed `$css` to `$value` for PHP 8 named parameter support. + * + * @param string $value CSS to validate. + * @return true|WP_Error True if the input was validated, otherwise WP_Error. + */ + public function validate($value) + { + } + /** + * Store the CSS setting value in the custom_css custom post type for the stylesheet. + * + * @since 4.7.0 + * @since 5.9.0 Renamed `$css` to `$value` for PHP 8 named parameter support. + * + * @param string $value CSS to update. + * @return int|false The post ID or false if the value could not be saved. + */ + public function update($value) + { + } + } + /** + * Customize Date Time Control class. + * + * @since 4.9.0 + * + * @see WP_Customize_Control + */ + class WP_Customize_Date_Time_Control extends \WP_Customize_Control + { + /** + * Customize control type. + * + * @since 4.9.0 + * @var string + */ + public $type = 'date_time'; + /** + * Minimum Year. + * + * @since 4.9.0 + * @var int + */ + public $min_year = 1000; + /** + * Maximum Year. + * + * @since 4.9.0 + * @var int + */ + public $max_year = 9999; + /** + * Allow past date, if set to false user can only select future date. + * + * @since 4.9.0 + * @var bool + */ + public $allow_past_date = \true; + /** + * Whether hours, minutes, and meridian should be shown. + * + * @since 4.9.0 + * @var bool + */ + public $include_time = \true; + /** + * If set to false the control will appear in 24 hour format, + * the value will still be saved in Y-m-d H:i:s format. + * + * @since 4.9.0 + * @var bool + */ + public $twelve_hour_format = \true; + /** + * Don't render the control's content - it's rendered with a JS template. + * + * @since 4.9.0 + */ + public function render_content() + { + } + /** + * Export data to JS. + * + * @since 4.9.0 + * @return array + */ + public function json() + { + } + /** + * Renders a JS template for the content of date time control. + * + * @since 4.9.0 + */ + public function content_template() + { + } + /** + * Generate options for the month Select. + * + * Based on touch_time(). + * + * @since 4.9.0 + * + * @see touch_time() + * + * @global WP_Locale $wp_locale WordPress date and time locale object. + * + * @return array + */ + public function get_month_choices() + { + } + /** + * Get timezone info. + * + * @since 4.9.0 + * + * @return array { + * Timezone info. All properties are optional. + * + * @type string $abbr Timezone abbreviation. Examples: PST or CEST. + * @type string $description Human-readable timezone description as HTML. + * } + * @phpstan-return array{ + * abbr: string, + * description: string, + * } + */ + public function get_timezone_info() + { + } + /** + * Format GMT Offset. + * + * @since 4.9.0 + * + * @see wp_timezone_choice() + * + * @param float $offset Offset in hours. + * @return string Formatted offset. + */ + public function format_gmt_offset($offset) + { + } + } + /** + * A setting that is used to filter a value, but will not save the results. + * + * Results should be properly handled using another setting or callback. + * + * @since 3.4.0 + * + * @see WP_Customize_Setting + */ + class WP_Customize_Filter_Setting extends \WP_Customize_Setting + { + /** + * Saves the value of the setting, using the related API. + * + * @since 3.4.0 + * + * @param mixed $value The value to update. + */ + public function update($value) + { + } + } + /** + * Customize Header Image Control class. + * + * @since 3.4.0 + * + * @see WP_Customize_Image_Control + */ + class WP_Customize_Header_Image_Control extends \WP_Customize_Image_Control + { + /** + * Customize control type. + * + * @since 4.2.0 + * @var string + */ + public $type = 'header'; + /** + * Uploaded header images. + * + * @since 3.9.0 + * @var string + */ + public $uploaded_headers; + /** + * Default header images. + * + * @since 3.9.0 + * @var string + */ + public $default_headers; + /** + * Constructor. + * + * @since 3.4.0 + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + */ + public function __construct($manager) + { + } + /** + */ + public function enqueue() + { + } + /** + * @global Custom_Image_Header $custom_image_header + * @phpstan-return void + */ + public function prepare_control() + { + } + /** + */ + public function print_header_image_template() + { + } + /** + * @return string|void + */ + public function get_current_image_src() + { + } + /** + */ + public function render_content() + { + } + } + /** + * A setting that is used to filter a value, but will not save the results. + * + * Results should be properly handled using another setting or callback. + * + * @since 3.4.0 + * + * @see WP_Customize_Setting + */ + final class WP_Customize_Header_Image_Setting extends \WP_Customize_Setting + { + /** + * Unique string identifier for the setting. + * + * @since 3.4.0 + * @var string + */ + public $id = 'header_image_data'; + /** + * @since 3.4.0 + * + * @global Custom_Image_Header $custom_image_header + * + * @param mixed $value The value to update. + */ + public function update($value) + { + } + } + /** + * Customize control to represent the auto_add field for a given menu. + * + * @since 4.3.0 + * + * @see WP_Customize_Control + */ + class WP_Customize_Nav_Menu_Auto_Add_Control extends \WP_Customize_Control + { + /** + * Type of control, used by JS. + * + * @since 4.3.0 + * @var string + */ + public $type = 'nav_menu_auto_add'; + /** + * No-op since we're using JS template. + * + * @since 4.3.0 + */ + protected function render_content() + { + } + /** + * Render the Underscore template for this control. + * + * @since 4.3.0 + */ + protected function content_template() + { + } + } + /** + * Customize Nav Menu Control Class. + * + * @since 4.3.0 + * + * @see WP_Customize_Control + */ + class WP_Customize_Nav_Menu_Control extends \WP_Customize_Control + { + /** + * Control type. + * + * @since 4.3.0 + * @var string + */ + public $type = 'nav_menu'; + /** + * Don't render the control's content - it uses a JS template instead. + * + * @since 4.3.0 + */ + public function render_content() + { + } + /** + * JS/Underscore template for the control UI. + * + * @since 4.3.0 + */ + public function content_template() + { + } + /** + * Return parameters for this control. + * + * @since 4.3.0 + * + * @return array Exported parameters. + */ + public function json() + { + } + } + /** + * Customize control to represent the name field for a given menu. + * + * @since 4.3.0 + * + * @see WP_Customize_Control + */ + class WP_Customize_Nav_Menu_Item_Control extends \WP_Customize_Control + { + /** + * Control type. + * + * @since 4.3.0 + * @var string + */ + public $type = 'nav_menu_item'; + /** + * The nav menu item setting. + * + * @since 4.3.0 + * @var WP_Customize_Nav_Menu_Item_Setting + */ + public $setting; + /** + * Constructor. + * + * @since 4.3.0 + * + * @see WP_Customize_Control::__construct() + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @param string $id The control ID. + * @param array $args Optional. Arguments to override class property defaults. + * See WP_Customize_Control::__construct() for information + * on accepted arguments. Default empty array. + * @phpstan-param array{ + * instance_number?: int, + * manager?: WP_Customize_Manager, + * id?: string, + * settings?: array, + * setting?: string, + * capability?: string, + * priority?: int, + * section?: string, + * label?: string, + * description?: string, + * choices?: array, + * input_attrs?: array, + * allow_addition?: bool, + * json?: array, + * type?: string, + * active_callback?: callable, + * } $args See WP_Customize_Control::__construct() + */ + public function __construct($manager, $id, $args = array()) + { + } + /** + * Don't render the control's content - it's rendered with a JS template. + * + * @since 4.3.0 + */ + public function render_content() + { + } + /** + * JS/Underscore template for the control UI. + * + * @since 4.3.0 + */ + public function content_template() + { + } + /** + * Return parameters for this control. + * + * @since 4.3.0 + * + * @return array Exported parameters. + */ + public function json() + { + } + } + /** + * Customize Setting to represent a nav_menu. + * + * Subclass of WP_Customize_Setting to represent a nav_menu taxonomy term, and + * the IDs for the nav_menu_items associated with the nav menu. + * + * @since 4.3.0 + * + * @see WP_Customize_Setting + */ + class WP_Customize_Nav_Menu_Item_Setting extends \WP_Customize_Setting + { + const ID_PATTERN = '/^nav_menu_item\[(?P<id>-?\d+)\]$/'; + const POST_TYPE = 'nav_menu_item'; + const TYPE = 'nav_menu_item'; + /** + * Setting type. + * + * @since 4.3.0 + * @var string + */ + public $type = self::TYPE; + /** + * Default setting value. + * + * @since 4.3.0 + * @var array + * + * @see wp_setup_nav_menu_item() + */ + public $default = array( + // The $menu_item_data for wp_update_nav_menu_item(). + 'object_id' => 0, + 'object' => '', + // Taxonomy name. + 'menu_item_parent' => 0, + // A.K.A. menu-item-parent-id; note that post_parent is different, and not included. + 'position' => 0, + // A.K.A. menu_order. + 'type' => 'custom', + // Note that type_label is not included here. + 'title' => '', + 'url' => '', + 'target' => '', + 'attr_title' => '', + 'description' => '', + 'classes' => '', + 'xfn' => '', + 'status' => 'publish', + 'nav_menu_term_id' => 0, + // This will be supplied as the $menu_id arg for wp_update_nav_menu_item(). + '_invalid' => \false, + ); + /** + * Default transport. + * + * @since 4.3.0 + * @since 4.5.0 Default changed to 'refresh' + * @var string + */ + public $transport = 'refresh'; + /** + * The post ID represented by this setting instance. This is the db_id. + * + * A negative value represents a placeholder ID for a new menu not yet saved. + * + * @since 4.3.0 + * @var int + */ + public $post_id; + /** + * Storage of pre-setup menu item to prevent wasted calls to wp_setup_nav_menu_item(). + * + * @since 4.3.0 + * @var array|null + */ + protected $value; + /** + * Previous (placeholder) post ID used before creating a new menu item. + * + * This value will be exported to JS via the customize_save_response filter + * so that JavaScript can update the settings to refer to the newly-assigned + * post ID. This value is always negative to indicate it does not refer to + * a real post. + * + * @since 4.3.0 + * @var int + * + * @see WP_Customize_Nav_Menu_Item_Setting::update() + * @see WP_Customize_Nav_Menu_Item_Setting::amend_customize_save_response() + */ + public $previous_post_id; + /** + * When previewing or updating a menu item, this stores the previous nav_menu_term_id + * which ensures that we can apply the proper filters. + * + * @since 4.3.0 + * @var int + */ + public $original_nav_menu_term_id; + /** + * Whether or not update() was called. + * + * @since 4.3.0 + * @var bool + */ + protected $is_updated = \false; + /** + * Status for calling the update method, used in customize_save_response filter. + * + * See {@see 'customize_save_response'}. + * + * When status is inserted, the placeholder post ID is stored in $previous_post_id. + * When status is error, the error is stored in $update_error. + * + * @since 4.3.0 + * @var string updated|inserted|deleted|error + * + * @see WP_Customize_Nav_Menu_Item_Setting::update() + * @see WP_Customize_Nav_Menu_Item_Setting::amend_customize_save_response() + */ + public $update_status; + /** + * Any error object returned by wp_update_nav_menu_item() when setting is updated. + * + * @since 4.3.0 + * @var WP_Error + * + * @see WP_Customize_Nav_Menu_Item_Setting::update() + * @see WP_Customize_Nav_Menu_Item_Setting::amend_customize_save_response() + */ + public $update_error; + /** + * Constructor. + * + * Any supplied $args override class property defaults. + * + * @since 4.3.0 + * + * @throws Exception If $id is not valid for this setting type. + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @param string $id A specific ID of the setting. + * Can be a theme mod or option name. + * @param array $args Optional. Setting arguments. + */ + public function __construct(\WP_Customize_Manager $manager, $id, array $args = array()) + { + } + /** + * Clear the cached value when this nav menu item is updated. + * + * @since 4.3.0 + * + * @param int $menu_id The term ID for the menu. + * @param int $menu_item_id The post ID for the menu item. + */ + public function flush_cached_value($menu_id, $menu_item_id) + { + } + /** + * Get the instance data for a given nav_menu_item setting. + * + * @since 4.3.0 + * + * @see wp_setup_nav_menu_item() + * + * @return array|false Instance data array, or false if the item is marked for deletion. + */ + public function value() + { + } + /** + * Prepares the value for editing on the client. + * + * @since 6.8.3 + * + * @return array|false Value prepared for the client. + */ + public function js_value() + { + } + /** + * Get original title. + * + * @since 4.7.0 + * + * @param object $item Nav menu item. + * @return string The original title, without entity decoding. + */ + protected function get_original_title($item) + { + } + /** + * Get type label. + * + * @since 4.7.0 + * + * @param object $item Nav menu item. + * @return string The type label. + */ + protected function get_type_label($item) + { + } + /** + * Ensure that the value is fully populated with the necessary properties. + * + * Translates some properties added by wp_setup_nav_menu_item() and removes others. + * + * @since 4.3.0 + * + * @see WP_Customize_Nav_Menu_Item_Setting::value() + * @phpstan-return void + */ + protected function populate_value() + { + } + /** + * Handle previewing the setting. + * + * @since 4.3.0 + * @since 4.4.0 Added boolean return value. + * + * @see WP_Customize_Manager::post_value() + * + * @return bool False if method short-circuited due to no-op. + */ + public function preview() + { + } + /** + * Filters the wp_get_nav_menu_items() result to supply the previewed menu items. + * + * @since 4.3.0 + * + * @see wp_get_nav_menu_items() + * + * @param WP_Post[] $items An array of menu item post objects. + * @param WP_Term $menu The menu object. + * @param array $args An array of arguments used to retrieve menu item objects. + * @return WP_Post[] Array of menu item objects. + */ + public function filter_wp_get_nav_menu_items($items, $menu, $args) + { + } + /** + * Re-apply the tail logic also applied on $items by wp_get_nav_menu_items(). + * + * @since 4.3.0 + * + * @see wp_get_nav_menu_items() + * + * @param WP_Post[] $items An array of menu item post objects. + * @param WP_Term $menu The menu object. + * @param array $args An array of arguments used to retrieve menu item objects. + * @return WP_Post[] Array of menu item objects. + */ + public static function sort_wp_get_nav_menu_items($items, $menu, $args) + { + } + /** + * Get the value emulated into a WP_Post and set up as a nav_menu_item. + * + * @since 4.3.0 + * + * @return WP_Post With wp_setup_nav_menu_item() applied. + */ + public function value_as_wp_post_nav_menu_item() + { + } + /** + * Sanitize an input. + * + * Note that parent::sanitize() erroneously does wp_unslash() on $value, but + * we remove that in this override. + * + * @since 4.3.0 + * @since 5.9.0 Renamed `$menu_item_value` to `$value` for PHP 8 named parameter support. + * + * @param array|false $value The menu item value to sanitize. + * @return array|false|null|WP_Error Null or WP_Error if an input isn't valid. False if it is marked for deletion. + * Otherwise the sanitized value. + */ + public function sanitize($value) + { + } + /** + * Creates/updates the nav_menu_item post for this setting. + * + * Any created menu items will have their assigned post IDs exported to the client + * via the {@see 'customize_save_response'} filter. Likewise, any errors will be + * exported to the client via the customize_save_response() filter. + * + * To delete a menu, the client can send false as the value. + * + * @since 4.3.0 + * + * @see wp_update_nav_menu_item() + * + * @param array|false $value The menu item array to update. If false, then the menu item will be deleted + * entirely. See WP_Customize_Nav_Menu_Item_Setting::$default for what the value + * should consist of. + * @return null|void + * @phpstan-return void + */ + protected function update($value) + { + } + /** + * Export data for the JS client. + * + * @since 4.3.0 + * + * @see WP_Customize_Nav_Menu_Item_Setting::update() + * + * @param array $data Additional information passed back to the 'saved' event on `wp.customize`. + * @return array Save response data. + */ + public function amend_customize_save_response($data) + { + } + } + /** + * Customize Menu Location Control Class. + * + * This custom control is only needed for JS. + * + * @since 4.3.0 + * + * @see WP_Customize_Control + */ + class WP_Customize_Nav_Menu_Location_Control extends \WP_Customize_Control + { + /** + * Control type. + * + * @since 4.3.0 + * @var string + */ + public $type = 'nav_menu_location'; + /** + * Location ID. + * + * @since 4.3.0 + * @var string + */ + public $location_id = ''; + /** + * Refresh the parameters passed to JavaScript via JSON. + * + * @since 4.3.0 + * + * @see WP_Customize_Control::to_json() + */ + public function to_json() + { + } + /** + * Render content just like a normal select control. + * + * @since 4.3.0 + * @since 4.9.0 Added a button to create menus. + * @phpstan-return void + */ + public function render_content() + { + } + } + /** + * Customize Nav Menu Locations Control Class. + * + * @since 4.9.0 + * + * @see WP_Customize_Control + */ + class WP_Customize_Nav_Menu_Locations_Control extends \WP_Customize_Control + { + /** + * Control type. + * + * @since 4.9.0 + * @var string + */ + public $type = 'nav_menu_locations'; + /** + * Don't render the control's content - it uses a JS template instead. + * + * @since 4.9.0 + */ + public function render_content() + { + } + /** + * JS/Underscore template for the control UI. + * + * @since 4.9.0 + */ + public function content_template() + { + } + } + /** + * Customize control to represent the name field for a given menu. + * + * @since 4.3.0 + * + * @see WP_Customize_Control + */ + class WP_Customize_Nav_Menu_Name_Control extends \WP_Customize_Control + { + /** + * Type of control, used by JS. + * + * @since 4.3.0 + * @var string + */ + public $type = 'nav_menu_name'; + /** + * No-op since we're using JS template. + * + * @since 4.3.0 + */ + protected function render_content() + { + } + /** + * Render the Underscore template for this control. + * + * @since 4.3.0 + */ + protected function content_template() + { + } + } + /** + * Customize Menu Section Class + * + * Custom section only needed in JS. + * + * @since 4.3.0 + * + * @see WP_Customize_Section + */ + class WP_Customize_Nav_Menu_Section extends \WP_Customize_Section + { + /** + * Control type. + * + * @since 4.3.0 + * @var string + */ + public $type = 'nav_menu'; + /** + * Get section parameters for JS. + * + * @since 4.3.0 + * @return array Exported parameters. + */ + public function json() + { + } + } + /** + * Customize Setting to represent a nav_menu. + * + * Subclass of WP_Customize_Setting to represent a nav_menu taxonomy term, and + * the IDs for the nav_menu_items associated with the nav menu. + * + * @since 4.3.0 + * + * @see wp_get_nav_menu_object() + * @see WP_Customize_Setting + */ + class WP_Customize_Nav_Menu_Setting extends \WP_Customize_Setting + { + const ID_PATTERN = '/^nav_menu\[(?P<id>-?\d+)\]$/'; + const TAXONOMY = 'nav_menu'; + const TYPE = 'nav_menu'; + /** + * Setting type. + * + * @since 4.3.0 + * @var string + */ + public $type = self::TYPE; + /** + * Default setting value. + * + * @since 4.3.0 + * @var array + * + * @see wp_get_nav_menu_object() + */ + public $default = array('name' => '', 'description' => '', 'parent' => 0, 'auto_add' => \false); + /** + * Default transport. + * + * @since 4.3.0 + * @var string + */ + public $transport = 'postMessage'; + /** + * The term ID represented by this setting instance. + * + * A negative value represents a placeholder ID for a new menu not yet saved. + * + * @since 4.3.0 + * @var int + */ + public $term_id; + /** + * Previous (placeholder) term ID used before creating a new menu. + * + * This value will be exported to JS via the {@see 'customize_save_response'} filter + * so that JavaScript can update the settings to refer to the newly-assigned + * term ID. This value is always negative to indicate it does not refer to + * a real term. + * + * @since 4.3.0 + * @var int + * + * @see WP_Customize_Nav_Menu_Setting::update() + * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response() + */ + public $previous_term_id; + /** + * Whether or not update() was called. + * + * @since 4.3.0 + * @var bool + */ + protected $is_updated = \false; + /** + * Status for calling the update method, used in customize_save_response filter. + * + * See {@see 'customize_save_response'}. + * + * When status is inserted, the placeholder term ID is stored in `$previous_term_id`. + * When status is error, the error is stored in `$update_error`. + * + * @since 4.3.0 + * @var string updated|inserted|deleted|error + * + * @see WP_Customize_Nav_Menu_Setting::update() + * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response() + */ + public $update_status; + /** + * Any error object returned by wp_update_nav_menu_object() when setting is updated. + * + * @since 4.3.0 + * @var WP_Error + * + * @see WP_Customize_Nav_Menu_Setting::update() + * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response() + */ + public $update_error; + /** + * Constructor. + * + * Any supplied $args override class property defaults. + * + * @since 4.3.0 + * + * @throws Exception If $id is not valid for this setting type. + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @param string $id A specific ID of the setting. + * Can be a theme mod or option name. + * @param array $args Optional. Setting arguments. + */ + public function __construct(\WP_Customize_Manager $manager, $id, array $args = array()) + { + } + /** + * Get the instance data for a given widget setting. + * + * @since 4.3.0 + * + * @see wp_get_nav_menu_object() + * + * @return array Instance data. + */ + public function value() + { + } + /** + * Handle previewing the setting. + * + * @since 4.3.0 + * @since 4.4.0 Added boolean return value + * + * @see WP_Customize_Manager::post_value() + * + * @return bool False if method short-circuited due to no-op. + */ + public function preview() + { + } + /** + * Filters the wp_get_nav_menus() result to ensure the inserted menu object is included, and the deleted one is removed. + * + * @since 4.3.0 + * + * @see wp_get_nav_menus() + * + * @param WP_Term[] $menus An array of menu objects. + * @param array $args An array of arguments used to retrieve menu objects. + * @return WP_Term[] Array of menu objects. + */ + public function filter_wp_get_nav_menus($menus, $args) + { + } + /** + * Temporary non-closure passing of orderby value to function. + * + * @since 4.3.0 + * @var string + * + * @see WP_Customize_Nav_Menu_Setting::filter_wp_get_nav_menus() + * @see WP_Customize_Nav_Menu_Setting::_sort_menus_by_orderby() + */ + protected $_current_menus_sort_orderby; + /** + * Sort menu objects by the class-supplied orderby property. + * + * This is a workaround for a lack of closures. + * + * @since 4.3.0 + * @deprecated 4.7.0 Use wp_list_sort() + * + * @param object $menu1 + * @param object $menu2 + * @return int + * + * @see WP_Customize_Nav_Menu_Setting::filter_wp_get_nav_menus() + */ + protected function _sort_menus_by_orderby($menu1, $menu2) + { + } + /** + * Filters the wp_get_nav_menu_object() result to supply the previewed menu object. + * + * Requesting a nav_menu object by anything but ID is not supported. + * + * @since 4.3.0 + * + * @see wp_get_nav_menu_object() + * + * @param object|null $menu_obj Object returned by wp_get_nav_menu_object(). + * @param string $menu_id ID of the nav_menu term. Requests by slug or name will be ignored. + * @return object|null + */ + public function filter_wp_get_nav_menu_object($menu_obj, $menu_id) + { + } + /** + * Filters the nav_menu_options option to include this menu's auto_add preference. + * + * @since 4.3.0 + * + * @param array $nav_menu_options Nav menu options including auto_add. + * @return array (Maybe) modified nav menu options. + */ + public function filter_nav_menu_options($nav_menu_options) + { + } + /** + * Sanitize an input. + * + * Note that parent::sanitize() erroneously does wp_unslash() on $value, but + * we remove that in this override. + * + * @since 4.3.0 + * + * @param array $value The menu value to sanitize. + * @return array|false|null Null if an input isn't valid. False if it is marked for deletion. + * Otherwise the sanitized value. + */ + public function sanitize($value) + { + } + /** + * Storage for data to be sent back to client in customize_save_response filter. + * + * See {@see 'customize_save_response'}. + * + * @since 4.3.0 + * @var array + * + * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response() + */ + protected $_widget_nav_menu_updates = array(); + /** + * Create/update the nav_menu term for this setting. + * + * Any created menus will have their assigned term IDs exported to the client + * via the {@see 'customize_save_response'} filter. Likewise, any errors will be exported + * to the client via the customize_save_response() filter. + * + * To delete a menu, the client can send false as the value. + * + * @since 4.3.0 + * + * @see wp_update_nav_menu_object() + * + * @param array|false $value { + * The value to update. Note that slug cannot be updated via wp_update_nav_menu_object(). + * If false, then the menu will be deleted entirely. + * + * @type string $name The name of the menu to save. + * @type string $description The term description. Default empty string. + * @type int $parent The id of the parent term. Default 0. + * @type bool $auto_add Whether pages will auto_add to this menu. Default false. + * } + * @return null|void + * @phpstan-param false|array{ + * name?: string, + * description?: string, + * parent?: int, + * auto_add?: bool, + * } $value + * @phpstan-return void + */ + protected function update($value) + { + } + /** + * Updates a nav_menu_options array. + * + * @since 4.3.0 + * + * @see WP_Customize_Nav_Menu_Setting::filter_nav_menu_options() + * @see WP_Customize_Nav_Menu_Setting::update() + * + * @param array $nav_menu_options Array as returned by get_option( 'nav_menu_options' ). + * @param int $menu_id The term ID for the given menu. + * @param bool $auto_add Whether to auto-add or not. + * @return array (Maybe) modified nav_menu_options array. + */ + protected function filter_nav_menu_options_value($nav_menu_options, $menu_id, $auto_add) + { + } + /** + * Export data for the JS client. + * + * @since 4.3.0 + * + * @see WP_Customize_Nav_Menu_Setting::update() + * + * @param array $data Additional information passed back to the 'saved' event on `wp.customize`. + * @return array Export data. + */ + public function amend_customize_save_response($data) + { + } + } + /** + * Customize Nav Menus Panel Class + * + * Needed to add screen options. + * + * @since 4.3.0 + * + * @see WP_Customize_Panel + */ + class WP_Customize_Nav_Menus_Panel extends \WP_Customize_Panel + { + /** + * Control type. + * + * @since 4.3.0 + * @var string + */ + public $type = 'nav_menus'; + /** + * Render screen options for Menus. + * + * @since 4.3.0 + */ + public function render_screen_options() + { + } + /** + * Returns the advanced options for the nav menus page. + * + * Link title attribute added as it's a relatively advanced concept for new users. + * + * @since 4.3.0 + * @deprecated 4.5.0 Deprecated in favor of wp_nav_menu_manage_columns(). + */ + public function wp_nav_menu_manage_columns() + { + } + /** + * An Underscore (JS) template for this panel's content (but not its container). + * + * Class variables for this panel class are available in the `data` JS object; + * export custom variables by overriding WP_Customize_Panel::json(). + * + * @since 4.3.0 + * + * @see WP_Customize_Panel::print_template() + */ + protected function content_template() + { + } + } + /** + * Customize control class for new menus. + * + * @since 4.3.0 + * @deprecated 4.9.0 This class is no longer used as of the menu creation UX introduced in #40104. + * + * @see WP_Customize_Control + */ + class WP_Customize_New_Menu_Control extends \WP_Customize_Control + { + /** + * Control type. + * + * @since 4.3.0 + * @var string + */ + public $type = 'new_menu'; + /** + * Constructor. + * + * @since 4.9.0 + * @deprecated 4.9.0 + * + * @see WP_Customize_Control::__construct() + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @param string $id The control ID. + * @param array $args Optional. Arguments to override class property defaults. + * See WP_Customize_Control::__construct() for information + * on accepted arguments. Default empty array. + * @phpstan-param array{ + * instance_number?: int, + * manager?: WP_Customize_Manager, + * id?: string, + * settings?: array, + * setting?: string, + * capability?: string, + * priority?: int, + * section?: string, + * label?: string, + * description?: string, + * choices?: array, + * input_attrs?: array, + * allow_addition?: bool, + * json?: array, + * type?: string, + * active_callback?: callable, + * } $args See WP_Customize_Control::__construct() + */ + public function __construct(\WP_Customize_Manager $manager, $id, array $args = array()) + { + } + /** + * Render the control's content. + * + * @since 4.3.0 + * @deprecated 4.9.0 + */ + public function render_content() + { + } + } + /** + * Customize Menu Section Class + * + * @since 4.3.0 + * @deprecated 4.9.0 This class is no longer used as of the menu creation UX introduced in #40104. + * + * @see WP_Customize_Section + */ + class WP_Customize_New_Menu_Section extends \WP_Customize_Section + { + /** + * Control type. + * + * @since 4.3.0 + * @var string + */ + public $type = 'new_menu'; + /** + * Constructor. + * + * Any supplied $args override class property defaults. + * + * @since 4.9.0 + * @deprecated 4.9.0 + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @param string $id A specific ID of the section. + * @param array $args Section arguments. + */ + public function __construct(\WP_Customize_Manager $manager, $id, array $args = array()) + { + } + /** + * Render the section, and the controls that have been added to it. + * + * @since 4.3.0 + * @deprecated 4.9.0 + */ + protected function render() + { + } + } + /** + * Core Customizer class for implementing selective refresh partials. + * + * Representation of a rendered region in the previewed page that gets + * selectively refreshed when an associated setting is changed. + * This class is analogous of WP_Customize_Control. + * + * @since 4.5.0 + */ + #[\AllowDynamicProperties] + class WP_Customize_Partial + { + /** + * Component. + * + * @since 4.5.0 + * @var WP_Customize_Selective_Refresh + */ + public $component; + /** + * Unique identifier for the partial. + * + * If the partial is used to display a single setting, this would generally + * be the same as the associated setting's ID. + * + * @since 4.5.0 + * @var string + */ + public $id; + /** + * Parsed ID. + * + * @since 4.5.0 + * @var array { + * @type string $base ID base. + * @type array $keys Keys for multidimensional. + * } + * @phpstan-var array{ + * base: string, + * keys: array, + * } + */ + protected $id_data = array(); + /** + * Type of this partial. + * + * @since 4.5.0 + * @var string + */ + public $type = 'default'; + /** + * The jQuery selector to find the container element for the partial. + * + * @since 4.5.0 + * @var string + */ + public $selector; + /** + * IDs for settings tied to the partial. + * + * @since 4.5.0 + * @var string[] + */ + public $settings; + /** + * The ID for the setting that this partial is primarily responsible for rendering. + * + * If not supplied, it will default to the ID of the first setting. + * + * @since 4.5.0 + * @var string + */ + public $primary_setting; + /** + * Capability required to edit this partial. + * + * Normally this is empty and the capability is derived from the capabilities + * of the associated `$settings`. + * + * @since 4.5.0 + * @var string + */ + public $capability; + /** + * Render callback. + * + * @since 4.5.0 + * + * @see WP_Customize_Partial::render() + * @var callable Callback is called with one argument, the instance of + * WP_Customize_Partial. The callback can either echo the + * partial or return the partial as a string, or return false if error. + */ + public $render_callback; + /** + * Whether the container element is included in the partial, or if only the contents are rendered. + * + * @since 4.5.0 + * @var bool + */ + public $container_inclusive = \false; + /** + * Whether to refresh the entire preview in case a partial cannot be refreshed. + * + * A partial render is considered a failure if the render_callback returns false. + * + * @since 4.5.0 + * @var bool + */ + public $fallback_refresh = \true; + /** + * Constructor. + * + * Supplied `$args` override class property defaults. + * + * If `$args['settings']` is not defined, use the $id as the setting ID. + * + * @since 4.5.0 + * + * @param WP_Customize_Selective_Refresh $component Customize Partial Refresh plugin instance. + * @param string $id Control ID. + * @param array $args { + * Optional. Array of properties for the new Partials object. Default empty array. + * + * @type string $type Type of the partial to be created. + * @type string $selector The jQuery selector to find the container element for the partial, that is, + * a partial's placement. + * @type string[] $settings IDs for settings tied to the partial. If undefined, `$id` will be used. + * @type string $primary_setting The ID for the setting that this partial is primarily responsible for + * rendering. If not supplied, it will default to the ID of the first setting. + * @type string $capability Capability required to edit this partial. + * Normally this is empty and the capability is derived from the capabilities + * of the associated `$settings`. + * @type callable $render_callback Render callback. + * Callback is called with one argument, the instance of WP_Customize_Partial. + * The callback can either echo the partial or return the partial as a string, + * or return false if error. + * @type bool $container_inclusive Whether the container element is included in the partial, or if only + * the contents are rendered. + * @type bool $fallback_refresh Whether to refresh the entire preview in case a partial cannot be refreshed. + * A partial render is considered a failure if the render_callback returns + * false. + * } + * @phpstan-param array{ + * type?: string, + * selector?: string, + * settings?: string[], + * primary_setting?: string, + * capability?: string, + * render_callback?: callable, + * container_inclusive?: bool, + * fallback_refresh?: bool, + * } $args + */ + public function __construct(\WP_Customize_Selective_Refresh $component, $id, $args = array()) + { + } + /** + * Retrieves parsed ID data for multidimensional setting. + * + * @since 4.5.0 + * + * @return array { + * ID data for multidimensional partial. + * + * @type string $base ID base. + * @type array $keys Keys for multidimensional array. + * } + * @phpstan-return array{ + * base: string, + * keys: array, + * } + */ + final public function id_data() + { + } + /** + * Renders the template partial involving the associated settings. + * + * @since 4.5.0 + * + * @param array $container_context Optional. Array of context data associated with the target container (placement). + * Default empty array. + * @return string|array|false The rendered partial as a string, raw data array (for client-side JS template), + * or false if no render applied. + */ + final public function render($container_context = array()) + { + } + /** + * Default callback used when invoking WP_Customize_Control::render(). + * + * Note that this method may echo the partial *or* return the partial as + * a string or array, but not both. Output buffering is performed when this + * is called. Subclasses can override this with their specific logic, or they + * may provide an 'render_callback' argument to the constructor. + * + * This method may return an HTML string for straight DOM injection, or it + * may return an array for supporting Partial JS subclasses to render by + * applying to client-side templating. + * + * @since 4.5.0 + * + * @param WP_Customize_Partial $partial Partial. + * @param array $context Context. + * @return string|array|false + */ + public function render_callback(\WP_Customize_Partial $partial, $context = array()) + { + } + /** + * Retrieves the data to export to the client via JSON. + * + * @since 4.5.0 + * + * @return array Array of parameters passed to the JavaScript. + */ + public function json() + { + } + /** + * Checks if the user can refresh this partial. + * + * Returns false if the user cannot manipulate one of the associated settings, + * or if one of the associated settings does not exist. + * + * @since 4.5.0 + * + * @return bool False if user can't edit one of the related settings, + * or if one of the associated settings does not exist. + */ + final public function check_capabilities() + { + } + } + /** + * Core Customizer class for implementing selective refresh. + * + * @since 4.5.0 + */ + #[\AllowDynamicProperties] + final class WP_Customize_Selective_Refresh + { + /** + * Query var used in requests to render partials. + * + * @since 4.5.0 + */ + const RENDER_QUERY_VAR = 'wp_customize_render_partials'; + /** + * Customize manager. + * + * @since 4.5.0 + * @var WP_Customize_Manager + */ + public $manager; + /** + * Plugin bootstrap for Partial Refresh functionality. + * + * @since 4.5.0 + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + */ + public function __construct(\WP_Customize_Manager $manager) + { + } + /** + * Retrieves the registered partials. + * + * @since 4.5.0 + * + * @return array Partials. + */ + public function partials() + { + } + /** + * Adds a partial. + * + * @since 4.5.0 + * + * @see WP_Customize_Partial::__construct() + * + * @param WP_Customize_Partial|string $id Customize Partial object, or Partial ID. + * @param array $args Optional. Array of properties for the new Partials object. + * See WP_Customize_Partial::__construct() for information + * on accepted arguments. Default empty array. + * @return WP_Customize_Partial The instance of the partial that was added. + * @phpstan-param array{ + * type?: string, + * selector?: string, + * settings?: string[], + * primary_setting?: string, + * capability?: string, + * render_callback?: callable, + * container_inclusive?: bool, + * fallback_refresh?: bool, + * } $args See WP_Customize_Partial::__construct() + */ + public function add_partial($id, $args = array()) + { + } + /** + * Retrieves a partial. + * + * @since 4.5.0 + * + * @param string $id Customize Partial ID. + * @return WP_Customize_Partial|null The partial, if set. Otherwise null. + */ + public function get_partial($id) + { + } + /** + * Removes a partial. + * + * @since 4.5.0 + * + * @param string $id Customize Partial ID. + */ + public function remove_partial($id) + { + } + /** + * Initializes the Customizer preview. + * + * @since 4.5.0 + */ + public function init_preview() + { + } + /** + * Enqueues preview scripts. + * + * @since 4.5.0 + */ + public function enqueue_preview_scripts() + { + } + /** + * Exports data in preview after it has finished rendering so that partials can be added at runtime. + * + * @since 4.5.0 + */ + public function export_preview_data() + { + } + /** + * Registers dynamically-created partials. + * + * @since 4.5.0 + * + * @see WP_Customize_Manager::add_dynamic_settings() + * + * @param string[] $partial_ids Array of the partial IDs to add. + * @return WP_Customize_Partial[] Array of added WP_Customize_Partial instances. + */ + public function add_dynamic_partials($partial_ids) + { + } + /** + * Checks whether the request is for rendering partials. + * + * Note that this will not consider whether the request is authorized or valid, + * just that essentially the route is a match. + * + * @since 4.5.0 + * + * @return bool Whether the request is for rendering partials. + */ + public function is_render_partials_request() + { + } + /** + * Handles PHP errors triggered during rendering the partials. + * + * These errors will be relayed back to the client in the Ajax response. + * + * @since 4.5.0 + * + * @param int $errno Error number. + * @param string $errstr Error string. + * @param string $errfile Error file. + * @param int $errline Error line. + * @return true Always true. + */ + public function handle_error($errno, $errstr, $errfile = \null, $errline = \null) + { + } + /** + * Handles the Ajax request to return the rendered partials for the requested placements. + * + * @since 4.5.0 + * @phpstan-return void + */ + public function handle_render_partials_request() + { + } + } + /** + * Customizer section representing widget area (sidebar). + * + * @since 4.1.0 + * + * @see WP_Customize_Section + */ + class WP_Customize_Sidebar_Section extends \WP_Customize_Section + { + /** + * Type of this section. + * + * @since 4.1.0 + * @var string + */ + public $type = 'sidebar'; + /** + * Unique identifier. + * + * @since 4.1.0 + * @var string + */ + public $sidebar_id; + /** + * Gather the parameters passed to client JavaScript via JSON. + * + * @since 4.1.0 + * + * @return array The array to be exported to the client as JSON. + */ + public function json() + { + } + /** + * Whether the current sidebar is rendered on the page. + * + * @since 4.1.0 + * + * @return bool Whether sidebar is rendered. + */ + public function active_callback() + { + } + } + /** + * Customize Site Icon control class. + * + * Used only for custom functionality in JavaScript. + * + * @since 4.3.0 + * + * @see WP_Customize_Cropped_Image_Control + */ + class WP_Customize_Site_Icon_Control extends \WP_Customize_Cropped_Image_Control + { + /** + * Control type. + * + * @since 4.3.0 + * @var string + */ + public $type = 'site_icon'; + /** + * Constructor. + * + * @since 4.3.0 + * + * @see WP_Customize_Control::__construct() + * + * @param WP_Customize_Manager $manager Customizer bootstrap instance. + * @param string $id Control ID. + * @param array $args Optional. Arguments to override class property defaults. + * See WP_Customize_Control::__construct() for information + * on accepted arguments. Default empty array. + * @phpstan-param array{ + * instance_number?: int, + * manager?: WP_Customize_Manager, + * id?: string, + * settings?: array, + * setting?: string, + * capability?: string, + * priority?: int, + * section?: string, + * label?: string, + * description?: string, + * choices?: array, + * input_attrs?: array, + * allow_addition?: bool, + * json?: array, + * type?: string, + * active_callback?: callable, + * } $args See WP_Customize_Control::__construct() + */ + public function __construct($manager, $id, $args = array()) + { + } + /** + * Renders a JS template for the content of the site icon control. + * + * @since 4.5.0 + */ + public function content_template() + { + } + } + /** + * Customize Theme Control class. + * + * @since 4.2.0 + * + * @see WP_Customize_Control + */ + class WP_Customize_Theme_Control extends \WP_Customize_Control + { + /** + * Customize control type. + * + * @since 4.2.0 + * @var string + */ + public $type = 'theme'; + /** + * Theme object. + * + * @since 4.2.0 + * @var WP_Theme + */ + public $theme; + /** + * Refresh the parameters passed to the JavaScript via JSON. + * + * @since 4.2.0 + * + * @see WP_Customize_Control::to_json() + */ + public function to_json() + { + } + /** + * Don't render the control content from PHP, as it's rendered via JS on load. + * + * @since 4.2.0 + */ + public function render_content() + { + } + /** + * Render a JS template for theme display. + * + * @since 4.2.0 + */ + public function content_template() + { + } + } + /** + * Customize Themes Panel Class + * + * @since 4.9.0 + * + * @see WP_Customize_Panel + */ + class WP_Customize_Themes_Panel extends \WP_Customize_Panel + { + /** + * Panel type. + * + * @since 4.9.0 + * @var string + */ + public $type = 'themes'; + /** + * An Underscore (JS) template for rendering this panel's container. + * + * The themes panel renders a custom panel heading with the active theme and a switch themes button. + * + * @see WP_Customize_Panel::print_template() + * + * @since 4.9.0 + */ + protected function render_template() + { + } + /** + * An Underscore (JS) template for this panel's content (but not its container). + * + * Class variables for this panel class are available in the `data` JS object; + * export custom variables by overriding WP_Customize_Panel::json(). + * + * @since 4.9.0 + * + * @see WP_Customize_Panel::print_template() + */ + protected function content_template() + { + } + } + /** + * Customize Themes Section class. + * + * A UI container for theme controls, which are displayed within sections. + * + * @since 4.2.0 + * + * @see WP_Customize_Section + */ + class WP_Customize_Themes_Section extends \WP_Customize_Section + { + /** + * Section type. + * + * @since 4.2.0 + * @var string + */ + public $type = 'themes'; + /** + * Theme section action. + * + * Defines the type of themes to load (installed, wporg, etc.). + * + * @since 4.9.0 + * @var string + */ + public $action = ''; + /** + * Theme section filter type. + * + * Determines whether filters are applied to loaded (local) themes or by initiating a new remote query (remote). + * When filtering is local, the initial themes query is not paginated by default. + * + * @since 4.9.0 + * @var string + */ + public $filter_type = 'local'; + /** + * Gets section parameters for JS. + * + * @since 4.9.0 + * @return array Exported parameters. + */ + public function json() + { + } + /** + * Renders a themes section as a JS template. + * + * The template is only rendered by PHP once, so all actions are prepared at once on the server side. + * + * @since 4.9.0 + */ + protected function render_template() + { + } + /** + * Renders the filter bar portion of a themes section as a JS template. + * + * The template is only rendered by PHP once, so all actions are prepared at once on the server side. + * The filter bar container is rendered by {@see render_template()}. + * + * @since 4.9.0 + */ + protected function filter_bar_content_template() + { + } + /** + * Renders the filter drawer portion of a themes section as a JS template. + * + * The filter bar container is rendered by {@see render_template()}. + * + * @since 4.9.0 + */ + protected function filter_drawer_content_template() + { + } + } + /** + * Core class used to implement the widgets block editor control in the + * customizer. + * + * @since 5.8.0 + * + * @see WP_Customize_Control + */ + class WP_Sidebar_Block_Editor_Control extends \WP_Customize_Control + { + /** + * The control type. + * + * @since 5.8.0 + * + * @var string + */ + public $type = 'sidebar_block_editor'; + /** + * Render the widgets block editor container. + * + * @since 5.8.0 + */ + public function render_content() + { + } + } + /** + * Widget Area Customize Control class. + * + * @since 3.9.0 + * + * @see WP_Customize_Control + */ + class WP_Widget_Area_Customize_Control extends \WP_Customize_Control + { + /** + * Customize control type. + * + * @since 3.9.0 + * @var string + */ + public $type = 'sidebar_widgets'; + /** + * Sidebar ID. + * + * @since 3.9.0 + * @var int|string + */ + public $sidebar_id; + /** + * Refreshes the parameters passed to the JavaScript via JSON. + * + * @since 3.9.0 + */ + public function to_json() + { + } + /** + * Renders the control's content. + * + * @since 3.9.0 + */ + public function render_content() + { + } + } + /** + * Widget Form Customize Control class. + * + * @since 3.9.0 + * + * @see WP_Customize_Control + */ + class WP_Widget_Form_Customize_Control extends \WP_Customize_Control + { + /** + * Customize control type. + * + * @since 3.9.0 + * @var string + */ + public $type = 'widget_form'; + /** + * Widget ID. + * + * @since 3.9.0 + * @var string + */ + public $widget_id; + /** + * Widget ID base. + * + * @since 3.9.0 + * @var string + */ + public $widget_id_base; + /** + * Sidebar ID. + * + * @since 3.9.0 + * @var string + */ + public $sidebar_id; + /** + * Widget status. + * + * @since 3.9.0 + * @var bool True if new, false otherwise. Default false. + */ + public $is_new = \false; + /** + * Widget width. + * + * @since 3.9.0 + * @var int + */ + public $width; + /** + * Widget height. + * + * @since 3.9.0 + * @var int + */ + public $height; + /** + * Widget mode. + * + * @since 3.9.0 + * @var bool True if wide, false otherwise. Default false. + */ + public $is_wide = \false; + /** + * Gather control params for exporting to JavaScript. + * + * @since 3.9.0 + * + * @global array $wp_registered_widgets + */ + public function to_json() + { + } + /** + * Override render_content to be no-op since content is exported via to_json for deferred embedding. + * + * @since 3.9.0 + */ + public function render_content() + { + } + /** + * Whether the current widget is rendered on the page. + * + * @since 4.0.0 + * + * @return bool Whether the widget is rendered. + */ + public function active_callback() + { + } + } + /** + * Font Collection class. + * + * @since 6.5.0 + * + * @see wp_register_font_collection() + */ + final class WP_Font_Collection + { + /** + * The unique slug for the font collection. + * + * @since 6.5.0 + * @var string + */ + public $slug; + /** + * WP_Font_Collection constructor. + * + * @since 6.5.0 + * + * @param string $slug Font collection slug. May only contain alphanumeric characters, dashes, + * and underscores. See sanitize_title(). + * @param array $args Font collection data. See wp_register_font_collection() for information on accepted arguments. + * @phpstan-param array{ + * name?: string, + * description?: string, + * font_families?: array|string, + * categories?: array, + * } $args See wp_register_font_collection() + */ + public function __construct(string $slug, array $args) + { + } + /** + * Retrieves the font collection data. + * + * @since 6.5.0 + * + * @return array|WP_Error An array containing the font collection data, or a WP_Error on failure. + */ + public function get_data() + { + } + } + /** + * The Font Face Resolver abstracts the processing of different data sources + * (such as theme.json) for processing within the Font Face. + * + * This class is for internal core usage and is not supposed to be used by + * extenders (plugins and/or themes). + * + * @access private + */ + class WP_Font_Face_Resolver + { + /** + * Gets fonts defined in theme.json. + * + * @since 6.4.0 + * + * @return array Returns the font-families, each with their font-face variations. + */ + public static function get_fonts_from_theme_json() + { + } + /** + * Gets fonts defined in style variations. + * + * @since 6.7.0 + * + * @return array Returns an array of font-families. + */ + public static function get_fonts_from_style_variations() + { + } + } + /** + * Font Face generates and prints `@font-face` styles for given fonts. + * + * @since 6.4.0 + */ + class WP_Font_Face + { + /** + * Creates and initializes an instance of WP_Font_Face. + * + * @since 6.4.0 + */ + public function __construct() + { + } + /** + * Generates and prints the `@font-face` styles for the given fonts. + * + * @since 6.4.0 + * + * @param array[][] $fonts Optional. The font-families and their font variations. + * See {@see wp_print_font_faces()} for the supported fields. + * Default empty array. + * @phpstan-param array[]<int|string, array{ + * ?: array<array-key, array{ + * font-family: string, + * src: string|string[], + * font-style?: string, + * font-weight?: string, + * font-display?: string, + * ascent-override?: string, + * descent-override?: string, + * font-stretch?: string, + * font-variant?: string, + * font-feature-settings?: string, + * font-variation-settings?: string, + * line-gap-override?: string, + * size-adjust?: string, + * unicode-range?: string, + * }>, + * }> $fonts See wp_print_font_faces() + * @phpstan-return void + */ + public function generate_and_print(array $fonts) + { + } + } + /** + * Font Library class. + * + * @since 6.5.0 + */ + class WP_Font_Library + { + /** + * Register a new font collection. + * + * @since 6.5.0 + * + * @param string $slug Font collection slug. May only contain alphanumeric characters, dashes, + * and underscores. See sanitize_title(). + * @param array $args Font collection data. See wp_register_font_collection() for information on accepted arguments. + * @return WP_Font_Collection|WP_Error A font collection if it was registered successfully, + * or WP_Error object on failure. + * @phpstan-param array{ + * name?: string, + * description?: string, + * font_families?: array|string, + * categories?: array, + * } $args See wp_register_font_collection() + */ + public function register_font_collection(string $slug, array $args) + { + } + /** + * Unregisters a previously registered font collection. + * + * @since 6.5.0 + * + * @param string $slug Font collection slug. + * @return bool True if the font collection was unregistered successfully and false otherwise. + */ + public function unregister_font_collection(string $slug) + { + } + /** + * Gets all the font collections available. + * + * @since 6.5.0 + * + * @return array List of font collections. + */ + public function get_font_collections() + { + } + /** + * Gets a font collection. + * + * @since 6.5.0 + * + * @param string $slug Font collection slug. + * @return WP_Font_Collection|null Font collection object, or null if the font collection doesn't exist. + */ + public function get_font_collection(string $slug) + { + } + /** + * Utility method to retrieve the main instance of the class. + * + * The instance will be created if it does not exist yet. + * + * @since 6.5.0 + * + * @return WP_Font_Library The main instance. + */ + public static function get_instance() + { + } + } + /** + * A class of utilities for working with the Font Library. + * + * These utilities may change or be removed in the future and are intended for internal use only. + * + * @since 6.5.0 + * @access private + */ + class WP_Font_Utils + { + /** + * Sanitizes and formats font family names. + * + * - Applies `sanitize_text_field`. + * - Adds surrounding quotes to names containing any characters that are not alphabetic or dashes. + * + * It follows the recommendations from the CSS Fonts Module Level 4. + * @link https://www.w3.org/TR/css-fonts-4/#font-family-prop + * + * @since 6.5.0 + * @access private + * + * @see sanitize_text_field() + * + * @param string $font_family Font family name(s), comma-separated. + * @return string Sanitized and formatted font family name(s). + */ + public static function sanitize_font_family($font_family) + { + } + /** + * Generates a slug from font face properties, e.g. `open sans;normal;400;100%;U+0-10FFFF` + * + * Used for comparison with other font faces in the same family, to prevent duplicates + * that would both match according the CSS font matching spec. Uses only simple case-insensitive + * matching for fontFamily and unicodeRange, so does not handle overlapping font-family lists or + * unicode ranges. + * + * @since 6.5.0 + * @access private + * + * @link https://drafts.csswg.org/css-fonts/#font-style-matching + * + * @param array $settings { + * Font face settings. + * + * @type string $fontFamily Font family name. + * @type string $fontStyle Optional font style, defaults to 'normal'. + * @type string $fontWeight Optional font weight, defaults to 400. + * @type string $fontStretch Optional font stretch, defaults to '100%'. + * @type string $unicodeRange Optional unicode range, defaults to 'U+0-10FFFF'. + * } + * @return string Font face slug. + * @phpstan-param array{ + * fontFamily?: string, + * fontStyle?: string, + * fontWeight?: string, + * fontStretch?: string, + * unicodeRange?: string, + * } $settings + */ + public static function get_font_face_slug($settings) + { + } + /** + * Sanitizes a tree of data using a schema. + * + * The schema structure should mirror the data tree. Each value provided in the + * schema should be a callable that will be applied to sanitize the corresponding + * value in the data tree. Keys that are in the data tree, but not present in the + * schema, will be removed in the sanitized data. Nested arrays are traversed recursively. + * + * @since 6.5.0 + * + * @access private + * + * @param array $tree The data to sanitize. + * @param array $schema The schema used for sanitization. + * @return array The sanitized data. + */ + public static function sanitize_from_schema($tree, $schema) + { + } + /** + * Returns the expected mime-type values for font files, depending on PHP version. + * + * This is needed because font mime types vary by PHP version, so checking the PHP version + * is necessary until a list of valid mime-types for each file extension can be provided to + * the 'upload_mimes' filter. + * + * @since 6.5.0 + * + * @access private + * + * @return string[] A collection of mime types keyed by file extension. + */ + public static function get_allowed_font_mime_types() + { + } + } + /** + * Core class used by the HTML processor during HTML parsing + * for managing the stack of active formatting elements. + * + * This class is designed for internal use by the HTML processor. + * + * > Initially, the list of active formatting elements is empty. + * > It is used to handle mis-nested formatting element tags. + * > + * > The list contains elements in the formatting category, and markers. + * > The markers are inserted when entering applet, object, marquee, + * > template, td, th, and caption elements, and are used to prevent + * > formatting from "leaking" into applet, object, marquee, template, + * > td, th, and caption elements. + * > + * > In addition, each element in the list of active formatting elements + * > is associated with the token for which it was created, so that + * > further elements can be created for that token if necessary. + * + * @since 6.4.0 + * + * @access private + * + * @see https://html.spec.whatwg.org/#list-of-active-formatting-elements + * @see WP_HTML_Processor + */ + class WP_HTML_Active_Formatting_Elements + { + /** + * Reports if a specific node is in the stack of active formatting elements. + * + * @since 6.4.0 + * + * @param WP_HTML_Token $token Look for this node in the stack. + * @return bool Whether the referenced node is in the stack of active formatting elements. + */ + public function contains_node(\WP_HTML_Token $token) + { + } + /** + * Returns how many nodes are currently in the stack of active formatting elements. + * + * @since 6.4.0 + * + * @return int How many node are in the stack of active formatting elements. + */ + public function count() + { + } + /** + * Returns the node at the end of the stack of active formatting elements, + * if one exists. If the stack is empty, returns null. + * + * @since 6.4.0 + * + * @return WP_HTML_Token|null Last node in the stack of active formatting elements, if one exists, otherwise null. + */ + public function current_node() + { + } + /** + * Inserts a "marker" at the end of the list of active formatting elements. + * + * > The markers are inserted when entering applet, object, marquee, + * > template, td, th, and caption elements, and are used to prevent + * > formatting from "leaking" into applet, object, marquee, template, + * > td, th, and caption elements. + * + * @see https://html.spec.whatwg.org/#concept-parser-marker + * + * @since 6.7.0 + */ + public function insert_marker(): void + { + } + /** + * Pushes a node onto the stack of active formatting elements. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#push-onto-the-list-of-active-formatting-elements + * + * @param WP_HTML_Token $token Push this node onto the stack. + */ + public function push(\WP_HTML_Token $token) + { + } + /** + * Removes a node from the stack of active formatting elements. + * + * @since 6.4.0 + * + * @param WP_HTML_Token $token Remove this node from the stack, if it's there already. + * @return bool Whether the node was found and removed from the stack of active formatting elements. + */ + public function remove_node(\WP_HTML_Token $token) + { + } + /** + * Steps through the stack of active formatting elements, starting with the + * top element (added first) and walking downwards to the one added last. + * + * This generator function is designed to be used inside a "foreach" loop. + * + * Example: + * + * $html = '<em><strong><a>We are here'; + * foreach ( $stack->walk_down() as $node ) { + * echo "{$node->node_name} -> "; + * } + * > EM -> STRONG -> A -> + * + * To start with the most-recently added element and walk towards the top, + * see WP_HTML_Active_Formatting_Elements::walk_up(). + * + * @since 6.4.0 + */ + public function walk_down() + { + } + /** + * Steps through the stack of active formatting elements, starting with the + * bottom element (added last) and walking upwards to the one added first. + * + * This generator function is designed to be used inside a "foreach" loop. + * + * Example: + * + * $html = '<em><strong><a>We are here'; + * foreach ( $stack->walk_up() as $node ) { + * echo "{$node->node_name} -> "; + * } + * > A -> STRONG -> EM -> + * + * To start with the first added element and walk towards the bottom, + * see WP_HTML_Active_Formatting_Elements::walk_down(). + * + * @since 6.4.0 + */ + public function walk_up() + { + } + /** + * Clears the list of active formatting elements up to the last marker. + * + * > When the steps below require the UA to clear the list of active formatting elements up to + * > the last marker, the UA must perform the following steps: + * > + * > 1. Let entry be the last (most recently added) entry in the list of active + * > formatting elements. + * > 2. Remove entry from the list of active formatting elements. + * > 3. If entry was a marker, then stop the algorithm at this point. + * > The list has been cleared up to the last marker. + * > 4. Go to step 1. + * + * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker + * + * @since 6.7.0 + */ + public function clear_up_to_last_marker(): void + { + } + } + /** + * Core class used by the HTML tag processor as a data structure for the attribute token, + * allowing to drastically improve performance. + * + * This class is for internal usage of the WP_HTML_Tag_Processor class. + * + * @access private + * @since 6.2.0 + * @since 6.5.0 Replaced `end` with `length` to more closely match `substr()`. + * + * @see WP_HTML_Tag_Processor + */ + class WP_HTML_Attribute_Token + { + /** + * Attribute name. + * + * @since 6.2.0 + * + * @var string + */ + public $name; + /** + * Attribute value. + * + * @since 6.2.0 + * + * @var int + */ + public $value_starts_at; + /** + * How many bytes the value occupies in the input HTML. + * + * @since 6.2.0 + * + * @var int + */ + public $value_length; + /** + * The string offset where the attribute name starts. + * + * @since 6.2.0 + * + * @var int + */ + public $start; + /** + * Byte length of text spanning the attribute inside a tag. + * + * This span starts at the first character of the attribute name + * and it ends after one of three cases: + * + * - at the end of the attribute name for boolean attributes. + * - at the end of the value for unquoted attributes. + * - at the final single or double quote for quoted attributes. + * + * Example: + * + * <div class="post"> + * ------------ length is 12, including quotes + * + * <input type="checked" checked id="selector"> + * ------- length is 6 + * + * <a rel=noopener> + * ------------ length is 11 + * + * @since 6.5.0 Replaced `end` with `length` to more closely match `substr()`. + * + * @var int + */ + public $length; + /** + * Whether the attribute is a boolean attribute with value `true`. + * + * @since 6.2.0 + * + * @var bool + */ + public $is_true; + /** + * Constructor. + * + * @since 6.2.0 + * @since 6.5.0 Replaced `end` with `length` to more closely match `substr()`. + * + * @param string $name Attribute name. + * @param int $value_start Attribute value. + * @param int $value_length Number of bytes attribute value spans. + * @param int $start The string offset where the attribute name starts. + * @param int $length Byte length of the entire attribute name or name and value pair expression. + * @param bool $is_true Whether the attribute is a boolean attribute with true value. + */ + public function __construct($name, $value_start, $value_length, $start, $length, $is_true) + { + } + } + /** + * HTML API: WP_HTML_Decoder class + * + * Decodes spans of raw text found inside HTML content. + * + * @package WordPress + * @subpackage HTML-API + * @since 6.6.0 + */ + class WP_HTML_Decoder + { + /** + * Indicates if an attribute value starts with a given raw string value. + * + * Use this method to determine if an attribute value starts with a given string, regardless + * of how it might be encoded in HTML. For instance, `http:` could be represented as `http:` + * or as `http:` or as `http:` or as `http:`, or in many other ways. + * + * Example: + * + * $value = 'http://wordpress.org/'; + * true === WP_HTML_Decoder::attribute_starts_with( $value, 'http:', 'ascii-case-insensitive' ); + * false === WP_HTML_Decoder::attribute_starts_with( $value, 'https:', 'ascii-case-insensitive' ); + * + * @since 6.6.0 + * + * @param string $haystack String containing the raw non-decoded attribute value. + * @param string $search_text Does the attribute value start with this plain string. + * @param string $case_sensitivity Optional. Pass 'ascii-case-insensitive' to ignore ASCII case when matching. + * Default 'case-sensitive'. + * @return bool Whether the attribute value starts with the given string. + */ + public static function attribute_starts_with($haystack, $search_text, $case_sensitivity = 'case-sensitive'): bool + { + } + /** + * Returns a string containing the decoded value of a given HTML text node. + * + * Text nodes appear in HTML DATA sections, which are the text segments inside + * and around tags, excepting SCRIPT and STYLE elements (and some others), + * whose inner text is not decoded. Use this function to read the decoded + * value of such a text span in an HTML document. + * + * Example: + * + * '“😄”' === WP_HTML_Decode::decode_text_node( '“😄”' ); + * + * @since 6.6.0 + * + * @param string $text Text containing raw and non-decoded text node to decode. + * @return string Decoded UTF-8 value of given text node. + */ + public static function decode_text_node($text): string + { + } + /** + * Returns a string containing the decoded value of a given HTML attribute. + * + * Text found inside an HTML attribute has different parsing rules than for + * text found inside other markup, or DATA segments. Use this function to + * read the decoded value of an HTML string inside a quoted attribute. + * + * Example: + * + * '“😄”' === WP_HTML_Decode::decode_attribute( '“😄”' ); + * + * @since 6.6.0 + * + * @param string $text Text containing raw and non-decoded attribute value to decode. + * @return string Decoded UTF-8 value of given attribute value. + */ + public static function decode_attribute($text): string + { + } + /** + * Decodes a span of HTML text, depending on the context in which it's found. + * + * This is a low-level method; prefer calling WP_HTML_Decoder::decode_attribute() or + * WP_HTML_Decoder::decode_text_node() instead. It's provided for cases where this + * may be difficult to do from calling code. + * + * Example: + * + * '©' = WP_HTML_Decoder::decode( 'data', '©' ); + * + * @since 6.6.0 + * + * @access private + * + * @param string $context `attribute` for decoding attribute values, `data` otherwise. + * @param string $text Text document containing span of text to decode. + * @return string Decoded UTF-8 string. + */ + public static function decode($context, $text): string + { + } + /** + * Attempt to read a character reference at the given location in a given string, + * depending on the context in which it's found. + * + * If a character reference is found, this function will return the translated value + * that the reference maps to. It will then set `$match_byte_length` the + * number of bytes of input it read while consuming the character reference. This + * gives calling code the opportunity to advance its cursor when traversing a string + * and decoding. + * + * Example: + * + * null === WP_HTML_Decoder::read_character_reference( 'attribute', 'Ships…', 0 ); + * '…' === WP_HTML_Decoder::read_character_reference( 'attribute', 'Ships…', 5, $token_length ); + * 8 === $token_length; // `…` + * + * null === WP_HTML_Decoder::read_character_reference( 'attribute', '¬in', 0 ); + * '∉' === WP_HTML_Decoder::read_character_reference( 'attribute', '∉', 0, $token_length ); + * 7 === $token_length; // `∉` + * + * '¬' === WP_HTML_Decoder::read_character_reference( 'data', '¬in', 0, $token_length ); + * 4 === $token_length; // `¬` + * '∉' === WP_HTML_Decoder::read_character_reference( 'data', '∉', 0, $token_length ); + * 7 === $token_length; // `∉` + * + * @since 6.6.0 + * + * @global WP_Token_Map $html5_named_character_references Mappings for HTML5 named character references. + * + * @param string $context `attribute` for decoding attribute values, `data` otherwise. + * @param string $text Text document containing span of text to decode. + * @param int $at Optional. Byte offset into text where span begins, defaults to the beginning (0). + * @param int &$match_byte_length Optional. Set to byte-length of character reference if provided and if a match + * is found, otherwise not set. Default null. + * @return string|false Decoded character reference in UTF-8 if found, otherwise `false`. + */ + public static function read_character_reference($context, $text, $at = 0, &$match_byte_length = \null) + { + } + /** + * Encode a code point number into the UTF-8 encoding. + * + * This encoder implements the UTF-8 encoding algorithm for converting + * a code point into a byte sequence. If it receives an invalid code + * point it will return the Unicode Replacement Character U+FFFD `�`. + * + * Example: + * + * '🅰' === WP_HTML_Decoder::code_point_to_utf8_bytes( 0x1f170 ); + * + * // Half of a surrogate pair is an invalid code point. + * '�' === WP_HTML_Decoder::code_point_to_utf8_bytes( 0xd83c ); + * + * @since 6.6.0 + * + * @see https://www.rfc-editor.org/rfc/rfc3629 For the UTF-8 standard. + * + * @param int $code_point Which code point to convert. + * @return string Converted code point, or `�` if invalid. + */ + public static function code_point_to_utf8_bytes($code_point): string + { + } + } + /** + * Core class used by the HTML API to represent a DOCTYPE declaration. + * + * This class parses DOCTYPE tokens for the full parser in the HTML Processor. + * Most code interacting with HTML won't need to parse DOCTYPE declarations; + * the HTML Processor is one exception. Consult the HTML Processor for proper + * parsing of an HTML document. + * + * A DOCTYPE declaration may indicate its document compatibility mode, which impacts + * the structure of the following HTML as well as the behavior of CSS class selectors. + * There are three possible modes: + * + * - "no-quirks" and "limited-quirks" modes (also called "standards mode"). + * - "quirks" mode. + * + * These modes mostly determine whether CSS class name selectors match values in the + * HTML `class` attribute in an ASCII-case-insensitive way (quirks mode), or whether + * they match only when byte-for-byte identical (no-quirks mode). + * + * All HTML documents should start with the standard HTML5 DOCTYPE: `<!DOCTYPE html>`. + * + * > DOCTYPEs are required for legacy reasons. When omitted, browsers tend to use a different + * > rendering mode that is incompatible with some specifications. Including the DOCTYPE in a + * > document ensures that the browser makes a best-effort attempt at following the + * > relevant specifications. + * + * @see https://html.spec.whatwg.org/#the-doctype + * + * DOCTYPE declarations comprise four properties: a name, public identifier, system identifier, + * and an indication of which document compatibility mode they would imply if an HTML parser + * hadn't already determined it from other information. + * + * @see https://html.spec.whatwg.org/#the-initial-insertion-mode + * + * Historically, the DOCTYPE declaration was used in SGML documents to instruct a parser how + * to interpret the various tags and entities within a document. Its role in HTML diverged + * from how it was used in SGML and no meaning should be back-read into HTML based on how it + * is used in SGML, XML, or XHTML documents. + * + * @see https://www.iso.org/standard/16387.html + * + * @since 6.7.0 + * + * @access private + * + * @see WP_HTML_Processor + */ + class WP_HTML_Doctype_Info + { + /** + * Name of the DOCTYPE: should be "html" for HTML documents. + * + * This value should be considered "read only" and not modified. + * + * Historically the DOCTYPE name indicates name of the document's root element. + * + * <!DOCTYPE html> + * ╰──┴── name is "html". + * + * @see https://html.spec.whatwg.org/#tokenization + * + * @since 6.7.0 + * + * @var string|null + */ + public $name = \null; + /** + * Public identifier of the DOCTYPE. + * + * This value should be considered "read only" and not modified. + * + * The public identifier is optional and should not appear in HTML documents. + * A `null` value indicates that no public identifier was present in the DOCTYPE. + * + * Historically the presence of the public identifier indicated that a document + * was meant to be shared between computer systems and the value indicated to a + * knowledgeable parser how to find the relevant document type definition (DTD). + * + * <!DOCTYPE html PUBLIC "public id goes here in quotes"> + * │ │ ╰─── public identifier ─────╯ + * ╰──┴── name is "html". + * + * @see https://html.spec.whatwg.org/#tokenization + * + * @since 6.7.0 + * + * @var string|null + */ + public $public_identifier = \null; + /** + * System identifier of the DOCTYPE. + * + * This value should be considered "read only" and not modified. + * + * The system identifier is optional and should not appear in HTML documents. + * A `null` value indicates that no system identifier was present in the DOCTYPE. + * + * Historically the system identifier specified where a relevant document type + * declaration for the given document is stored and may be retrieved. + * + * <!DOCTYPE html SYSTEM "system id goes here in quotes"> + * │ │ ╰──── system identifier ────╯ + * ╰──┴── name is "html". + * + * If a public identifier were provided it would indicate to a knowledgeable + * parser how to interpret the system identifier. + * + * <!DOCTYPE html PUBLIC "public id goes here in quotes" "system id goes here in quotes"> + * │ │ ╰─── public identifier ─────╯ ╰──── system identifier ────╯ + * ╰──┴── name is "html". + * + * @see https://html.spec.whatwg.org/#tokenization + * + * @since 6.7.0 + * + * @var string|null + */ + public $system_identifier = \null; + /** + * Which document compatibility mode this DOCTYPE declaration indicates. + * + * This value should be considered "read only" and not modified. + * + * When an HTML parser has not already set the document compatibility mode, + * (e.g. "quirks" or "no-quirks" mode), it will be inferred from the properties + * of the appropriate DOCTYPE declaration, if one exists. The DOCTYPE can + * indicate one of three possible document compatibility modes: + * + * - "no-quirks" and "limited-quirks" modes (also called "standards" mode). + * - "quirks" mode (also called `CSS1Compat` mode). + * + * An appropriate DOCTYPE is one encountered in the "initial" insertion mode, + * before the HTML element has been opened and before finding any other + * DOCTYPE declaration tokens. + * + * @see https://html.spec.whatwg.org/#the-initial-insertion-mode + * + * @since 6.7.0 + * + * @var string One of "no-quirks", "limited-quirks", or "quirks". + */ + public $indicated_compatibility_mode; + /** + * Creates a WP_HTML_Doctype_Info instance by parsing a raw DOCTYPE declaration token. + * + * Use this method to parse a DOCTYPE declaration token and get access to its properties + * via the returned WP_HTML_Doctype_Info class instance. The provided input must parse + * properly as a DOCTYPE declaration, though it must not represent a valid DOCTYPE. + * + * Example: + * + * // Normative HTML DOCTYPE declaration. + * $doctype = WP_HTML_Doctype_Info::from_doctype_token( '<!DOCTYPE html>' ); + * 'no-quirks' === $doctype->indicated_compatibility_mode; + * + * // A nonsensical DOCTYPE is still valid, and will indicate "quirks" mode. + * $doctype = WP_HTML_Doctype_Info::from_doctype_token( '<!doctypeJSON SILLY "nonsense\'>' ); + * 'quirks' === $doctype->indicated_compatibility_mode; + * + * // Textual quirks present in raw HTML are handled appropriately. + * $doctype = WP_HTML_Doctype_Info::from_doctype_token( "<!DOCTYPE\nhtml\n>" ); + * 'no-quirks' === $doctype->indicated_compatibility_mode; + * + * // Anything other than a proper DOCTYPE declaration token fails to parse. + * null === WP_HTML_Doctype_Info::from_doctype_token( ' <!DOCTYPE>' ); + * null === WP_HTML_Doctype_Info::from_doctype_token( '<!DOCTYPE ><p>' ); + * null === WP_HTML_Doctype_Info::from_doctype_token( '<!TYPEDOC>' ); + * null === WP_HTML_Doctype_Info::from_doctype_token( 'html' ); + * null === WP_HTML_Doctype_Info::from_doctype_token( '<?xml version="1.0" encoding="UTF-8" ?>' ); + * + * @since 6.7.0 + * + * @param string $doctype_html The complete raw DOCTYPE HTML string, e.g. `<!DOCTYPE html>`. + * + * @return WP_HTML_Doctype_Info|null A WP_HTML_Doctype_Info instance will be returned if the + * provided DOCTYPE HTML is a valid DOCTYPE. Otherwise, null. + */ + public static function from_doctype_token(string $doctype_html): ?self + { + } + } + /** + * Core class used by the HTML processor during HTML parsing + * for managing the stack of open elements. + * + * This class is designed for internal use by the HTML processor. + * + * > Initially, the stack of open elements is empty. The stack grows + * > downwards; the topmost node on the stack is the first one added + * > to the stack, and the bottommost node of the stack is the most + * > recently added node in the stack (notwithstanding when the stack + * > is manipulated in a random access fashion as part of the handling + * > for misnested tags). + * + * @since 6.4.0 + * + * @access private + * + * @see https://html.spec.whatwg.org/#stack-of-open-elements + * @see WP_HTML_Processor + */ + class WP_HTML_Open_Elements + { + /** + * Holds the stack of open element references. + * + * @since 6.4.0 + * + * @var WP_HTML_Token[] + */ + public $stack = array(); + /** + * Sets a pop handler that will be called when an item is popped off the stack of + * open elements. + * + * The function will be called with the pushed item as its argument. + * + * @since 6.6.0 + * + * @param Closure $handler The handler function. + */ + public function set_pop_handler(\Closure $handler): void + { + } + /** + * Sets a push handler that will be called when an item is pushed onto the stack of + * open elements. + * + * The function will be called with the pushed item as its argument. + * + * @since 6.6.0 + * + * @param Closure $handler The handler function. + */ + public function set_push_handler(\Closure $handler): void + { + } + /** + * Returns the name of the node at the nth position on the stack + * of open elements, or `null` if no such position exists. + * + * Note that this uses a 1-based index, which represents the + * "nth item" on the stack, counting from the top, where the + * top-most element is the 1st, the second is the 2nd, etc... + * + * @since 6.7.0 + * + * @param int $nth Retrieve the nth item on the stack, with 1 being + * the top element, 2 being the second, etc... + * @return WP_HTML_Token|null Name of the node on the stack at the given location, + * or `null` if the location isn't on the stack. + */ + public function at(int $nth): ?\WP_HTML_Token + { + } + /** + * Reports if a node of a given name is in the stack of open elements. + * + * @since 6.7.0 + * + * @param string $node_name Name of node for which to check. + * @return bool Whether a node of the given name is in the stack of open elements. + */ + public function contains(string $node_name): bool + { + } + /** + * Reports if a specific node is in the stack of open elements. + * + * @since 6.4.0 + * + * @param WP_HTML_Token $token Look for this node in the stack. + * @return bool Whether the referenced node is in the stack of open elements. + */ + public function contains_node(\WP_HTML_Token $token): bool + { + } + /** + * Returns how many nodes are currently in the stack of open elements. + * + * @since 6.4.0 + * + * @return int How many node are in the stack of open elements. + */ + public function count(): int + { + } + /** + * Returns the node at the end of the stack of open elements, + * if one exists. If the stack is empty, returns null. + * + * @since 6.4.0 + * + * @return WP_HTML_Token|null Last node in the stack of open elements, if one exists, otherwise null. + */ + public function current_node(): ?\WP_HTML_Token + { + } + /** + * Indicates if the current node is of a given type or name. + * + * It's possible to pass either a node type or a node name to this function. + * In the case there is no current element it will always return `false`. + * + * Example: + * + * // Is the current node a text node? + * $stack->current_node_is( '#text' ); + * + * // Is the current node a DIV element? + * $stack->current_node_is( 'DIV' ); + * + * // Is the current node any element/tag? + * $stack->current_node_is( '#tag' ); + * + * @see WP_HTML_Tag_Processor::get_token_type + * @see WP_HTML_Tag_Processor::get_token_name + * + * @since 6.7.0 + * + * @access private + * + * @param string $identity Check if the current node has this name or type (depending on what is provided). + * @return bool Whether there is a current element that matches the given identity, whether a token name or type. + */ + public function current_node_is(string $identity): bool + { + } + /** + * Returns whether an element is in a specific scope. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#has-an-element-in-the-specific-scope + * + * @param string $tag_name Name of tag check. + * @param string[] $termination_list List of elements that terminate the search. + * @return bool Whether the element was found in a specific scope. + */ + public function has_element_in_specific_scope(string $tag_name, $termination_list): bool + { + } + /** + * Returns whether a particular element is in scope. + * + * > The stack of open elements is said to have a particular element in + * > scope when it has that element in the specific scope consisting of + * > the following element types: + * > + * > - applet + * > - caption + * > - html + * > - table + * > - td + * > - th + * > - marquee + * > - object + * > - template + * > - MathML mi + * > - MathML mo + * > - MathML mn + * > - MathML ms + * > - MathML mtext + * > - MathML annotation-xml + * > - SVG foreignObject + * > - SVG desc + * > - SVG title + * + * @since 6.4.0 + * @since 6.7.0 Full support. + * + * @see https://html.spec.whatwg.org/#has-an-element-in-scope + * + * @param string $tag_name Name of tag to check. + * @return bool Whether given element is in scope. + */ + public function has_element_in_scope(string $tag_name): bool + { + } + /** + * Returns whether a particular element is in list item scope. + * + * > The stack of open elements is said to have a particular element + * > in list item scope when it has that element in the specific scope + * > consisting of the following element types: + * > + * > - All the element types listed above for the has an element in scope algorithm. + * > - ol in the HTML namespace + * > - ul in the HTML namespace + * + * @since 6.4.0 + * @since 6.5.0 Implemented: no longer throws on every invocation. + * @since 6.7.0 Supports all required HTML elements. + * + * @see https://html.spec.whatwg.org/#has-an-element-in-list-item-scope + * + * @param string $tag_name Name of tag to check. + * @return bool Whether given element is in scope. + */ + public function has_element_in_list_item_scope(string $tag_name): bool + { + } + /** + * Returns whether a particular element is in button scope. + * + * > The stack of open elements is said to have a particular element + * > in button scope when it has that element in the specific scope + * > consisting of the following element types: + * > + * > - All the element types listed above for the has an element in scope algorithm. + * > - button in the HTML namespace + * + * @since 6.4.0 + * @since 6.7.0 Supports all required HTML elements. + * + * @see https://html.spec.whatwg.org/#has-an-element-in-button-scope + * + * @param string $tag_name Name of tag to check. + * @return bool Whether given element is in scope. + */ + public function has_element_in_button_scope(string $tag_name): bool + { + } + /** + * Returns whether a particular element is in table scope. + * + * > The stack of open elements is said to have a particular element + * > in table scope when it has that element in the specific scope + * > consisting of the following element types: + * > + * > - html in the HTML namespace + * > - table in the HTML namespace + * > - template in the HTML namespace + * + * @since 6.4.0 + * @since 6.7.0 Full implementation. + * + * @see https://html.spec.whatwg.org/#has-an-element-in-table-scope + * + * @param string $tag_name Name of tag to check. + * @return bool Whether given element is in scope. + */ + public function has_element_in_table_scope(string $tag_name): bool + { + } + /** + * Returns whether a particular element is in select scope. + * + * This test differs from the others like it, in that its rules are inverted. + * Instead of arriving at a match when one of any tag in a termination group + * is reached, this one terminates if any other tag is reached. + * + * > The stack of open elements is said to have a particular element in select scope when it has + * > that element in the specific scope consisting of all element types except the following: + * > - optgroup in the HTML namespace + * > - option in the HTML namespace + * + * @since 6.4.0 Stub implementation (throws). + * @since 6.7.0 Full implementation. + * + * @see https://html.spec.whatwg.org/#has-an-element-in-select-scope + * + * @param string $tag_name Name of tag to check. + * @return bool Whether the given element is in SELECT scope. + */ + public function has_element_in_select_scope(string $tag_name): bool + { + } + /** + * Returns whether a P is in BUTTON scope. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#has-an-element-in-button-scope + * + * @return bool Whether a P is in BUTTON scope. + */ + public function has_p_in_button_scope(): bool + { + } + /** + * Pops a node off of the stack of open elements. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#stack-of-open-elements + * + * @return bool Whether a node was popped off of the stack. + */ + public function pop(): bool + { + } + /** + * Pops nodes off of the stack of open elements until an HTML tag with the given name has been popped. + * + * @since 6.4.0 + * + * @see WP_HTML_Open_Elements::pop + * + * @param string $html_tag_name Name of tag that needs to be popped off of the stack of open elements. + * @return bool Whether a tag of the given name was found and popped off of the stack of open elements. + */ + public function pop_until(string $html_tag_name): bool + { + } + /** + * Pushes a node onto the stack of open elements. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#stack-of-open-elements + * + * @param WP_HTML_Token $stack_item Item to add onto stack. + */ + public function push(\WP_HTML_Token $stack_item): void + { + } + /** + * Removes a specific node from the stack of open elements. + * + * @since 6.4.0 + * + * @param WP_HTML_Token $token The node to remove from the stack of open elements. + * @return bool Whether the node was found and removed from the stack of open elements. + */ + public function remove_node(\WP_HTML_Token $token): bool + { + } + /** + * Steps through the stack of open elements, starting with the top element + * (added first) and walking downwards to the one added last. + * + * This generator function is designed to be used inside a "foreach" loop. + * + * Example: + * + * $html = '<em><strong><a>We are here'; + * foreach ( $stack->walk_down() as $node ) { + * echo "{$node->node_name} -> "; + * } + * > EM -> STRONG -> A -> + * + * To start with the most-recently added element and walk towards the top, + * see WP_HTML_Open_Elements::walk_up(). + * + * @since 6.4.0 + */ + public function walk_down() + { + } + /** + * Steps through the stack of open elements, starting with the bottom element + * (added last) and walking upwards to the one added first. + * + * This generator function is designed to be used inside a "foreach" loop. + * + * Example: + * + * $html = '<em><strong><a>We are here'; + * foreach ( $stack->walk_up() as $node ) { + * echo "{$node->node_name} -> "; + * } + * > A -> STRONG -> EM -> + * + * To start with the first added element and walk towards the bottom, + * see WP_HTML_Open_Elements::walk_down(). + * + * @since 6.4.0 + * @since 6.5.0 Accepts $above_this_node to start traversal above a given node, if it exists. + * + * @param WP_HTML_Token|null $above_this_node Optional. Start traversing above this node, + * if provided and if the node exists. + */ + public function walk_up(?\WP_HTML_Token $above_this_node = \null) + { + } + /** + * Updates internal flags after adding an element. + * + * Certain conditions (such as "has_p_in_button_scope") are maintained here as + * flags that are only modified when adding and removing elements. This allows + * the HTML Processor to quickly check for these conditions instead of iterating + * over the open stack elements upon each new tag it encounters. These flags, + * however, need to be maintained as items are added and removed from the stack. + * + * @since 6.4.0 + * + * @param WP_HTML_Token $item Element that was added to the stack of open elements. + */ + public function after_element_push(\WP_HTML_Token $item): void + { + } + /** + * Updates internal flags after removing an element. + * + * Certain conditions (such as "has_p_in_button_scope") are maintained here as + * flags that are only modified when adding and removing elements. This allows + * the HTML Processor to quickly check for these conditions instead of iterating + * over the open stack elements upon each new tag it encounters. These flags, + * however, need to be maintained as items are added and removed from the stack. + * + * @since 6.4.0 + * + * @param WP_HTML_Token $item Element that was removed from the stack of open elements. + */ + public function after_element_pop(\WP_HTML_Token $item): void + { + } + /** + * Clear the stack back to a table context. + * + * > When the steps above require the UA to clear the stack back to a table context, it means + * > that the UA must, while the current node is not a table, template, or html element, pop + * > elements from the stack of open elements. + * + * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-context + * + * @since 6.7.0 + */ + public function clear_to_table_context(): void + { + } + /** + * Clear the stack back to a table body context. + * + * > When the steps above require the UA to clear the stack back to a table body context, it + * > means that the UA must, while the current node is not a tbody, tfoot, thead, template, or + * > html element, pop elements from the stack of open elements. + * + * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-body-context + * + * @since 6.7.0 + */ + public function clear_to_table_body_context(): void + { + } + /** + * Clear the stack back to a table row context. + * + * > When the steps above require the UA to clear the stack back to a table row context, it + * > means that the UA must, while the current node is not a tr, template, or html element, pop + * > elements from the stack of open elements. + * + * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-row-context + * + * @since 6.7.0 + */ + public function clear_to_table_row_context(): void + { + } + /** + * Wakeup magic method. + * + * @since 6.6.0 + */ + public function __wakeup() + { + } + } + /** + * Core class used by the HTML processor during HTML parsing + * for managing the internal parsing state. + * + * This class is designed for internal use by the HTML processor. + * + * @since 6.4.0 + * + * @access private + * + * @see WP_HTML_Processor + */ + class WP_HTML_Processor_State + { + /* + * Insertion mode constants. + * + * These constants exist and are named to make it easier to + * discover and recognize the supported insertion modes in + * the parser. + * + * Out of all the possible insertion modes, only those + * supported by the parser are listed here. As support + * is added to the parser for more modes, add them here + * following the same naming and value pattern. + * + * @see https://html.spec.whatwg.org/#the-insertion-mode + */ + /** + * Initial insertion mode for full HTML parser. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#the-initial-insertion-mode + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_INITIAL = 'insertion-mode-initial'; + /** + * Before HTML insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#the-before-html-insertion-mode + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_BEFORE_HTML = 'insertion-mode-before-html'; + /** + * Before head insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-beforehead + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_BEFORE_HEAD = 'insertion-mode-before-head'; + /** + * In head insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-inhead + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_HEAD = 'insertion-mode-in-head'; + /** + * In head noscript insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-inheadnoscript + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_HEAD_NOSCRIPT = 'insertion-mode-in-head-noscript'; + /** + * After head insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-afterhead + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_AFTER_HEAD = 'insertion-mode-after-head'; + /** + * In body insertion mode for full HTML parser. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-inbody + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_BODY = 'insertion-mode-in-body'; + /** + * In table insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-intable + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_TABLE = 'insertion-mode-in-table'; + /** + * In table text insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-intabletext + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_TABLE_TEXT = 'insertion-mode-in-table-text'; + /** + * In caption insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-incaption + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_CAPTION = 'insertion-mode-in-caption'; + /** + * In column group insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-incolumngroup + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_COLUMN_GROUP = 'insertion-mode-in-column-group'; + /** + * In table body insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-intablebody + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_TABLE_BODY = 'insertion-mode-in-table-body'; + /** + * In row insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-inrow + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_ROW = 'insertion-mode-in-row'; + /** + * In cell insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-incell + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_CELL = 'insertion-mode-in-cell'; + /** + * In select insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-inselect + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_SELECT = 'insertion-mode-in-select'; + /** + * In select in table insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-inselectintable + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_SELECT_IN_TABLE = 'insertion-mode-in-select-in-table'; + /** + * In template insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-intemplate + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_TEMPLATE = 'insertion-mode-in-template'; + /** + * After body insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-afterbody + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_AFTER_BODY = 'insertion-mode-after-body'; + /** + * In frameset insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-inframeset + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_IN_FRAMESET = 'insertion-mode-in-frameset'; + /** + * After frameset insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#parsing-main-afterframeset + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_AFTER_FRAMESET = 'insertion-mode-after-frameset'; + /** + * After after body insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#the-after-after-body-insertion-mode + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_AFTER_AFTER_BODY = 'insertion-mode-after-after-body'; + /** + * After after frameset insertion mode for full HTML parser. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode + * @see WP_HTML_Processor_State::$insertion_mode + * + * @var string + */ + const INSERTION_MODE_AFTER_AFTER_FRAMESET = 'insertion-mode-after-after-frameset'; + /** + * The stack of template insertion modes. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/#the-insertion-mode:stack-of-template-insertion-modes + * + * @var array<string> + */ + public $stack_of_template_insertion_modes = array(); + /** + * Tracks open elements while scanning HTML. + * + * This property is initialized in the constructor and never null. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#stack-of-open-elements + * + * @var WP_HTML_Open_Elements + */ + public $stack_of_open_elements; + /** + * Tracks open formatting elements, used to handle mis-nested formatting element tags. + * + * This property is initialized in the constructor and never null. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#list-of-active-formatting-elements + * + * @var WP_HTML_Active_Formatting_Elements + */ + public $active_formatting_elements; + /** + * Refers to the currently-matched tag, if any. + * + * @since 6.4.0 + * + * @var WP_HTML_Token|null + */ + public $current_token = \null; + /** + * Tree construction insertion mode. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#insertion-mode + * + * @var string + */ + public $insertion_mode = self::INSERTION_MODE_INITIAL; + /** + * Context node initializing fragment parser, if created as a fragment parser. + * + * @since 6.4.0 + * @deprecated 6.8.0 WP_HTML_Processor tracks the context_node internally. + * + * @var null + */ + public $context_node = \null; + /** + * The recognized encoding of the input byte stream. + * + * > The stream of code points that comprises the input to the tokenization + * > stage will be initially seen by the user agent as a stream of bytes + * > (typically coming over the network or from the local file system). + * > The bytes encode the actual characters according to a particular character + * > encoding, which the user agent uses to decode the bytes into characters. + * + * @since 6.7.0 + * + * @var string|null + */ + public $encoding = \null; + /** + * The parser's confidence in the input encoding. + * + * > When the HTML parser is decoding an input byte stream, it uses a character + * > encoding and a confidence. The confidence is either tentative, certain, or + * > irrelevant. The encoding used, and whether the confidence in that encoding + * > is tentative or certain, is used during the parsing to determine whether to + * > change the encoding. If no encoding is necessary, e.g. because the parser is + * > operating on a Unicode stream and doesn't have to use a character encoding + * > at all, then the confidence is irrelevant. + * + * @since 6.7.0 + * + * @var string + */ + public $encoding_confidence = 'tentative'; + /** + * HEAD element pointer. + * + * @since 6.7.0 + * + * @see https://html.spec.whatwg.org/multipage/parsing.html#head-element-pointer + * + * @var WP_HTML_Token|null + */ + public $head_element = \null; + /** + * FORM element pointer. + * + * > points to the last form element that was opened and whose end tag has + * > not yet been seen. It is used to make form controls associate with + * > forms in the face of dramatically bad markup, for historical reasons. + * > It is ignored inside template elements. + * + * @todo This may be invalidated by a seek operation. + * + * @see https://html.spec.whatwg.org/#form-element-pointer + * + * @since 6.7.0 + * + * @var WP_HTML_Token|null + */ + public $form_element = \null; + /** + * The frameset-ok flag indicates if a `FRAMESET` element is allowed in the current state. + * + * > The frameset-ok flag is set to "ok" when the parser is created. It is set to "not ok" after certain tokens are seen. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#frameset-ok-flag + * + * @var bool + */ + public $frameset_ok = \true; + /** + * Constructor - creates a new and empty state value. + * + * @since 6.4.0 + * + * @see WP_HTML_Processor + */ + public function __construct() + { + } + } + /** + * Core class used to modify attributes in an HTML document for tags matching a query. + * + * ## Usage + * + * Use of this class requires three steps: + * + * 1. Create a new class instance with your input HTML document. + * 2. Find the tag(s) you are looking for. + * 3. Request changes to the attributes in those tag(s). + * + * Example: + * + * $tags = new WP_HTML_Tag_Processor( $html ); + * if ( $tags->next_tag( 'option' ) ) { + * $tags->set_attribute( 'selected', true ); + * } + * + * ### Finding tags + * + * The `next_tag()` function moves the internal cursor through + * your input HTML document until it finds a tag meeting any of + * the supplied restrictions in the optional query argument. If + * no argument is provided then it will find the next HTML tag, + * regardless of what kind it is. + * + * If you want to _find whatever the next tag is_: + * + * $tags->next_tag(); + * + * | Goal | Query | + * |-----------------------------------------------------------|---------------------------------------------------------------------------------| + * | Find any tag. | `$tags->next_tag();` | + * | Find next image tag. | `$tags->next_tag( array( 'tag_name' => 'img' ) );` | + * | Find next image tag (without passing the array). | `$tags->next_tag( 'img' );` | + * | Find next tag containing the `fullwidth` CSS class. | `$tags->next_tag( array( 'class_name' => 'fullwidth' ) );` | + * | Find next image tag containing the `fullwidth` CSS class. | `$tags->next_tag( array( 'tag_name' => 'img', 'class_name' => 'fullwidth' ) );` | + * + * If a tag was found meeting your criteria then `next_tag()` + * will return `true` and you can proceed to modify it. If it + * returns `false`, however, it failed to find the tag and + * moved the cursor to the end of the file. + * + * Once the cursor reaches the end of the file the processor + * is done and if you want to reach an earlier tag you will + * need to recreate the processor and start over, as it's + * unable to back up or move in reverse. + * + * See the section on bookmarks for an exception to this + * no-backing-up rule. + * + * #### Custom queries + * + * Sometimes it's necessary to further inspect an HTML tag than + * the query syntax here permits. In these cases one may further + * inspect the search results using the read-only functions + * provided by the processor or external state or variables. + * + * Example: + * + * // Paint up to the first five DIV or SPAN tags marked with the "jazzy" style. + * $remaining_count = 5; + * while ( $remaining_count > 0 && $tags->next_tag() ) { + * if ( + * ( 'DIV' === $tags->get_tag() || 'SPAN' === $tags->get_tag() ) && + * 'jazzy' === $tags->get_attribute( 'data-style' ) + * ) { + * $tags->add_class( 'theme-style-everest-jazz' ); + * $remaining_count--; + * } + * } + * + * `get_attribute()` will return `null` if the attribute wasn't present + * on the tag when it was called. It may return `""` (the empty string) + * in cases where the attribute was present but its value was empty. + * For boolean attributes, those whose name is present but no value is + * given, it will return `true` (the only way to set `false` for an + * attribute is to remove it). + * + * #### When matching fails + * + * When `next_tag()` returns `false` it could mean different things: + * + * - The requested tag wasn't found in the input document. + * - The input document ended in the middle of an HTML syntax element. + * + * When a document ends in the middle of a syntax element it will pause + * the processor. This is to make it possible in the future to extend the + * input document and proceed - an important requirement for chunked + * streaming parsing of a document. + * + * Example: + * + * $processor = new WP_HTML_Tag_Processor( 'This <div is="a" partial="token' ); + * false === $processor->next_tag(); + * + * If a special element (see next section) is encountered but no closing tag + * is found it will count as an incomplete tag. The parser will pause as if + * the opening tag were incomplete. + * + * Example: + * + * $processor = new WP_HTML_Tag_Processor( '<style>// there could be more styling to come' ); + * false === $processor->next_tag(); + * + * $processor = new WP_HTML_Tag_Processor( '<style>// this is everything</style><div>' ); + * true === $processor->next_tag( 'DIV' ); + * + * #### Special self-contained elements + * + * Some HTML elements are handled in a special way; their start and end tags + * act like a void tag. These are special because their contents can't contain + * HTML markup. Everything inside these elements is handled in a special way + * and content that _appears_ like HTML tags inside of them isn't. There can + * be no nesting in these elements. + * + * In the following list, "raw text" means that all of the content in the HTML + * until the matching closing tag is treated verbatim without any replacements + * and without any parsing. + * + * - IFRAME allows no content but requires a closing tag. + * - NOEMBED (deprecated) content is raw text. + * - NOFRAMES (deprecated) content is raw text. + * - SCRIPT content is plaintext apart from legacy rules allowing `</script>` inside an HTML comment. + * - STYLE content is raw text. + * - TITLE content is plain text but character references are decoded. + * - TEXTAREA content is plain text but character references are decoded. + * - XMP (deprecated) content is raw text. + * + * ### Modifying HTML attributes for a found tag + * + * Once you've found the start of an opening tag you can modify + * any number of the attributes on that tag. You can set a new + * value for an attribute, remove the entire attribute, or do + * nothing and move on to the next opening tag. + * + * Example: + * + * if ( $tags->next_tag( array( 'class_name' => 'wp-group-block' ) ) ) { + * $tags->set_attribute( 'title', 'This groups the contained content.' ); + * $tags->remove_attribute( 'data-test-id' ); + * } + * + * If `set_attribute()` is called for an existing attribute it will + * overwrite the existing value. Similarly, calling `remove_attribute()` + * for a non-existing attribute has no effect on the document. Both + * of these methods are safe to call without knowing if a given attribute + * exists beforehand. + * + * ### Modifying CSS classes for a found tag + * + * The tag processor treats the `class` attribute as a special case. + * Because it's a common operation to add or remove CSS classes, this + * interface adds helper methods to make that easier. + * + * As with attribute values, adding or removing CSS classes is a safe + * operation that doesn't require checking if the attribute or class + * exists before making changes. If removing the only class then the + * entire `class` attribute will be removed. + * + * Example: + * + * // from `<span>Yippee!</span>` + * // to `<span class="is-active">Yippee!</span>` + * $tags->add_class( 'is-active' ); + * + * // from `<span class="excited">Yippee!</span>` + * // to `<span class="excited is-active">Yippee!</span>` + * $tags->add_class( 'is-active' ); + * + * // from `<span class="is-active heavy-accent">Yippee!</span>` + * // to `<span class="is-active heavy-accent">Yippee!</span>` + * $tags->add_class( 'is-active' ); + * + * // from `<input type="text" class="is-active rugby not-disabled" length="24">` + * // to `<input type="text" class="is-active not-disabled" length="24"> + * $tags->remove_class( 'rugby' ); + * + * // from `<input type="text" class="rugby" length="24">` + * // to `<input type="text" length="24"> + * $tags->remove_class( 'rugby' ); + * + * // from `<input type="text" length="24">` + * // to `<input type="text" length="24"> + * $tags->remove_class( 'rugby' ); + * + * When class changes are enqueued but a direct change to `class` is made via + * `set_attribute` then the changes to `set_attribute` (or `remove_attribute`) + * will take precedence over those made through `add_class` and `remove_class`. + * + * ### Bookmarks + * + * While scanning through the input HTMl document it's possible to set + * a named bookmark when a particular tag is found. Later on, after + * continuing to scan other tags, it's possible to `seek` to one of + * the set bookmarks and then proceed again from that point forward. + * + * Because bookmarks create processing overhead one should avoid + * creating too many of them. As a rule, create only bookmarks + * of known string literal names; avoid creating "mark_{$index}" + * and so on. It's fine from a performance standpoint to create a + * bookmark and update it frequently, such as within a loop. + * + * $total_todos = 0; + * while ( $p->next_tag( array( 'tag_name' => 'UL', 'class_name' => 'todo' ) ) ) { + * $p->set_bookmark( 'list-start' ); + * while ( $p->next_tag( array( 'tag_closers' => 'visit' ) ) ) { + * if ( 'UL' === $p->get_tag() && $p->is_tag_closer() ) { + * $p->set_bookmark( 'list-end' ); + * $p->seek( 'list-start' ); + * $p->set_attribute( 'data-contained-todos', (string) $total_todos ); + * $total_todos = 0; + * $p->seek( 'list-end' ); + * break; + * } + * + * if ( 'LI' === $p->get_tag() && ! $p->is_tag_closer() ) { + * $total_todos++; + * } + * } + * } + * + * ## Tokens and finer-grained processing. + * + * It's possible to scan through every lexical token in the + * HTML document using the `next_token()` function. This + * alternative form takes no argument and provides no built-in + * query syntax. + * + * Example: + * + * $title = '(untitled)'; + * $text = ''; + * while ( $processor->next_token() ) { + * switch ( $processor->get_token_name() ) { + * case '#text': + * $text .= $processor->get_modifiable_text(); + * break; + * + * case 'BR': + * $text .= "\n"; + * break; + * + * case 'TITLE': + * $title = $processor->get_modifiable_text(); + * break; + * } + * } + * return trim( "# {$title}\n\n{$text}" ); + * + * ### Tokens and _modifiable text_. + * + * #### Special "atomic" HTML elements. + * + * Not all HTML elements are able to contain other elements inside of them. + * For instance, the contents inside a TITLE element are plaintext (except + * that character references like & will be decoded). This means that + * if the string `<img>` appears inside a TITLE element, then it's not an + * image tag, but rather it's text describing an image tag. Likewise, the + * contents of a SCRIPT or STYLE element are handled entirely separately in + * a browser than the contents of other elements because they represent a + * different language than HTML. + * + * For these elements the Tag Processor treats the entire sequence as one, + * from the opening tag, including its contents, through its closing tag. + * This means that the it's not possible to match the closing tag for a + * SCRIPT element unless it's unexpected; the Tag Processor already matched + * it when it found the opening tag. + * + * The inner contents of these elements are that element's _modifiable text_. + * + * The special elements are: + * - `SCRIPT` whose contents are treated as raw plaintext but supports a legacy + * style of including JavaScript inside of HTML comments to avoid accidentally + * closing the SCRIPT from inside a JavaScript string. E.g. `console.log( '</script>' )`. + * - `TITLE` and `TEXTAREA` whose contents are treated as plaintext and then any + * character references are decoded. E.g. `1 < 2 < 3` becomes `1 < 2 < 3`. + * - `IFRAME`, `NOSCRIPT`, `NOEMBED`, `NOFRAME`, `STYLE` whose contents are treated as + * raw plaintext and left as-is. E.g. `1 < 2 < 3` remains `1 < 2 < 3`. + * + * #### Other tokens with modifiable text. + * + * There are also non-elements which are void/self-closing in nature and contain + * modifiable text that is part of that individual syntax token itself. + * + * - `#text` nodes, whose entire token _is_ the modifiable text. + * - HTML comments and tokens that become comments due to some syntax error. The + * text for these tokens is the portion of the comment inside of the syntax. + * E.g. for `<!-- comment -->` the text is `" comment "` (note the spaces are included). + * - `CDATA` sections, whose text is the content inside of the section itself. E.g. for + * `<![CDATA[some content]]>` the text is `"some content"` (with restrictions [1]). + * - "Funky comments," which are a special case of invalid closing tags whose name is + * invalid. The text for these nodes is the text that a browser would transform into + * an HTML comment when parsing. E.g. for `</%post_author>` the text is `%post_author`. + * - `DOCTYPE` declarations like `<DOCTYPE html>` which have no closing tag. + * - XML Processing instruction nodes like `<?wp __( "Like" ); ?>` (with restrictions [2]). + * - The empty end tag `</>` which is ignored in the browser and DOM. + * + * [1]: There are no CDATA sections in HTML. When encountering `<![CDATA[`, everything + * until the next `>` becomes a bogus HTML comment, meaning there can be no CDATA + * section in an HTML document containing `>`. The Tag Processor will first find + * all valid and bogus HTML comments, and then if the comment _would_ have been a + * CDATA section _were they to exist_, it will indicate this as the type of comment. + * + * [2]: XML allows a broader range of characters in a processing instruction's target name + * and disallows "xml" as a name, since it's special. The Tag Processor only recognizes + * target names with an ASCII-representable subset of characters. It also exhibits the + * same constraint as with CDATA sections, in that `>` cannot exist within the token + * since Processing Instructions do no exist within HTML and their syntax transforms + * into a bogus comment in the DOM. + * + * ## Design and limitations + * + * The Tag Processor is designed to linearly scan HTML documents and tokenize + * HTML tags and their attributes. It's designed to do this as efficiently as + * possible without compromising parsing integrity. Therefore it will be + * slower than some methods of modifying HTML, such as those incorporating + * over-simplified PCRE patterns, but will not introduce the defects and + * failures that those methods bring in, which lead to broken page renders + * and often to security vulnerabilities. On the other hand, it will be faster + * than full-blown HTML parsers such as DOMDocument and use considerably + * less memory. It requires a negligible memory overhead, enough to consider + * it a zero-overhead system. + * + * The performance characteristics are maintained by avoiding tree construction + * and semantic cleanups which are specified in HTML5. Because of this, for + * example, it's not possible for the Tag Processor to associate any given + * opening tag with its corresponding closing tag, or to return the inner markup + * inside an element. Systems may be built on top of the Tag Processor to do + * this, but the Tag Processor is and should be constrained so it can remain an + * efficient, low-level, and reliable HTML scanner. + * + * The Tag Processor's design incorporates a "garbage-in-garbage-out" philosophy. + * HTML5 specifies that certain invalid content be transformed into different forms + * for display, such as removing null bytes from an input document and replacing + * invalid characters with the Unicode replacement character `U+FFFD` (visually "�"). + * Where errors or transformations exist within the HTML5 specification, the Tag Processor + * leaves those invalid inputs untouched, passing them through to the final browser + * to handle. While this implies that certain operations will be non-spec-compliant, + * such as reading the value of an attribute with invalid content, it also preserves a + * simplicity and efficiency for handling those error cases. + * + * Most operations within the Tag Processor are designed to minimize the difference + * between an input and output document for any given change. For example, the + * `add_class` and `remove_class` methods preserve whitespace and the class ordering + * within the `class` attribute; and when encountering tags with duplicated attributes, + * the Tag Processor will leave those invalid duplicate attributes where they are but + * update the proper attribute which the browser will read for parsing its value. An + * exception to this rule is that all attribute updates store their values as + * double-quoted strings, meaning that attributes on input with single-quoted or + * unquoted values will appear in the output with double-quotes. + * + * ### Scripting Flag + * + * The Tag Processor parses HTML with the "scripting flag" disabled. This means + * that it doesn't run any scripts while parsing the page. In a browser with + * JavaScript enabled, for example, the script can change the parse of the + * document as it loads. On the server, however, evaluating JavaScript is not + * only impractical, but also unwanted. + * + * Practically this means that the Tag Processor will descend into NOSCRIPT + * elements and process its child tags. Were the scripting flag enabled, such + * as in a typical browser, the contents of NOSCRIPT are skipped entirely. + * + * This allows the HTML API to process the content that will be presented in + * a browser when scripting is disabled, but it offers a different view of a + * page than most browser sessions will experience. E.g. the tags inside the + * NOSCRIPT disappear. + * + * ### Text Encoding + * + * The Tag Processor assumes that the input HTML document is encoded with a + * text encoding compatible with 7-bit ASCII's '<', '>', '&', ';', '/', '=', + * "'", '"', 'a' - 'z', 'A' - 'Z', and the whitespace characters ' ', tab, + * carriage-return, newline, and form-feed. + * + * In practice, this includes almost every single-byte encoding as well as + * UTF-8. Notably, however, it does not include UTF-16. If providing input + * that's incompatible, then convert the encoding beforehand. + * + * @since 6.2.0 + * @since 6.2.1 Fix: Support for various invalid comments; attribute updates are case-insensitive. + * @since 6.3.2 Fix: Skip HTML-like content inside rawtext elements such as STYLE. + * @since 6.5.0 Pauses processor when input ends in an incomplete syntax token. + * Introduces "special" elements which act like void elements, e.g. TITLE, STYLE. + * Allows scanning through all tokens and processing modifiable text, where applicable. + */ + class WP_HTML_Tag_Processor + { + /** + * The maximum number of bookmarks allowed to exist at + * any given time. + * + * @since 6.2.0 + * @var int + * + * @see WP_HTML_Tag_Processor::set_bookmark() + */ + const MAX_BOOKMARKS = 10; + /** + * Maximum number of times seek() can be called. + * Prevents accidental infinite loops. + * + * @since 6.2.0 + * @var int + * + * @see WP_HTML_Tag_Processor::seek() + */ + const MAX_SEEK_OPS = 1000; + /** + * The HTML document to parse. + * + * @since 6.2.0 + * @var string + */ + protected $html; + /** + * Specifies mode of operation of the parser at any given time. + * + * | State | Meaning | + * | ----------------|----------------------------------------------------------------------| + * | *Ready* | The parser is ready to run. | + * | *Complete* | There is nothing left to parse. | + * | *Incomplete* | The HTML ended in the middle of a token; nothing more can be parsed. | + * | *Matched tag* | Found an HTML tag; it's possible to modify its attributes. | + * | *Text node* | Found a #text node; this is plaintext and modifiable. | + * | *CDATA node* | Found a CDATA section; this is modifiable. | + * | *Comment* | Found a comment or bogus comment; this is modifiable. | + * | *Presumptuous* | Found an empty tag closer: `</>`. | + * | *Funky comment* | Found a tag closer with an invalid tag name; this is modifiable. | + * + * @since 6.5.0 + * + * @see WP_HTML_Tag_Processor::STATE_READY + * @see WP_HTML_Tag_Processor::STATE_COMPLETE + * @see WP_HTML_Tag_Processor::STATE_INCOMPLETE_INPUT + * @see WP_HTML_Tag_Processor::STATE_MATCHED_TAG + * @see WP_HTML_Tag_Processor::STATE_TEXT_NODE + * @see WP_HTML_Tag_Processor::STATE_CDATA_NODE + * @see WP_HTML_Tag_Processor::STATE_COMMENT + * @see WP_HTML_Tag_Processor::STATE_DOCTYPE + * @see WP_HTML_Tag_Processor::STATE_PRESUMPTUOUS_TAG + * @see WP_HTML_Tag_Processor::STATE_FUNKY_COMMENT + * + * @var string + */ + protected $parser_state = self::STATE_READY; + /** + * Indicates if the document is in quirks mode or no-quirks mode. + * + * Impact on HTML parsing: + * + * - In `NO_QUIRKS_MODE` (also known as "standard mode"): + * - CSS class and ID selectors match byte-for-byte (case-sensitively). + * - A TABLE start tag `<table>` implicitly closes any open `P` element. + * + * - In `QUIRKS_MODE`: + * - CSS class and ID selectors match match in an ASCII case-insensitive manner. + * - A TABLE start tag `<table>` opens a `TABLE` element as a child of a `P` + * element if one is open. + * + * Quirks and no-quirks mode are thus mostly about styling, but have an impact when + * tables are found inside paragraph elements. + * + * @see self::QUIRKS_MODE + * @see self::NO_QUIRKS_MODE + * + * @since 6.7.0 + * + * @var string + */ + protected $compat_mode = self::NO_QUIRKS_MODE; + /** + * What kind of syntax token became an HTML comment. + * + * Since there are many ways in which HTML syntax can create an HTML comment, + * this indicates which of those caused it. This allows the Tag Processor to + * represent more from the original input document than would appear in the DOM. + * + * @since 6.5.0 + * + * @var string|null + */ + protected $comment_type = \null; + /** + * What kind of text the matched text node represents, if it was subdivided. + * + * @see self::TEXT_IS_NULL_SEQUENCE + * @see self::TEXT_IS_WHITESPACE + * @see self::TEXT_IS_GENERIC + * @see self::subdivide_text_appropriately + * + * @since 6.7.0 + * + * @var string + */ + protected $text_node_classification = self::TEXT_IS_GENERIC; + /** + * Tracks a semantic location in the original HTML which + * shifts with updates as they are applied to the document. + * + * @since 6.2.0 + * @var WP_HTML_Span[] + */ + protected $bookmarks = array(); + const ADD_CLASS = \true; + const REMOVE_CLASS = \false; + const SKIP_CLASS = \null; + /** + * Lexical replacements to apply to input HTML document. + * + * "Lexical" in this class refers to the part of this class which + * operates on pure text _as text_ and not as HTML. There's a line + * between the public interface, with HTML-semantic methods like + * `set_attribute` and `add_class`, and an internal state that tracks + * text offsets in the input document. + * + * When higher-level HTML methods are called, those have to transform their + * operations (such as setting an attribute's value) into text diffing + * operations (such as replacing the sub-string from indices A to B with + * some given new string). These text-diffing operations are the lexical + * updates. + * + * As new higher-level methods are added they need to collapse their + * operations into these lower-level lexical updates since that's the + * Tag Processor's internal language of change. Any code which creates + * these lexical updates must ensure that they do not cross HTML syntax + * boundaries, however, so these should never be exposed outside of this + * class or any classes which intentionally expand its functionality. + * + * These are enqueued while editing the document instead of being immediately + * applied to avoid processing overhead, string allocations, and string + * copies when applying many updates to a single document. + * + * Example: + * + * // Replace an attribute stored with a new value, indices + * // sourced from the lazily-parsed HTML recognizer. + * $start = $attributes['src']->start; + * $length = $attributes['src']->length; + * $modifications[] = new WP_HTML_Text_Replacement( $start, $length, $new_value ); + * + * // Correspondingly, something like this will appear in this array. + * $lexical_updates = array( + * WP_HTML_Text_Replacement( 14, 28, 'https://my-site.my-domain/wp-content/uploads/2014/08/kittens.jpg' ) + * ); + * + * @since 6.2.0 + * @var WP_HTML_Text_Replacement[] + */ + protected $lexical_updates = array(); + /** + * Tracks and limits `seek()` calls to prevent accidental infinite loops. + * + * @since 6.2.0 + * @var int + * + * @see WP_HTML_Tag_Processor::seek() + */ + protected $seek_count = 0; + /** + * Constructor. + * + * @since 6.2.0 + * + * @param string $html HTML to process. + */ + public function __construct($html) + { + } + /** + * Switches parsing mode into a new namespace, such as when + * encountering an SVG tag and entering foreign content. + * + * @since 6.7.0 + * + * @param string $new_namespace One of 'html', 'svg', or 'math' indicating into what + * namespace the next tokens will be processed. + * @return bool Whether the namespace was valid and changed. + * @phpstan-param 'html'|'svg'|'math' $new_namespace + */ + public function change_parsing_namespace(string $new_namespace): bool + { + } + /** + * Finds the next tag matching the $query. + * + * @since 6.2.0 + * @since 6.5.0 No longer processes incomplete tokens at end of document; pauses the processor at start of token. + * + * @param array|string|null $query { + * Optional. Which tag name to find, having which class, etc. Default is to find any tag. + * + * @type string|null $tag_name Which tag to find, or `null` for "any tag." + * @type int|null $match_offset Find the Nth tag matching all search criteria. + * 1 for "first" tag, 3 for "third," etc. + * Defaults to first tag. + * @type string|null $class_name Tag must contain this whole class name to match. + * @type string|null $tag_closers "visit" or "skip": whether to stop on tag closers, e.g. </div>. + * } + * @return bool Whether a tag was matched. + * @phpstan-param null|array{ + * tag_name?: string|null, + * match_offset?: int|null, + * class_name?: string|null, + * tag_closers?: string|null, + * } $query + */ + public function next_tag($query = \null): bool + { + } + /** + * Finds the next token in the HTML document. + * + * An HTML document can be viewed as a stream of tokens, + * where tokens are things like HTML tags, HTML comments, + * text nodes, etc. This method finds the next token in + * the HTML document and returns whether it found one. + * + * If it starts parsing a token and reaches the end of the + * document then it will seek to the start of the last + * token and pause, returning `false` to indicate that it + * failed to find a complete token. + * + * Possible token types, based on the HTML specification: + * + * - an HTML tag, whether opening, closing, or void. + * - a text node - the plaintext inside tags. + * - an HTML comment. + * - a DOCTYPE declaration. + * - a processing instruction, e.g. `<?xml version="1.0" ?>`. + * + * The Tag Processor currently only supports the tag token. + * + * @since 6.5.0 + * @since 6.7.0 Recognizes CDATA sections within foreign content. + * + * @return bool Whether a token was parsed. + */ + public function next_token(): bool + { + } + /** + * Whether the processor paused because the input HTML document ended + * in the middle of a syntax element, such as in the middle of a tag. + * + * Example: + * + * $processor = new WP_HTML_Tag_Processor( '<input type="text" value="Th' ); + * false === $processor->get_next_tag(); + * true === $processor->paused_at_incomplete_token(); + * + * @since 6.5.0 + * + * @return bool Whether the parse paused at the start of an incomplete token. + */ + public function paused_at_incomplete_token(): bool + { + } + /** + * Generator for a foreach loop to step through each class name for the matched tag. + * + * This generator function is designed to be used inside a "foreach" loop. + * + * Example: + * + * $p = new WP_HTML_Tag_Processor( "<div class='free <egg<\tlang-en'>" ); + * $p->next_tag(); + * foreach ( $p->class_list() as $class_name ) { + * echo "{$class_name} "; + * } + * // Outputs: "free <egg> lang-en " + * + * @since 6.4.0 + * @phpstan-return void + */ + public function class_list() + { + } + /** + * Returns if a matched tag contains the given ASCII case-insensitive class name. + * + * @since 6.4.0 + * + * @param string $wanted_class Look for this CSS class name, ASCII case-insensitive. + * @return bool|null Whether the matched tag contains the given class name, or null if not matched. + */ + public function has_class($wanted_class): ?bool + { + } + /** + * Sets a bookmark in the HTML document. + * + * Bookmarks represent specific places or tokens in the HTML + * document, such as a tag opener or closer. When applying + * edits to a document, such as setting an attribute, the + * text offsets of that token may shift; the bookmark is + * kept updated with those shifts and remains stable unless + * the entire span of text in which the token sits is removed. + * + * Release bookmarks when they are no longer needed. + * + * Example: + * + * <main><h2>Surprising fact you may not know!</h2></main> + * ^ ^ + * \-|-- this `H2` opener bookmark tracks the token + * + * <main class="clickbait"><h2>Surprising fact you may no… + * ^ ^ + * \-|-- it shifts with edits + * + * Bookmarks provide the ability to seek to a previously-scanned + * place in the HTML document. This avoids the need to re-scan + * the entire document. + * + * Example: + * + * <ul><li>One</li><li>Two</li><li>Three</li></ul> + * ^^^^ + * want to note this last item + * + * $p = new WP_HTML_Tag_Processor( $html ); + * $in_list = false; + * while ( $p->next_tag( array( 'tag_closers' => $in_list ? 'visit' : 'skip' ) ) ) { + * if ( 'UL' === $p->get_tag() ) { + * if ( $p->is_tag_closer() ) { + * $in_list = false; + * $p->set_bookmark( 'resume' ); + * if ( $p->seek( 'last-li' ) ) { + * $p->add_class( 'last-li' ); + * } + * $p->seek( 'resume' ); + * $p->release_bookmark( 'last-li' ); + * $p->release_bookmark( 'resume' ); + * } else { + * $in_list = true; + * } + * } + * + * if ( 'LI' === $p->get_tag() ) { + * $p->set_bookmark( 'last-li' ); + * } + * } + * + * Bookmarks intentionally hide the internal string offsets + * to which they refer. They are maintained internally as + * updates are applied to the HTML document and therefore + * retain their "position" - the location to which they + * originally pointed. The inability to use bookmarks with + * functions like `substr` is therefore intentional to guard + * against accidentally breaking the HTML. + * + * Because bookmarks allocate memory and require processing + * for every applied update, they are limited and require + * a name. They should not be created with programmatically-made + * names, such as "li_{$index}" with some loop. As a general + * rule they should only be created with string-literal names + * like "start-of-section" or "last-paragraph". + * + * Bookmarks are a powerful tool to enable complicated behavior. + * Consider double-checking that you need this tool if you are + * reaching for it, as inappropriate use could lead to broken + * HTML structure or unwanted processing overhead. + * + * @since 6.2.0 + * + * @param string $name Identifies this particular bookmark. + * @return bool Whether the bookmark was successfully created. + */ + public function set_bookmark($name): bool + { + } + /** + * Removes a bookmark that is no longer needed. + * + * Releasing a bookmark frees up the small + * performance overhead it requires. + * + * @param string $name Name of the bookmark to remove. + * @return bool Whether the bookmark already existed before removal. + */ + public function release_bookmark($name): bool + { + } + /** + * Checks whether a bookmark with the given name exists. + * + * @since 6.3.0 + * + * @param string $bookmark_name Name to identify a bookmark that potentially exists. + * @return bool Whether that bookmark exists. + */ + public function has_bookmark($bookmark_name): bool + { + } + /** + * Move the internal cursor in the Tag Processor to a given bookmark's location. + * + * In order to prevent accidental infinite loops, there's a + * maximum limit on the number of times seek() can be called. + * + * @since 6.2.0 + * + * @param string $bookmark_name Jump to the place in the document identified by this bookmark name. + * @return bool Whether the internal cursor was successfully moved to the bookmark's location. + */ + public function seek($bookmark_name): bool + { + } + /** + * Returns the value of a requested attribute from a matched tag opener if that attribute exists. + * + * Example: + * + * $p = new WP_HTML_Tag_Processor( '<div enabled class="test" data-test-id="14">Test</div>' ); + * $p->next_tag( array( 'class_name' => 'test' ) ) === true; + * $p->get_attribute( 'data-test-id' ) === '14'; + * $p->get_attribute( 'enabled' ) === true; + * $p->get_attribute( 'aria-label' ) === null; + * + * $p->next_tag() === false; + * $p->get_attribute( 'class' ) === null; + * + * @since 6.2.0 + * + * @param string $name Name of attribute whose value is requested. + * @return string|true|null Value of attribute or `null` if not available. Boolean attributes return `true`. + */ + public function get_attribute($name) + { + } + /** + * Gets lowercase names of all attributes matching a given prefix in the current tag. + * + * Note that matching is case-insensitive. This is in accordance with the spec: + * + * > There must never be two or more attributes on + * > the same start tag whose names are an ASCII + * > case-insensitive match for each other. + * - HTML 5 spec + * + * Example: + * + * $p = new WP_HTML_Tag_Processor( '<div data-ENABLED class="test" DATA-test-id="14">Test</div>' ); + * $p->next_tag( array( 'class_name' => 'test' ) ) === true; + * $p->get_attribute_names_with_prefix( 'data-' ) === array( 'data-enabled', 'data-test-id' ); + * + * $p->next_tag() === false; + * $p->get_attribute_names_with_prefix( 'data-' ) === null; + * + * @since 6.2.0 + * + * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * + * @param string $prefix Prefix of requested attribute names. + * @return array|null List of attribute names, or `null` when no tag opener is matched. + */ + public function get_attribute_names_with_prefix($prefix): ?array + { + } + /** + * Returns the namespace of the matched token. + * + * @since 6.7.0 + * + * @return string One of 'html', 'math', or 'svg'. + * @phpstan-return 'html'|'math'|'svg' + */ + public function get_namespace(): string + { + } + /** + * Returns the uppercase name of the matched tag. + * + * Example: + * + * $p = new WP_HTML_Tag_Processor( '<div class="test">Test</div>' ); + * $p->next_tag() === true; + * $p->get_tag() === 'DIV'; + * + * $p->next_tag() === false; + * $p->get_tag() === null; + * + * @since 6.2.0 + * + * @return string|null Name of currently matched tag in input HTML, or `null` if none found. + */ + public function get_tag(): ?string + { + } + /** + * Returns the adjusted tag name for a given token, taking into + * account the current parsing context, whether HTML, SVG, or MathML. + * + * @since 6.7.0 + * + * @return string|null Name of current tag name. + */ + public function get_qualified_tag_name(): ?string + { + } + /** + * Returns the adjusted attribute name for a given attribute, taking into + * account the current parsing context, whether HTML, SVG, or MathML. + * + * @since 6.7.0 + * + * @param string $attribute_name Which attribute to adjust. + * + * @return string|null + */ + public function get_qualified_attribute_name($attribute_name): ?string + { + } + /** + * Indicates if the currently matched tag contains the self-closing flag. + * + * No HTML elements ought to have the self-closing flag and for those, the self-closing + * flag will be ignored. For void elements this is benign because they "self close" + * automatically. For non-void HTML elements though problems will appear if someone + * intends to use a self-closing element in place of that element with an empty body. + * For HTML foreign elements and custom elements the self-closing flag determines if + * they self-close or not. + * + * This function does not determine if a tag is self-closing, + * but only if the self-closing flag is present in the syntax. + * + * @since 6.3.0 + * + * @return bool Whether the currently matched tag contains the self-closing flag. + */ + public function has_self_closing_flag(): bool + { + } + /** + * Indicates if the current tag token is a tag closer. + * + * Example: + * + * $p = new WP_HTML_Tag_Processor( '<div></div>' ); + * $p->next_tag( array( 'tag_name' => 'div', 'tag_closers' => 'visit' ) ); + * $p->is_tag_closer() === false; + * + * $p->next_tag( array( 'tag_name' => 'div', 'tag_closers' => 'visit' ) ); + * $p->is_tag_closer() === true; + * + * @since 6.2.0 + * @since 6.7.0 Reports all BR tags as opening tags. + * + * @return bool Whether the current tag is a tag closer. + */ + public function is_tag_closer(): bool + { + } + /** + * Indicates the kind of matched token, if any. + * + * This differs from `get_token_name()` in that it always + * returns a static string indicating the type, whereas + * `get_token_name()` may return values derived from the + * token itself, such as a tag name or processing + * instruction tag. + * + * Possible values: + * - `#tag` when matched on a tag. + * - `#text` when matched on a text node. + * - `#cdata-section` when matched on a CDATA node. + * - `#comment` when matched on a comment. + * - `#doctype` when matched on a DOCTYPE declaration. + * - `#presumptuous-tag` when matched on an empty tag closer. + * - `#funky-comment` when matched on a funky comment. + * + * @since 6.5.0 + * + * @return string|null What kind of token is matched, or null. + */ + public function get_token_type(): ?string + { + } + /** + * Returns the node name represented by the token. + * + * This matches the DOM API value `nodeName`. Some values + * are static, such as `#text` for a text node, while others + * are dynamically generated from the token itself. + * + * Dynamic names: + * - Uppercase tag name for tag matches. + * - `html` for DOCTYPE declarations. + * + * Note that if the Tag Processor is not matched on a token + * then this function will return `null`, either because it + * hasn't yet found a token or because it reached the end + * of the document without matching a token. + * + * @since 6.5.0 + * + * @return string|null Name of the matched token. + */ + public function get_token_name(): ?string + { + } + /** + * Indicates what kind of comment produced the comment node. + * + * Because there are different kinds of HTML syntax which produce + * comments, the Tag Processor tracks and exposes this as a type + * for the comment. Nominally only regular HTML comments exist as + * they are commonly known, but a number of unrelated syntax errors + * also produce comments. + * + * @see self::COMMENT_AS_ABRUPTLY_CLOSED_COMMENT + * @see self::COMMENT_AS_CDATA_LOOKALIKE + * @see self::COMMENT_AS_INVALID_HTML + * @see self::COMMENT_AS_HTML_COMMENT + * @see self::COMMENT_AS_PI_NODE_LOOKALIKE + * + * @since 6.5.0 + * + * @return string|null + */ + public function get_comment_type(): ?string + { + } + /** + * Returns the text of a matched comment or null if not on a comment type node. + * + * This method returns the entire text content of a comment node as it + * would appear in the browser. + * + * This differs from {@see ::get_modifiable_text()} in that certain comment + * types in the HTML API cannot allow their entire comment text content to + * be modified. Namely, "bogus comments" of the form `<?not allowed in html>` + * will create a comment whose text content starts with `?`. Note that if + * that character were modified, it would be possible to change the node + * type. + * + * @since 6.7.0 + * + * @return string|null The comment text as it would appear in the browser or null + * if not on a comment type node. + */ + public function get_full_comment_text(): ?string + { + } + /** + * Subdivides a matched text node, splitting NULL byte sequences and decoded whitespace as + * distinct nodes prefixes. + * + * Note that once anything that's neither a NULL byte nor decoded whitespace is + * encountered, then the remainder of the text node is left intact as generic text. + * + * - The HTML Processor uses this to apply distinct rules for different kinds of text. + * - Inter-element whitespace can be detected and skipped with this method. + * + * Text nodes aren't eagerly subdivided because there's no need to split them unless + * decisions are being made on NULL byte sequences or whitespace-only text. + * + * Example: + * + * $processor = new WP_HTML_Tag_Processor( "\x00Apples & Oranges" ); + * true === $processor->next_token(); // Text is "Apples & Oranges". + * true === $processor->subdivide_text_appropriately(); // Text is "". + * true === $processor->next_token(); // Text is "Apples & Oranges". + * false === $processor->subdivide_text_appropriately(); + * + * $processor = new WP_HTML_Tag_Processor( " \r\n\tMore" ); + * true === $processor->next_token(); // Text is "␤ ␤␉More". + * true === $processor->subdivide_text_appropriately(); // Text is "␤ ␤␉". + * true === $processor->next_token(); // Text is "More". + * false === $processor->subdivide_text_appropriately(); + * + * @since 6.7.0 + * + * @return bool Whether the text node was subdivided. + */ + public function subdivide_text_appropriately(): bool + { + } + /** + * Returns the modifiable text for a matched token, or an empty string. + * + * Modifiable text is text content that may be read and changed without + * changing the HTML structure of the document around it. This includes + * the contents of `#text` nodes in the HTML as well as the inner + * contents of HTML comments, Processing Instructions, and others, even + * though these nodes aren't part of a parsed DOM tree. They also contain + * the contents of SCRIPT and STYLE tags, of TEXTAREA tags, and of any + * other section in an HTML document which cannot contain HTML markup (DATA). + * + * If a token has no modifiable text then an empty string is returned to + * avoid needless crashing or type errors. An empty string does not mean + * that a token has modifiable text, and a token with modifiable text may + * have an empty string (e.g. a comment with no contents). + * + * Limitations: + * + * - This function will not strip the leading newline appropriately + * after seeking into a LISTING or PRE element. To ensure that the + * newline is treated properly, seek to the LISTING or PRE opening + * tag instead of to the first text node inside the element. + * + * @since 6.5.0 + * @since 6.7.0 Replaces NULL bytes (U+0000) and newlines appropriately. + * + * @return string + */ + public function get_modifiable_text(): string + { + } + /** + * Sets the modifiable text for the matched token, if matched. + * + * Modifiable text is text content that may be read and changed without + * changing the HTML structure of the document around it. This includes + * the contents of `#text` nodes in the HTML as well as the inner + * contents of HTML comments, Processing Instructions, and others, even + * though these nodes aren't part of a parsed DOM tree. They also contain + * the contents of SCRIPT and STYLE tags, of TEXTAREA tags, and of any + * other section in an HTML document which cannot contain HTML markup (DATA). + * + * Not all modifiable text may be set by this method, and not all content + * may be set as modifiable text. In the case that this fails it will return + * `false` indicating as much. For instance, it will not allow inserting the + * string `</script` into a SCRIPT element, because the rules for escaping + * that safely are complicated. Similarly, it will not allow setting content + * into a comment which would prematurely terminate the comment. + * + * Example: + * + * // Add a preface to all STYLE contents. + * while ( $processor->next_tag( 'STYLE' ) ) { + * $style = $processor->get_modifiable_text(); + * $processor->set_modifiable_text( "// Made with love on the World Wide Web\n{$style}" ); + * } + * + * // Replace smiley text with Emoji smilies. + * while ( $processor->next_token() ) { + * if ( '#text' !== $processor->get_token_name() ) { + * continue; + * } + * + * $chunk = $processor->get_modifiable_text(); + * if ( ! str_contains( $chunk, ':)' ) ) { + * continue; + * } + * + * $processor->set_modifiable_text( str_replace( ':)', '🙂', $chunk ) ); + * } + * + * This function handles all necessary HTML encoding. Provide normal, unescaped string values. + * The HTML API will encode the strings appropriately so that the browser will interpret them + * as the intended value. + * + * Example: + * + * // Renders as “Eggs & Milk” in a browser, encoded as `<p>Eggs & Milk</p>`. + * $processor->set_modifiable_text( 'Eggs & Milk' ); + * + * // Renders as “Eggs & Milk” in a browser, encoded as `<p>Eggs &amp; Milk</p>`. + * $processor->set_modifiable_text( 'Eggs & Milk' ); + * + * @since 6.7.0 + * @since 6.9.0 Escapes all character references instead of trying to avoid double-escaping. + * + * @param string $plaintext_content New text content to represent in the matched token. + * @return bool Whether the text was able to update. + */ + public function set_modifiable_text(string $plaintext_content): bool + { + } + /** + * Updates or creates a new attribute on the currently matched tag with the passed value. + * + * This function handles all necessary HTML encoding. Provide normal, unescaped string values. + * The HTML API will encode the strings appropriately so that the browser will interpret them + * as the intended value. + * + * Example: + * + * // Renders “Eggs & Milk” in a browser, encoded as `<abbr title="Eggs & Milk">`. + * $processor->set_attribute( 'title', 'Eggs & Milk' ); + * + * // Renders “Eggs & Milk” in a browser, encoded as `<abbr title="Eggs &amp; Milk">`. + * $processor->set_attribute( 'title', 'Eggs & Milk' ); + * + * // Renders `true` as `<abbr title>`. + * $processor->set_attribute( 'title', true ); + * + * // Renders without the attribute for `false` as `<abbr>`. + * $processor->set_attribute( 'title', false ); + * + * Special handling is provided for boolean attribute values: + * - When `true` is passed as the value, then only the attribute name is added to the tag. + * - When `false` is passed, the attribute gets removed if it existed before. + * + * @since 6.2.0 + * @since 6.2.1 Fix: Only create a single update for multiple calls with case-variant attribute names. + * @since 6.9.0 Escapes all character references instead of trying to avoid double-escaping. + * + * @param string $name The attribute name to target. + * @param string|bool $value The new attribute value. + * @return bool Whether an attribute value was set. + */ + public function set_attribute($name, $value): bool + { + } + /** + * Remove an attribute from the currently-matched tag. + * + * @since 6.2.0 + * + * @param string $name The attribute name to remove. + * @return bool Whether an attribute was removed. + */ + public function remove_attribute($name): bool + { + } + /** + * Adds a new class name to the currently matched tag. + * + * @since 6.2.0 + * + * @param string $class_name The class name to add. + * @return bool Whether the class was set to be added. + */ + public function add_class($class_name): bool + { + } + /** + * Removes a class name from the currently matched tag. + * + * @since 6.2.0 + * + * @param string $class_name The class name to remove. + * @return bool Whether the class was set to be removed. + */ + public function remove_class($class_name): bool + { + } + /** + * Returns the string representation of the HTML Tag Processor. + * + * @since 6.2.0 + * + * @see WP_HTML_Tag_Processor::get_updated_html() + * + * @return string The processed HTML. + */ + public function __toString(): string + { + } + /** + * Returns the string representation of the HTML Tag Processor. + * + * @since 6.2.0 + * @since 6.2.1 Shifts the internal cursor corresponding to the applied updates. + * @since 6.4.0 No longer calls subclass method `next_tag()` after updating HTML. + * + * @return string The processed HTML. + */ + public function get_updated_html(): string + { + } + /** + * Gets DOCTYPE declaration info from a DOCTYPE token. + * + * DOCTYPE tokens may appear in many places in an HTML document. In most places, they are + * simply ignored. The main parsing functions find the basic shape of DOCTYPE tokens but + * do not perform detailed parsing. + * + * This method can be called to perform a full parse of the DOCTYPE token and retrieve + * its information. + * + * @return WP_HTML_Doctype_Info|null The DOCTYPE declaration information or `null` if not + * currently at a DOCTYPE node. + */ + public function get_doctype_info(): ?\WP_HTML_Doctype_Info + { + } + /** + * Parser Ready State. + * + * Indicates that the parser is ready to run and waiting for a state transition. + * It may not have started yet, or it may have just finished parsing a token and + * is ready to find the next one. + * + * @since 6.5.0 + * + * @access private + */ + const STATE_READY = 'STATE_READY'; + /** + * Parser Complete State. + * + * Indicates that the parser has reached the end of the document and there is + * nothing left to scan. It finished parsing the last token completely. + * + * @since 6.5.0 + * + * @access private + */ + const STATE_COMPLETE = 'STATE_COMPLETE'; + /** + * Parser Incomplete Input State. + * + * Indicates that the parser has reached the end of the document before finishing + * a token. It started parsing a token but there is a possibility that the input + * HTML document was truncated in the middle of a token. + * + * The parser is reset at the start of the incomplete token and has paused. There + * is nothing more than can be scanned unless provided a more complete document. + * + * @since 6.5.0 + * + * @access private + */ + const STATE_INCOMPLETE_INPUT = 'STATE_INCOMPLETE_INPUT'; + /** + * Parser Matched Tag State. + * + * Indicates that the parser has found an HTML tag and it's possible to get + * the tag name and read or modify its attributes (if it's not a closing tag). + * + * @since 6.5.0 + * + * @access private + */ + const STATE_MATCHED_TAG = 'STATE_MATCHED_TAG'; + /** + * Parser Text Node State. + * + * Indicates that the parser has found a text node and it's possible + * to read and modify that text. + * + * @since 6.5.0 + * + * @access private + */ + const STATE_TEXT_NODE = 'STATE_TEXT_NODE'; + /** + * Parser CDATA Node State. + * + * Indicates that the parser has found a CDATA node and it's possible + * to read and modify its modifiable text. Note that in HTML there are + * no CDATA nodes outside of foreign content (SVG and MathML). Outside + * of foreign content, they are treated as HTML comments. + * + * @since 6.5.0 + * + * @access private + */ + const STATE_CDATA_NODE = 'STATE_CDATA_NODE'; + /** + * Indicates that the parser has found an HTML comment and it's + * possible to read and modify its modifiable text. + * + * @since 6.5.0 + * + * @access private + */ + const STATE_COMMENT = 'STATE_COMMENT'; + /** + * Indicates that the parser has found a DOCTYPE node and it's + * possible to read its DOCTYPE information via `get_doctype_info()`. + * + * @since 6.5.0 + * + * @access private + */ + const STATE_DOCTYPE = 'STATE_DOCTYPE'; + /** + * Indicates that the parser has found an empty tag closer `</>`. + * + * Note that in HTML there are no empty tag closers, and they + * are ignored. Nonetheless, the Tag Processor still + * recognizes them as they appear in the HTML stream. + * + * These were historically discussed as a "presumptuous tag + * closer," which would close the nearest open tag, but were + * dismissed in favor of explicitly-closing tags. + * + * @since 6.5.0 + * + * @access private + */ + const STATE_PRESUMPTUOUS_TAG = 'STATE_PRESUMPTUOUS_TAG'; + /** + * Indicates that the parser has found a "funky comment" + * and it's possible to read and modify its modifiable text. + * + * Example: + * + * </%url> + * </{"wp-bit":"query/post-author"}> + * </2> + * + * Funky comments are tag closers with invalid tag names. Note + * that in HTML these are turn into bogus comments. Nonetheless, + * the Tag Processor recognizes them in a stream of HTML and + * exposes them for inspection and modification. + * + * @since 6.5.0 + * + * @access private + */ + const STATE_FUNKY_COMMENT = 'STATE_WP_FUNKY'; + /** + * Indicates that a comment was created when encountering abruptly-closed HTML comment. + * + * Example: + * + * <!--> + * <!---> + * + * @since 6.5.0 + */ + const COMMENT_AS_ABRUPTLY_CLOSED_COMMENT = 'COMMENT_AS_ABRUPTLY_CLOSED_COMMENT'; + /** + * Indicates that a comment would be parsed as a CDATA node, + * were HTML to allow CDATA nodes outside of foreign content. + * + * Example: + * + * <![CDATA[This is a CDATA node.]]> + * + * This is an HTML comment, but it looks like a CDATA node. + * + * @since 6.5.0 + */ + const COMMENT_AS_CDATA_LOOKALIKE = 'COMMENT_AS_CDATA_LOOKALIKE'; + /** + * Indicates that a comment was created when encountering + * normative HTML comment syntax. + * + * Example: + * + * <!-- this is a comment --> + * + * @since 6.5.0 + */ + const COMMENT_AS_HTML_COMMENT = 'COMMENT_AS_HTML_COMMENT'; + /** + * Indicates that a comment would be parsed as a Processing + * Instruction node, were they to exist within HTML. + * + * Example: + * + * <?wp __( 'Like' ) ?> + * + * This is an HTML comment, but it looks like a CDATA node. + * + * @since 6.5.0 + */ + const COMMENT_AS_PI_NODE_LOOKALIKE = 'COMMENT_AS_PI_NODE_LOOKALIKE'; + /** + * Indicates that a comment was created when encountering invalid + * HTML input, a so-called "bogus comment." + * + * Example: + * + * <?nothing special> + * <!{nothing special}> + * + * @since 6.5.0 + */ + const COMMENT_AS_INVALID_HTML = 'COMMENT_AS_INVALID_HTML'; + /** + * No-quirks mode document compatibility mode. + * + * > In no-quirks mode, the behavior is (hopefully) the desired behavior + * > described by the modern HTML and CSS specifications. + * + * @see self::$compat_mode + * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode + * + * @since 6.7.0 + * + * @var string + */ + const NO_QUIRKS_MODE = 'no-quirks-mode'; + /** + * Quirks mode document compatibility mode. + * + * > In quirks mode, layout emulates behavior in Navigator 4 and Internet + * > Explorer 5. This is essential in order to support websites that were + * > built before the widespread adoption of web standards. + * + * @see self::$compat_mode + * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode + * + * @since 6.7.0 + * + * @var string + */ + const QUIRKS_MODE = 'quirks-mode'; + /** + * Indicates that a span of text may contain any combination of significant + * kinds of characters: NULL bytes, whitespace, and others. + * + * @see self::$text_node_classification + * @see self::subdivide_text_appropriately + * + * @since 6.7.0 + */ + const TEXT_IS_GENERIC = 'TEXT_IS_GENERIC'; + /** + * Indicates that a span of text comprises a sequence only of NULL bytes. + * + * @see self::$text_node_classification + * @see self::subdivide_text_appropriately + * + * @since 6.7.0 + */ + const TEXT_IS_NULL_SEQUENCE = 'TEXT_IS_NULL_SEQUENCE'; + /** + * Indicates that a span of decoded text comprises only whitespace. + * + * @see self::$text_node_classification + * @see self::subdivide_text_appropriately + * + * @since 6.7.0 + */ + const TEXT_IS_WHITESPACE = 'TEXT_IS_WHITESPACE'; + } + /** + * Core class used to safely parse and modify an HTML document. + * + * The HTML Processor class properly parses and modifies HTML5 documents. + * + * It supports a subset of the HTML5 specification, and when it encounters + * unsupported markup, it aborts early to avoid unintentionally breaking + * the document. The HTML Processor should never break an HTML document. + * + * While the `WP_HTML_Tag_Processor` is a valuable tool for modifying + * attributes on individual HTML tags, the HTML Processor is more capable + * and useful for the following operations: + * + * - Querying based on nested HTML structure. + * + * Eventually the HTML Processor will also support: + * - Wrapping a tag in surrounding HTML. + * - Unwrapping a tag by removing its parent. + * - Inserting and removing nodes. + * - Reading and changing inner content. + * - Navigating up or around HTML structure. + * + * ## Usage + * + * Use of this class requires three steps: + * + * 1. Call a static creator method with your input HTML document. + * 2. Find the location in the document you are looking for. + * 3. Request changes to the document at that location. + * + * Example: + * + * $processor = WP_HTML_Processor::create_fragment( $html ); + * if ( $processor->next_tag( array( 'breadcrumbs' => array( 'DIV', 'FIGURE', 'IMG' ) ) ) ) { + * $processor->add_class( 'responsive-image' ); + * } + * + * #### Breadcrumbs + * + * Breadcrumbs represent the stack of open elements from the root + * of the document or fragment down to the currently-matched node, + * if one is currently selected. Call WP_HTML_Processor::get_breadcrumbs() + * to inspect the breadcrumbs for a matched tag. + * + * Breadcrumbs can specify nested HTML structure and are equivalent + * to a CSS selector comprising tag names separated by the child + * combinator, such as "DIV > FIGURE > IMG". + * + * Since all elements find themselves inside a full HTML document + * when parsed, the return value from `get_breadcrumbs()` will always + * contain any implicit outermost elements. For example, when parsing + * with `create_fragment()` in the `BODY` context (the default), any + * tag in the given HTML document will contain `array( 'HTML', 'BODY', … )` + * in its breadcrumbs. + * + * Despite containing the implied outermost elements in their breadcrumbs, + * tags may be found with the shortest-matching breadcrumb query. That is, + * `array( 'IMG' )` matches all IMG elements and `array( 'P', 'IMG' )` + * matches all IMG elements directly inside a P element. To ensure that no + * partial matches erroneously match it's possible to specify in a query + * the full breadcrumb match all the way down from the root HTML element. + * + * Example: + * + * $html = '<figure><img><figcaption>A <em>lovely</em> day outside</figcaption></figure>'; + * // ----- Matches here. + * $processor->next_tag( array( 'breadcrumbs' => array( 'FIGURE', 'IMG' ) ) ); + * + * $html = '<figure><img><figcaption>A <em>lovely</em> day outside</figcaption></figure>'; + * // ---- Matches here. + * $processor->next_tag( array( 'breadcrumbs' => array( 'FIGURE', 'FIGCAPTION', 'EM' ) ) ); + * + * $html = '<div><img></div><img>'; + * // ----- Matches here, because IMG must be a direct child of the implicit BODY. + * $processor->next_tag( array( 'breadcrumbs' => array( 'BODY', 'IMG' ) ) ); + * + * ## HTML Support + * + * This class implements a small part of the HTML5 specification. + * It's designed to operate within its support and abort early whenever + * encountering circumstances it can't properly handle. This is + * the principle way in which this class remains as simple as possible + * without cutting corners and breaking compliance. + * + * ### Supported elements + * + * If any unsupported element appears in the HTML input the HTML Processor + * will abort early and stop all processing. This draconian measure ensures + * that the HTML Processor won't break any HTML it doesn't fully understand. + * + * The HTML Processor supports all elements other than a specific set: + * + * - Any element inside a TABLE. + * - Any element inside foreign content, including SVG and MATH. + * - Any element outside the IN BODY insertion mode, e.g. doctype declarations, meta, links. + * + * ### Supported markup + * + * Some kinds of non-normative HTML involve reconstruction of formatting elements and + * re-parenting of mis-nested elements. For example, a DIV tag found inside a TABLE + * may in fact belong _before_ the table in the DOM. If the HTML Processor encounters + * such a case it will stop processing. + * + * The following list illustrates some common examples of unexpected HTML inputs that + * the HTML Processor properly parses and represents: + * + * - HTML with optional tags omitted, e.g. `<p>one<p>two`. + * - HTML with unexpected tag closers, e.g. `<p>one </span> more</p>`. + * - Non-void tags with self-closing flag, e.g. `<div/>the DIV is still open.</div>`. + * - Heading elements which close open heading elements of another level, e.g. `<h1>Closed by </h2>`. + * - Elements containing text that looks like other tags but isn't, e.g. `<title>The <img> is plaintext`. + * - SCRIPT and STYLE tags containing text that looks like HTML but isn't, e.g. ``. + * - SCRIPT content which has been escaped, e.g. ``. + * + * ### Unsupported Features + * + * This parser does not report parse errors. + * + * Normally, when additional HTML or BODY tags are encountered in a document, if there + * are any additional attributes on them that aren't found on the previous elements, + * the existing HTML and BODY elements adopt those missing attribute values. This + * parser does not add those additional attributes. + * + * In certain situations, elements are moved to a different part of the document in + * a process called "adoption" and "fostering." Because the nodes move to a location + * in the document that the parser had already processed, this parser does not support + * these situations and will bail. + * + * @since 6.4.0 + * + * @see WP_HTML_Tag_Processor + * @see https://html.spec.whatwg.org/ + */ + class WP_HTML_Processor extends \WP_HTML_Tag_Processor + { + /** + * The maximum number of bookmarks allowed to exist at any given time. + * + * HTML processing requires more bookmarks than basic tag processing, + * so this class constant from the Tag Processor is overwritten. + * + * @since 6.4.0 + * + * @var int + */ + const MAX_BOOKMARKS = 100; + /** + * Creates an HTML processor in the fragment parsing mode. + * + * Use this for cases where you are processing chunks of HTML that + * will be found within a bigger HTML document, such as rendered + * block output that exists within a post, `the_content` inside a + * rendered site layout. + * + * Fragment parsing occurs within a context, which is an HTML element + * that the document will eventually be placed in. It becomes important + * when special elements have different rules than others, such as inside + * a TEXTAREA or a TITLE tag where things that look like tags are text, + * or inside a SCRIPT tag where things that look like HTML syntax are JS. + * + * The context value should be a representation of the tag into which the + * HTML is found. For most cases this will be the body element. The HTML + * form is provided because a context element may have attributes that + * impact the parse, such as with a SCRIPT tag and its `type` attribute. + * + * ## Current HTML Support + * + * - The only supported context is ``, which is the default value. + * - The only supported document encoding is `UTF-8`, which is the default value. + * + * @since 6.4.0 + * @since 6.6.0 Returns `static` instead of `self` so it can create subclass instances. + * + * @param string $html Input HTML fragment to process. + * @param string $context Context element for the fragment, must be default of ``. + * @param string $encoding Text encoding of the document; must be default of 'UTF-8'. + * @return static|null The created processor if successful, otherwise null. + */ + public static function create_fragment($html, $context = '', $encoding = 'UTF-8') + { + } + /** + * Creates an HTML processor in the full parsing mode. + * + * It's likely that a fragment parser is more appropriate, unless sending an + * entire HTML document from start to finish. Consider a fragment parser with + * a context node of ``. + * + * UTF-8 is the only allowed encoding. If working with a document that + * isn't UTF-8, first convert the document to UTF-8, then pass in the + * converted HTML. + * + * @param string $html Input HTML document to process. + * @param string|null $known_definite_encoding Optional. If provided, specifies the charset used + * in the input byte stream. Currently must be UTF-8. + * @return static|null The created processor if successful, otherwise null. + */ + public static function create_full_parser($html, $known_definite_encoding = 'UTF-8') + { + } + /** + * Constructor. + * + * Do not use this method. Use the static creator methods instead. + * + * @access private + * + * @since 6.4.0 + * + * @see WP_HTML_Processor::create_fragment() + * + * @param string $html HTML to process. + * @param string|null $use_the_static_create_methods_instead This constructor should not be called manually. + */ + public function __construct($html, $use_the_static_create_methods_instead = \null) + { + } + /** + * Returns the last error, if any. + * + * Various situations lead to parsing failure but this class will + * return `false` in all those cases. To determine why something + * failed it's possible to request the last error. This can be + * helpful to know to distinguish whether a given tag couldn't + * be found or if content in the document caused the processor + * to give up and abort processing. + * + * Example + * + * $processor = WP_HTML_Processor::create_fragment( '