diff --git a/src/BrainMonkey/TestCase.php b/src/BrainMonkey/TestCase.php index e1d67cf..b1a2f9e 100644 --- a/src/BrainMonkey/TestCase.php +++ b/src/BrainMonkey/TestCase.php @@ -81,10 +81,10 @@ public function stubTranslationFunctions() { [ '__' => null, '_x' => null, - '_n' => static function( $single, $plural, $number ) { + '_n' => static function ( $single, $plural, $number ) { return ( $number === 1 ) ? $single : $plural; }, - '_nx' => static function( $single, $plural, $number ) { + '_nx' => static function ( $single, $plural, $number ) { return ( $number === 1 ) ? $single : $plural; }, 'translate' => null, diff --git a/src/BrainMonkey/YoastTestCase.php b/src/BrainMonkey/YoastTestCase.php index 113a332..167b0f7 100644 --- a/src/BrainMonkey/YoastTestCase.php +++ b/src/BrainMonkey/YoastTestCase.php @@ -24,7 +24,7 @@ protected function set_up() { Monkey\Functions\stubs( [ // Passing "null" makes the function return it's first argument. - 'get_bloginfo' => static function( $show ) { + 'get_bloginfo' => static function ( $show ) { switch ( $show ) { case 'charset': return 'UTF-8'; @@ -34,14 +34,14 @@ protected function set_up() { return $show; }, - 'is_multisite' => static function() { + 'is_multisite' => static function () { if ( \defined( 'WP_TESTS_MULTISITE' ) ) { return (bool) \WP_TESTS_MULTISITE; } return false; }, - 'mysql2date' => static function( $format, $date ) { + 'mysql2date' => static function ( $format, $date ) { return $date; }, 'number_format_i18n' => null, @@ -51,7 +51,7 @@ protected function set_up() { 'wp_parse_args' => static function ( $args, $defaults ) { return \array_merge( $defaults, $args ); }, - 'wp_strip_all_tags' => static function( $text, $remove_breaks = false ) { + 'wp_strip_all_tags' => static function ( $text, $remove_breaks = false ) { $text = \preg_replace( '@<(script|style)[^>]*?>.*?@si', '', $text ); $text = \strip_tags( $text ); @@ -62,7 +62,7 @@ protected function set_up() { return \trim( $text ); }, 'wp_slash' => null, - 'wp_unslash' => static function( $value ) { + 'wp_unslash' => static function ( $value ) { return \is_string( $value ) ? \stripslashes( $value ) : $value; }, ] diff --git a/src/WPIntegration/TestCaseNoPolyfills.php b/src/WPIntegration/TestCaseNoPolyfills.php index 5a2499f..b17be10 100644 --- a/src/WPIntegration/TestCaseNoPolyfills.php +++ b/src/WPIntegration/TestCaseNoPolyfills.php @@ -26,5 +26,4 @@ abstract class TestCase extends WP_UnitTestCase { use ExpectOutputHelper; - } diff --git a/src/WPIntegration/bootstrap-functions.php b/src/WPIntegration/bootstrap-functions.php index f934a6a..282dd32 100644 --- a/src/WPIntegration/bootstrap-functions.php +++ b/src/WPIntegration/bootstrap-functions.php @@ -42,7 +42,7 @@ function get_path_to_wp_test_dir() { * * @return string The file path with normalized slashes. */ - $normalize_path = static function( $path ) { + $normalize_path = static function ( $path ) { return \str_replace( '\\', '/', $path ); };