mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 18:13:11 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
771770e56c | ||
|
|
88353535f2 | ||
|
|
acb2df9dfb | ||
|
|
7052b4f708 | ||
|
|
ac1e27167d | ||
|
|
de64d665e0 | ||
|
|
93d987336b | ||
|
|
744a9cf380 |
@@ -18,7 +18,7 @@ jobs:
|
|||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: 7.4
|
php-version: 8.0
|
||||||
coverage: none
|
coverage: none
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|||||||
@@ -77,6 +77,11 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
php: [8.1, 8.0, 7.4, 7.3]
|
php: [8.1, 8.0, 7.4, 7.3]
|
||||||
laravel: [8.*]
|
laravel: [8.*]
|
||||||
|
exclude:
|
||||||
|
- php: 7.4
|
||||||
|
laravel: 9.*
|
||||||
|
- php: 7.3
|
||||||
|
laravel: 9.*
|
||||||
name: P${{ matrix.php }} - Laravel${{ matrix.laravel }}
|
name: P${{ matrix.php }} - Laravel${{ matrix.laravel }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: 7.4
|
php-version: 8.0
|
||||||
coverage: none
|
coverage: none
|
||||||
extensions: pdo_sqlite
|
extensions: pdo_sqlite
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,15 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, windows-2019]
|
os: [ubuntu-20.04, windows-2019]
|
||||||
php: [8.1, 8.0, 7.4, 7.3]
|
php: [8.1, 8.0, 7.4, 7.3]
|
||||||
laravel: [8.*]
|
laravel: [8.*, 9.*]
|
||||||
dependency-version: [prefer-lowest, prefer-stable]
|
dependency-version: [prefer-lowest, prefer-stable]
|
||||||
exclude:
|
exclude:
|
||||||
- php: 8.0
|
- php: 8.0
|
||||||
dependency-version: prefer-lowest
|
dependency-version: prefer-lowest
|
||||||
|
- php: 7.4
|
||||||
|
laravel: 9.*
|
||||||
|
- php: 7.3
|
||||||
|
laravel: 9.*
|
||||||
- os: windows-2019
|
- os: windows-2019
|
||||||
php: 7.4
|
php: 7.4
|
||||||
- os: windows-2019
|
- os: windows-2019
|
||||||
|
|||||||
+14
-11
@@ -2,34 +2,37 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
[Next release](https://github.com/barryvdh/laravel-ide-helper/compare/v2.10.0...master)
|
[Next release](https://github.com/barryvdh/laravel-ide-helper/compare/v2.12.0...master)
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
2022-01-23, 2.12.0
|
||||||
|
------------------
|
||||||
|
### Added
|
||||||
|
- Add support for custom casts that using `Castable` [#1287 / binotaliu](https://github.com/barryvdh/laravel-ide-helper/pull/1287)
|
||||||
|
- Added Laravel 9 support [#1297 / rcerljenko](https://github.com/barryvdh/laravel-ide-helper/pull/1297)
|
||||||
|
|
||||||
|
2022-01-03, 2.11.0
|
||||||
|
------------------
|
||||||
### Added
|
### Added
|
||||||
- Add support for Laravel 8.77 Attributes [\#1289 / SimonJnsson](https://github.com/barryvdh/laravel-ide-helper/pull/1289)
|
- Add support for Laravel 8.77 Attributes [\#1289 / SimonJnsson](https://github.com/barryvdh/laravel-ide-helper/pull/1289)
|
||||||
|
|
||||||
### Added
|
|
||||||
- Add support for cast types `decimal:*`, `encrypted:*`, `immutable_date`, `immutable_datetime`, `custom_datetime`, and `immutable_custom_datetime` [#1262 / miken32](https://github.com/barryvdh/laravel-ide-helper/pull/1262)
|
- Add support for cast types `decimal:*`, `encrypted:*`, `immutable_date`, `immutable_datetime`, `custom_datetime`, and `immutable_custom_datetime` [#1262 / miken32](https://github.com/barryvdh/laravel-ide-helper/pull/1262)
|
||||||
|
- Add support of variadic parameters in `ide-helper:models` [\#1234 / shaffe-fr](https://github.com/barryvdh/laravel-ide-helper/pull/1234)
|
||||||
|
- Add support of custom casts without properties [\#1267 / sparclex](https://github.com/barryvdh/laravel-ide-helper/pull/1267)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fix recursively searching for `HasFactory` and `Macroable` traits [\#1216 / daniel-de-wit](https://github.com/barryvdh/laravel-ide-helper/pull/1216)
|
- Fix recursively searching for `HasFactory` and `Macroable` traits [\#1216 / daniel-de-wit](https://github.com/barryvdh/laravel-ide-helper/pull/1216)
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- Use platformName to determine db type when casting boolean types [\#1212 / stockalexander](https://github.com/barryvdh/laravel-ide-helper/pull/1212)
|
- Use platformName to determine db type when casting boolean types [\#1212 / stockalexander](https://github.com/barryvdh/laravel-ide-helper/pull/1212)
|
||||||
|
|
||||||
### Added
|
|
||||||
- Add support of variadic parameters in `ide-helper:models` [\#1234 / shaffe-fr](https://github.com/barryvdh/laravel-ide-helper/pull/1234)
|
|
||||||
- Add support of custom casts without properties [\#1267 / sparclex](https://github.com/barryvdh/laravel-ide-helper/pull/1267)
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Move default models helper filename to config [\#1241 / wimski](https://github.com/barryvdh/laravel-ide-helper/pull/1241)
|
- Move default models helper filename to config [\#1241 / wimski](https://github.com/barryvdh/laravel-ide-helper/pull/1241)
|
||||||
|
|
||||||
2021-06-18, 2.10.1
|
2021-06-18, 2.10.1
|
||||||
------------------
|
------------------
|
||||||
### Added
|
### Added
|
||||||
- Added Type registration according to [Custom Mapping Types documentation](https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html#custom-mapping-types)
|
- Added Type registration according to [Custom Mapping Types documentation](https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html#custom-mapping-types) [\#1228 / wimski](https://github.com/barryvdh/laravel-ide-helper/pull/1241)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fixing issue where configured custom_db_types could cause a DBAL exception to be thrown while running `ide-helper:models`
|
- Fixing issue where configured custom_db_types could cause a DBAL exception to be thrown while running `ide-helper:models` [\#1228 / wimski](https://github.com/barryvdh/laravel-ide-helper/pull/1241)
|
||||||
|
|
||||||
2021-04-09, 2.10.0
|
2021-04-09, 2.10.0
|
||||||
------------------
|
------------------
|
||||||
|
|||||||
+23
-23
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "barryvdh/laravel-ide-helper",
|
"name": "barryvdh/laravel-ide-helper",
|
||||||
"description": "Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.",
|
"description": "Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.",
|
||||||
|
"license": "MIT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"laravel",
|
"laravel",
|
||||||
"autocomplete",
|
"autocomplete",
|
||||||
@@ -12,7 +13,6 @@
|
|||||||
"codeintel",
|
"codeintel",
|
||||||
"phpdoc"
|
"phpdoc"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Barry vd. Heuvel",
|
"name": "Barry vd. Heuvel",
|
||||||
@@ -25,39 +25,28 @@
|
|||||||
"barryvdh/reflection-docblock": "^2.0.6",
|
"barryvdh/reflection-docblock": "^2.0.6",
|
||||||
"composer/composer": "^1.10.23 || ^2.1.9",
|
"composer/composer": "^1.10.23 || ^2.1.9",
|
||||||
"doctrine/dbal": "^2.6 || ^3",
|
"doctrine/dbal": "^2.6 || ^3",
|
||||||
"illuminate/console": "^8",
|
"illuminate/console": "^8 || ^9",
|
||||||
"illuminate/filesystem": "^8",
|
"illuminate/filesystem": "^8 || ^9",
|
||||||
"illuminate/support": "^8",
|
"illuminate/support": "^8 || ^9",
|
||||||
"nikic/php-parser": "^4.7",
|
"nikic/php-parser": "^4.7",
|
||||||
"phpdocumentor/type-resolver": "^1.1.0"
|
"phpdocumentor/type-resolver": "^1.1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"ext-pdo_sqlite": "*",
|
"ext-pdo_sqlite": "*",
|
||||||
"friendsofphp/php-cs-fixer": "^2",
|
"friendsofphp/php-cs-fixer": "^2",
|
||||||
"illuminate/config": "^8",
|
"illuminate/config": "^8 || ^9",
|
||||||
"illuminate/view": "^8",
|
"illuminate/view": "^8 || ^9",
|
||||||
"mockery/mockery": "^1.4",
|
"mockery/mockery": "^1.4",
|
||||||
"orchestra/testbench": "^6",
|
"orchestra/testbench": "^6 || ^7",
|
||||||
"phpunit/phpunit": "^8.5 || ^9",
|
"phpunit/phpunit": "^8.5 || ^9",
|
||||||
"spatie/phpunit-snapshot-assertions": "^3 || ^4",
|
"spatie/phpunit-snapshot-assertions": "^3 || ^4",
|
||||||
"vimeo/psalm": "^3.12"
|
"vimeo/psalm": "^3.12"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"illuminate/events": "Required for automatic helper generation (^6|^7|^8)."
|
"illuminate/events": "Required for automatic helper generation (^6|^7|^8|^9)."
|
||||||
},
|
|
||||||
"config": {
|
|
||||||
"sort-packages": true
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "2.9-dev"
|
|
||||||
},
|
|
||||||
"laravel": {
|
|
||||||
"providers": [
|
|
||||||
"Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"prefer-stable": true,
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Barryvdh\\LaravelIdeHelper\\": "src"
|
"Barryvdh\\LaravelIdeHelper\\": "src"
|
||||||
@@ -68,8 +57,19 @@
|
|||||||
"Barryvdh\\LaravelIdeHelper\\Tests\\": "tests"
|
"Barryvdh\\LaravelIdeHelper\\Tests\\": "tests"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"config": {
|
||||||
"prefer-stable": true,
|
"sort-packages": true
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.12-dev"
|
||||||
|
},
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"analyze": "psalm",
|
"analyze": "psalm",
|
||||||
"check-style": [
|
"check-style": [
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
|
// phpcs:ignoreFile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A helper file for Laravel, to provide autocomplete information to your IDE
|
* A helper file for Laravel, to provide autocomplete information to your IDE
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ use Composer\Autoload\ClassMapGenerator;
|
|||||||
use Doctrine\DBAL\Exception as DBALException;
|
use Doctrine\DBAL\Exception as DBALException;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Type;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
|
use Illuminate\Contracts\Database\Eloquent\Castable;
|
||||||
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
||||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
@@ -366,6 +367,9 @@ class ModelsCommand extends Command
|
|||||||
} elseif (Str::startsWith($type, 'encrypted:')) {
|
} elseif (Str::startsWith($type, 'encrypted:')) {
|
||||||
$type = Str::after($type, ':');
|
$type = Str::after($type, ':');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$params = [];
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'encrypted':
|
case 'encrypted':
|
||||||
$realType = 'mixed';
|
$realType = 'mixed';
|
||||||
@@ -412,6 +416,9 @@ class ModelsCommand extends Command
|
|||||||
$type = strtok($type, ':');
|
$type = strtok($type, ':');
|
||||||
$realType = class_exists($type) ? ('\\' . $type) : 'mixed';
|
$realType = class_exists($type) ? ('\\' . $type) : 'mixed';
|
||||||
$this->setProperty($name, null, true, true);
|
$this->setProperty($name, null, true, true);
|
||||||
|
|
||||||
|
$params = strtok(':');
|
||||||
|
$params = $params ? explode(',', $params) : [];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -419,6 +426,7 @@ class ModelsCommand extends Command
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$realType = $this->checkForCastableCasts($realType, $params);
|
||||||
$realType = $this->checkForCustomLaravelCasts($realType);
|
$realType = $this->checkForCustomLaravelCasts($realType);
|
||||||
$realType = $this->getTypeOverride($realType);
|
$realType = $this->getTypeOverride($realType);
|
||||||
$this->properties[$name]['type'] = $this->getTypeInModel($model, $realType);
|
$this->properties[$name]['type'] = $this->getTypeInModel($model, $realType);
|
||||||
@@ -1141,9 +1149,9 @@ class ModelsCommand extends Command
|
|||||||
*
|
*
|
||||||
* @return null|string
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
protected function getReturnTypeFromDocBlock(\ReflectionMethod $reflection)
|
protected function getReturnTypeFromDocBlock(\ReflectionMethod $reflection, \Reflector $reflectorForContext = null)
|
||||||
{
|
{
|
||||||
$phpDocContext = (new ContextFactory())->createFromReflector($reflection);
|
$phpDocContext = (new ContextFactory())->createFromReflector($reflectorForContext ?? $reflection);
|
||||||
$context = new Context(
|
$context = new Context(
|
||||||
$phpDocContext->getNamespace(),
|
$phpDocContext->getNamespace(),
|
||||||
$phpDocContext->getNamespaceAliases()
|
$phpDocContext->getNamespaceAliases()
|
||||||
@@ -1260,6 +1268,32 @@ class ModelsCommand extends Command
|
|||||||
return $keyword;
|
return $keyword;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function checkForCastableCasts(string $type, array $params = []): string
|
||||||
|
{
|
||||||
|
if (!class_exists($type) || !interface_exists(Castable::class)) {
|
||||||
|
return $type;
|
||||||
|
}
|
||||||
|
|
||||||
|
$reflection = new \ReflectionClass($type);
|
||||||
|
|
||||||
|
if (!$reflection->implementsInterface(Castable::class)) {
|
||||||
|
return $type;
|
||||||
|
}
|
||||||
|
|
||||||
|
$cast = call_user_func([$type, 'castUsing'], $params);
|
||||||
|
|
||||||
|
if (is_string($cast) && !is_object($cast)) {
|
||||||
|
return $cast;
|
||||||
|
}
|
||||||
|
|
||||||
|
$castReflection = new ReflectionObject($cast);
|
||||||
|
|
||||||
|
$methodReflection = $castReflection->getMethod('get');
|
||||||
|
|
||||||
|
return $this->getReturnTypeFromReflection($methodReflection) ??
|
||||||
|
$this->getReturnTypeFromDocBlock($methodReflection, $reflection);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $type
|
* @param string $type
|
||||||
* @return string|null
|
* @return string|null
|
||||||
|
|||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\Database\Eloquent\Castable;
|
||||||
|
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
||||||
|
|
||||||
|
class CastableReturnsAnonymousCaster implements Castable
|
||||||
|
{
|
||||||
|
public static function castUsing(array $arguments)
|
||||||
|
{
|
||||||
|
return new class() implements CastsAttributes {
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
* @return CastedProperty
|
||||||
|
*/
|
||||||
|
public function get($model, string $key, $value, array $attributes)
|
||||||
|
{
|
||||||
|
return new CastedProperty();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function set($model, string $key, $value, array $attributes)
|
||||||
|
{
|
||||||
|
// TODO: Implement set() method.
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\Database\Eloquent\Castable;
|
||||||
|
|
||||||
|
class CastableReturnsCustomCaster implements Castable
|
||||||
|
{
|
||||||
|
public static function castUsing(array $arguments)
|
||||||
|
{
|
||||||
|
return CustomCasterWithDocblockReturn::class;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Models;
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Models;
|
||||||
|
|
||||||
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CastableReturnsAnonymousCaster;
|
||||||
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CastableReturnsCustomCaster;
|
||||||
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithDocblockReturn;
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithDocblockReturn;
|
||||||
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithDocblockReturnFqn;
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithDocblockReturnFqn;
|
||||||
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithNullablePrimitiveReturn;
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithNullablePrimitiveReturn;
|
||||||
@@ -31,6 +33,8 @@ class CustomCast extends Model
|
|||||||
'casted_property_with_param' => CustomCasterWithParam::class . ':param',
|
'casted_property_with_param' => CustomCasterWithParam::class . ':param',
|
||||||
'casted_property_with_static_return_docblock' => SelfCastingCasterWithStaticDocblockReturn::class,
|
'casted_property_with_static_return_docblock' => SelfCastingCasterWithStaticDocblockReturn::class,
|
||||||
'casted_property_with_this_return_docblock' => SelfCastingCasterWithThisDocblockReturn::class,
|
'casted_property_with_this_return_docblock' => SelfCastingCasterWithThisDocblockReturn::class,
|
||||||
|
'casted_property_with_castable' => CastableReturnsCustomCaster::class,
|
||||||
|
'casted_property_with_anonymous_cast' => CastableReturnsAnonymousCaster::class,
|
||||||
'extended_casted_property_with_static_return_docblock' => ExtendedSelfCastingCasterWithStaticDocblockReturn::class,
|
'extended_casted_property_with_static_return_docblock' => ExtendedSelfCastingCasterWithStaticDocblockReturn::class,
|
||||||
'extended_casted_property_with_this_return_docblock' => ExtendedSelfCastingCasterWithThisDocblockReturn::class,
|
'extended_casted_property_with_this_return_docblock' => ExtendedSelfCastingCasterWithThisDocblockReturn::class,
|
||||||
'casted_property_with_static_return_docblock_and_param' => SelfCastingCasterWithStaticDocblockReturn::class . ':param',
|
'casted_property_with_static_return_docblock_and_param' => SelfCastingCasterWithStaticDocblockReturn::class . ':param',
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Models;
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Models;
|
||||||
|
|
||||||
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CastableReturnsAnonymousCaster;
|
||||||
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CastableReturnsCustomCaster;
|
||||||
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithDocblockReturn;
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithDocblockReturn;
|
||||||
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithDocblockReturnFqn;
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithDocblockReturnFqn;
|
||||||
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithNullablePrimitiveReturn;
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CustomCasterWithNullablePrimitiveReturn;
|
||||||
@@ -34,6 +36,8 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
* @property ExtendedSelfCastingCasterWithStaticDocblockReturn $extended_casted_property_with_static_return_docblock
|
* @property ExtendedSelfCastingCasterWithStaticDocblockReturn $extended_casted_property_with_static_return_docblock
|
||||||
* @property ExtendedSelfCastingCasterWithThisDocblockReturn $extended_casted_property_with_this_return_docblock
|
* @property ExtendedSelfCastingCasterWithThisDocblockReturn $extended_casted_property_with_this_return_docblock
|
||||||
* @property SelfCastingCasterWithStaticDocblockReturn $casted_property_with_static_return_docblock_and_param
|
* @property SelfCastingCasterWithStaticDocblockReturn $casted_property_with_static_return_docblock_and_param
|
||||||
|
* @property \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CastedProperty $casted_property_with_castable
|
||||||
|
* @property \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CastedProperty $casted_property_with_anonymous_cast
|
||||||
* @property \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CastedProperty $cast_without_property
|
* @property \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\LaravelCustomCasts\Casts\CastedProperty $cast_without_property
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|CustomCast newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|CustomCast newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|CustomCast newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|CustomCast newQuery()
|
||||||
@@ -66,6 +70,8 @@ class CustomCast extends Model
|
|||||||
'casted_property_with_param' => CustomCasterWithParam::class . ':param',
|
'casted_property_with_param' => CustomCasterWithParam::class . ':param',
|
||||||
'casted_property_with_static_return_docblock' => SelfCastingCasterWithStaticDocblockReturn::class,
|
'casted_property_with_static_return_docblock' => SelfCastingCasterWithStaticDocblockReturn::class,
|
||||||
'casted_property_with_this_return_docblock' => SelfCastingCasterWithThisDocblockReturn::class,
|
'casted_property_with_this_return_docblock' => SelfCastingCasterWithThisDocblockReturn::class,
|
||||||
|
'casted_property_with_castable' => CastableReturnsCustomCaster::class,
|
||||||
|
'casted_property_with_anonymous_cast' => CastableReturnsAnonymousCaster::class,
|
||||||
'extended_casted_property_with_static_return_docblock' => ExtendedSelfCastingCasterWithStaticDocblockReturn::class,
|
'extended_casted_property_with_static_return_docblock' => ExtendedSelfCastingCasterWithStaticDocblockReturn::class,
|
||||||
'extended_casted_property_with_this_return_docblock' => ExtendedSelfCastingCasterWithThisDocblockReturn::class,
|
'extended_casted_property_with_this_return_docblock' => ExtendedSelfCastingCasterWithThisDocblockReturn::class,
|
||||||
'casted_property_with_static_return_docblock_and_param' => SelfCastingCasterWithStaticDocblockReturn::class . ':param',
|
'casted_property_with_static_return_docblock_and_param' => SelfCastingCasterWithStaticDocblockReturn::class . ':param',
|
||||||
|
|||||||
Reference in New Issue
Block a user