| Summary: | New templated 'Content Assist': optional parameters are included in the template | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Ilya Sedlovsky <purebill> |
| Component: | PDT | Assignee: | PHP Core <php.core-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | gadi, ganoro |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
duplicate (original is fixed) *** This bug has been marked as a duplicate of bug 309297 *** I tested it use the pdt product,and I can reproduce it,but it does not exist in devenv.And I have written a pdtt file to test it.Maybe it will works in the next version,but I am not sure! Verified at PDT-2.2.0.v20100616 Auto completion is suggested only mandatory function parameters This issue is fixed Closing Thanks Verified by Teodor Kirkov teodor.k@zend.com |
Build Identifier: 20100520-1308 When a method of any class is inserted using code assist the list of all parameters of the method is present in the template of the method to fill them regardless of the fact some of them are optional (has default values) for the method and may not be present in the method call. Reproducible: Always Steps to Reproduce: 1. Create new PHP file and fill it with: <?php class Test { public function test($mandatory, $optional = null) {} } $test = new Test(); $test-> ?> 2. Put your text cursor after "$test->" and press Ctrl+Space (invoke Code Assist). 3. PDT inserts template: $test->test($mandatory, $optional) Note that $optional parameter has default value and must not be present in the template.