Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type hints not working correctly? #5

Open
jrswgtr opened this issue Aug 5, 2022 · 1 comment
Open

Type hints not working correctly? #5

jrswgtr opened this issue Aug 5, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@jrswgtr
Copy link

jrswgtr commented Aug 5, 2022

Type hints don't get the class names but instead [object Object]. Is this a bug, or am I doing something wrong?

Here's an example.

Class diagram:

+-----------------------+
| SynchronizerInterface |
+-----------------------+
| +synchronize()        |
+-----------------------+
+---------------------------------------------------------------+
|                         Synchronizer                          |
+---------------------------------------------------------------+
| -synchronizers: SynchronizerInterface[0..*]                   |
+---------------------------------------------------------------+
| +__construct(synchronizers: SynchronizerInterface[0..*] = []) |
| +add(synchronizer: SynchronizerInterface)                     |
+---------------------------------------------------------------+

Generated PHP code of the SynchronizerInterface interface and Synchronizer implementation:

interface SynchronizerInterface
{

    /**
     * 
     */
    public function synchronize();

}

class Synchronizer implements SynchronizerInterface
{

    /** @var [object Object][] */
    private array $synchronizers;

    /**
     * @param [object Object][] $synchronizers
     */
    public function __construct([object Object] $synchronizers = [])
    {
        // TODO implement here
    }

    /**
     * @param [object Object] $synchronizer
     */
    public function add([object Object] $synchronizer)
    {
        // TODO implement here
    }

    /**
     * 
     */
    public function synchronize()
    {
        // TODO implement here
    }

}
@nahakiole
Copy link
Owner

Hey, thank you for reporting this. I think it is a bug :)
Did the bug template not show up for you? Could you reformat it like in the template and send me an example file as described?

Describe the bug
A clear and concise description of what the bug is.

Attach the .mdj file
To reproduce the problem it's best to attach the .mdj file where the problem appears. Else I might not be able to reproduce it and won't be able to solve the problem.

You can also try and create a blank one and reproduce it there, so you won't need to send me your evil world takeover UML plans.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@nahakiole nahakiole added the bug Something isn't working label Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants