From 644a5b90a73212e9d4e1612cc75a003161748453 Mon Sep 17 00:00:00 2001 From: Luca Tumedei Date: Wed, 5 Jun 2024 14:17:02 +0200 Subject: [PATCH] style(Assets) correct --- src/Tribe/Assets.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Tribe/Assets.php b/src/Tribe/Assets.php index 6c02976574..7d69947cc0 100644 --- a/src/Tribe/Assets.php +++ b/src/Tribe/Assets.php @@ -347,16 +347,17 @@ public function register( $origin, $slug, $file, $deps = [], $action = null, $ar return false; } - $extension = substr( $file, strrpos( $file, '.' ) + 1 ); + $extension = substr( $file, strrpos( $file, '.' ) + 1 ); + // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase $plugin_path = ! empty( $origin->plugin_path ) ? $origin->plugin_path : $origin->pluginPath; // Infer the type from the file extension, if not passed. - $type = empty( $arguments['type'] ) ? $extension : $arguments['type']; + $type = empty( $arguments['type'] ) ? $extension : $arguments['type']; // Try to enqueue the minified version of the file if not debugging scripts or the file is not available. if ( ! str_contains( $file, '.min.' ) ) { // From `something.js` to `something.min.js`. - $minified_file = substr( $file, 0, - ( strlen( $extension ) + 1 ) ) . '.min.' . $extension; + $minified_file = substr( $file, 0, - ( strlen( $extension ) + 1 ) ) . '.min.' . $extension; $min_file_abspath = $plugin_path . $minified_file; if (