From a09c7c9c3362e1bf0f7466b593f94d0cfcc42486 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sun, 6 Oct 2024 16:09:09 +0200 Subject: [PATCH] Remove unnecessary brackets --- src/Drivers/AbstractDriver.php | 4 ++-- src/Drivers/AbstractFontProcessor.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Drivers/AbstractDriver.php b/src/Drivers/AbstractDriver.php index cb7264fc..781446e2 100644 --- a/src/Drivers/AbstractDriver.php +++ b/src/Drivers/AbstractDriver.php @@ -70,7 +70,7 @@ abstract class AbstractDriver implements DriverInterface } // return directly and only attach driver if object is already specialized - if (($object instanceof SpecializedInterface)) { + if ($object instanceof SpecializedInterface) { $object->setDriver($this); return $object; @@ -88,7 +88,7 @@ abstract class AbstractDriver implements DriverInterface } // create a driver specialized object with the specializable properties of generic object - $specialized = (new $specialized_classname(...$object->specializable())); + $specialized = new $specialized_classname(...$object->specializable()); // attach driver return $specialized->setDriver($this); diff --git a/src/Drivers/AbstractFontProcessor.php b/src/Drivers/AbstractFontProcessor.php index 6ffef565..39203ed1 100644 --- a/src/Drivers/AbstractFontProcessor.php +++ b/src/Drivers/AbstractFontProcessor.php @@ -163,10 +163,10 @@ abstract class AbstractFontProcessor implements FontProcessorInterface protected function buildPivot(TextBlock $block, FontInterface $font, PointInterface $position): PointInterface { // bounding box - $box = (new Rectangle( + $box = new Rectangle( $this->boxSize((string) $block->longestLine(), $font)->width(), $this->leading($font) * ($block->count() - 1) + $this->capHeight($font) - )); + ); // set position $box->setPivot($position);