Skip to content

Working with nullable properties. #196

Open
@todo-username

Description

@todo-username

Bug Report

Q A
Version(s) 4.13.0

Summary

When creating methods with arguments that accept NULL, an additional '\' character is inserted.

image

Current behavior

When creating methods with arguments that accept NULL, an additional '\' character is inserted.

image

This behavior is most likely due to this method

src/Generator/TypeGenerator/AtomicType.php
image

If you remove the substitution of these characters, the method is generated correctly
image

Most likely, these characters are removed incorrectly if use ClassName is present in the class. If you create properties without the '?' The extra '\' is not added.

How to reproduce

Try creating methods for nullable properties (not primitives).
image

Expected behavior

The method is created without the additional '\' character.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions