picqer / php-barcode-generator

Barcode generator in PHP that is easy to use, non-bloated and framework independent.
GNU Lesser General Public License v3.0
1.66k stars 400 forks source link

Fix phpdoc type case for usage with vimeo/psalm #187

Closed mbaschnitzi closed 1 year ago

mbaschnitzi commented 1 year ago

The phpdoc type BarcodeGenerator::Type* (with wrong case) is not recognized by vimeo/psalm, but BarcodeGenerator::TYPE* (with correct case) is.

We found this issue because of the change in #176, which caused psalm to throw the following error:

InvalidArgument: Argument 2 of Picqer\Barcode\BarcodeGeneratorPNG::getBarcode expects Picqer\Barcode\BarcodeGenerator::Type_*, but 'C128' provided
casperbakker commented 1 year ago

Thanks @mbaschnitzi