This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 270237 - [PHP7.1] Generated codes are missing the nullable type prefix
Summary: [PHP7.1] Generated codes are missing the nullable type prefix
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: Dev
Hardware: All All
: P3 normal (vote)
Assignee: junichi11
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-29 05:01 UTC by junichi11
Modified: 2017-04-04 02:22 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description junichi11 2017-03-29 05:01:00 UTC
Implement(Override) methods can be generated by three ways:

- Code Generator
- Code Completion
- Hint (ImlementAbstractMethodsHintError)


Sample code:

<?php

interface TestInterface {
    
    public function test(?string $stirng, int $int): ?string;
}

abstract class AbstractClass implements TestInterface {
    // Code Generator: [Alt] + [Insert]
    public function test(?string $stirng, int $int): string { // missing "?"
        
    }

}

class MyClass implements TestInterface { // Hint: [Alt] + [Enter]
    
    public function test(?string $stirng, int $int): string { // missing "?"
        
    }

}

class MyClass2 implements TestInterface {
    
    // CC: [Ctrl] + [Space]
    public function test(?string $stirng, int $int) { // missing a return type
        ;
    }
}

It seems that parameters have the prefix. But return types are missing it(or itself).

Thanks.
Comment 1 Tomas Mysik 2017-03-29 09:37:11 UTC
Thanks for looking at this issue, Junichi.
Comment 2 junichi11 2017-03-29 11:37:28 UTC
Sure :)
Comment 3 junichi11 2017-04-03 01:47:46 UTC
Fixed.

http://hg.netbeans.org/web-main/rev/e70046a5d4af

Thanks.
Comment 4 Quality Engineering 2017-04-04 02:22:40 UTC
Integrated into 'main-silver', will be available in build *201704040002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e70046a5d4af
User: Junichi Yamamoto <junichi11@netbeans.org>
Log: #270237 - [PHP7.1] Generated codes are missing the nullable type prefix