mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +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:
@@ -21,6 +21,7 @@ use Barryvdh\Reflection\DocBlock\Serializer as DocBlockSerializer;
|
||||
class Alias
|
||||
{
|
||||
protected $alias;
|
||||
/** @psalm-var class-string $facade */
|
||||
protected $facade;
|
||||
protected $extends = null;
|
||||
protected $extendsClass = null;
|
||||
@@ -43,6 +44,7 @@ class Alias
|
||||
/**
|
||||
* @param ConfigRepository $config
|
||||
* @param string $alias
|
||||
* @psalm-param class-string $facade
|
||||
* @param string $facade
|
||||
* @param array $magicMethods
|
||||
* @param array $interfaces
|
||||
|
||||
@@ -43,7 +43,7 @@ class MetaCommand extends Command
|
||||
/** @var \Illuminate\Contracts\View\Factory */
|
||||
protected $view;
|
||||
|
||||
/** @var \Illuminate\Contracts\Config */
|
||||
/** @var \Illuminate\Contracts\Config\Repository */
|
||||
protected $config;
|
||||
|
||||
protected $methods = [
|
||||
@@ -61,7 +61,7 @@ class MetaCommand extends Command
|
||||
*
|
||||
* @param \Illuminate\Contracts\Filesystem\Filesystem $files
|
||||
* @param \Illuminate\Contracts\View\Factory $view
|
||||
* @param \Illuminate\Contracts\Config $config
|
||||
* @param \Illuminate\Contracts\Config\Repository $config
|
||||
*/
|
||||
public function __construct($files, $view, $config)
|
||||
{
|
||||
|
||||
@@ -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