From 3f9414cdecc8baa728bc4fc24afc3f4d313f7a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Thu, 27 Jul 2023 17:09:19 +0000 Subject: [PATCH 1/2] Fix typos --- lang/tribe-common.pot | 8 ++++---- readme.txt | 4 ++-- src/Tribe/Admin/Help_Page.php | 2 +- src/Tribe/Admin/Helpers.php | 2 +- src/Tribe/Admin/Live_Date_Preview.php | 2 +- src/Tribe/Admin/Notices.php | 2 +- src/Tribe/Admin/Troubleshooting.php | 2 +- src/Tribe/Cache.php | 2 +- src/Tribe/Context.php | 2 +- src/Tribe/Cost_Utils.php | 6 +++--- src/Tribe/DB_Lock.php | 2 +- src/Tribe/Date_Utils.php | 2 +- src/Tribe/Debug_Bar/Panels/Context.php | 2 +- .../Swagger/Cost_Details_Definition_Provider.php | 2 +- .../Swagger/Date_Details_Definition_Provider.php | 2 +- .../Swagger/Image_Definition_Provider.php | 2 +- .../Swagger/Image_Size_Definition_Provider.php | 2 +- .../Documentation/Swagger/Provider_Interface.php | 2 +- .../Swagger/Term_Definition_Provider.php | 2 +- src/Tribe/Duplicate/Strategy/Like.php | 2 +- src/Tribe/Duplicate/Strategy/Same.php | 2 +- .../Editor/Compatibility/Classic_Editor.php | 2 +- src/Tribe/Editor/Meta.php | 2 +- src/Tribe/Editor/Utils.php | 2 +- src/Tribe/Extension_Loader.php | 2 +- src/Tribe/JSON_LD/Abstract.php | 4 ++-- src/Tribe/Log/Admin.php | 2 +- src/Tribe/Log/File_Logger.php | 4 ++-- src/Tribe/Log/Logger.php | 6 +++--- src/Tribe/Log/Null_Logger.php | 6 +++--- src/Tribe/Log/README.md | 4 ++-- src/Tribe/Meta/Chunker.php | 2 +- src/Tribe/PUE/Checker.php | 6 +++--- src/Tribe/Process/Handler.php | 2 +- src/Tribe/Process/Queue.php | 2 +- src/Tribe/Promise.php | 2 +- src/Tribe/REST/Headers/Base_Interface.php | 2 +- src/Tribe/Repository/Usage_Error.php | 2 +- src/Tribe/Simple_Table.php | 2 +- src/Tribe/Tabbed_View.php | 6 +++--- src/Tribe/Terms.php | 2 +- src/Tribe/Timezones.php | 2 +- src/Tribe/Tracker.php | 2 +- src/Tribe/Utils/Body_Classes.php | 2 +- src/Tribe/Utils/Color.php | 2 +- src/Tribe/Utils/Compatibility_Classes.php | 2 +- src/Tribe/Utils/Post_Root_Pool.php | 2 +- src/Tribe/Validate.php | 6 +++--- src/Tribe/View_Helpers.php | 4 ++-- src/Tribe/Widget/Widget_Abstract.php | 2 +- src/admin-views/tabbed-view/tabbed-view.php | 2 +- src/deprecated/Tribe__Freemius.php | 8 ++++---- src/functions/template-tags/date.php | 12 ++++++------ src/functions/url.php | 2 +- src/modules/utils/__tests__/dom.test.js | 2 +- src/modules/utils/dom.js | 2 +- src/modules/utils/time.js | 16 ++++++++-------- src/resources/js/admin-image-field.js | 2 +- src/resources/js/admin-log-controls.js | 2 +- src/resources/js/admin/url-fragment-scroll.js | 2 +- src/resources/js/validation.js | 2 +- src/resources/postcss/README.md | 6 +++--- tests/_support/Helper/TECDb.php | 2 +- .../_support/ea-server-mocker/src/functions.php | 2 +- tests/integration/Tribe/PUE/Checker_Test.php | 2 +- tests/integration/Updater_Test.php | 6 +++--- tests/muwpunit/Tribe/PUE/CheckerTest.php | 14 +++++++------- .../Tribe/PUE/Replacement_Key_Checker_Test.php | 2 +- .../Integration/Integration_AbstractTests.php | 2 +- tests/wpunit/Tribe/CacheTest.php | 4 ++-- tests/wpunit/Tribe/ContextTest.php | 10 +++++----- .../Tribe/Duplicate/Strategy_FactoryTest.php | 4 ++-- tests/wpunit/Tribe/PUE/Package_HandlerTest.php | 4 ++-- tests/wpunit/Tribe/Repository/ReadTest.php | 2 +- tests/wpunit/Tribe/Tabbed_ViewTest.php | 2 +- tests/wpunit/Tribe/Utils/ArrayTest.php | 4 ++-- .../Tribe/Utils/Coordinates_ProviderTest.php | 2 +- tests/wpunit/Tribe/Utils/Post_CollectionTest.php | 4 ++-- 78 files changed, 132 insertions(+), 132 deletions(-) diff --git a/lang/tribe-common.pot b/lang/tribe-common.pot index b2053bbae3..352dfc03f4 100644 --- a/lang/tribe-common.pot +++ b/lang/tribe-common.pot @@ -1350,7 +1350,7 @@ msgid "Plugin(s) are out of date" msgstr "" #: src/Tribe/Admin/Troubleshooting.php:322 -msgid "It's important to use the most recent versions of our plugins so that you have access to the latest features, bug fixes, and security updates. Plugin functionality can be comprimised if your site is running outdated or mis-matched versions." +msgid "It's important to use the most recent versions of our plugins so that you have access to the latest features, bug fixes, and security updates. Plugin functionality can be compromised if your site is running outdated or mismatched versions." msgstr "" #: src/Tribe/Admin/Troubleshooting.php:324 @@ -3765,11 +3765,11 @@ msgid "Field ID:" msgstr "" #: src/Tribe/Validate.php:104 -msgid "Non-existant field validation function passed" +msgid "Non-existent field validation function passed" msgstr "" #: src/Tribe/Validate.php:105 -msgctxt "non-existant function name passed for field validation" +msgctxt "non-existent function name passed for field validation" msgid "with function name:" msgstr "" @@ -3783,7 +3783,7 @@ msgid "%s must contain numbers, letters and dots only" msgstr "" #: src/Tribe/Validate.php:160 -msgid "%s must contain numbers, letters, dashes and undescores only" +msgid "%s must contain numbers, letters, dashes and underscores only" msgstr "" #: src/Tribe/Validate.php:174 diff --git a/readme.txt b/readme.txt index fdaf37a52a..eef771e3ec 100644 --- a/readme.txt +++ b/readme.txt @@ -349,7 +349,7 @@ * Feature - Add new custom Customizer controls - Number, Range Slider, Toggle. [TEC-3897] * Tweak - Added a `tribe_post_id` filter to `post_id_helper` in the Main class. * Tweak - Alter Customizer and Section objects to be more versatile. [TCMN-104] -* Tweak - Split pcss variable imports so we only import hte necessary variables for skeleton, and don't import more than once. [TCMN-104] +* Tweak - Split pcss variable imports so we only import the necessary variables for skeleton, and don't import more than once. [TCMN-104] * Tweak - added new `get_hex_with_hash` function to Tribe/Utils/Color.php to reduce need for manual string concatenation. [TCMN-104] * Language - 0 new strings added, 50 updated, 1 fuzzied, and 0 obsoleted @@ -460,7 +460,7 @@ = [4.12.15] 2020-12-15 = * Tweak - Add the `tribe_customizer_print_styles_action` to allow filtering the action the Customizer will use to print inline styles. [TEC-3686] -* Tweak - Allow disabling and enabling logging functionality by calling hte `tribe( 'log' )->disable()` and `tribe( 'log' )->enable()` methods on the Log service provider. +* Tweak - Allow disabling and enabling logging functionality by calling the `tribe( 'log' )->disable()` and `tribe( 'log' )->enable()` methods on the Log service provider. * Tweak - Update di52 containers to latest version for compatibility with WPStaging Pro. [TCMN-136] * Language - 0 new strings added, 9 updated, 1 fuzzied, and 0 obsoleted diff --git a/src/Tribe/Admin/Help_Page.php b/src/Tribe/Admin/Help_Page.php index b854f999a2..439d2d27ea 100644 --- a/src/Tribe/Admin/Help_Page.php +++ b/src/Tribe/Admin/Help_Page.php @@ -477,7 +477,7 @@ private function get_plugin_api_data( $plugin = null ) { ] ); if ( ! is_wp_error( $data ) ) { - // Format Downloaded Infomation + // Format Downloaded Information $data->downloaded = $data->downloaded ? number_format( $data->downloaded ) : _x( 'n/a', 'not available', 'tribe-common' ); } else { // If there was a bug on the Current Request just leave diff --git a/src/Tribe/Admin/Helpers.php b/src/Tribe/Admin/Helpers.php index 7f1d832b29..914171413b 100644 --- a/src/Tribe/Admin/Helpers.php +++ b/src/Tribe/Admin/Helpers.php @@ -41,7 +41,7 @@ public function is_wp_screen() { /** * Filter `tribe_admin_is_wp_screen` - * Allows fo filter if we're on a WP_Screen + * Allows to filter if we're on a WP_Screen * * @since 4.9.5 * @param bool null bypass if we want to return a bool of is_wp_scren diff --git a/src/Tribe/Admin/Live_Date_Preview.php b/src/Tribe/Admin/Live_Date_Preview.php index 9b53e99bc9..60bbf41dae 100644 --- a/src/Tribe/Admin/Live_Date_Preview.php +++ b/src/Tribe/Admin/Live_Date_Preview.php @@ -1,6 +1,6 @@ Settings > Display admin screen. + * Facilitates live date previews in the Events > Settings > Display admin screen. */ class Tribe__Admin__Live_Date_Preview { protected $target_fields = [ diff --git a/src/Tribe/Admin/Notices.php b/src/Tribe/Admin/Notices.php index f1a2965b42..9ff56e702e 100644 --- a/src/Tribe/Admin/Notices.php +++ b/src/Tribe/Admin/Notices.php @@ -386,7 +386,7 @@ public function has_user_dismissed( $slug, $user_id = null ) { * * @return boolean */ - public function has_user_dimissed( $slug, $user_id = null ) { + public function has_user_dismissed( $slug, $user_id = null ) { return $this->has_user_dismissed( $slug, $user_id ); } diff --git a/src/Tribe/Admin/Troubleshooting.php b/src/Tribe/Admin/Troubleshooting.php index 27c1d25273..78c9ab8f56 100644 --- a/src/Tribe/Admin/Troubleshooting.php +++ b/src/Tribe/Admin/Troubleshooting.php @@ -319,7 +319,7 @@ public function get_issues_found() { ], [ 'title' => __( 'Plugin(s) are out of date', 'tribe-common' ), - 'description' => __( 'It\'s important to use the most recent versions of our plugins so that you have access to the latest features, bug fixes, and security updates. Plugin functionality can be comprimised if your site is running outdated or mis-matched versions.', 'tribe-common' ), + 'description' => __( 'It\'s important to use the most recent versions of our plugins so that you have access to the latest features, bug fixes, and security updates. Plugin functionality can be compromised if your site is running outdated or mismatched versions.', 'tribe-common' ), 'more_info' => 'https://evnt.is/1aqy', 'resolve_text' => __( 'Check for updates', 'tribe-common' ), 'fix' => '/wp-admin/update-core.php', diff --git a/src/Tribe/Cache.php b/src/Tribe/Cache.php index 3dbf9e83fa..94d658416d 100755 --- a/src/Tribe/Cache.php +++ b/src/Tribe/Cache.php @@ -550,7 +550,7 @@ public function data_size_over_packet_size( $value ) { } /** - * Returns a transient that might have been stored, due ot its size, in chunks. + * Returns a transient that might have been stored, due to its size, in chunks. * * @since 4.13.3 * diff --git a/src/Tribe/Context.php b/src/Tribe/Context.php index 04f753a20e..321986317b 100644 --- a/src/Tribe/Context.php +++ b/src/Tribe/Context.php @@ -131,7 +131,7 @@ class Tribe__Context { const WP_PARSED = 'wp_parsed'; /** - * The key to locate a context value among the values in the query mached by `WP::parse_request`. + * The key to locate a context value among the values in the query matched by `WP::parse_request`. * * @since 4.9.11 */ diff --git a/src/Tribe/Cost_Utils.php b/src/Tribe/Cost_Utils.php index 42a112a19f..e771fbd0bb 100644 --- a/src/Tribe/Cost_Utils.php +++ b/src/Tribe/Cost_Utils.php @@ -48,7 +48,7 @@ public function is_valid_cost( $cost, $allow_negative = true ) { } /** - * Returns the regular expression that shold be used to identify a valid + * Returns the regular expression that should be used to identify a valid * cost string. * * @return string @@ -188,11 +188,11 @@ public function merge_cost_ranges( $original_string_cost, $merging_cost, $with_c $matches[0] ); - $numeric_orignal_costs = empty( $matches[0] ) ? $matches[0] : array_map( + $numeric_original_costs = empty( $matches[0] ) ? $matches[0] : array_map( 'floatval', $matches[0] ); - $all_numeric_costs = array_filter( array_merge( $numeric_merging_cost_costs, $numeric_orignal_costs ) ); + $all_numeric_costs = array_filter( array_merge( $numeric_merging_cost_costs, $numeric_original_costs ) ); $cost_min = $cost_max = false; $merging_mins = array_intersect( $sorted_mins, (array) $merging_cost ); diff --git a/src/Tribe/DB_Lock.php b/src/Tribe/DB_Lock.php index cb9e1955b3..547c46a710 100644 --- a/src/Tribe/DB_Lock.php +++ b/src/Tribe/DB_Lock.php @@ -1,6 +1,6 @@ type ) ); /** - * Allows the event data to be modifed by themes and other plugins. + * Allows the event data to be modified by themes and other plugins. * * @example tribe_json_ld_thing_object * @example tribe_json_ld_event_object @@ -160,7 +160,7 @@ public function get_markup( $post = null, $args = [] ) { } /** - * Allows the event data to be modifed by themes and other plugins. + * Allows the event data to be modified by themes and other plugins. * * @example tribe_json_ld_thing_data * @example tribe_json_ld_event_data diff --git a/src/Tribe/Log/Admin.php b/src/Tribe/Log/Admin.php index c5aa2472df..dbb4e7b394 100644 --- a/src/Tribe/Log/Admin.php +++ b/src/Tribe/Log/Admin.php @@ -120,7 +120,7 @@ public function register_script() { } /** - * Checks wether the assets should be enqueued. + * Checks whether the assets should be enqueued. * * @since 4.15.0 * diff --git a/src/Tribe/Log/File_Logger.php b/src/Tribe/Log/File_Logger.php index ef69a7f38e..bec885da21 100644 --- a/src/Tribe/Log/File_Logger.php +++ b/src/Tribe/Log/File_Logger.php @@ -138,7 +138,7 @@ public function is_available() { } /** - * Responsible for commiting the entry to the log. + * Responsible for committing the entry to the log. * * @param string $entry * @param string $type @@ -197,7 +197,7 @@ public function retrieve( $limit = 0, array $args = [] ) { /** * Returns a list of currently accessible logs (current first, oldest last). - * Each is refered to by date. + * Each is referred to by date. * * Example: * diff --git a/src/Tribe/Log/Logger.php b/src/Tribe/Log/Logger.php index 0ffeb09371..32c5fe4334 100644 --- a/src/Tribe/Log/Logger.php +++ b/src/Tribe/Log/Logger.php @@ -18,7 +18,7 @@ public function is_available(); public function get_name(); /** - * Responsible for commiting the entry to the log (but only if the debug level + * Responsible for committing the entry to the log (but only if the debug level * is appropriate). * * @param string $entry @@ -32,8 +32,8 @@ public function log( $entry, $type = Tribe__Log::DEBUG, $src = '' ); * order. If $limit is a negative or zero value, there is no limit. * * Implementation-specific arguments can optionally be provided as a second - * parameter. This may include support for a 'log' param where an identifer - * obtained via the list_availalbe_logs() method is passed in order to query + * parameter. This may include support for a 'log' param where an identifier + * obtained via the list_available_logs() method is passed in order to query * a specific archived log. * * @see Tribe__Log__Logger::list_available_logs() diff --git a/src/Tribe/Log/Null_Logger.php b/src/Tribe/Log/Null_Logger.php index 953215731d..3c9f78a5ad 100644 --- a/src/Tribe/Log/Null_Logger.php +++ b/src/Tribe/Log/Null_Logger.php @@ -27,7 +27,7 @@ public function get_name() { } /** - * Responsible for commiting the entry to the log (but only if the debug level + * Responsible for committing the entry to the log (but only if the debug level * is appropriate). * * @param string $entry @@ -43,8 +43,8 @@ public function log( $entry, $type = Tribe__Log::DEBUG, $src = '' ) { * order. If $limit is a negative or zero value, there is no limit. * * Implementation-specific arguments can optionally be provided as a second - * parameter. This may include support for a 'log' param where an identifer - * obtained via the list_availalbe_logs() method is passed in order to query + * parameter. This may include support for a 'log' param where an identifier + * obtained via the list_available_logs() method is passed in order to query * a specific archived log. * * @see Tribe__Log__Logger::list_available_logs() diff --git a/src/Tribe/Log/README.md b/src/Tribe/Log/README.md index 63209b157c..c5cc2406c3 100644 --- a/src/Tribe/Log/README.md +++ b/src/Tribe/Log/README.md @@ -1,7 +1,7 @@ # Monolog-based logging We've introduced a [Monolog based](https://github.com/Seldaek/monolog) logger in our common libraries. -You can find more information about all the possibilities this opens [on the library documentaion](https://seldaek.github.io/monolog/), but this document will serve as an introduction to the essentials of its day to day use. +You can find more information about all the possibilities this opens [on the library documentation](https://seldaek.github.io/monolog/), but this document will serve as an introduction to the essentials of its day to day use. ## When should I log? @@ -35,7 +35,7 @@ The Monolog-based logger will handle logging coming from the legacy logger only add_filter( 'tribe_log_use_action_logger', '__return_true' ); ``` -Once this is in your code any call to the legacy logger wil be redirected to the new one. +Once this is in your code any call to the legacy logger will be redirected to the new one. ## Using the logger diff --git a/src/Tribe/Meta/Chunker.php b/src/Tribe/Meta/Chunker.php index f24018d649..a15f2f85e1 100644 --- a/src/Tribe/Meta/Chunker.php +++ b/src/Tribe/Meta/Chunker.php @@ -71,7 +71,7 @@ class Tribe__Meta__Chunker { protected $filter_priority = - 1; /** - * @var string The meta key prefix applied ot any Chunker related post meta. + * @var string The meta key prefix applied to any Chunker related post meta. */ protected $meta_key_prefix = '_tribe_chunker_'; diff --git a/src/Tribe/PUE/Checker.php b/src/Tribe/PUE/Checker.php index 6c29d5ec30..f74628a51a 100755 --- a/src/Tribe/PUE/Checker.php +++ b/src/Tribe/PUE/Checker.php @@ -281,7 +281,7 @@ public function set_key_status_transient( $valid ) { /** * Install the hooks required to run periodic update checks and inject update info * into WP data structures. - * Also other hooks related to the automatic updates (such as checking agains API and what not (@from Darren) + * Also other hooks related to the automatic updates (such as checking against API and what not (@from Darren) */ public function hooks() { // Override requests for plugin information @@ -634,7 +634,7 @@ public function do_license_key_fields( $fields ) { 'parent_option' => false, 'network_option' => false, ]; - } elseif ( $this->should_show_overrideable_license() ) { + } elseif ( $this->should_show_overridable_license() ) { $to_insert[ $this->pue_install_key . '-state' ] = [ 'type' => 'html', 'label' => sprintf( esc_attr__( 'License Key Status:', 'tribe-common' ) ), @@ -1859,7 +1859,7 @@ public function should_show_subsite_editable_license() { * * @return bool */ - public function should_show_overrideable_license() { + public function should_show_overridable_license() { if ( is_network_admin() ) { return false; } diff --git a/src/Tribe/Process/Handler.php b/src/Tribe/Process/Handler.php index ccad1f6801..051d974098 100644 --- a/src/Tribe/Process/Handler.php +++ b/src/Tribe/Process/Handler.php @@ -278,7 +278,7 @@ protected function get_query_args() { } /** - * Returns the URL that wil be used to post the request. + * Returns the URL that will be used to post the request. * * @since 4.9.5 Pulled from the `WP_Async_Request` class. * diff --git a/src/Tribe/Process/Queue.php b/src/Tribe/Process/Queue.php index b1dc37fcc8..58c410e504 100644 --- a/src/Tribe/Process/Queue.php +++ b/src/Tribe/Process/Queue.php @@ -300,7 +300,7 @@ public static function delete_queue( $key ) { } /** - * Upates the queue and meta data for the process. + * Updates the queue and meta data for the process. * * @since 4.7.12 * @since 4.9.5 Pulled method from the `WP_Background_Process` class. diff --git a/src/Tribe/Promise.php b/src/Tribe/Promise.php index d3c1dc4b07..98fb2f8344 100644 --- a/src/Tribe/Promise.php +++ b/src/Tribe/Promise.php @@ -141,7 +141,7 @@ public function dispatch() { } /** - * A custom error handler to log any error tha might happen while invoking a promise + * A custom error handler to log any error that might happen while invoking a promise * callback. * * @since 4.9.5 diff --git a/src/Tribe/REST/Headers/Base_Interface.php b/src/Tribe/REST/Headers/Base_Interface.php index 4cf32f0adc..1ff6bd7422 100644 --- a/src/Tribe/REST/Headers/Base_Interface.php +++ b/src/Tribe/REST/Headers/Base_Interface.php @@ -40,7 +40,7 @@ public function get_rest_url(); /** * Returns the header the REST API will print on the page head to report its origin - * url. Normaly the home_url() + * url. Normally the home_url() * * @return string diff --git a/src/Tribe/Repository/Usage_Error.php b/src/Tribe/Repository/Usage_Error.php index e21682344a..5cf05ef6af 100644 --- a/src/Tribe/Repository/Usage_Error.php +++ b/src/Tribe/Repository/Usage_Error.php @@ -90,7 +90,7 @@ public static function because_this_field_cannot_be_updated( $key, $object ) { * * @return Tribe__Repository__Usage_Error A ready to throw instance of the class. */ - public static function because_udpate_key_should_be_a_string( $object ) { + public static function because_update_key_should_be_a_string( $object ) { return self::because_update_key_should_be_a_string( $object ); } diff --git a/src/Tribe/Simple_Table.php b/src/Tribe/Simple_Table.php index 4c3e2ec08c..16a16f7a6b 100644 --- a/src/Tribe/Simple_Table.php +++ b/src/Tribe/Simple_Table.php @@ -35,7 +35,7 @@ class Tribe__Simple_Table { /** * Tribe__Simple_Table constructor. * - * @param array $tbody Multidimension array containing table rows/columns + * @param array $tbody Multidimensional array containing table rows/columns * @param array $thead Single dimension array containing table headings */ public function __construct( $tbody, $thead = [] ) { diff --git a/src/Tribe/Tabbed_View.php b/src/Tribe/Tabbed_View.php index 38e7aa7fe5..d9ef912e60 100644 --- a/src/Tribe/Tabbed_View.php +++ b/src/Tribe/Tabbed_View.php @@ -98,7 +98,7 @@ public function set_label( $label ) { * * @return Tribe__Tabbed_View__Tab[] An array of all the active and visible tabs. */ - public function get_visibles() { + public function get_visible() { return array_filter( $this->get(), [ $this, 'is_tab_visible' ] ); } @@ -317,8 +317,8 @@ protected function get_new_tab_instance( $tab_class ) { * @return string */ public function render() { - $visibles = $this->get_visibles(); - if ( empty( $visibles ) ) { + $visible = $this->get_visible(); + if ( empty( $visible ) ) { return ''; } diff --git a/src/Tribe/Terms.php b/src/Tribe/Terms.php index 7810dd9fb3..d3495b867e 100644 --- a/src/Tribe/Terms.php +++ b/src/Tribe/Terms.php @@ -9,7 +9,7 @@ class Tribe__Terms { * * @param array|string $terms An array or comma separated list of term `term_id` or `slug` or a single `term_id` or `slug`. * @param string $taxonomy - * @param bool $create_missing Whether terms that could not be found by `term_id` or `slug` should be creater or not. + * @param bool $create_missing Whether terms that could not be found by `term_id` or `slug` should be creator or not. * * @return array An array containing the `term_id`s of the created terms. */ diff --git a/src/Tribe/Timezones.php b/src/Tribe/Timezones.php index 2edd8f3d69..5c3e12c451 100644 --- a/src/Tribe/Timezones.php +++ b/src/Tribe/Timezones.php @@ -325,7 +325,7 @@ public static function to_tz( $datetime, $tzstring ) { * * @param string $format The format the date shouuld be formatted to. * @param string|int $date The date UNIX timestamp or `strtotime` parseable string. - * @param string $timezone An optional timezone string identifying the timezone the date shoudl be localized + * @param string $timezone An optional timezone string identifying the timezone the date should be localized * to; defaults to the WordPress installation timezone (if available) or to the system * timezone. * diff --git a/src/Tribe/Tracker.php b/src/Tribe/Tracker.php index 20e5413917..d21d1cf32e 100644 --- a/src/Tribe/Tracker.php +++ b/src/Tribe/Tracker.php @@ -122,7 +122,7 @@ public function get_post_types() { } /** - * Easy way to see currenlty which meta values are been tracked by our code + * Easy way to see currently which meta values are been tracked by our code * * @return array */ diff --git a/src/Tribe/Utils/Body_Classes.php b/src/Tribe/Utils/Body_Classes.php index 7f8da5d376..01844e49ff 100644 --- a/src/Tribe/Utils/Body_Classes.php +++ b/src/Tribe/Utils/Body_Classes.php @@ -77,7 +77,7 @@ static function( $v ) { /** * Checks if a class is in the queue, - * wether it's going to be added or not. + * whether it's going to be added or not. * * @since 4.12.6 * diff --git a/src/Tribe/Utils/Color.php b/src/Tribe/Utils/Color.php index 2e8e34aafb..4a8efa3fd3 100644 --- a/src/Tribe/Utils/Color.php +++ b/src/Tribe/Utils/Color.php @@ -544,7 +544,7 @@ public static function get_contrast_color( $hex_color, $light_color = '#ffffff', * @since 5.0.10 * * @param string $hex_color Hex value of color. - * @param string $compare_color Hax value of comparing color. + * @param string $compare_color Hex value of comparing color. * * @return int */ diff --git a/src/Tribe/Utils/Compatibility_Classes.php b/src/Tribe/Utils/Compatibility_Classes.php index 972c0112c1..b11db56faf 100644 --- a/src/Tribe/Utils/Compatibility_Classes.php +++ b/src/Tribe/Utils/Compatibility_Classes.php @@ -77,7 +77,7 @@ static function( $v ) { /** * Checks if a class is in the queue, - * wether it's going to be added or not. + * whether it's going to be added or not. * * @since 4.14.0 * diff --git a/src/Tribe/Utils/Post_Root_Pool.php b/src/Tribe/Utils/Post_Root_Pool.php index de1b920ab4..574c579f51 100644 --- a/src/Tribe/Utils/Post_Root_Pool.php +++ b/src/Tribe/Utils/Post_Root_Pool.php @@ -38,7 +38,7 @@ class Tribe__Utils__Post_Root_Pool { public function generate_unique_root( WP_Post $post ) { $post_name = $post->post_name; - // A lot fo these get urlencoded, so let's try to fix that first + // A lot of these get urlencoded, so let's try to fix that first $post_name = tribe_maybe_urldecode( $post_name ); $this->current_post = $post; diff --git a/src/Tribe/Validate.php b/src/Tribe/Validate.php index 8f187daaf4..b90a21ceb0 100755 --- a/src/Tribe/Validate.php +++ b/src/Tribe/Validate.php @@ -101,8 +101,8 @@ public function __construct( $field_id, $field, $value, $additional_args = [] ) } else { // invalid validation type set, validation fails $this->result->valid = false; - $this->result->error = esc_html__( 'Non-existant field validation function passed', 'tribe-common' ); - $this->result->error .= ( isset( $this->field['id'] ) ) ? ' (' . esc_html__( 'Field ID:', 'tribe-common' ) . ' ' . $this->field['id'] . ' ' . _x( 'with function name:', 'non-existant function name passed for field validation', 'tribe-common' ) . ' ' . $this->field['validation_type'] . ' )' : ''; + $this->result->error = esc_html__( 'Non-existent field validation function passed', 'tribe-common' ); + $this->result->error .= ( isset( $this->field['id'] ) ) ? ' (' . esc_html__( 'Field ID:', 'tribe-common' ) . ' ' . $this->field['id'] . ' ' . _x( 'with function name:', 'non-existent function name passed for field validation', 'tribe-common' ) . ' ' . $this->field['validation_type'] . ' )' : ''; } } } @@ -157,7 +157,7 @@ public function alpha_numeric_with_dashes_and_underscores() { $this->result->valid = true; } else { $this->result->valid = false; - $this->result->error = sprintf( esc_html__( '%s must contain numbers, letters, dashes and undescores only', 'tribe-common' ), $this->label ); + $this->result->error = sprintf( esc_html__( '%s must contain numbers, letters, dashes and underscores only', 'tribe-common' ), $this->label ); } } diff --git a/src/Tribe/View_Helpers.php b/src/Tribe/View_Helpers.php index 0ee74d06e8..ab80c54656 100755 --- a/src/Tribe/View_Helpers.php +++ b/src/Tribe/View_Helpers.php @@ -81,7 +81,7 @@ public static function constructCountries( $postId = '', $useDefault = true ) { } /** - * Get the i18ned states available to the plugin. + * Get the i18n-d states available to the plugin. * * @return array The states array. */ @@ -272,7 +272,7 @@ private static function minutes( $exact_minute = 0 ) { } /** - * Builds a set of options for diplaying a meridian chooser + * Builds a set of options for displaying a meridian chooser * * @param string $date YYYY-MM-DD HH:MM:SS to select (optional) * @param bool $isStart diff --git a/src/Tribe/Widget/Widget_Abstract.php b/src/Tribe/Widget/Widget_Abstract.php index 89c4cd7ae4..1995edd69f 100644 --- a/src/Tribe/Widget/Widget_Abstract.php +++ b/src/Tribe/Widget/Widget_Abstract.php @@ -438,7 +438,7 @@ public function filter_admin_fields( $admin_fields ) { /** * Applies a filter to a widget's admin fields based on the widget slug of the widget. * - * @since TBE + * @since 4.12.14 * * @param array $admin_fields The array of widget admin fields. * @param static $instance The widget instance we are dealing with. diff --git a/src/admin-views/tabbed-view/tabbed-view.php b/src/admin-views/tabbed-view/tabbed-view.php index a9da9f17f5..c923357b00 100644 --- a/src/admin-views/tabbed-view/tabbed-view.php +++ b/src/admin-views/tabbed-view/tabbed-view.php @@ -6,7 +6,7 @@ */ /** @var Tribe__Tabbed_View__Tab[] $tabs */ -$tabs = $view->get_visibles(); +$tabs = $view->get_visible(); ?> 1 ) : ?> diff --git a/src/deprecated/Tribe__Freemius.php b/src/deprecated/Tribe__Freemius.php index b948655339..0477f7d32c 100644 --- a/src/deprecated/Tribe__Freemius.php +++ b/src/deprecated/Tribe__Freemius.php @@ -5,14 +5,14 @@ * Class Tribe__Freemius * * @since 4.9.5 - * @depecated 5.1.0 + * @deprecated 5.1.0 */ class Tribe__Freemius { /** * Store all instances of Freemius that we would use * * @since 4.9.5 - * @depecated 5.1.0 + * @deprecated 5.1.0 * * @var array */ @@ -24,7 +24,7 @@ class Tribe__Freemius { * Freemius class should only be loaded once since it will be registered as a Singleton. * * @since 4.9.5 - * @depecated 5.1.0 + * @deprecated 5.1.0 */ public function __construct() { require_once Tribe__Main::instance()->plugin_path . 'vendor/freemius/start.php'; @@ -34,7 +34,7 @@ public function __construct() { * Initialize the Fremius instance using their methods * * @since 4.9.5 - * @depecated 5.1.0 + * @deprecated 5.1.0 * * @param string $slug Slug of the plugin * @param string $id ID in Freemius diff --git a/src/functions/template-tags/date.php b/src/functions/template-tags/date.php index d68562da95..fe6b7769e4 100755 --- a/src/functions/template-tags/date.php +++ b/src/functions/template-tags/date.php @@ -24,7 +24,7 @@ * * @param string $date String representing the datetime, assumed to be UTC (relevant if timezone conversion is used) * @param bool $display_time If true shows date and time, if false only shows date - * @param string $date_format Allows date and time formating using standard php syntax (http://php.net/manual/en/function.date.php) + * @param string $date_format Allows date and time formatting using standard php syntax (http://php.net/manual/en/function.date.php) * * @return string */ @@ -107,7 +107,7 @@ function tribe_beginning_of_day( $date = null, $format = 'Y-m-d H:i:s' ) { * @category Events * * @param string $date The date to find the end of the day, defaults to today - * @param string $format Allows date and time formating using standard php syntax (http://php.net/manual/en/function.date.php) + * @param string $format Allows date and time formatting using standard php syntax (http://php.net/manual/en/function.date.php) * * @return string */ @@ -168,7 +168,7 @@ function tribe_get_datetime_separator( $default = ' @ ', $esc = false ) { * @category Events * * @param int $event (optional) - * @param string $date_format Allows date and time formating using standard php syntax (http://php.net/manual/en/function.date.php) + * @param string $date_format Allows date and time formatting using standard php syntax (http://php.net/manual/en/function.date.php) * @param string $timezone Timezone in which to present the date/time (or default behaviour if not set) * * @return string|null Time @@ -219,7 +219,7 @@ function tribe_get_start_time( $event = null, $date_format = '', $timezone = nul * @category Events * * @param int $event (optional) - * @param string $date_format Allows date and time formating using standard php syntax (http://php.net/manual/en/function.date.php) + * @param string $date_format Allows date and time formatting using standard php syntax (http://php.net/manual/en/function.date.php) * @param string $timezone Timezone in which to present the date/time (or default behaviour if not set) * * @return string|null Time @@ -273,7 +273,7 @@ function tribe_get_end_time( $event = null, $date_format = '', $timezone = null * * @param int $event (optional) * @param bool $display_time If true shows date and time, if false only shows date - * @param string $date_format Allows date and time formating using standard php syntax (http://php.net/manual/en/function.date.php) + * @param string $date_format Allows date and time formatting using standard php syntax (http://php.net/manual/en/function.date.php) * @param string $timezone Deprecated. Timezone in which to present the date/time (or default behaviour if not set) * * @return string|null Date @@ -335,7 +335,7 @@ function tribe_get_start_date( $event = null, $display_time = true, $date_format * * @param int $event (optional) * @param bool $display_time If true shows date and time, if false only shows date - * @param string $date_format Allows date and time formating using standard php syntax (http://php.net/manual/en/function.date.php) + * @param string $date_format Allows date and time formatting using standard php syntax (http://php.net/manual/en/function.date.php) * @param string $timezone Deprecated. Timezone in which to present the date/time (or default behaviour if not set) * * @return string|null Date diff --git a/src/functions/url.php b/src/functions/url.php index fdcfc7e3e8..734197ab6f 100644 --- a/src/functions/url.php +++ b/src/functions/url.php @@ -84,7 +84,7 @@ function tribe_build_url( $url, $parts = [], $flags = HTTP_URL_REPLACE, &$new_ur $flags |= HTTP_URL_STRIP_USER | HTTP_URL_STRIP_PASS; } - // Schema and host are alwasy replaced + // Schema and host are always replaced foreach ( [ 'scheme', 'host' ] as $part ) { if ( isset( $parts[ $part ] ) ) { $url[ $part ] = $parts[ $part ]; diff --git a/src/modules/utils/__tests__/dom.test.js b/src/modules/utils/__tests__/dom.test.js index d4aabd7387..3e7dfd62c6 100644 --- a/src/modules/utils/__tests__/dom.test.js +++ b/src/modules/utils/__tests__/dom.test.js @@ -23,7 +23,7 @@ describe( 'Tests for dom.js', () => { expect( hasClass( window.document.body, [ 'eight' ] ) ).toBe( false ); } ); - it( 'Should return true whe the dom element has any of the classes', () => { + it( 'Should return true when the dom element has any of the classes', () => { expect( hasClass( window.document.body, [ 'one', 'two' ] ) ).toBe( true ); expect( hasClass( window.document.body, [ 'two', 'one' ] ) ).toBe( true ); expect( hasClass( window.document.body, [ 'four', 'two' ] ) ).toBe( true ); diff --git a/src/modules/utils/dom.js b/src/modules/utils/dom.js index 9633bdacf1..cd0700e20e 100644 --- a/src/modules/utils/dom.js +++ b/src/modules/utils/dom.js @@ -33,7 +33,7 @@ export const isRootNode = ( node ) => node === window.top.document; * * @param {(HTMLElement|object)} node - The DOM node where the search starts * @param {Function} callback - Is executed on every iteration, it should return a boolean - * @returns {boolean} Returns tre if the callback returns true with any of the parents. + * @returns {boolean} Returns tree if the callback returns true with any of the parents. */ export const searchParent = ( node = {}, callback = noop ) => { let found = false; diff --git a/src/modules/utils/time.js b/src/modules/utils/time.js index 7532335f43..a314402097 100644 --- a/src/modules/utils/time.js +++ b/src/modules/utils/time.js @@ -46,12 +46,12 @@ export const formatTime = ( time, format ) => { showHr = true; break; case TIME_FORMAT_HH_MM_SS: - showMs = ! ! time.miliseconds; + showMs = ! ! time.milliseconds; showSc = true; showHr = true; break; case TIME_FORMAT_HH_MM: - showMs = ! ! time.miliseconds; + showMs = ! ! time.milliseconds; showSc = showMs || ! ! time.seconds; showHr = true; break; @@ -61,7 +61,7 @@ export const formatTime = ( time, format ) => { showHr = ! ! time.hours; break; case TIME_FORMAT_MM_SS: - showMs = ! ! time.miliseconds; + showMs = ! ! time.milliseconds; showSc = true; showHr = ! ! time.hours; break; @@ -73,7 +73,7 @@ export const formatTime = ( time, format ) => { const hh = zeroFill( 2, time.hours ); const mm = zeroFill( 2, time.minutes ); const ss = zeroFill( 2, time.seconds ); - const sss = zeroFill( 3, time.miliseconds ); + const sss = zeroFill( 3, time.milliseconds ); let formattedTime = time.negative ? '-' : ''; formattedTime += showHr ? `${ hh }:` : ''; @@ -118,7 +118,7 @@ export const toMilliseconds = ( time, format = TIME_FORMAT_MM_SS ) => { const hours = result[ 2 ] | 0; const minutes = result[ 3 ] | 0; const seconds = result[ 4 ] | 0; - const miliseconds = Math.floor( 1000 * result[ 5 ] | 0 ); + const milliseconds = Math.floor( 1000 * result[ 5 ] | 0 ); if ( minutes >= 60 || seconds >= 60 ) { /* eslint-disable-next-line max-len */ @@ -129,7 +129,7 @@ export const toMilliseconds = ( time, format = TIME_FORMAT_MM_SS ) => { hours * HOUR_IN_MS + minutes * MINUTE_IN_MS + seconds * SECOND_IN_MS + - miliseconds + milliseconds ); }; @@ -152,14 +152,14 @@ export const fromMilliseconds = ( ms, format = TIME_FORMAT_MM_SS ) => { const hours = Math.floor( absMs / HOUR_IN_MS ); const minutes = Math.floor( absMs % HOUR_IN_MS / MINUTE_IN_MS ); const seconds = Math.floor( absMs % MINUTE_IN_MS / SECOND_IN_MS ); - const miliseconds = Math.floor( absMs % SECOND_IN_MS ); + const milliseconds = Math.floor( absMs % SECOND_IN_MS ); return formatTime( { negative, hours, minutes, seconds, - miliseconds, + milliseconds, }, format ); }; diff --git a/src/resources/js/admin-image-field.js b/src/resources/js/admin-image-field.js index 3a7c80872e..e6b02758e2 100644 --- a/src/resources/js/admin-image-field.js +++ b/src/resources/js/admin-image-field.js @@ -19,7 +19,7 @@ tribe.settings.fields = tribe.settings.fields || {}; tribe.settings.fields.image = {}; /** - * Intializes the image field for settings. + * Initializes the image field for settings. * * @since 5.0.0 * diff --git a/src/resources/js/admin-log-controls.js b/src/resources/js/admin-log-controls.js index 4308031f10..fee5efff5d 100644 --- a/src/resources/js/admin-log-controls.js +++ b/src/resources/js/admin-log-controls.js @@ -140,7 +140,7 @@ var tribe_logger_data = tribe_logger_data || {}; } /** - * Check if a change in controls constituting a change of view has occured. + * Check if a change in controls constituting a change of view has occurred. * * This could be because the user changed logging engine or because they picked * a different log to peruse; a change in logging level on the other hand does diff --git a/src/resources/js/admin/url-fragment-scroll.js b/src/resources/js/admin/url-fragment-scroll.js index 4058273ed9..58d53a5a6b 100644 --- a/src/resources/js/admin/url-fragment-scroll.js +++ b/src/resources/js/admin/url-fragment-scroll.js @@ -44,7 +44,7 @@ tribe.urlFragmentScroll = tribe.urlFragmentScroll || {}; } /** - * Will atempt to navigate to a given Fragment based on a URL. + * Will attempt to navigate to a given Fragment based on a URL. * * @since 4.9.12 * diff --git a/src/resources/js/validation.js b/src/resources/js/validation.js index 46b608c769..d3bcc5474d 100644 --- a/src/resources/js/validation.js +++ b/src/resources/js/validation.js @@ -174,7 +174,7 @@ tribe.validation = {}; /** * Parses the Condition for all the types of conditional and returns a - * better state of Value and Contraint based on the rules for each + * better state of Value and Constraint based on the rules for each * * @since 4.7 * diff --git a/src/resources/postcss/README.md b/src/resources/postcss/README.md index ae24ae2e15..677d4b4721 100644 --- a/src/resources/postcss/README.md +++ b/src/resources/postcss/README.md @@ -67,7 +67,7 @@ Given the above structure of using a wrapper class, we've increased the [CSS spe In this case, the label is an element of the toggle. However, the `--vertical` modifier is applied to the top level block. Given this structure, our minimum specificity becomes 3 classes. -For overriding styles, it is recommended to only use classes to keep overriding specificity consistent. All elements should have classes and should be targetted using those classes. +For overriding styles, it is recommended to only use classes to keep overriding specificity consistent. All elements should have classes and should be targeted using those classes. ## Modifiers, pseudo-classes, and container query classes @@ -255,11 +255,11 @@ Common theme overrides, mainly in base and components, are applied to the bottom You want to contribute to these styles? Great! There are a couple things to consider when making changes: 1. These styles are the base layer to a number of The Events Calendar plugins. Make changes with care. -2. Consider whether these styles may be reuseable or not. If they are good candidates for a component for more than one plugin, then it's probably a good idea to put them into these styles. +2. Consider whether these styles may be reusable or not. If they are good candidates for a component for more than one plugin, then it's probably a good idea to put them into these styles. ### Additions -Additions are generally safe, as long as the selectors do not conflict with existing selectors. Confirm that the styles you are adding are reuseable and are a consistent part of the design system before adding. +Additions are generally safe, as long as the selectors do not conflict with existing selectors. Confirm that the styles you are adding are reusable and are a consistent part of the design system before adding. ### Alterations diff --git a/tests/_support/Helper/TECDb.php b/tests/_support/Helper/TECDb.php index 5d48961625..037ce0b2b9 100644 --- a/tests/_support/Helper/TECDb.php +++ b/tests/_support/Helper/TECDb.php @@ -191,7 +191,7 @@ public function haveManyEventsInDatabase( $count, array $overrides = [], $time_s * Notable arguments: * `when` - by default events will happen in 24hrs; set this to a different hour offset * to have them happen at a different time in the format `+4 hours` - * `duration` - by defautl events will last for 2hrs; set this to a different duration + * `duration` - by default events will last for 2hrs; set this to a different duration * in seconds if required. * `utc_offset` - by default events will happen on UTC time; set this to a different hour * offset if required. diff --git a/tests/_support/ea-server-mocker/src/functions.php b/tests/_support/ea-server-mocker/src/functions.php index 495262815e..ca289655b7 100644 --- a/tests/_support/ea-server-mocker/src/functions.php +++ b/tests/_support/ea-server-mocker/src/functions.php @@ -26,7 +26,7 @@ function set_object_state( array $properties ) { if ( ! function_exists( 'template' ) ) { /** - * An Handlebars dumb clone to replace occurences of double fenced instances of a word in a template. + * An Handlebars dumb clone to replace occurrences of double fenced instances of a word in a template. * * @param array|object|string $template * @param array $data diff --git a/tests/integration/Tribe/PUE/Checker_Test.php b/tests/integration/Tribe/PUE/Checker_Test.php index e8aab9789a..e9715fe0e3 100644 --- a/tests/integration/Tribe/PUE/Checker_Test.php +++ b/tests/integration/Tribe/PUE/Checker_Test.php @@ -104,7 +104,7 @@ public function should_update_license_key_if_replacement_key_provided_and_key_pr $this->assertEquals( $replacement_key, $pue_instance->get_key() ); } - public function test_replacemnt_key_update_in_multisite_context(): void { + public function test_replacement_key_update_in_multisite_context(): void { } } diff --git a/tests/integration/Updater_Test.php b/tests/integration/Updater_Test.php index 72bcaecf54..3c4aca8677 100644 --- a/tests/integration/Updater_Test.php +++ b/tests/integration/Updater_Test.php @@ -85,9 +85,9 @@ public function test_get_constant_update_callbacks() { $current_version = Tribe__Main::VERSION; $updater = new Tribe__Updater( $current_version ); - $contant_updates = $updater->get_constant_update_callbacks(); - foreach ( $contant_updates as $contant_update_callable ) { - $this->assertTrue( is_callable( $contant_update_callable ), 'checking constant update function is callable' ); + $contsant_updates = $updater->get_constant_update_callbacks(); + foreach ( $constant_updates as $constant_update_callable ) { + $this->assertTrue( is_callable( $constant_update_callable ), 'checking constant update function is callable' ); } } diff --git a/tests/muwpunit/Tribe/PUE/CheckerTest.php b/tests/muwpunit/Tribe/PUE/CheckerTest.php index 25e0dd7359..1e4a97af12 100644 --- a/tests/muwpunit/Tribe/PUE/CheckerTest.php +++ b/tests/muwpunit/Tribe/PUE/CheckerTest.php @@ -209,7 +209,7 @@ public function it_should_show_network_editable_license_to_network_admin_in_netw $sut = $this->make_instance(); $this->assertFalse( $sut->should_show_subsite_editable_license() ); - $this->assertFalse( $sut->should_show_overrideable_license() ); + $this->assertFalse( $sut->should_show_overridable_license() ); $this->assertTrue( $sut->should_show_network_editable_license() ); } @@ -228,7 +228,7 @@ public function it_should_show_locally_editable_license_to_network_admin_in_subs $sut = $this->make_instance(); $this->assertTrue( $sut->should_show_subsite_editable_license() ); - $this->assertFalse( $sut->should_show_overrideable_license() ); + $this->assertFalse( $sut->should_show_overridable_license() ); $this->assertFalse( $sut->should_show_network_editable_license() ); } @@ -247,7 +247,7 @@ public function it_should_show_non_editable_network_license_to_subsite_amin_in_s $sut = $this->make_instance(); $this->assertFalse( $sut->should_show_subsite_editable_license() ); - $this->assertTrue( $sut->should_show_overrideable_license() ); + $this->assertTrue( $sut->should_show_overridable_license() ); $this->assertFalse( $sut->should_show_network_editable_license() ); } @@ -265,7 +265,7 @@ public function it_should_show_locally_editable_license_to_network_admin_in_main $sut = $this->make_instance(); $this->assertTrue( $sut->should_show_subsite_editable_license() ); - $this->assertFalse( $sut->should_show_overrideable_license() ); + $this->assertFalse( $sut->should_show_overridable_license() ); $this->assertFalse( $sut->should_show_network_editable_license() ); } @@ -284,7 +284,7 @@ public function it_should_show_locally_editable_license_to_network_admin_on_subs $sut = $this->make_instance(); $this->assertTrue( $sut->should_show_subsite_editable_license() ); - $this->assertFalse( $sut->should_show_overrideable_license() ); + $this->assertFalse( $sut->should_show_overridable_license() ); $this->assertFalse( $sut->should_show_network_editable_license() ); } @@ -303,7 +303,7 @@ public function it_should_show_locally_editable_license_to_subsite_admin_on_subs $sut = $this->make_instance(); $this->assertTrue( $sut->should_show_subsite_editable_license() ); - $this->assertFalse( $sut->should_show_overrideable_license() ); + $this->assertFalse( $sut->should_show_overridable_license() ); $this->assertFalse( $sut->should_show_network_editable_license() ); } @@ -323,7 +323,7 @@ public function it_should_show_locally_editable_license_to_main_site_admin_on_ma $sut = $this->make_instance(); $this->assertTrue( $sut->should_show_subsite_editable_license() ); - $this->assertFalse( $sut->should_show_overrideable_license() ); + $this->assertFalse( $sut->should_show_overridable_license() ); $this->assertFalse( $sut->should_show_network_editable_license() ); } diff --git a/tests/muwpunit/Tribe/PUE/Replacement_Key_Checker_Test.php b/tests/muwpunit/Tribe/PUE/Replacement_Key_Checker_Test.php index 941919e182..583cdcbbc5 100644 --- a/tests/muwpunit/Tribe/PUE/Replacement_Key_Checker_Test.php +++ b/tests/muwpunit/Tribe/PUE/Replacement_Key_Checker_Test.php @@ -117,7 +117,7 @@ public function should_update_local_license_key_if_replacement_key_provided_and_ } /** - * It should set not previosly set network key to validated key when replacement key not provided + * It should set not previously set network key to validated key when replacement key not provided * * @test */ diff --git a/tests/wpunit/Common/Integration/Integration_AbstractTests.php b/tests/wpunit/Common/Integration/Integration_AbstractTests.php index 801799cf0d..28b72736ad 100644 --- a/tests/wpunit/Common/Integration/Integration_AbstractTests.php +++ b/tests/wpunit/Common/Integration/Integration_AbstractTests.php @@ -61,7 +61,7 @@ public function get_integration_instances() { * @test * @dataProvider get_integration_instances */ - public function integrations_should_load_as_inteded( $integration, $type, $slug, $parent, $was_loaded ) { + public function integrations_should_load_as_intended( $integration, $type, $slug, $parent, $was_loaded ) { $this->assertEquals( $integration->get_type(), $type, 'Integration type does not match' ); $this->assertEquals( $integration->get_slug(), $slug, 'Integration slug does not match' ); $this->assertEquals( $integration->get_parent(), $parent, 'Integration parent does not match' ); diff --git a/tests/wpunit/Tribe/CacheTest.php b/tests/wpunit/Tribe/CacheTest.php index b705c7cf2b..475531ad41 100644 --- a/tests/wpunit/Tribe/CacheTest.php +++ b/tests/wpunit/Tribe/CacheTest.php @@ -590,9 +590,9 @@ public function should_return_the_chunks_from_the_cache_correctly_when_the_cache $cache = $this->make_instance(); - $this->assertTrue( $cache->set_chunkable_transient( '__test___retrival__from__cache', $value, DAY_IN_SECONDS, [ 'save_post' ] ) ); + $this->assertTrue( $cache->set_chunkable_transient( '__test___retrieval__from__cache', $value, DAY_IN_SECONDS, [ 'save_post' ] ) ); // The value from the cache should be the same that was stored. - $this->assertSame( $value, $cache->get_chunkable_transient( '__test___retrival__from__cache', [ 'save_post' ] ) ); + $this->assertSame( $value, $cache->get_chunkable_transient( '__test___retrieval__from__cache', [ 'save_post' ] ) ); } } diff --git a/tests/wpunit/Tribe/ContextTest.php b/tests/wpunit/Tribe/ContextTest.php index f2c1336c2e..c6813fa02b 100644 --- a/tests/wpunit/Tribe/ContextTest.php +++ b/tests/wpunit/Tribe/ContextTest.php @@ -304,11 +304,11 @@ public function should_allow_reading_a_value_from_a_transient() { } /** - * It should allow reading a value from a contstant + * It should allow reading a value from a constant * * @test */ - public function should_allow_reading_a_value_from_a_contstant() { + public function should_allow_reading_a_value_from_a_constant() { define( '__KEY__', '__value__' ); $original_context = tribe_context(); @@ -1541,7 +1541,7 @@ public function test_translate_sub_locations($values,$expected) { * * @test */ - public function should_allow_getting_a_value_calling_a_fucntion_on_a_location_value() { + public function should_allow_getting_a_value_calling_a_function_on_a_location_value() { $context = (new Context)->add_locations( [ 'test_location' => [ 'read' => [ @@ -1566,11 +1566,11 @@ static function ( $val ) { } /** - * It should allow safe seting of values + * It should allow safe setting of values * * @test */ - public function should_allow_safe_seting_of_values() { + public function should_allow_safe_setting_of_values() { $context = (new Context)->add_locations( [ 'test_location' => [ 'read' => [ diff --git a/tests/wpunit/Tribe/Duplicate/Strategy_FactoryTest.php b/tests/wpunit/Tribe/Duplicate/Strategy_FactoryTest.php index 064c0c2a50..12217699a4 100644 --- a/tests/wpunit/Tribe/Duplicate/Strategy_FactoryTest.php +++ b/tests/wpunit/Tribe/Duplicate/Strategy_FactoryTest.php @@ -91,11 +91,11 @@ public function it_should_use_the_first_strategy_as_default_strategy_if_map_does } /** - * It should return false when trying to build with empy map + * It should return false when trying to build with empty map * * @test */ - public function it_should_return_false_when_trying_to_build_with_empy_map() { + public function it_should_return_false_when_trying_to_build_with_empty_map() { $sut = $this->make_instance(); $sut->set_strategy_map( [] ); diff --git a/tests/wpunit/Tribe/PUE/Package_HandlerTest.php b/tests/wpunit/Tribe/PUE/Package_HandlerTest.php index 3d8436926b..cff0bc34e6 100644 --- a/tests/wpunit/Tribe/PUE/Package_HandlerTest.php +++ b/tests/wpunit/Tribe/PUE/Package_HandlerTest.php @@ -181,8 +181,8 @@ public function it_should_move_the_file_and_return_a_shorter_named_version_of_it $filtered = $sut->filter_upgrader_pre_download( false, $package, $upgrader ); $expected_dir = dirname( $real_temp_file_name ); - $expected_file_exension = pathinfo( $real_temp_file_name, PATHINFO_EXTENSION ); - $expected_file_basename = substr( md5( $real_temp_file_name ), 0, 5 ) . '.' . $expected_file_exension; + $expected_file_extension = pathinfo( $real_temp_file_name, PATHINFO_EXTENSION ); + $expected_file_basename = substr( md5( $real_temp_file_name ), 0, 5 ) . '.' . $expected_file_extension; $expected_filename = $expected_dir . '/' . $expected_file_basename; $this->assertEquals( $expected_filename, $destination_file ); $this->assertEquals( $destination_file, $filtered ); diff --git a/tests/wpunit/Tribe/Repository/ReadTest.php b/tests/wpunit/Tribe/Repository/ReadTest.php index a820ae4e1d..acc4361213 100644 --- a/tests/wpunit/Tribe/Repository/ReadTest.php +++ b/tests/wpunit/Tribe/Repository/ReadTest.php @@ -833,7 +833,7 @@ public function should_return_null_when_getting_a_post_by_primary_key_and_it_doe * * @test */ - public function should_not_take_permissions_into_account_when_reding_posts_by_primary_key() { + public function should_not_take_permissions_into_account_when_reading_posts_by_primary_key() { $ids = $this->factory()->post->create_many( 3, [ 'post_type' => 'book' ] ); $repository = $this->repository(); diff --git a/tests/wpunit/Tribe/Tabbed_ViewTest.php b/tests/wpunit/Tribe/Tabbed_ViewTest.php index 2ddd6605de..0a9068035b 100644 --- a/tests/wpunit/Tribe/Tabbed_ViewTest.php +++ b/tests/wpunit/Tribe/Tabbed_ViewTest.php @@ -318,7 +318,7 @@ public function it_should_allow_fetching_visible_tabs_only() { $sut->register( $three->reveal() ); $sut->register( $four->reveal() ); - $tabs = $sut->get_visibles(); + $tabs = $sut->get_visible(); $this->assertCount( 3, $tabs ); } diff --git a/tests/wpunit/Tribe/Utils/ArrayTest.php b/tests/wpunit/Tribe/Utils/ArrayTest.php index 7e91859a10..3dbc86e827 100644 --- a/tests/wpunit/Tribe/Utils/ArrayTest.php +++ b/tests/wpunit/Tribe/Utils/ArrayTest.php @@ -173,7 +173,7 @@ public function test_parse_associative_array_alias( $original, $alias_map, $expe $this->assertEquals( $expected, \Tribe__Utils__Array::parse_associative_array_alias( $original, $alias_map ) ); } - public function key_fitering_data_provider() { + public function key_filtering_data_provider() { return [ 'empty array' => [ 'input' => [], @@ -235,7 +235,7 @@ public function key_fitering_data_provider() { } /** - * @dataProvider key_fitering_data_provider + * @dataProvider key_filtering_data_provider */ public function test_key_filtering( $input, $expected_numeric,$expected_associative ) { $this->assertEquals( $expected_numeric, Arr::remove_string_keys_recursive( $input ) ); diff --git a/tests/wpunit/Tribe/Utils/Coordinates_ProviderTest.php b/tests/wpunit/Tribe/Utils/Coordinates_ProviderTest.php index d24f81e4ea..36583f7851 100644 --- a/tests/wpunit/Tribe/Utils/Coordinates_ProviderTest.php +++ b/tests/wpunit/Tribe/Utils/Coordinates_ProviderTest.php @@ -99,7 +99,7 @@ class Coordinates_ProviderTest extends \Codeception\TestCase\WPTestCase { } JSON; - protected $json_mock_reponse_missing_location = <<post->create(); $posts[] = static::factory()->post->create(); $posts[] = static::factory()->post->create(); - // The `tax_input` creation argument works in tricky ways, avoid it completely and use explict assignment. + // The `tax_input` creation argument works in tricky ways, avoid it completely and use explicit assignment. foreach ( $posts as $id ) { foreach ( [ @@ -122,7 +122,7 @@ public function should_allow_to_pluck_combine() { $posts[] = static::factory()->post->create( [ 'post_title' => 'Post 1' ] ); $posts[] = static::factory()->post->create( [ 'post_title' => 'Post 2' ] ); $posts[] = static::factory()->post->create( [ 'post_title' => 'Post 3' ] ); - // The `tax_input` creation argument works in tricky ways, avoid it completely and use explict assignment. + // The `tax_input` creation argument works in tricky ways, avoid it completely and use explicit assignment. foreach ( $posts as $id ) { foreach ( [ From 3b53350d52d4c481286bc9b3299002e19a1553ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Thu, 27 Jul 2023 17:19:03 +0000 Subject: [PATCH 2/2] Fix a typo fix --- src/modules/utils/dom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/utils/dom.js b/src/modules/utils/dom.js index cd0700e20e..31e64ea072 100644 --- a/src/modules/utils/dom.js +++ b/src/modules/utils/dom.js @@ -33,7 +33,7 @@ export const isRootNode = ( node ) => node === window.top.document; * * @param {(HTMLElement|object)} node - The DOM node where the search starts * @param {Function} callback - Is executed on every iteration, it should return a boolean - * @returns {boolean} Returns tree if the callback returns true with any of the parents. + * @returns {boolean} Returns true if the callback returns true with any of the parents. */ export const searchParent = ( node = {}, callback = noop ) => { let found = false;