php-stubs / woocommerce-stubs

WooCommerce function and class declaration stubs for static analysis
https://packagist.org/packages/php-stubs/woocommerce-stubs
MIT License
83 stars 10 forks source link

Incorrect nulls #10

Closed Gemorroj closed 3 years ago

Gemorroj commented 3 years ago

All null values have unnecessary backslash for example 91 line:

protected $meta_data = \null;
szepeviktor commented 3 years ago

Hello @Gemorroj! Thank you for your report. These stubs are automatically generated from WC source code. I think the generator tool puts there those backslashes. https://github.com/php-stubs/woocommerce-stubs/blob/master/composer.json#L17

szepeviktor commented 3 years ago

Please see https://stackoverflow.com/questions/55707481/why-can-null-be-written-with-a-backslash