Skip to content

Commit

Permalink
Test updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Wulfheart committed Feb 19, 2022
1 parent 07a5cf1 commit 567a66b
Show file tree
Hide file tree
Showing 2 changed files with 148 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Service/Generator/DocBlock/AsJobGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ public function generate(ActionInfo $info): array
new Method('makeUniqueJob', $args, $this->resolveType(UniqueJobDecorator::class), true),
new Method('dispatch', $args, $this->resolveType(PendingDispatch::class), true),
new Method('dispatchIf',
collect($args)->prepend(['name' => 'boolean', 'type' => Boolean::class])->toArray(),
collect($args)->prepend(['name' => 'boolean', 'type' => 'bool'])->toArray(),
$this->resolveAsUnionType(PendingDispatch::class, Fluent::class),
true),
new Method('dispatchUnless',
collect($args)->prepend(['name' => 'boolean', 'type' => Boolean::class])->toArray(),
collect($args)->prepend(['name' => 'boolean', 'type' => 'bool'])->toArray(),
$this->resolveAsUnionType(PendingDispatch::class, Fluent::class),
true),
new Method('dispatchSync', $args, null, true),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<?php

namespace Wulfheart\LaravelActionsIdeHelper\Tests\stubs;

/**
* @method static string run()
*/
class BaseAction
{
}
/**
*/
class EmptyAction
{
}
/**
*/
class NewAction
{
}
/**
* @method static \Lorisleiva\Actions\Decorators\JobDecorator|\Lorisleiva\Actions\Decorators\UniqueJobDecorator makeJob(mixed $someArguments)
* @method static \Lorisleiva\Actions\Decorators\UniqueJobDecorator makeUniqueJob(mixed $someArguments)
* @method static \Illuminate\Foundation\Bus\PendingDispatch dispatch(mixed $someArguments)
* @method static \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent dispatchIf(bool $boolean, mixed $someArguments)
* @method static \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent dispatchUnless(bool $boolean, mixed $someArguments)
* @method static void dispatchSync(mixed $someArguments)
* @method static void dispatchNow(mixed $someArguments)
* @method static void dispatchAfterResponse(mixed $someArguments)
* @method static mixed run(mixed $someArguments)
*/
class TestAction
{
}
/**
* @method static \Lorisleiva\Actions\Decorators\JobDecorator|\Lorisleiva\Actions\Decorators\UniqueJobDecorator makeJob(string $string, float|int $number)
* @method static \Lorisleiva\Actions\Decorators\UniqueJobDecorator makeUniqueJob(string $string, float|int $number)
* @method static \Illuminate\Foundation\Bus\PendingDispatch dispatch(string $string, float|int $number)
* @method static \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent dispatchIf(bool $boolean, string $string, float|int $number)
* @method static \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent dispatchUnless(bool $boolean, string $string, float|int $number)
* @method static void dispatchSync(string $string, float|int $number)
* @method static void dispatchNow(string $string, float|int $number)
* @method static void dispatchAfterResponse(string $string, float|int $number)
* @method static int|string run(string $string, float|int $number)
*/
class UnionTypeAction
{
}
/**
* @method static \Lorisleiva\Actions\Decorators\JobDecorator|\Lorisleiva\Actions\Decorators\UniqueJobDecorator makeJob(int $i)
* @method static \Lorisleiva\Actions\Decorators\UniqueJobDecorator makeUniqueJob(int $i)
* @method static \Illuminate\Foundation\Bus\PendingDispatch dispatch(int $i)
* @method static \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent dispatchIf(bool $boolean, int $i)
* @method static \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent dispatchUnless(bool $boolean, int $i)
* @method static void dispatchSync(int $i)
* @method static void dispatchNow(int $i)
* @method static void dispatchAfterResponse(int $i)
* @method static void run(int $i)
*/
class VoidAction
{
}
/**
* @method static \Lorisleiva\Actions\Decorators\JobDecorator|\Lorisleiva\Actions\Decorators\UniqueJobDecorator makeJob()
* @method static \Lorisleiva\Actions\Decorators\UniqueJobDecorator makeUniqueJob()
* @method static \Illuminate\Foundation\Bus\PendingDispatch dispatch()
* @method static \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent dispatchIf(bool $boolean)
* @method static \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent dispatchUnless(bool $boolean)
* @method static void dispatchSync()
* @method static void dispatchNow()
* @method static void dispatchAfterResponse()
* @method static mixed run()
*/
class VoidActionWithNoReturnType
{
}
namespace Wulfheart\LaravelActionsIdeHelper\Tests\stubs\Object;

/**
* @method static \Lorisleiva\Actions\Decorators\JobDecorator|\Lorisleiva\Actions\Decorators\UniqueJobDecorator makeJob(string $string, float|int $number)
* @method static \Lorisleiva\Actions\Decorators\UniqueJobDecorator makeUniqueJob(string $string, float|int $number)
* @method static \Illuminate\Foundation\Bus\PendingDispatch dispatch(string $string, float|int $number)
* @method static \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent dispatchIf(bool $boolean, string $string, float|int $number)
* @method static \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent dispatchUnless(bool $boolean, string $string, float|int $number)
* @method static void dispatchSync(string $string, float|int $number)
* @method static void dispatchNow(string $string, float|int $number)
* @method static void dispatchAfterResponse(string $string, float|int $number)
* @method static int|string run(string $string, float|int $number)
*/
class ObjectAction
{
}
namespace Wulfheart\LaravelActionsIdeHelper\Tests\stubs\Jobs;

/**
* @method static \Lorisleiva\Actions\Decorators\JobDecorator|\Lorisleiva\Actions\Decorators\UniqueJobDecorator makeJob(int $i)
* @method static \Lorisleiva\Actions\Decorators\UniqueJobDecorator makeUniqueJob(int $i)
* @method static \Illuminate\Foundation\Bus\PendingDispatch dispatch(int $i)
* @method static \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent dispatchIf(bool $boolean, int $i)
* @method static \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent dispatchUnless(bool $boolean, int $i)
* @method static void dispatchSync(int $i)
* @method static void dispatchNow(int $i)
* @method static void dispatchAfterResponse(int $i)
*/
class WithDecoratorAction
{
}
/**
* @method static \Lorisleiva\Actions\Decorators\JobDecorator|\Lorisleiva\Actions\Decorators\UniqueJobDecorator makeJob()
* @method static \Lorisleiva\Actions\Decorators\UniqueJobDecorator makeUniqueJob()
* @method static \Illuminate\Foundation\Bus\PendingDispatch dispatch()
* @method static \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent dispatchIf(bool $boolean)
* @method static \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent dispatchUnless(bool $boolean)
* @method static void dispatchSync()
* @method static void dispatchNow()
* @method static void dispatchAfterResponse()
*/
class WithoutDecoratorAction
{
}
namespace Lorisleiva\Actions\Concerns;

/**
* @method void asController()
*/
trait AsController
{
}
/**
* @method void asListener()
*/
trait AsListener
{
}
/**
* @method void asJob()
*/
trait AsJob
{
}
/**
* @method void asCommand(\Illuminate\Console\Command $command)
*/
trait AsCommand
{
}

0 comments on commit 567a66b

Please sign in to comment.