From ef234bcb4fc8d34eb0df6088cb85f02ff46e6442 Mon Sep 17 00:00:00 2001 From: Fabian Grutschus Date: Mon, 25 Jan 2021 15:20:21 +0100 Subject: [PATCH] Remove unnecessary casts --- src/Configuration.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Configuration.php b/src/Configuration.php index 7ce3467..cdf3290 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -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' ); } @@ -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