mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
TWeak meta methods
This commit is contained in:
+16
-20
@@ -1,24 +1,20 @@
|
|||||||
<?= '<?php' ?> namespace PHPSTORM_META {
|
<?= '<?php' ?> namespace PHPSTORM_META {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
|
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
|
||||||
* Generated on <?= date("Y-m-d") ?>.
|
* Generated on <?= date("Y-m-d") ?>.
|
||||||
*
|
*
|
||||||
* @author Barry vd. Heuvel <[email protected]>
|
* @author Barry vd. Heuvel <[email protected]>
|
||||||
* @see https://github.com/barryvdh/laravel-ide-helper
|
* @see https://github.com/barryvdh/laravel-ide-helper
|
||||||
*/
|
* @noinspection PhpUnusedLocalVariableInspection
|
||||||
|
* @noinspection PhpIllegalArrayKeyTypeInspection
|
||||||
/** @noinspection PhpUnusedLocalVariableInspection */
|
*/
|
||||||
/** @noinspection PhpIllegalArrayKeyTypeInspection */
|
$STATIC_METHOD_TYPES = [
|
||||||
$STATIC_METHOD_TYPES = [
|
<?php foreach($methods as $method): ?>
|
||||||
\App::make('') => [
|
<?= $method ?>('') => [
|
||||||
<?php foreach($bindings as $abstract => $class): ?>
|
<?php foreach($bindings as $abstract => $class): ?>
|
||||||
'<?= $abstract ?>' instanceof \<?= $class ?>,
|
'<?= $abstract ?>' instanceof \<?= $class ?>,
|
||||||
<?php endforeach ?> ],
|
<?php endforeach ?> ],
|
||||||
app('') => [
|
<?php endforeach ?>
|
||||||
<?php foreach($bindings as $abstract => $class): ?>
|
];
|
||||||
'<?= $abstract ?>' instanceof \<?= $class ?>,
|
|
||||||
<?php endforeach ?> ],
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,12 @@ class MetaCommand extends Command {
|
|||||||
/** @var \Illuminate\View\Factory */
|
/** @var \Illuminate\View\Factory */
|
||||||
protected $view;
|
protected $view;
|
||||||
|
|
||||||
|
protected $methods = [
|
||||||
|
'\Illuminate\Foundation\Application::make',
|
||||||
|
'\App::make',
|
||||||
|
'app'
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Filesystem\Filesystem $files
|
* @param \Illuminate\Filesystem\Filesystem $files
|
||||||
@@ -73,7 +79,12 @@ class MetaCommand extends Command {
|
|||||||
$this->error("Cannot make $abstract: ".$e->getMessage());
|
$this->error("Cannot make $abstract: ".$e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$content = $this->view->make('ide-helper::meta', ['bindings' => $bindings])->render();
|
|
||||||
|
$content = $this->view->make('ide-helper::meta', [
|
||||||
|
'bindings' => $bindings,
|
||||||
|
'methods' => $this->methods,
|
||||||
|
])->render();
|
||||||
|
|
||||||
$written = $this->files->put($filename, $content);
|
$written = $this->files->put($filename, $content);
|
||||||
|
|
||||||
if ($written !== false) {
|
if ($written !== false) {
|
||||||
|
|||||||
Reference in New Issue
Block a user