Skip to content
This repository was archived by the owner on Sep 8, 2023. It is now read-only.
This repository was archived by the owner on Sep 8, 2023. It is now read-only.

Problem with MacrosCommand.php::generateFunction #33

Open
@farpat

Description

@farpat

Hello here,

This is an example of a macro :

use Carbon\Carbon;

Carbon::macro('example', function (Carbon $otherDate) {
   // ... some any code
});

When I generate macro via

php artisan ide-helper:macros

the generated _ide_macros.php contains something like that :

namespace Carbon {
   class Carbon {
        public static function example(Carbon\Carbon $otherDate) {

        }
   }
}

And we can see the type of $otherDate is wrong. I think that the easiest is to add the prefix \ in all types.

Thanks for your work :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions