mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 18:13:11 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0373861536 | ||
|
|
3a4671f3ea | ||
|
|
8515b7ac0b | ||
|
|
541b9508e2 | ||
|
|
afe1fe88ba | ||
|
|
a59a5e1ae1 |
@@ -39,7 +39,7 @@ Require this package with composer using the following command:
|
|||||||
|
|
||||||
After updating composer, add the service provider to the `providers` array in `config/app.php`
|
After updating composer, add the service provider to the `providers` array in `config/app.php`
|
||||||
|
|
||||||
'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider',
|
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
|
||||||
|
|
||||||
You can now re-generate the docs yourself (for future updates)
|
You can now re-generate the docs yourself (for future updates)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<?= '<?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
|
||||||
@@ -7,13 +9,10 @@
|
|||||||
* @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 PhpIllegalArrayKeyTypeInspection */
|
|
||||||
/** @noinspection PhpUnusedLocalVariableInspection */
|
|
||||||
/** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */
|
|
||||||
$STATIC_METHOD_TYPES = [
|
$STATIC_METHOD_TYPES = [
|
||||||
<?php foreach($methods as $method): ?>
|
<?php foreach($methods as $method): ?>
|
||||||
<?= $method ?>('') => [
|
<?= $method ?> => [
|
||||||
|
'' == '@',
|
||||||
<?php foreach($bindings as $abstract => $class): ?>
|
<?php foreach($bindings as $abstract => $class): ?>
|
||||||
'<?= $abstract ?>' instanceof \<?= $class ?>,
|
'<?= $abstract ?>' instanceof \<?= $class ?>,
|
||||||
<?php endforeach ?> ],
|
<?php endforeach ?> ],
|
||||||
|
|||||||
@@ -76,9 +76,11 @@ class GeneratorCommand extends Command
|
|||||||
*/
|
*/
|
||||||
public function fire()
|
public function fire()
|
||||||
{
|
{
|
||||||
if (file_exists($compiled = base_path() . '/bootstrap/compiled.php')) {
|
if (file_exists(base_path() . '/vendor/compiled.php') ||
|
||||||
|
file_exists(base_path() . '/bootstrap/cache/compiled.php') ||
|
||||||
|
file_exists(base_path() . '/storage/framework/compiled.php')) {
|
||||||
$this->error(
|
$this->error(
|
||||||
'Error generating IDE Helper: first delete bootstrap/compiled.php (php artisan clear-compiled)'
|
'Error generating IDE Helper: first delete your compiled file (php artisan clear-compiled)'
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$filename = $this->argument('filename');
|
$filename = $this->argument('filename');
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ namespace Barryvdh\LaravelIdeHelper\Console;
|
|||||||
|
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A command to generate phpstorm meta data
|
* A command to generate phpstorm meta data
|
||||||
@@ -42,12 +43,10 @@ class MetaCommand extends Command {
|
|||||||
protected $view;
|
protected $view;
|
||||||
|
|
||||||
protected $methods = [
|
protected $methods = [
|
||||||
'\Illuminate\Foundation\Application::make',
|
'new \Illuminate\Contracts\Container\Container',
|
||||||
'\Illuminate\Contracts\Foundation\Application::make',
|
'\Illuminate\Contracts\Container\Container::make(\'\')',
|
||||||
'\Illuminate\Contracts\Container\Container::make',
|
'\App::make(\'\')',
|
||||||
'\Illuminate\Container\Container::make',
|
'app(\'\')',
|
||||||
'\App::make',
|
|
||||||
'app',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -78,7 +77,9 @@ class MetaCommand extends Command {
|
|||||||
$bindings[$abstract] = get_class($concrete);
|
$bindings[$abstract] = get_class($concrete);
|
||||||
}
|
}
|
||||||
}catch (\Exception $e) {
|
}catch (\Exception $e) {
|
||||||
$this->comment("Cannot make '$abstract': ".$e->getMessage());
|
if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
|
||||||
|
$this->comment("Cannot make '$abstract': ".$e->getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ use Illuminate\Console\Command;
|
|||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Symfony\Component\ClassLoader\ClassMapGenerator;
|
use Symfony\Component\ClassLoader\ClassMapGenerator;
|
||||||
use phpDocumentor\Reflection\DocBlock;
|
use phpDocumentor\Reflection\DocBlock;
|
||||||
use phpDocumentor\Reflection\DocBlock\Context;
|
use phpDocumentor\Reflection\DocBlock\Context;
|
||||||
@@ -148,7 +149,9 @@ class ModelsCommand extends Command
|
|||||||
|
|
||||||
foreach ($models as $name) {
|
foreach ($models as $name) {
|
||||||
if (in_array($name, $ignore)) {
|
if (in_array($name, $ignore)) {
|
||||||
$this->comment("Ignoring model '$name'");
|
if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
|
||||||
|
$this->comment("Ignoring model '$name'");
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$this->properties = array();
|
$this->properties = array();
|
||||||
@@ -162,7 +165,9 @@ class ModelsCommand extends Command
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->comment("Loading model '$name'");
|
if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
|
||||||
|
$this->comment("Loading model '$name'");
|
||||||
|
}
|
||||||
|
|
||||||
if (!$reflectionClass->IsInstantiable()) {
|
if (!$reflectionClass->IsInstantiable()) {
|
||||||
throw new \Exception($name . ' is not instantiable.');
|
throw new \Exception($name . ' is not instantiable.');
|
||||||
|
|||||||
Reference in New Issue
Block a user