Skip to content

Commit

Permalink
Remove unnecessary casts
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiang committed Jan 25, 2021
1 parent bac8bf2 commit ef234bc
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ protected function assembleSetterNameFromConfigKey(string $key): string
$setter = 'set' . implode('', $parts);
if (!method_exists($this, $setter)) {
throw new Exception\BadMethodCallException(
'The configuration key "' . $key . '" does not '
. 'have a matching ' . $setter . ' setter method '
. 'which must be defined'
'The configuration key "' . $key . '" does not '
. 'have a matching ' . $setter . ' setter method '
. 'which must be defined'
);
}

Expand Down Expand Up @@ -353,15 +353,12 @@ public function getUmask(): ?int

public function setUmask(?int $umask): void
{
$this->umask = null;
if (is_int($umask)) {
$this->umask = (int) $umask;
}
$this->umask = $umask;
}

public function setBuildOnRequest(bool $flag): void
{
$this->buildOnRequest = (bool) $flag;
$this->buildOnRequest = $flag;
}

public function getBuildOnRequest(): bool
Expand Down

0 comments on commit ef234bc

Please sign in to comment.