Skip to content

Commit

Permalink
Merge branch '4.4' into 5.0
Browse files Browse the repository at this point in the history
* 4.4:
  Add missing dots at the end of exception messages
  [DI][Form] Fixed test suite (TimeType changes & unresolved merge conflict)
  Fix bad merge
  Add missing dots at the end of exception messages
  • Loading branch information
fabpot committed Mar 15, 2020
2 parents b8fee53 + a65222b commit cb3f0f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions DeprecationErrorHandler/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ private function __construct(array $thresholds = [], $regex = '', $verboseOutput

foreach ($thresholds as $group => $threshold) {
if (!\in_array($group, $groups, true)) {
throw new \InvalidArgumentException(sprintf('Unrecognized threshold "%s", expected one of "%s"', $group, implode('", "', $groups)));
throw new \InvalidArgumentException(sprintf('Unrecognized threshold "%s", expected one of "%s".', $group, implode('", "', $groups)));
}
if (!is_numeric($threshold)) {
throw new \InvalidArgumentException(sprintf('Threshold for group "%s" has invalid value "%s"', $group, $threshold));
throw new \InvalidArgumentException(sprintf('Threshold for group "%s" has invalid value "%s".', $group, $threshold));
}
$this->thresholds[$group] = (int) $threshold;
}
Expand Down Expand Up @@ -146,7 +146,7 @@ public static function fromUrlEncodedString($serializedConfiguration)
parse_str($serializedConfiguration, $normalizedConfiguration);
foreach (array_keys($normalizedConfiguration) as $key) {
if (!\in_array($key, ['max', 'disabled', 'verbose'], true)) {
throw new \InvalidArgumentException(sprintf('Unknown configuration option "%s"', $key));
throw new \InvalidArgumentException(sprintf('Unknown configuration option "%s".', $key));
}
}

Expand Down
8 changes: 4 additions & 4 deletions DeprecationErrorHandler/Deprecation.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function originatesFromAnObject()
public function originatingClass()
{
if (null === $this->originClass) {
throw new \LogicException('Check with originatesFromAnObject() before calling this method');
throw new \LogicException('Check with originatesFromAnObject() before calling this method.');
}

return $this->originClass;
Expand All @@ -121,7 +121,7 @@ public function originatingClass()
public function originatingMethod()
{
if (null === $this->originMethod) {
throw new \LogicException('Check with originatesFromAnObject() before calling this method');
throw new \LogicException('Check with originatesFromAnObject() before calling this method.');
}

return $this->originMethod;
Expand Down Expand Up @@ -237,7 +237,7 @@ private function getPackage($path)
$relativePath = substr($path, \strlen($vendorRoot) + 1);
$vendor = strstr($relativePath, \DIRECTORY_SEPARATOR, true);
if (false === $vendor) {
throw new \RuntimeException(sprintf('Could not find directory separator "%s" in path "%s"', \DIRECTORY_SEPARATOR, $relativePath));
throw new \RuntimeException(sprintf('Could not find directory separator "%s" in path "%s".', \DIRECTORY_SEPARATOR, $relativePath));
}

return rtrim($vendor.'/'.strstr(substr(
Expand All @@ -247,7 +247,7 @@ private function getPackage($path)
}
}

throw new \RuntimeException(sprintf('No vendors found for path "%s"', $path));
throw new \RuntimeException(sprintf('No vendors found for path "%s".', $path));
}

/**
Expand Down

0 comments on commit cb3f0f5

Please sign in to comment.