Skip to content

Commit

Permalink
refine InvalidArgException::__construct()
Browse files Browse the repository at this point in the history
Justify coding style, suppress extra quotes around the value and place
the period at the end of the sentence.
  • Loading branch information
infrastation committed Mar 2, 2013
1 parent 7f1fb7e commit bc6499d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions wwwroot/inc/exceptions.php
Expand Up @@ -84,9 +84,8 @@ class InvalidArgException extends RackTablesError
{
function __construct ($name, $value, $reason=NULL)
{
$message = "Argument '${name}' of value '".var_export($value,true)."' is invalid.";
if (!is_null($reason))
$message .= ' ('.$reason.')';
$message = "Argument '${name}' of value " . var_export ($value, TRUE) . ' is invalid';
$message .= is_null ($reason) ? '.' : " (${reason}).";
parent::__construct ($message, parent::INTERNAL);
}
}
Expand Down

0 comments on commit bc6499d

Please sign in to comment.