Skip to content
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 :)

Activity

farpat

farpat commented on Sep 4, 2023

@farpat
Author

I go to propose a merge request

added a commit that references this issue on Sep 4, 2023
415b54c
linked a pull request that will close this issue on Sep 4, 2023
added a commit that references this issue on Sep 4, 2023
4b357d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Participants

    @farpat

    Issue actions

      Problem with MacrosCommand.php::generateFunction · Issue #33 · KristofMorva/laravel-ide-macros