ZF-3510: Best Practice & PHP IDE Compatability Improvement


On line 81 of /Zend/Validate/Barcode.php (@version $Id: Barcode.php 8211 2008-02-20 14:29:24Z darby $) we have the following code:

require_once 'Zend/Validate/Barcode/' . $className . '.php';

This is not IDE friendly (I'm using Zend Studio for Eclipse) as there is a variable in the include and therefore the IDE cannot locate the file.

I propose that the include is moved into the switch statement so that the variable $className is no longer needed. I suppose this is a slight compromise to the DRY methodoloy however I think it is worth it. Also, although using the variable in the include looks to be secure, it is bad practice.


Fixed with r14042