Skip to content

Commit

Permalink
Fix IDE Help file return types and method
Browse files Browse the repository at this point in the history
  • Loading branch information
victor-falcon committed Nov 19, 2020
1 parent 80a41c5 commit a1cf80f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Console/Commands/IdeHelpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace VictorFalcon\LaravelTask\Console\Commands;

use App\Models\User;
use Composer\Autoload\ClassMapGenerator;
use Illuminate\Console\Command;
use ReflectionClass;
Expand Down Expand Up @@ -167,11 +168,17 @@ private function createPhpDocs(Task $task, array $args, string $return): string
$classname = $reflection->getShortName();
$argsString = implode(', ', $args);

$user = '\\' . User::class;

return <<<TEXT
namespace $namespace {
/**
* @method static $return trigger($argsString)
* @method static self trigger($argsString)
* @method self by($user \$user)
* @method self withValid(array \$data)
* @method $return result
* @method $return forceResult
*/
class $classname extends \VictorFalcon\LaravelTask\Task {}
}
Expand Down

0 comments on commit a1cf80f

Please sign in to comment.