Skip to content

Commit

Permalink
- Removed spaces around the concation dots to be more consitent
Browse files Browse the repository at this point in the history
- adjusted some formatting
  • Loading branch information
JanDC committed Jul 23, 2014
1 parent 0459d89 commit b099936
Showing 1 changed file with 4 additions and 7 deletions.
Expand Up @@ -33,20 +33,17 @@ public function __construct($resource, $sourceResource = null, $code = null, $pr
// Trim the trailing period of the previous message. We only want 1 period remove so no rtrim...
if ('.' === substr($previous->getMessage(), -1)) {
$trimmedMessage = substr($previous->getMessage(), 0, -1);
$message .= sprintf('%s', $trimmedMessage) . ' in ';
$message .= sprintf('%s', $trimmedMessage).' in ';
} else {
$message .= sprintf('%s', $previous->getMessage()) . ' in ';
$message .= sprintf('%s', $previous->getMessage()).' in ';
}
$message .= $resource . ' ';

// show tweaked trace to complete the human readable sentence
if (null === $sourceResource) {
$message .= sprintf('(which is loaded in resource "%s")', $this->varToString($resource));
} else {
$message .= sprintf(
'(which is being imported from "%s")',
$this->varToString($sourceResource)
);
$message .= sprintf('(which is being imported from "%s")',$this->varToString($sourceResource));
}
$message .= '.';

Expand All @@ -61,7 +58,7 @@ public function __construct($resource, $sourceResource = null, $code = null, $pr
if ('@' === $resource[0]) {
$parts = explode(DIRECTORY_SEPARATOR, $resource);
$bundle = substr($parts[0], 1);
$message .= ' ' . sprintf('Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.',$bundle);
$message .= ' '.sprintf('Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.',$bundle);
}

parent::__construct($message, $code, $previous);
Expand Down

0 comments on commit b099936

Please sign in to comment.