mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-19 02:23:11 +00:00
[Chore] Introduce psalm (#962)
* chore: introduce psalm * chore: remove dead code * chore: run psalm workflow * chore: run psalm in grumphp * normalize composer.json * chore: analyse --> analyze * chore: just remove psalm when running tests instead of worrying about dependency mismatch hell Co-authored-by: mr-feek <[email protected]>
This commit is contained in:
@@ -283,36 +283,6 @@ class Generator
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the driver/connection/store from the managers
|
||||
*
|
||||
* @param $alias
|
||||
* @return array|bool|string
|
||||
*/
|
||||
public function getDriver($alias)
|
||||
{
|
||||
try {
|
||||
if ($alias == "Auth") {
|
||||
$driver = \Auth::driver();
|
||||
} elseif ($alias == "DB") {
|
||||
$driver = \DB::connection();
|
||||
} elseif ($alias == "Cache") {
|
||||
$driver = get_class(\Cache::driver());
|
||||
$store = get_class(\Cache::getStore());
|
||||
return array($driver, $store);
|
||||
} elseif ($alias == "Queue") {
|
||||
$driver = \Queue::connection();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return get_class($driver);
|
||||
} catch (\Exception $e) {
|
||||
$this->error("Could not determine driver/connection for $alias.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Write a string as error output.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user