We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28dc2d2 commit d9bef34Copy full SHA for d9bef34
src/Casbin.php
@@ -116,9 +116,7 @@ public function __construct(?Config $config = null)
116
117
$this->config = $config;
118
119
- if (!$config->getAdapter() instanceof Adapter) {
120
- $this->adapter = new DatabaseAdapter();
121
- }
+ $this->adapter = $config->getAdapter() ?? new DatabaseAdapter();
122
123
if ($logger = $this->config->getLoggerClass() ?? 'EasySwoole\Permission\Logger') {
124
if (class_exists($logger)) {
0 commit comments