mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 10:07:12 +00:00
Compare commits
14
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12222b1901 | ||
|
|
391872ba66 | ||
|
|
d1e6c313c1 | ||
|
|
9d2c95e338 | ||
|
|
c223665e99 | ||
|
|
127c9dca94 | ||
|
|
76f27119d0 | ||
|
|
381d41d638 | ||
|
|
6709385ca5 | ||
|
|
c2f2e206b2 | ||
|
|
25f0c78e26 | ||
|
|
7dcee6fdd1 | ||
|
|
f8e28d390c | ||
|
|
f9ab4a61e0 |
@@ -29,6 +29,7 @@
|
|||||||
"illuminate/filesystem": "^10 || ^11",
|
"illuminate/filesystem": "^10 || ^11",
|
||||||
"illuminate/support": "^10 || ^11",
|
"illuminate/support": "^10 || ^11",
|
||||||
"nikic/php-parser": "^4.18 || ^5",
|
"nikic/php-parser": "^4.18 || ^5",
|
||||||
|
"phpdocumentor/reflection-docblock": "^5.3",
|
||||||
"phpdocumentor/type-resolver": "^1.1.0"
|
"phpdocumentor/type-resolver": "^1.1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|||||||
+16
-12
@@ -11,14 +11,15 @@
|
|||||||
|
|
||||||
namespace Barryvdh\LaravelIdeHelper;
|
namespace Barryvdh\LaravelIdeHelper;
|
||||||
|
|
||||||
use Barryvdh\Reflection\DocBlock;
|
use Barryvdh\LaravelIdeHelper\DocBlock\DocBlockBuilder;
|
||||||
use Barryvdh\Reflection\DocBlock\Context;
|
|
||||||
use Barryvdh\Reflection\DocBlock\Serializer as DocBlockSerializer;
|
|
||||||
use Barryvdh\Reflection\DocBlock\Tag\MethodTag;
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Illuminate\Config\Repository as ConfigRepository;
|
use Illuminate\Config\Repository as ConfigRepository;
|
||||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||||
use Illuminate\Support\Facades\Facade;
|
use Illuminate\Support\Facades\Facade;
|
||||||
|
use phpDocumentor\Reflection\DocBlock;
|
||||||
|
use phpDocumentor\Reflection\DocBlock\Serializer;
|
||||||
|
use phpDocumentor\Reflection\DocBlock\Tags\Method as MethodTag;
|
||||||
|
use phpDocumentor\Reflection\Types\Context;
|
||||||
use ReflectionClass;
|
use ReflectionClass;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
@@ -41,6 +42,7 @@ class Alias
|
|||||||
protected $magicMethods = [];
|
protected $magicMethods = [];
|
||||||
protected $interfaces = [];
|
protected $interfaces = [];
|
||||||
protected $phpdoc = null;
|
protected $phpdoc = null;
|
||||||
|
protected $phpdocContext = null;
|
||||||
protected $classAliases = [];
|
protected $classAliases = [];
|
||||||
|
|
||||||
/** @var ConfigRepository */
|
/** @var ConfigRepository */
|
||||||
@@ -82,8 +84,11 @@ class Alias
|
|||||||
if (!empty($this->namespace)) {
|
if (!empty($this->namespace)) {
|
||||||
$this->classAliases = (new UsesResolver())->loadFromClass($this->root);
|
$this->classAliases = (new UsesResolver())->loadFromClass($this->root);
|
||||||
|
|
||||||
//Create a DocBlock and serializer instance
|
//Create a DocBlock
|
||||||
$this->phpdoc = new DocBlock(new ReflectionClass($alias), new Context($this->namespace, $this->classAliases));
|
$this->phpdocContext = new Context($this->namespace, $this->classAliases);
|
||||||
|
$reflector = new ReflectionClass($alias);
|
||||||
|
|
||||||
|
$this->phpdoc = DocBlockBuilder::createFromReflector($reflector, $this->phpdocContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($facade === '\Illuminate\Database\Eloquent\Model') {
|
if ($facade === '\Illuminate\Database\Eloquent\Model') {
|
||||||
@@ -422,8 +427,7 @@ class Alias
|
|||||||
*/
|
*/
|
||||||
public function getDocComment($prefix = "\t\t")
|
public function getDocComment($prefix = "\t\t")
|
||||||
{
|
{
|
||||||
$serializer = new DocBlockSerializer(1, $prefix);
|
$serializer = new Serializer(1, $prefix);
|
||||||
|
|
||||||
if (!$this->phpdoc) {
|
if (!$this->phpdoc) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -433,13 +437,13 @@ class Alias
|
|||||||
// we can perform reflection on the class and
|
// we can perform reflection on the class and
|
||||||
// add in the original class DocBlock
|
// add in the original class DocBlock
|
||||||
if (count($this->phpdoc->getTags()) === 0) {
|
if (count($this->phpdoc->getTags()) === 0) {
|
||||||
$class = new ReflectionClass($this->root);
|
$reflector = new ReflectionClass($this->root);
|
||||||
$this->phpdoc = new DocBlock($class->getDocComment());
|
$this->phpdoc = DocBlockBuilder::createFromReflector($reflector, $this->phpdocContext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->removeDuplicateMethodsFromPhpDoc();
|
$this->removeDuplicateMethodsFromPhpDoc();
|
||||||
return $serializer->getDocComment($this->phpdoc);
|
return $serializer->getDocComment($this->phpdoc->getDocBlock());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -456,7 +460,7 @@ class Alias
|
|||||||
|
|
||||||
foreach ($this->phpdoc->getTags() as $tag) {
|
foreach ($this->phpdoc->getTags() as $tag) {
|
||||||
if ($tag instanceof MethodTag && in_array($tag->getMethodName(), $methodNames)) {
|
if ($tag instanceof MethodTag && in_array($tag->getMethodName(), $methodNames)) {
|
||||||
$this->phpdoc->deleteTag($tag);
|
$this->phpdoc->removeTag($tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,10 +12,7 @@
|
|||||||
namespace Barryvdh\LaravelIdeHelper\Console;
|
namespace Barryvdh\LaravelIdeHelper\Console;
|
||||||
|
|
||||||
use Barryvdh\LaravelIdeHelper\Contracts\ModelHookInterface;
|
use Barryvdh\LaravelIdeHelper\Contracts\ModelHookInterface;
|
||||||
use Barryvdh\Reflection\DocBlock;
|
use Barryvdh\LaravelIdeHelper\DocBlock\DocBlockBuilder;
|
||||||
use Barryvdh\Reflection\DocBlock\Context;
|
|
||||||
use Barryvdh\Reflection\DocBlock\Serializer as DocBlockSerializer;
|
|
||||||
use Barryvdh\Reflection\DocBlock\Tag;
|
|
||||||
use Composer\ClassMapGenerator\ClassMapGenerator;
|
use Composer\ClassMapGenerator\ClassMapGenerator;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Contracts\Database\Eloquent\Castable;
|
use Illuminate\Contracts\Database\Eloquent\Castable;
|
||||||
@@ -42,6 +39,10 @@ use Illuminate\Filesystem\Filesystem;
|
|||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
use phpDocumentor\Reflection\DocBlock\Serializer;
|
||||||
|
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||||
|
use phpDocumentor\Reflection\DocBlock\Tags\BaseTag;
|
||||||
|
use phpDocumentor\Reflection\DocBlockFactory;
|
||||||
use phpDocumentor\Reflection\Types\ContextFactory;
|
use phpDocumentor\Reflection\Types\ContextFactory;
|
||||||
use ReflectionClass;
|
use ReflectionClass;
|
||||||
use ReflectionNamedType;
|
use ReflectionNamedType;
|
||||||
@@ -882,16 +883,14 @@ class ModelsCommand extends Command
|
|||||||
$reflection->getInterfaceNames(),
|
$reflection->getInterfaceNames(),
|
||||||
$reflection->getParentClass()->getInterfaceNames()
|
$reflection->getParentClass()->getInterfaceNames()
|
||||||
);
|
);
|
||||||
|
$phpDocContext = (new ContextFactory())->createFromReflector($reflection);
|
||||||
|
$phpdoc = DocBlockBuilder::createFromReflector($reflection, $phpDocContext);
|
||||||
|
|
||||||
if ($this->reset) {
|
if ($this->reset) {
|
||||||
$phpdoc = new DocBlock('', new Context($namespace));
|
$phpdoc->clearTags();
|
||||||
$phpdoc->setText(
|
|
||||||
(new DocBlock($reflection, new Context($namespace)))->getText()
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
$phpdoc = new DocBlock($reflection, new Context($namespace));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$existingTags = $phpdoc->getTags();
|
||||||
$properties = [];
|
$properties = [];
|
||||||
$methods = [];
|
$methods = [];
|
||||||
foreach ($phpdoc->getTags() as $tag) {
|
foreach ($phpdoc->getTags() as $tag) {
|
||||||
@@ -922,8 +921,8 @@ class ModelsCommand extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
$tagLine = trim("@{$attr} {$property['type']} {$name} {$property['comment']}");
|
$tagLine = trim("@{$attr} {$property['type']} {$name} {$property['comment']}");
|
||||||
$tag = Tag::createInstance($tagLine, $phpdoc);
|
|
||||||
$phpdoc->appendTag($tag);
|
$phpdoc->appendTagline($tagLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
ksort($this->methods);
|
ksort($this->methods);
|
||||||
@@ -937,21 +936,14 @@ class ModelsCommand extends Command
|
|||||||
if ($method['comment'] !== '') {
|
if ($method['comment'] !== '') {
|
||||||
$tagLine .= " {$method['comment']}";
|
$tagLine .= " {$method['comment']}";
|
||||||
}
|
}
|
||||||
$tag = Tag::createInstance($tagLine, $phpdoc);
|
|
||||||
$phpdoc->appendTag($tag);
|
$phpdoc->appendTagline($tagLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->write) {
|
if ($this->write) {
|
||||||
$eloquentClassNameInModel = $this->getClassNameInDestinationFile($reflection, 'Eloquent');
|
$eloquentClassNameInModel = $this->getClassNameInDestinationFile($reflection, 'Eloquent');
|
||||||
|
|
||||||
// remove the already existing tag to prevent duplicates
|
$phpdoc->appendTagline('@mixin ' . $eloquentClassNameInModel);
|
||||||
foreach ($phpdoc->getTagsByName('mixin') as $tag) {
|
|
||||||
if ($tag->getContent() === $eloquentClassNameInModel) {
|
|
||||||
$phpdoc->deleteTag($tag);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$phpdoc->appendTag(Tag::createInstance('@mixin ' . $eloquentClassNameInModel, $phpdoc));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->phpstorm_noinspections) {
|
if ($this->phpstorm_noinspections) {
|
||||||
@@ -959,44 +951,41 @@ class ModelsCommand extends Command
|
|||||||
* Facades, Eloquent API
|
* Facades, Eloquent API
|
||||||
* @see https://www.jetbrains.com/help/phpstorm/php-fully-qualified-name-usage.html
|
* @see https://www.jetbrains.com/help/phpstorm/php-fully-qualified-name-usage.html
|
||||||
*/
|
*/
|
||||||
$phpdoc->appendTag(Tag::createInstance('@noinspection PhpFullyQualifiedNameUsageInspection', $phpdoc));
|
$phpdoc->appendTagline('@noinspection PhpFullyQualifiedNameUsageInspection');
|
||||||
/**
|
/**
|
||||||
* Relations, other models in the same namespace
|
* Relations, other models in the same namespace
|
||||||
* @see https://www.jetbrains.com/help/phpstorm/php-unnecessary-fully-qualified-name.html
|
* @see https://www.jetbrains.com/help/phpstorm/php-unnecessary-fully-qualified-name.html
|
||||||
*/
|
*/
|
||||||
$phpdoc->appendTag(
|
$phpdoc->appendTagline('@noinspection PhpUnnecessaryFullyQualifiedNameInspection');
|
||||||
Tag::createInstance('@noinspection PhpUnnecessaryFullyQualifiedNameInspection', $phpdoc)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$serializer = new DocBlockSerializer();
|
$serializer = new Serializer();
|
||||||
$docComment = $serializer->getDocComment($phpdoc);
|
|
||||||
|
|
||||||
if ($this->write_mixin) {
|
if ($this->write_mixin) {
|
||||||
$phpdocMixin = new DocBlock($reflection, new Context($namespace));
|
|
||||||
// remove all mixin tags prefixed with IdeHelper
|
// remove all mixin tags prefixed with IdeHelper
|
||||||
foreach ($phpdocMixin->getTagsByName('mixin') as $tag) {
|
$mixinTags = array_filter($existingTags, function (Tag $tag) {
|
||||||
if (Str::startsWith($tag->getContent(), 'IdeHelper')) {
|
return !($tag instanceof BaseTag) || !Str::startsWith($tag->getDescription(), 'IdeHelper');
|
||||||
$phpdocMixin->deleteTag($tag);
|
});
|
||||||
|
|
||||||
|
$phpdocMixin = DocBlockBuilder::create($phpdoc->getSummary(), $phpdoc->getDescription(), $mixinTags, $phpDocContext);
|
||||||
|
$mixinClassName = "IdeHelper{$classname}";
|
||||||
|
$phpdocMixin->appendTagline("@mixin {$mixinClassName}");
|
||||||
|
|
||||||
|
foreach ($phpdoc->getTags() as $tag) {
|
||||||
|
if ($tag instanceof BaseTag && Str::startsWith($tag->getDescription(), 'IdeHelper')) {
|
||||||
|
$phpdoc->removeTag($tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$mixinClassName = "IdeHelper{$classname}";
|
$mixinDocComment = $serializer->getDocComment($phpdocMixin->getDocBlock());
|
||||||
$phpdocMixin->appendTag(Tag::createInstance("@mixin {$mixinClassName}", $phpdocMixin));
|
|
||||||
$mixinDocComment = $serializer->getDocComment($phpdocMixin);
|
|
||||||
// remove blank lines if there's no text
|
// remove blank lines if there's no text
|
||||||
if (!$phpdocMixin->getText()) {
|
if (!$phpdocMixin->getSummary()) {
|
||||||
$mixinDocComment = preg_replace("/\s\*\s*\n/", '', $mixinDocComment);
|
$mixinDocComment = preg_replace("/\s\*\s*\n/", '', $mixinDocComment);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($phpdoc->getTagsByName('mixin') as $tag) {
|
|
||||||
if (Str::startsWith($tag->getContent(), 'IdeHelper')) {
|
|
||||||
$phpdoc->deleteTag($tag);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$docComment = $serializer->getDocComment($phpdoc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$docComment = $serializer->getDocComment($phpdoc->getDocBlock());
|
||||||
|
|
||||||
if ($this->write) {
|
if ($this->write) {
|
||||||
$modelDocComment = $this->write_mixin ? $mixinDocComment : $docComment;
|
$modelDocComment = $this->write_mixin ? $mixinDocComment : $docComment;
|
||||||
$filename = $reflection->getFileName();
|
$filename = $reflection->getFileName();
|
||||||
@@ -1202,21 +1191,20 @@ class ModelsCommand extends Command
|
|||||||
*
|
*
|
||||||
* @return null|string
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
protected function getCommentFromDocBlock(\ReflectionMethod $reflection)
|
protected function getCommentFromDocBlock(\ReflectionMethod $reflection): ?string
|
||||||
{
|
{
|
||||||
$phpDocContext = (new ContextFactory())->createFromReflector($reflection);
|
if (!$reflection->getDocComment()) {
|
||||||
$context = new Context(
|
return '';
|
||||||
$phpDocContext->getNamespace(),
|
|
||||||
$phpDocContext->getNamespaceAliases()
|
|
||||||
);
|
|
||||||
$comment = '';
|
|
||||||
$phpdoc = new DocBlock($reflection, $context);
|
|
||||||
|
|
||||||
if ($phpdoc->hasTag('comment')) {
|
|
||||||
$comment = $phpdoc->getTagsByName('comment')[0]->getContent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $comment;
|
$phpDocContext = (new ContextFactory())->createFromReflector($reflection);
|
||||||
|
$phpdoc = (DocBlockFactory::createInstance())->create($reflection, $phpDocContext);
|
||||||
|
|
||||||
|
foreach ($phpdoc->getTagsByName('comment') as $tag) {
|
||||||
|
return $tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1226,21 +1214,19 @@ class ModelsCommand extends Command
|
|||||||
*
|
*
|
||||||
* @return null|string
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
protected function getReturnTypeFromDocBlock(\ReflectionMethod $reflection, \Reflector $reflectorForContext = null)
|
protected function getReturnTypeFromDocBlock(\ReflectionMethod $reflection, \Reflector $reflectorForContext = null): ?string
|
||||||
{
|
{
|
||||||
|
if (!$reflection->getDocComment()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$phpDocContext = (new ContextFactory())->createFromReflector($reflectorForContext ?? $reflection);
|
$phpDocContext = (new ContextFactory())->createFromReflector($reflectorForContext ?? $reflection);
|
||||||
$context = new Context(
|
$phpdoc = (DocBlockFactory::createInstance())->create($reflection, $phpDocContext);
|
||||||
$phpDocContext->getNamespace(),
|
|
||||||
$phpDocContext->getNamespaceAliases()
|
|
||||||
);
|
|
||||||
$type = null;
|
|
||||||
$phpdoc = new DocBlock($reflection, $context);
|
|
||||||
|
|
||||||
if ($phpdoc->hasTag('return')) {
|
foreach ($phpdoc->getTagsByName('return') as $tag) {
|
||||||
$type = $phpdoc->getTagsByName('return')[0]->getType();
|
return $tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $type;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getReturnTypeFromReflection(\ReflectionMethod $reflection): ?string
|
protected function getReturnTypeFromReflection(\ReflectionMethod $reflection): ?string
|
||||||
|
|||||||
@@ -0,0 +1,162 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Barryvdh\LaravelIdeHelper\DocBlock;
|
||||||
|
|
||||||
|
use phpDocumentor\Reflection\DocBlock;
|
||||||
|
use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
|
||||||
|
use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
|
||||||
|
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||||
|
use phpDocumentor\Reflection\DocBlock\TagFactory;
|
||||||
|
use phpDocumentor\Reflection\DocBlockFactory;
|
||||||
|
use phpDocumentor\Reflection\TypeResolver;
|
||||||
|
use phpDocumentor\Reflection\Types\Context;
|
||||||
|
|
||||||
|
class DocBlockBuilder
|
||||||
|
{
|
||||||
|
/** @var $tagFactory TagFactory */
|
||||||
|
private $tagFactory = null;
|
||||||
|
|
||||||
|
private function __construct(
|
||||||
|
protected string $summary = '',
|
||||||
|
protected ?DocBlock\Description $description = null,
|
||||||
|
protected array $tags = [],
|
||||||
|
protected ?Context $context = null
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function createFromReflector(\Reflector $reflector, ?Context $context = null): static
|
||||||
|
{
|
||||||
|
if ($doc = $reflector->getDocComment()) {
|
||||||
|
$docblock = DocBlockFactory::createInstance()->create($doc, $context);
|
||||||
|
|
||||||
|
return new static(
|
||||||
|
$docblock->getSummary(),
|
||||||
|
$docblock->getDescription(),
|
||||||
|
$docblock->getTags(),
|
||||||
|
$docblock->getContext()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return static::create('', null, [], $context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function create(
|
||||||
|
string $summary = '',
|
||||||
|
?DocBlock\Description $description = null,
|
||||||
|
array $tags = null,
|
||||||
|
?Context $context = null
|
||||||
|
): static {
|
||||||
|
return new static($summary, $description, $tags, $context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDocBlock(): DocBlock
|
||||||
|
{
|
||||||
|
$tags = collect($this->tags)->unique(function (Tag $tag) {
|
||||||
|
if (method_exists($tag, 'getVariableName')) {
|
||||||
|
return $tag->getName() . ' ' . $tag->getVariableName();
|
||||||
|
}
|
||||||
|
return (string) $tag;
|
||||||
|
})->toArray();
|
||||||
|
|
||||||
|
return new DocBlock($this->summary, $this->description, $tags, $this->context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSummary(): ?string
|
||||||
|
{
|
||||||
|
return $this->summary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setSummary(string $summary)
|
||||||
|
{
|
||||||
|
$this->summary = $summary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription(): ?DocBlock\Description
|
||||||
|
{
|
||||||
|
return $this->description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDescription(?DocBlock\Description $description)
|
||||||
|
{
|
||||||
|
$this->description = $description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getContext()
|
||||||
|
{
|
||||||
|
return $this->context;
|
||||||
|
}
|
||||||
|
public function getTags()
|
||||||
|
{
|
||||||
|
return $this->tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function appendTagline(string $tagline)
|
||||||
|
{
|
||||||
|
$tag = $this->getTagFactory()->create($tagline, $this->context);
|
||||||
|
|
||||||
|
$this->appendTag($tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function hasTag(string $name): bool
|
||||||
|
{
|
||||||
|
/** @var Tag $tag */
|
||||||
|
foreach ($this->tags as $tag) {
|
||||||
|
if ($tag->getName() === $name) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTagsByName($name)
|
||||||
|
{
|
||||||
|
$result = [];
|
||||||
|
|
||||||
|
/** @var Tag $tag */
|
||||||
|
foreach ($this->tags as $tag) {
|
||||||
|
if ($tag->getName() != $name) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$result[] = $tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function appendTag(Tag $tag)
|
||||||
|
{
|
||||||
|
$this->tags[] = $tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeTag(Tag $tagToRemove)
|
||||||
|
{
|
||||||
|
foreach ($this->tags as $i => $tag) {
|
||||||
|
if ($tag === $tagToRemove) {
|
||||||
|
unset($this->tags[$i]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function clearTags()
|
||||||
|
{
|
||||||
|
$this->tags = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getTagFactory(): TagFactory
|
||||||
|
{
|
||||||
|
if ($this->tagFactory === null) {
|
||||||
|
$fqsenResolver = new LocalFsqenResolver();
|
||||||
|
$tagFactory = new StandardTagFactory($fqsenResolver);
|
||||||
|
$descriptionFactory = new DescriptionFactory($tagFactory);
|
||||||
|
|
||||||
|
$tagFactory->addService($descriptionFactory);
|
||||||
|
$tagFactory->addService(new TypeResolver($fqsenResolver));
|
||||||
|
|
||||||
|
$this->tagFactory = $tagFactory;
|
||||||
|
}
|
||||||
|
return $this->tagFactory;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Barryvdh\LaravelIdeHelper\DocBlock;
|
||||||
|
|
||||||
|
use phpDocumentor\Reflection\Fqsen;
|
||||||
|
use phpDocumentor\Reflection\FqsenResolver;
|
||||||
|
use phpDocumentor\Reflection\Types\Context;
|
||||||
|
|
||||||
|
class LocalFsqenResolver extends FqsenResolver
|
||||||
|
{
|
||||||
|
public function resolve(string $fqsen, ?Context $context = null): Fqsen
|
||||||
|
{
|
||||||
|
return new Fqsen($fqsen);
|
||||||
|
}
|
||||||
|
}
|
||||||
+7
-7
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace Barryvdh\LaravelIdeHelper;
|
namespace Barryvdh\LaravelIdeHelper;
|
||||||
|
|
||||||
|
use Barryvdh\LaravelIdeHelper\DocBlock\DocBlockBuilder;
|
||||||
use Barryvdh\Reflection\DocBlock;
|
use Barryvdh\Reflection\DocBlock;
|
||||||
use Barryvdh\Reflection\DocBlock\Tag;
|
|
||||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ class Macro extends Method
|
|||||||
*/
|
*/
|
||||||
protected function initPhpDoc($method)
|
protected function initPhpDoc($method)
|
||||||
{
|
{
|
||||||
$this->phpdoc = new DocBlock($method);
|
$this->phpdoc = DocBlockBuilder::createFromReflector($method);
|
||||||
|
|
||||||
$this->addLocationToPhpDoc();
|
$this->addLocationToPhpDoc();
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ class Macro extends Method
|
|||||||
$name = $parameter->isVariadic() ? '...' : '';
|
$name = $parameter->isVariadic() ? '...' : '';
|
||||||
$name .= '$' . $parameter->getName();
|
$name .= '$' . $parameter->getName();
|
||||||
|
|
||||||
$this->phpdoc->appendTag(Tag::createInstance("@param {$type} {$name}"));
|
$this->phpdoc->appendTagline("@param {$type} {$name}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,16 +64,16 @@ class Macro extends Method
|
|||||||
if ($method->hasReturnType() && !$this->phpdoc->hasTag('return')) {
|
if ($method->hasReturnType() && !$this->phpdoc->hasTag('return')) {
|
||||||
$builder = EloquentBuilder::class;
|
$builder = EloquentBuilder::class;
|
||||||
$return = $method->getReturnType();
|
$return = $method->getReturnType();
|
||||||
|
|
||||||
$type = $this->concatReflectionTypes($return);
|
$type = $this->concatReflectionTypes($return);
|
||||||
|
|
||||||
|
|
||||||
/** @psalm-suppress UndefinedClass */
|
/** @psalm-suppress UndefinedClass */
|
||||||
if (!$return instanceof \ReflectionUnionType) {
|
if (!$return instanceof \ReflectionUnionType) {
|
||||||
$type .= $this->root === "\\{$builder}" && $return->getName() === $builder ? '|static' : '';
|
$type .= $this->root === "\\{$builder}" && $return->getName() === $builder ? '|static' : '';
|
||||||
$type .= $return->allowsNull() ? '|null' : '';
|
$type .= $return->allowsNull() ? '|null' : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->phpdoc->appendTag(Tag::createInstance("@return {$type}"));
|
$this->phpdoc->appendTagLine("@return {$type}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,9 +109,9 @@ class Macro extends Method
|
|||||||
});
|
});
|
||||||
|
|
||||||
if ($enclosingMethod) {
|
if ($enclosingMethod) {
|
||||||
$this->phpdoc->appendTag(Tag::createInstance(
|
$this->phpdoc->appendTagLine(
|
||||||
'@see \\' . $enclosingClass->getName() . '::' . $enclosingMethod->getName() . '()'
|
'@see \\' . $enclosingClass->getName() . '::' . $enclosingMethod->getName() . '()'
|
||||||
));
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+26
-103
@@ -11,18 +11,18 @@
|
|||||||
|
|
||||||
namespace Barryvdh\LaravelIdeHelper;
|
namespace Barryvdh\LaravelIdeHelper;
|
||||||
|
|
||||||
|
use Barryvdh\LaravelIdeHelper\DocBlock\DocBlockBuilder;
|
||||||
use Barryvdh\Reflection\DocBlock;
|
use Barryvdh\Reflection\DocBlock;
|
||||||
use Barryvdh\Reflection\DocBlock\Context;
|
|
||||||
use Barryvdh\Reflection\DocBlock\Serializer as DocBlockSerializer;
|
|
||||||
use Barryvdh\Reflection\DocBlock\Tag;
|
use Barryvdh\Reflection\DocBlock\Tag;
|
||||||
use Barryvdh\Reflection\DocBlock\Tag\ParamTag;
|
|
||||||
use Barryvdh\Reflection\DocBlock\Tag\ReturnTag;
|
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
use phpDocumentor\Reflection\DocBlock\Serializer;
|
||||||
|
use phpDocumentor\Reflection\DocBlock\Tags\InvalidTag;
|
||||||
|
use phpDocumentor\Reflection\DocBlock\Tags\Return_;
|
||||||
|
|
||||||
class Method
|
class Method
|
||||||
{
|
{
|
||||||
/** @var DocBlock */
|
/** @var DocBlockBuilder */
|
||||||
protected $phpdoc;
|
protected $phpdoc;
|
||||||
|
|
||||||
/** @var \ReflectionMethod */
|
/** @var \ReflectionMethod */
|
||||||
@@ -63,11 +63,9 @@ class Method
|
|||||||
//Create a DocBlock and serializer instance
|
//Create a DocBlock and serializer instance
|
||||||
$this->initPhpDoc($method);
|
$this->initPhpDoc($method);
|
||||||
|
|
||||||
//Normalize the description and inherit the docs from parents/interfaces
|
//Normalize the returns and inherit the docs from parents/interfaces
|
||||||
try {
|
try {
|
||||||
$this->normalizeParams($this->phpdoc);
|
|
||||||
$this->normalizeReturn($this->phpdoc);
|
$this->normalizeReturn($this->phpdoc);
|
||||||
$this->normalizeDescription($this->phpdoc);
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +73,7 @@ class Method
|
|||||||
$this->getParameters($method);
|
$this->getParameters($method);
|
||||||
|
|
||||||
//Make the method static
|
//Make the method static
|
||||||
$this->phpdoc->appendTag(Tag::createInstance('@static', $this->phpdoc));
|
$this->phpdoc->appendTagline('@static');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -83,7 +81,8 @@ class Method
|
|||||||
*/
|
*/
|
||||||
protected function initPhpDoc($method)
|
protected function initPhpDoc($method)
|
||||||
{
|
{
|
||||||
$this->phpdoc = new DocBlock($method, new Context($this->namespace, $this->classAliases));
|
$context = new \phpDocumentor\Reflection\Types\Context($this->namespace, $this->classAliases);
|
||||||
|
$this->phpdoc = DocBlockBuilder::createFromReflector($method, $context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -145,8 +144,8 @@ class Method
|
|||||||
*/
|
*/
|
||||||
public function getDocComment($prefix = "\t\t")
|
public function getDocComment($prefix = "\t\t")
|
||||||
{
|
{
|
||||||
$serializer = new DocBlockSerializer(1, $prefix);
|
$serializer = new Serializer(1, $prefix);
|
||||||
return $serializer->getDocComment($this->phpdoc);
|
return $serializer->getDocComment($this->phpdoc->getDocBlock());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -191,68 +190,12 @@ class Method
|
|||||||
return $implode ? implode(', ', $this->params_with_default) : $this->params_with_default;
|
return $implode ? implode(', ', $this->params_with_default) : $this->params_with_default;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the description and get the inherited docs.
|
|
||||||
*
|
|
||||||
* @param DocBlock $phpdoc
|
|
||||||
*/
|
|
||||||
protected function normalizeDescription(DocBlock $phpdoc)
|
|
||||||
{
|
|
||||||
//Get the short + long description from the DocBlock
|
|
||||||
$description = $phpdoc->getText();
|
|
||||||
|
|
||||||
//Loop through parents/interfaces, to fill in {@inheritdoc}
|
|
||||||
if (strpos($description, '{@inheritdoc}') !== false) {
|
|
||||||
$inheritdoc = $this->getInheritDoc($this->method);
|
|
||||||
$inheritDescription = $inheritdoc->getText();
|
|
||||||
|
|
||||||
$description = str_replace('{@inheritdoc}', $inheritDescription, $description);
|
|
||||||
$phpdoc->setText($description);
|
|
||||||
|
|
||||||
$this->normalizeParams($inheritdoc);
|
|
||||||
$this->normalizeReturn($inheritdoc);
|
|
||||||
|
|
||||||
//Add the tags that are inherited
|
|
||||||
$inheritTags = $inheritdoc->getTags();
|
|
||||||
if ($inheritTags) {
|
|
||||||
/** @var Tag $tag */
|
|
||||||
foreach ($inheritTags as $tag) {
|
|
||||||
$tag->setDocBlock();
|
|
||||||
$phpdoc->appendTag($tag);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Normalize the parameters
|
|
||||||
*
|
|
||||||
* @param DocBlock $phpdoc
|
|
||||||
*/
|
|
||||||
protected function normalizeParams(DocBlock $phpdoc)
|
|
||||||
{
|
|
||||||
//Get the return type and adjust them for beter autocomplete
|
|
||||||
$paramTags = $phpdoc->getTagsByName('param');
|
|
||||||
if ($paramTags) {
|
|
||||||
/** @var ParamTag $tag */
|
|
||||||
foreach ($paramTags as $tag) {
|
|
||||||
// Convert the keywords
|
|
||||||
$content = $this->convertKeywords($tag->getContent());
|
|
||||||
$tag->setContent($content);
|
|
||||||
|
|
||||||
// Get the expanded type and re-set the content
|
|
||||||
$content = $tag->getType() . ' ' . $tag->getVariableName() . ' ' . $tag->getDescription();
|
|
||||||
$tag->setContent(trim($content));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Normalize the return tag (make full namespace, replace interfaces)
|
* Normalize the return tag (make full namespace, replace interfaces)
|
||||||
*
|
*
|
||||||
* @param DocBlock $phpdoc
|
* @param DocBlock $phpdoc
|
||||||
*/
|
*/
|
||||||
protected function normalizeReturn(DocBlock $phpdoc)
|
protected function normalizeReturn(DocBlockBuilder $phpdoc)
|
||||||
{
|
{
|
||||||
//Get the return type and adjust them for better autocomplete
|
//Get the return type and adjust them for better autocomplete
|
||||||
$returnTags = $phpdoc->getTagsByName('return');
|
$returnTags = $phpdoc->getTagsByName('return');
|
||||||
@@ -262,8 +205,13 @@ class Method
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var ReturnTag $tag */
|
|
||||||
|
/** @var Return_ $tag */
|
||||||
$tag = reset($returnTags);
|
$tag = reset($returnTags);
|
||||||
|
|
||||||
|
if ($tag instanceof InvalidTag) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Get the expanded type
|
// Get the expanded type
|
||||||
$returnValue = $tag->getType();
|
$returnValue = $tag->getType();
|
||||||
|
|
||||||
@@ -272,15 +220,17 @@ class Method
|
|||||||
$returnValue = str_replace($interface, $real, $returnValue);
|
$returnValue = str_replace($interface, $real, $returnValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the changed content
|
|
||||||
$tag->setContent($returnValue . ' ' . $tag->getDescription());
|
|
||||||
$this->return = $returnValue;
|
$this->return = $returnValue;
|
||||||
|
|
||||||
if ($tag->getType() === '$this') {
|
if ($returnValue === '$this') {
|
||||||
Str::contains($this->root, Builder::class)
|
$returnValue = Str::contains($this->root, Builder::class)
|
||||||
? $tag->setType($this->root . '|static')
|
? $this->root . '|static'
|
||||||
: $tag->setType($this->root);
|
: $this->root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the changed content
|
||||||
|
$this->phpdoc->removeTag($tag);
|
||||||
|
$this->phpdoc->appendTagline('@return ' . $returnValue . ' ' . $tag->getDescription());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -349,31 +299,4 @@ class Method
|
|||||||
$this->params = $params;
|
$this->params = $params;
|
||||||
$this->params_with_default = $paramsWithDefault;
|
$this->params_with_default = $paramsWithDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \ReflectionMethod $reflectionMethod
|
|
||||||
* @return DocBlock
|
|
||||||
*/
|
|
||||||
protected function getInheritDoc($reflectionMethod)
|
|
||||||
{
|
|
||||||
$parentClass = $reflectionMethod->getDeclaringClass()->getParentClass();
|
|
||||||
|
|
||||||
//Get either a parent or the interface
|
|
||||||
if ($parentClass) {
|
|
||||||
$method = $parentClass->getMethod($reflectionMethod->getName());
|
|
||||||
} else {
|
|
||||||
$method = $reflectionMethod->getPrototype();
|
|
||||||
}
|
|
||||||
if ($method) {
|
|
||||||
$namespace = $method->getDeclaringClass()->getNamespaceName();
|
|
||||||
$phpdoc = new DocBlock($method, new Context($namespace, $this->classAliases));
|
|
||||||
|
|
||||||
if (strpos($phpdoc->getText(), '{@inheritdoc}') !== false) {
|
|
||||||
//Not at the end yet, try another parent/interface..
|
|
||||||
return $this->getInheritDoc($method);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $phpdoc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ use Illuminate\Database\Eloquent\Casts\AsCollection;
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property \Illuminate\Support\Carbon $cast_to_date_serialization
|
* @property \Illuminate\Support\Carbon $cast_to_date_serialization
|
||||||
* @property \Illuminate\Support\Carbon $cast_to_datetime_serialization
|
* @property \Illuminate\Support\Carbon $cast_to_datetime_serialization
|
||||||
* @property \Illuminate\Support\Carbon $cast_to_custom_datetime
|
* @property \Illuminate\Support\Carbon $cast_to_custom_datetime
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\AllowGlobDirecto
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property string|null $char_nullable
|
* @property string|null $char_nullable
|
||||||
* @property string $char_not_nullable
|
* @property string $char_not_nullable
|
||||||
|
|||||||
@@ -7,18 +7,16 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\ArrayCastsWithCo
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @property array<int,string>|null $cast_to_array -- These three should not be duplicated
|
||||||
*
|
* @property array<int,string> $cast_to_json some-description
|
||||||
* @property array<int, string>|null $cast_to_array -- These three should not be duplicated
|
* @property \Illuminate\Support\Collection<int,string> $cast_to_collection some-description
|
||||||
* @property array<int, string> $cast_to_json some-description
|
|
||||||
* @property \Illuminate\Support\Collection<int, string> $cast_to_collection some-description
|
|
||||||
* @property array|null $cast_to_encrypted_array -- These three are OK (no types)
|
* @property array|null $cast_to_encrypted_array -- These three are OK (no types)
|
||||||
* @property array $cast_to_encrypted_json some-description
|
* @property array $cast_to_encrypted_json some-description
|
||||||
* @property \Illuminate\Support\Collection $cast_to_encrypted_collection some-description
|
* @property \Illuminate\Support\Collection $cast_to_encrypted_collection some-description
|
||||||
* @property string $cast_to_string -- The next three are OK (no description), this not included
|
* @property string $cast_to_string -- The next three are OK (no description), this not included
|
||||||
* @property array<int, string>|null $cast_to_immutable_date
|
* @property array<int,string>|null $cast_to_immutable_date
|
||||||
* @property array<int, string> $cast_to_immutable_date_serialization
|
* @property array<int,string> $cast_to_immutable_date_serialization
|
||||||
* @property \Illuminate\Support\Collection<int, string> $cast_to_immutable_custom_datetime
|
* @property \Illuminate\Support\Collection<int,string> $cast_to_immutable_custom_datetime
|
||||||
* @property string $cast_to_int
|
* @property string $cast_to_int
|
||||||
* @property string $cast_to_integer
|
* @property string $cast_to_integer
|
||||||
* @property string $cast_to_real
|
* @property string $cast_to_real
|
||||||
@@ -28,9 +26,6 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
* @property string $cast_to_bool
|
* @property string $cast_to_bool
|
||||||
* @property string $cast_to_boolean
|
* @property string $cast_to_boolean
|
||||||
* @property string $cast_to_object
|
* @property string $cast_to_object
|
||||||
* @property array $cast_to_array
|
|
||||||
* @property array $cast_to_json
|
|
||||||
* @property \Illuminate\Support\Collection $cast_to_collection
|
|
||||||
* @property string $cast_to_date
|
* @property string $cast_to_date
|
||||||
* @property string $cast_to_datetime
|
* @property string $cast_to_datetime
|
||||||
* @property string $cast_to_date_serialization
|
* @property string $cast_to_date_serialization
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ use Illuminate\Database\Eloquent\Casts\Attribute;
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property int $diverging_type_hinted_get_and_set
|
* @property int $diverging_type_hinted_get_and_set
|
||||||
* @property string|null $name
|
* @property string|null $name
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ use Illuminate\Database\Eloquent\Relations\HasOne;
|
|||||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property string $both_same_name I'm a getter
|
* @property string $both_same_name I'm a getter
|
||||||
* @property string $both_without_getter_comment
|
* @property string $both_without_getter_comment
|
||||||
|
|||||||
@@ -9,13 +9,11 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property-read SimpleCollection<int, Simple> $relationHasMany
|
* @property-read SimpleCollection<int, Simple> $relationHasMany
|
||||||
* @property-read int|null $relation_has_many_count
|
* @property-read int|null $relation_has_many_count
|
||||||
* @method static SimpleCollection<int, static> all($columns = ['*'])
|
* @method static void SimpleCollection() <int, static> all($columns = ['*'])
|
||||||
* @method static SimpleCollection<int, static> get($columns = ['*'])
|
* @method static void SimpleCollection() <int, static> get($columns = ['*'])
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Simple query()
|
* @method static \Illuminate\Database\Eloquent\Builder|Simple query()
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\CustomDate\Model
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property \Carbon\CarbonImmutable|null $created_at
|
* @property \Carbon\CarbonImmutable|null $created_at
|
||||||
* @property \Carbon\CarbonImmutable|null $updated_at
|
* @property \Carbon\CarbonImmutable|null $updated_at
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|CustomDate newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|CustomDate newModelQuery()
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
* the class phpdoc is written back, one is inserted.
|
* the class phpdoc is written back, one is inserted.
|
||||||
*
|
*
|
||||||
* @link https://github.com/barryvdh/laravel-ide-helper/issues/666
|
* @link https://github.com/barryvdh/laravel-ide-helper/issues/666
|
||||||
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
|
* @SuppressWarnings (PHPMD.ExcessiveClassComplexity)
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery()
|
||||||
|
|||||||
-2
@@ -13,8 +13,6 @@
|
|||||||
|
|
||||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\DoesNotGeneratePhpdocWithExternalEloquentBuilder\Models{
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\DoesNotGeneratePhpdocWithExternalEloquentBuilder\Models{
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property string|null $char_nullable
|
* @property string|null $char_nullable
|
||||||
* @property string $char_not_nullable
|
* @property string $char_not_nullable
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
|||||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, Dynamic> $regularHasMany
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, Dynamic> $regularHasMany
|
||||||
* @property-read int|null $regular_has_many_count
|
* @property-read int|null $regular_has_many_count
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Dynamic newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|Dynamic newModelQuery()
|
||||||
|
|||||||
@@ -9,9 +9,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Factories\CustomSpace\ModelWithCustomNamespaceFactory factory(mixed $count, mixed $state)
|
||||||
*
|
|
||||||
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Factories\CustomSpace\ModelWithCustomNamespaceFactory factory($count = null, $state = [])
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithCustomNamespace newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithCustomNamespace newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithCustomNamespace newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithCustomNamespace newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithCustomNamespace query()
|
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithCustomNamespace query()
|
||||||
@@ -41,9 +39,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Factories\Factories\ModelWithFactoryFactory factory(mixed $count, mixed $state)
|
||||||
*
|
|
||||||
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Factories\Factories\ModelWithFactoryFactory factory($count = null, $state = [])
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithFactory newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithFactory newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithFactory newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithFactory newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithFactory query()
|
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithFactory query()
|
||||||
@@ -60,9 +56,7 @@ declare(strict_types=1);
|
|||||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Factories\Models;
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Factories\Models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Factories\Factories\ModelWithNestedFactoryFactory factory(mixed $count, mixed $state)
|
||||||
*
|
|
||||||
* @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Factories\Factories\ModelWithNestedFactoryFactory factory($count = null, $state = [])
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithNestedFactory newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithNestedFactory newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithNestedFactory newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithNestedFactory newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithNestedFactory query()
|
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithNestedFactory query()
|
||||||
@@ -81,8 +75,6 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithoutFactory newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithoutFactory newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithoutFactory newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithoutFactory newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithoutFactory query()
|
* @method static \Illuminate\Database\Eloquent\Builder|ModelWithoutFactory query()
|
||||||
|
|||||||
-2
@@ -9,8 +9,6 @@ use Illuminate\Database\Eloquent\Builder;
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property string|null $char_nullable
|
* @property string|null $char_nullable
|
||||||
* @property string $char_not_nullable
|
* @property string $char_not_nullable
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GenerateBasicPhp
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property string|null $char_nullable
|
* @property string|null $char_nullable
|
||||||
* @property string $char_not_nullable
|
* @property string $char_not_nullable
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GenerateBasicPhp
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property string|null $charNullable
|
* @property string|null $charNullable
|
||||||
* @property string $charNotNullable
|
* @property string $charNotNullable
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GenerateBasicPhp
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property string|null $char_nullable
|
* @property string|null $char_nullable
|
||||||
* @property string $char_not_nullable
|
* @property string $char_not_nullable
|
||||||
|
|||||||
-2
@@ -13,8 +13,6 @@
|
|||||||
|
|
||||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Models{
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Models{
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property string|null $char_nullable
|
* @property string|null $char_nullable
|
||||||
* @property string $char_not_nullable
|
* @property string $char_not_nullable
|
||||||
|
|||||||
-2
@@ -8,8 +8,6 @@ use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExte
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property string|null $char_nullable
|
* @property string|null $char_nullable
|
||||||
* @property string $char_not_nullable
|
* @property string $char_not_nullable
|
||||||
|
|||||||
+72
-74
@@ -9,8 +9,6 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
|||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property string|null $char_nullable
|
* @property string|null $char_nullable
|
||||||
* @property string $char_not_nullable
|
* @property string $char_not_nullable
|
||||||
@@ -82,84 +80,84 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
* @property string $macaddress_not_nullable
|
* @property string $macaddress_not_nullable
|
||||||
* @property \Illuminate\Support\Carbon|null $created_at
|
* @property \Illuminate\Support\Carbon|null $created_at
|
||||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post> $posts
|
* @property-read \Illuminate\Database\Eloquent\Collection<int,\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post> $posts
|
||||||
* @property-read int|null $posts_count
|
* @property-read int|null $posts_count
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post null(string $unusedParam)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post null(string $unusedParam)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post onlyTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post onlyTrashed()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post query()
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post query()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereBigIntegerNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereBigIntegerNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereBigIntegerNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereBigIntegerNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereBinaryNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereBinaryNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereBinaryNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereBinaryNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereBooleanNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereBooleanNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereBooleanNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereBooleanNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereCharNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereCharNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereCharNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereCharNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereCreatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereCreatedAt(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDateNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDateNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDateNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDateNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDatetimeNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDatetimeNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDatetimeNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDatetimeNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDatetimetzNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDatetimetzNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDatetimetzNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDatetimetzNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDecimalNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDecimalNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDecimalNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDecimalNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDoubleNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDoubleNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDoubleNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereDoubleNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereEnumNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereEnumNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereEnumNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereEnumNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereFloatNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereFloatNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereFloatNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereFloatNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereId($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereId(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereIntegerNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereIntegerNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereIntegerNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereIntegerNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereIpaddressNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereIpaddressNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereIpaddressNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereIpaddressNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereJsonNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereJsonNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereJsonNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereJsonNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereJsonbNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereJsonbNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereJsonbNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereJsonbNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereLongTextNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereLongTextNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereLongTextNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereLongTextNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereMacaddressNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereMacaddressNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereMacaddressNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereMacaddressNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereMediumIntegerNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereMediumIntegerNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereMediumIntegerNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereMediumIntegerNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereMediumTextNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereMediumTextNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereMediumTextNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereMediumTextNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereSmallIntegerNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereSmallIntegerNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereSmallIntegerNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereSmallIntegerNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereStringNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereStringNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereStringNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereStringNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTextNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTextNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTextNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTextNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimeNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimeNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimeNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimeNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimestampNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimestampNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimestampNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimestampNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimestamptzNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimestamptzNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimestamptzNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimestamptzNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimetzNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimetzNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimetzNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTimetzNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTinyIntegerNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTinyIntegerNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTinyIntegerNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereTinyIntegerNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedBigIntegerNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedBigIntegerNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedBigIntegerNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedBigIntegerNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedIntegerNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedIntegerNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedIntegerNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedIntegerNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedMediumIntegerNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedMediumIntegerNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedMediumIntegerNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedMediumIntegerNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedSmallIntegerNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedSmallIntegerNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedSmallIntegerNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedSmallIntegerNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedTinyIntegerNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedTinyIntegerNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedTinyIntegerNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUnsignedTinyIntegerNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUpdatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUpdatedAt(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUuidNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUuidNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUuidNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUuidNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereYearNotNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereYearNotNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereYearNullable($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereYearNullable(mixed $value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post withTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post withTrashed()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post withoutTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post withoutTrashed()
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ use Illuminate\Database\Query\Builder as QueryBuilder;
|
|||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property string|null $char_nullable
|
* @property string|null $char_nullable
|
||||||
* @property CastType $char_not_nullable
|
* @property CastType $char_not_nullable
|
||||||
|
|||||||
-2
@@ -13,8 +13,6 @@
|
|||||||
|
|
||||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Models{
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Models{
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property string|null $char_nullable
|
* @property string|null $char_nullable
|
||||||
* @property string $char_not_nullable
|
* @property string $char_not_nullable
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @property $someProp
|
* @property $someProp
|
||||||
* @method someMethod(string $method)
|
* @method void someMethod(string $method)
|
||||||
* @mixin IdeHelperFinalPost
|
* @mixin IdeHelperFinalPost
|
||||||
*/
|
*/
|
||||||
final class FinalPost extends Model
|
final class FinalPost extends Model
|
||||||
@@ -24,7 +24,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @property $someProp
|
* @property $someProp
|
||||||
* @method someMethod(string $method)
|
* @method void someMethod(string $method)
|
||||||
* @mixin IdeHelperPost
|
* @mixin IdeHelperPost
|
||||||
*/
|
*/
|
||||||
class Post extends Model
|
class Post extends Model
|
||||||
@@ -45,10 +45,8 @@ class Post extends Model
|
|||||||
|
|
||||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithMixin\Models{
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithMixin\Models{
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property $someProp
|
* @property $someProp
|
||||||
* @method someMethod(string $method)
|
* @method void someMethod(string $method)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|FinalPost newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|FinalPost newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|FinalPost newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|FinalPost newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|FinalPost query()
|
* @method static \Illuminate\Database\Eloquent\Builder|FinalPost query()
|
||||||
@@ -60,10 +58,8 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWi
|
|||||||
|
|
||||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithMixin\Models{
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithMixin\Models{
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property $someProp
|
* @property $someProp
|
||||||
* @method someMethod(string $method)
|
* @method void someMethod(string $method)
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property string|null $char_nullable
|
* @property string|null $char_nullable
|
||||||
* @property string $char_not_nullable
|
* @property string $char_not_nullable
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
|||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection|Simple[] $regularBelongsToMany
|
* @property-read \Illuminate\Database\Eloquent\Collection|Simple[] $regularBelongsToMany
|
||||||
* @property-read int|null $regular_belongs_to_many_count
|
* @property-read int|null $regular_belongs_to_many_count
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ use DateTime;
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property-read int|null $attribute_return_type_int_or_null
|
* @property-read int|null $attribute_return_type_int_or_null
|
||||||
* @property-read array $attribute_returns_array
|
* @property-read array $attribute_returns_array
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Ignored\Models;
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|NotIgnored newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|NotIgnored newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|NotIgnored newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|NotIgnored newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|NotIgnored query()
|
* @method static \Illuminate\Database\Eloquent\Builder|NotIgnored query()
|
||||||
|
|||||||
@@ -13,8 +13,6 @@
|
|||||||
|
|
||||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Interfaces\Models{
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Interfaces\Models{
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|User newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|User newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|User newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|User newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|User query()
|
* @method static \Illuminate\Database\Eloquent\Builder|User query()
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Cas
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CastedProperty $casted_property_with_return_type
|
* @property \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CastedProperty $casted_property_with_return_type
|
||||||
* @property \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CastedProperty $casted_property_with_return_docblock
|
* @property \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CastedProperty $casted_property_with_return_docblock
|
||||||
* @property \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CastedProperty $casted_property_with_return_docblock_fqn
|
* @property \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CastedProperty $casted_property_with_return_docblock_fqn
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\MagicWhere\Model
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property string|null $char_nullable
|
* @property string|null $char_nullable
|
||||||
* @property string $char_not_nullable
|
* @property string $char_not_nullable
|
||||||
|
|||||||
-2
@@ -7,8 +7,6 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\PHPStormNoInspec
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery()
|
||||||
|
|||||||
-2
@@ -7,8 +7,6 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\PHPStormNoInspec
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery()
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property string|null $char_nullable
|
* @property string|null $char_nullable
|
||||||
* @property string $char_not_nullable
|
* @property string $char_not_nullable
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property int $not_null_column_with_foreign_key_constraint
|
* @property int $not_null_column_with_foreign_key_constraint
|
||||||
* @property int $not_null_column_with_no_foreign_key_constraint
|
* @property int $not_null_column_with_no_foreign_key_constraint
|
||||||
@@ -61,8 +59,6 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property int $not_null_column_with_foreign_key_constraint
|
* @property int $not_null_column_with_foreign_key_constraint
|
||||||
* @property int $not_null_column_with_no_foreign_key_constraint
|
* @property int $not_null_column_with_no_foreign_key_constraint
|
||||||
@@ -132,8 +128,6 @@ use Illuminate\Database\Eloquent\Relations\MorphTo;
|
|||||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property-read Simple|null $relationBelongsTo
|
* @property-read Simple|null $relationBelongsTo
|
||||||
* @property-read AnotherModel|null $relationBelongsToInAnotherNamespace
|
* @property-read AnotherModel|null $relationBelongsToInAnotherNamespace
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\SimpleCasts\Mode
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $cast_to_int
|
* @property int $cast_to_int
|
||||||
* @property int $cast_to_integer
|
* @property int $cast_to_integer
|
||||||
* @property float $cast_to_real
|
* @property float $cast_to_real
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery()
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
|||||||
use Illuminate\Database\Query\Builder;
|
use Illuminate\Database\Query\Builder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property-read string|int|null $foo
|
* @property-read string|int|null $foo
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, UnionTypeModel> $withUnionTypeReturn
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, UnionTypeModel> $withUnionTypeReturn
|
||||||
* @property-read int|null $with_union_type_return_count
|
* @property-read int|null $with_union_type_return_count
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ use Illuminate\Database\Eloquent\Builder;
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @method static Builder|Simple newModelQuery()
|
* @method static Builder|Simple newModelQuery()
|
||||||
* @method static Builder|Simple newQuery()
|
* @method static Builder|Simple newQuery()
|
||||||
|
|||||||
+14
-14
@@ -5,10 +5,10 @@ declare(strict_types=1);
|
|||||||
namespace Barryvdh\LaravelIdeHelper\Tests;
|
namespace Barryvdh\LaravelIdeHelper\Tests;
|
||||||
|
|
||||||
use Barryvdh\LaravelIdeHelper\Macro;
|
use Barryvdh\LaravelIdeHelper\Macro;
|
||||||
use Barryvdh\Reflection\DocBlock;
|
|
||||||
use Barryvdh\Reflection\DocBlock\Tag;
|
|
||||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||||
use Illuminate\Routing\UrlGenerator;
|
use Illuminate\Routing\UrlGenerator;
|
||||||
|
use phpDocumentor\Reflection\DocBlock;
|
||||||
|
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||||
use ReflectionClass;
|
use ReflectionClass;
|
||||||
use ReflectionFunction;
|
use ReflectionFunction;
|
||||||
use ReflectionFunctionAbstract;
|
use ReflectionFunctionAbstract;
|
||||||
@@ -62,7 +62,7 @@ class MacroTest extends TestCase
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->assertNotNull($phpdoc);
|
$this->assertNotNull($phpdoc);
|
||||||
$this->assertEmpty($phpdoc->getText());
|
$this->assertEmpty($phpdoc->getSummary());
|
||||||
$this->assertEquals('@param int|null $a', $this->tagsToString($phpdoc, 'param'));
|
$this->assertEquals('@param int|null $a', $this->tagsToString($phpdoc, 'param'));
|
||||||
$this->assertEquals('@return int', $this->tagsToString($phpdoc, 'return'));
|
$this->assertEquals('@return int', $this->tagsToString($phpdoc, 'return'));
|
||||||
$this->assertTrue($phpdoc->hasTag('see'));
|
$this->assertTrue($phpdoc->hasTag('see'));
|
||||||
@@ -86,7 +86,7 @@ class MacroTest extends TestCase
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->assertNotNull($phpdoc);
|
$this->assertNotNull($phpdoc);
|
||||||
$this->assertStringContainsString('Test docblock', $phpdoc->getText());
|
$this->assertStringContainsString('Test docblock', $phpdoc->getSummary());
|
||||||
$this->assertEquals('@param int|null $a', $this->tagsToString($phpdoc, 'param'));
|
$this->assertEquals('@param int|null $a', $this->tagsToString($phpdoc, 'param'));
|
||||||
$this->assertEquals('@return int', $this->tagsToString($phpdoc, 'return'));
|
$this->assertEquals('@return int', $this->tagsToString($phpdoc, 'return'));
|
||||||
$this->assertTrue($phpdoc->hasTag('see'));
|
$this->assertTrue($phpdoc->hasTag('see'));
|
||||||
@@ -110,7 +110,7 @@ class MacroTest extends TestCase
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->assertNotNull($phpdoc);
|
$this->assertNotNull($phpdoc);
|
||||||
$this->assertStringContainsString('Test docblock', $phpdoc->getText());
|
$this->assertStringContainsString('Test docblock', $phpdoc->getSummary());
|
||||||
$this->assertEquals('@param int|null $a', $this->tagsToString($phpdoc, 'param'));
|
$this->assertEquals('@param int|null $a', $this->tagsToString($phpdoc, 'param'));
|
||||||
$this->assertFalse($phpdoc->hasTag('return'));
|
$this->assertFalse($phpdoc->hasTag('return'));
|
||||||
$this->assertTrue($phpdoc->hasTag('see'));
|
$this->assertTrue($phpdoc->hasTag('see'));
|
||||||
@@ -134,7 +134,7 @@ class MacroTest extends TestCase
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->assertNotNull($phpdoc);
|
$this->assertNotNull($phpdoc);
|
||||||
$this->assertStringContainsString('Test docblock', $phpdoc->getText());
|
$this->assertStringContainsString('Test docblock', $phpdoc->getSummary());
|
||||||
$this->assertFalse($phpdoc->hasTag('param'));
|
$this->assertFalse($phpdoc->hasTag('param'));
|
||||||
$this->assertEquals('@return int', $this->tagsToString($phpdoc, 'return'));
|
$this->assertEquals('@return int', $this->tagsToString($phpdoc, 'return'));
|
||||||
$this->assertTrue($phpdoc->hasTag('see'));
|
$this->assertTrue($phpdoc->hasTag('see'));
|
||||||
@@ -159,7 +159,7 @@ class MacroTest extends TestCase
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->assertNotNull($phpdoc);
|
$this->assertNotNull($phpdoc);
|
||||||
$this->assertStringContainsString('Test docblock', $phpdoc->getText());
|
$this->assertStringContainsString('Test docblock', $phpdoc->getSummary());
|
||||||
$this->assertEquals('@param \stdClass|null $a aaaaa', $this->tagsToString($phpdoc, 'param'));
|
$this->assertEquals('@param \stdClass|null $a aaaaa', $this->tagsToString($phpdoc, 'param'));
|
||||||
$this->assertEquals('@return int', $this->tagsToString($phpdoc, 'return'));
|
$this->assertEquals('@return int', $this->tagsToString($phpdoc, 'return'));
|
||||||
}
|
}
|
||||||
@@ -183,7 +183,7 @@ class MacroTest extends TestCase
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->assertNotNull($phpdoc);
|
$this->assertNotNull($phpdoc);
|
||||||
$this->assertStringContainsString('Test docblock', $phpdoc->getText());
|
$this->assertStringContainsString('Test docblock', $phpdoc->getSummary());
|
||||||
$this->assertEquals('@param mixed $a', $this->tagsToString($phpdoc, 'param'));
|
$this->assertEquals('@param mixed $a', $this->tagsToString($phpdoc, 'param'));
|
||||||
$this->assertEquals('@return \stdClass|null rrrrrrr', $this->tagsToString($phpdoc, 'return'));
|
$this->assertEquals('@return \stdClass|null rrrrrrr', $this->tagsToString($phpdoc, 'return'));
|
||||||
}
|
}
|
||||||
@@ -202,7 +202,7 @@ class MacroTest extends TestCase
|
|||||||
PHP));
|
PHP));
|
||||||
|
|
||||||
$this->assertNotNull($phpdoc);
|
$this->assertNotNull($phpdoc);
|
||||||
$this->assertStringContainsString('Test docblock', $phpdoc->getText());
|
$this->assertStringContainsString('Test docblock', $phpdoc->getSummary());
|
||||||
$this->assertEquals('@param \Stringable|string|null $a', $this->tagsToString($phpdoc, 'param'));
|
$this->assertEquals('@param \Stringable|string|null $a', $this->tagsToString($phpdoc, 'param'));
|
||||||
$this->assertEquals('@return \Stringable|string|null', $this->tagsToString($phpdoc, 'return'));
|
$this->assertEquals('@return \Stringable|string|null', $this->tagsToString($phpdoc, 'return'));
|
||||||
}
|
}
|
||||||
@@ -212,7 +212,7 @@ class MacroTest extends TestCase
|
|||||||
$tags = $docBlock->getTagsByName($name);
|
$tags = $docBlock->getTagsByName($name);
|
||||||
$tags = array_map(
|
$tags = array_map(
|
||||||
function (Tag $tag) {
|
function (Tag $tag) {
|
||||||
return trim((string)$tag);
|
return trim($tag->render());
|
||||||
},
|
},
|
||||||
$tags
|
$tags
|
||||||
);
|
);
|
||||||
@@ -242,13 +242,13 @@ class MacroTest extends TestCase
|
|||||||
$macro = new Macro($reflectionMethod, 'URL', new ReflectionClass(UrlGenerator::class), 'macroName');
|
$macro = new Macro($reflectionMethod, 'URL', new ReflectionClass(UrlGenerator::class), 'macroName');
|
||||||
$output = <<<'DOC'
|
$output = <<<'DOC'
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param string $foo
|
* @param string $foo
|
||||||
* @param int $bar
|
* @param int $bar
|
||||||
* @return string
|
* @return string
|
||||||
* @see \Barryvdh\LaravelIdeHelper\Tests\UrlGeneratorMacroClass::__invoke()
|
* @see \Barryvdh\LaravelIdeHelper\Tests\UrlGeneratorMacroClass::__invoke()
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
DOC;
|
DOC;
|
||||||
$this->assertSame($output, $macro->getDocComment(''));
|
$this->assertSame($output, $macro->getDocComment(''));
|
||||||
@@ -276,7 +276,7 @@ class MacroMock extends Macro
|
|||||||
|
|
||||||
public function getPhpDoc(ReflectionFunctionAbstract $method, ReflectionClass $class = null): DocBlock
|
public function getPhpDoc(ReflectionFunctionAbstract $method, ReflectionClass $class = null): DocBlock
|
||||||
{
|
{
|
||||||
return (new Macro($method, '', $class ?? $method->getClosureScopeClass()))->phpdoc;
|
return (new Macro($method, '', $class ?? $method->getClosureScopeClass()))->phpdoc->getDocBlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user