Skip to content

Commit a32269e

Browse files
committed
Auto-fix invalid PHPDoc blocks in WC stubs
Closes #4
1 parent 2bd2d25 commit a32269e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

stub-generators/wc-generate-stubs.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Generate WooCommerce stubs.
44
#
55

6-
PLUGIN_VERSION="3.6.1"
6+
PLUGIN_VERSION="3.6.5"
77

88
Get_legacy_classes()
99
{
@@ -57,4 +57,6 @@ if [ ! -x vendor/bin/generate-stubs ]; then
5757
fi
5858
vendor/bin/generate-stubs --functions --classes --interfaces --traits --out=woocommerce-stubs-${PLUGIN_VERSION}.php ./woocommerce.php ./includes/
5959

60-
echo "[WARNING] WooCommerce version 3.6.1 has known invalid PHPDoc blocks." 1>&2
60+
echo "Fixing invalid PHPDoc blocks in WooCommerce version 3.6.* ..."
61+
sed -e 's#@return array\|WC_Error#@return array|WP_Error#' -i woocommerce-stubs-${PLUGIN_VERSION}.php
62+
sed -e 's#@return string\| Message#@return string Message#' -i woocommerce-stubs-${PLUGIN_VERSION}.php

0 commit comments

Comments
 (0)