From a0c0635b9b4d689c57125cb04e7e5472fe8e2a3b Mon Sep 17 00:00:00 2001 From: sgiehl Date: Fri, 27 Sep 2019 11:53:07 +0200 Subject: [PATCH] fix coding style --- Parser/Client/Browser.php | 6 +++++- Parser/Client/Browser/Engine.php | 5 ++++- Parser/Device/AbstractDeviceParser.php | 8 +++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Parser/Client/Browser.php b/Parser/Client/Browser.php index b3c67a0408..57193d103f 100644 --- a/Parser/Client/Browser.php +++ b/Parser/Client/Browser.php @@ -410,7 +410,11 @@ public function parse(): ?array } // This Exception should never be thrown. If so a defined browser name is missing in $availableBrowsers - throw new \Exception(sprintf('Detected browser name "%s" was not found in $availableBrowsers. Tried to parse user agent: %s', $name, $this->userAgent)); // @codeCoverageIgnore + throw new \Exception(sprintf( + 'Detected browser name "%s" was not found in $availableBrowsers. Tried to parse user agent: %s', + $name, + $this->userAgent + )); // @codeCoverageIgnore } /** diff --git a/Parser/Client/Browser/Engine.php b/Parser/Client/Browser/Engine.php index c70db82a66..44f05cef40 100644 --- a/Parser/Client/Browser/Engine.php +++ b/Parser/Client/Browser/Engine.php @@ -86,6 +86,9 @@ public function parse(): ?array } // This Exception should never be thrown. If so a defined browser name is missing in $availableEngines - throw new \Exception(sprintf('Detected browser engine was not found in $availableEngines. Tried to parse user agent: %s', $this->userAgent)); // @codeCoverageIgnore + throw new \Exception(sprintf( + 'Detected browser engine was not found in $availableEngines. Tried to parse user agent: %s', + $this->userAgent + )); // @codeCoverageIgnore } } diff --git a/Parser/Device/AbstractDeviceParser.php b/Parser/Device/AbstractDeviceParser.php index 016a3fad3b..0457f78a3a 100644 --- a/Parser/Device/AbstractDeviceParser.php +++ b/Parser/Device/AbstractDeviceParser.php @@ -751,7 +751,13 @@ public function parse(): ?array if (false === $brandId) { // This Exception should never be thrown. If so a defined brand name is missing in $deviceBrands - throw new \Exception(sprintf("The brand with name '%s' should be listed in the deviceBrands array. Tried to parse user agent: %s", $brand, $this->userAgent)); // @codeCoverageIgnore + throw new \Exception( + sprintf( + "The brand name '%s' needs to be in deviceBrands array. Tried parsing user agent: %s", + $brand, + $this->userAgent + ) + ); // @codeCoverageIgnore } $this->brand = (string) $brandId;