Skip to content

Commit 5422955

Browse files
committed
Remove Database::__call magic method
1 parent b7b9b0f commit 5422955

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

src/Database.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
*/
1010
namespace Framework\Database;
1111

12-
use BadMethodCallException;
1312
use Closure;
1413
use Exception;
1514
use Framework\Database\Debug\DatabaseCollector;
@@ -99,26 +98,6 @@ public function __destruct()
9998
$this->close();
10099
}
101100

102-
/**
103-
* @param string $method
104-
* @param array<int,mixed> $arguments
105-
*
106-
* @return mixed
107-
*/
108-
public function __call(string $method, array $arguments) : mixed
109-
{
110-
if ($method === 'addToDebug') {
111-
return $this->addToDebug(...$arguments);
112-
}
113-
$class = static::class;
114-
if (\method_exists($this, $method)) {
115-
throw new BadMethodCallException(
116-
"Method not allowed: {$class}::{$method}"
117-
);
118-
}
119-
throw new BadMethodCallException("Method not found: {$class}::{$method}");
120-
}
121-
122101
protected function log(string $message, int $level = Logger::ERROR) : void
123102
{
124103
if ($this->logger) {

0 commit comments

Comments
 (0)