Skip to content

Commit

Permalink
Merge pull request squizlabs#18 from jrbasso/fix_exception_name
Browse files Browse the repository at this point in the history
Fixed exception classname
  • Loading branch information
gsherwood committed Mar 12, 2012
2 parents c8ac067 + 2d81e5f commit 8f33675
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CodeSniffer/Standards/AbstractScopeSniff.php
Expand Up @@ -95,7 +95,7 @@ abstract class PHP_CodeSniffer_Standards_AbstractScopeSniff implements PHP_CodeS
* processTokenOutideScope method.
*
* @see PHP_CodeSniffer.getValidScopeTokeners()
* @throws PHP_CodeSniffer_Test_Exception If the specified tokens array is empty.
* @throws PHP_CodeSniffer_Exception If the specified tokens array is empty.
*/
public function __construct(
array $scopeTokens,
Expand All @@ -104,19 +104,19 @@ public function __construct(
) {
if (empty($scopeTokens) === true) {
$error = 'The scope tokens list cannot be empty';
throw new PHP_CodeSniffer_Test_Exception($error);
throw new PHP_CodeSniffer_Exception($error);
}

if (empty($tokens) === true) {
$error = 'The tokens list cannot be empty';
throw new PHP_CodeSniffer_Test_Exception($error);
throw new PHP_CodeSniffer_Exception($error);
}

$invalidScopeTokens = array_intersect($scopeTokens, $tokens);
if (empty($invalidScopeTokens) === false) {
$invalid = implode(', ', $invalidScopeTokens);
$error = "Scope tokens [$invalid] cant be in the tokens array";
throw new PHP_CodeSniffer_Test_Exception($error);
throw new PHP_CodeSniffer_Exception($error);
}

$this->_listenOutside = $listenOutside;
Expand Down

0 comments on commit 8f33675

Please sign in to comment.