diff --git a/src/Exceptions/TypeException.php b/src/Exceptions/TypeException.php deleted file mode 100644 index 3d5f3157..00000000 --- a/src/Exceptions/TypeException.php +++ /dev/null @@ -1,8 +0,0 @@ -resolveDriverClass('Factory'); - } -} diff --git a/src/Traits/CanCheckType.php b/src/Traits/CanCheckType.php deleted file mode 100644 index c817dfbd..00000000 --- a/src/Traits/CanCheckType.php +++ /dev/null @@ -1,26 +0,0 @@ -resolveDriverClass('InputHandler')->handle($input); - } -} diff --git a/src/Traits/CanResolveDriverClass.php b/src/Traits/CanResolveDriverClass.php deleted file mode 100644 index bf86e53a..00000000 --- a/src/Traits/CanResolveDriverClass.php +++ /dev/null @@ -1,50 +0,0 @@ -getCurrentDriver(); - $classname = sprintf( - "Intervention\\Image\\Drivers\\%s\\%s", - ucfirst($driver_id), - $classname - ); - - try { - $reflection = new ReflectionClass($classname); - } catch (ReflectionException $e) { - throw new MissingDriverComponentException( - 'Class (' . $classname . ') could not be resolved with driver ' . ucfirst($driver_id) . '.' - ); - } - - return $reflection->newInstanceArgs($arguments); - } - - protected function getCurrentDriver(): string - { - $pattern = '/Intervention\\\Image\\\Drivers\\\(?P[A-Za-z]+)/'; - preg_match($pattern, get_class($this), $matches); - - if (! array_key_exists('driver', $matches)) { - throw new RuntimeException('Current driver could not be resolved.'); - } - - return strtolower($matches['driver']); - } -} diff --git a/src/Traits/CanRunCallback.php b/src/Traits/CanRunCallback.php deleted file mode 100644 index a933e667..00000000 --- a/src/Traits/CanRunCallback.php +++ /dev/null @@ -1,29 +0,0 @@ -runCallback($callback, $object); - } - - return $object; - } -}