Vote Details for "Net_MAC" by cellog

» Details
» Comment
This code:

try {
if (!isset($options['vendorcol'])) {
throw new PEAR_Exception('No vendor column name given in options');
}
} catch (PEAR_Exception $e) {
throw $e;
}

is redundant and unnecessary. Just do:

if (!isset($options['vendorcol'])) {
throw new PEAR_Exception('No vendor column name given in options');
}

In addition, you should not be using the raw PEAR_Exception. It should have either a code, or be customized. You can do this with a 1-liner

class Net_MAC_Exception extends PEAR_Exception {}

The last issue is critical - you should not be using PEAR_Exception raw. The first one is cosmetic but will also affect performance so you should do it :).