@@ -289,7 +289,7 @@ jobs:
289289 # Create or copy required class-basic-object.php file if missing
290290 if [ ! -f "/tmp/wordpress-tests-lib/includes/class-basic-object.php" ]; then
291291 echo "Creating missing class-basic-object.php file in /tmp/wordpress-tests-lib..."
292- cat > " /tmp/wordpress-tests-lib/includes/class-basic-object.php" << 'EOF'
292+ cat > /tmp/wordpress-tests-lib/includes/class-basic-object.php << 'EOF'
293293<?php
294294/**
295295 * Basic object, which other objects in WordPress extend.
@@ -300,16 +300,16 @@ class Basic_Object {
300300 /**
301301 * Retrieve a value from an array with support for a default value.
302302 *
303- * @param array $args Arguments.
304- * @param string $key Key to retrieve.
305- * @param mixed $default Default value.
303+ * @param array \ $args Arguments.
304+ * @param string \ $key Key to retrieve.
305+ * @param mixed \ $default Default value.
306306 * @return mixed Value if set, default if not.
307307 */
308- protected function get_from_array( $args, $key, $default = null ) {
309- if ( isset( $args[ $key ] ) ) {
310- return $args[ $key ];
308+ protected function get_from_array( \ $args, \ $key, \ $default = null ) {
309+ if ( isset( \ $args[ \ $key ] ) ) {
310+ return \ $args[ \ $key ];
311311 }
312- return $default;
312+ return \ $default;
313313 }
314314}
315315EOF
@@ -322,27 +322,27 @@ EOF
322322 sudo cp -f /tmp/wordpress-tests-lib/includes/class-basic-object.php /wordpress-tests-lib/includes/ || echo "::warning::Failed to copy class-basic-object.php"
323323 else
324324 echo "Creating missing class-basic-object.php file in /wordpress-tests-lib..."
325- sudo bash -c 'cat > " /wordpress-tests-lib/includes/class-basic-object.php" << " EOF"
325+ sudo bash -c 'cat > /wordpress-tests-lib/includes/class-basic-object.php << '\'' EOF'\''
326326<?php
327327/**
328328 * Basic object, which other objects in WordPress extend.
329- *
329+ *
330330 * This is a simplified version for tests to fix the missing class issue.
331331 */
332332class Basic_Object {
333333 /**
334334 * Retrieve a value from an array with support for a default value.
335335 *
336- * @param array $args Arguments.
337- * @param string $key Key to retrieve.
338- * @param mixed $default Default value.
336+ * @param array \ $args Arguments.
337+ * @param string \ $key Key to retrieve.
338+ * @param mixed \ $default Default value.
339339 * @return mixed Value if set, default if not.
340340 */
341- protected function get_from_array( $args, $key, $default = null ) {
342- if ( isset( $args[ $key ] ) ) {
343- return $args[ $key ];
341+ protected function get_from_array( \ $args, \ $key, \ $default = null ) {
342+ if ( isset( \ $args[ \ $key ] ) ) {
343+ return \ $args[ \ $key ];
344344 }
345- return $default;
345+ return \ $default;
346346 }
347347}
348348EOF'
0 commit comments