Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349063

Summary: [CA] any CA for properties and methods in some cases in ZF, the order of methods call is important ( e.g. Zend_Dojo_Form_Element_DateTextBox and CA methods declared in Zend_Dojo_Form_Element_DateTextBox class )
Product: z_Archived Reporter: Silver Zachara <silver.zachara>
Component: PDTAssignee: PHP Core <php.core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: ganoro, silviya, zhaozhongwei, zulus
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Problems with CA for parent classes none

Description Silver Zachara CLA 2011-06-10 11:38:25 EDT
Hi,

I have long time problem with CA for the Zend_Dojo_Form_Element_ ( methods from parent classes aren't showed in CA popup tooltip ) ( below only short format like ZDFE_ ).

The order of the methods calls is critical, the example will be the best, how to show where the problem is.

In attachment is whole php file, where I will test this problems.

The are more problems and combinations, when CA doesn't work, so I show all examples:


h3. First Problem


bc.. $name = new Zend_Dojo_Form_Element_TextBox('name');
$name
    ->setLabel('Name:')
    ->| // Any CA from ZDFE_Textbox, Zend_Dojo_Form_Element_Dijit, CA only from Zend_Form_Element 


h3. Second Problem


bc.. 

$name = new Zend_Dojo_Form_Element_TextBox('name');
$name
    ->setLabel()
    ->setDijitParams()
    ->| // ANY CA !!!


p. 

I think, that there is still only one problem, but I can't discover where ( the combination of method call ), if I discover it I post it here.

Would be great, if this problems was fixed in Indigo Release.

Thank you.
Comment 1 Silver Zachara CLA 2011-06-10 11:40:10 EDT
Created attachment 197796 [details]
Problems with CA for parent classes

Problems with CA for parent classes ( Zend_Dojo_Form_Element_* )
Comment 2 Zhongwei Zhao CLA 2011-06-22 04:05:07 EDT
hi,

I have seen that the phpdoc of setLabel method return Zend_Form_Element
    /**
     * Set element label
     *
     * @param  string $label
     * @return Zend_Form_Element
     */
     
and because we look into the phpdoc first,if there is no @return in phpdoc,then we go over the method.So for this case we can do nothing.

But if I remove @return Zend_Form_Element from the phpdoc,the result is same,I can fix this,and will commit the code later.
Comment 3 Roy Ganor CLA 2011-08-09 04:12:42 EDT
Per Zhao's comment, this is the way ZF documented their methods.  sNop do you think this should be fixed?

Also lowering severity to normal (maybe a feature request?)
Comment 4 Dawid Pakula CLA 2015-09-26 06:01:41 EDT
Closing as WONTFIX.

As Zhongwei Zhao described, such methods have "@return Zend_Form_Element", this always override method return type.

If @return Zend_Form_Element will be removed or replaced by @return $this (PDT 3.6), everything works fine.
Comment 5 Sylvia Tancheva CLA 2015-10-14 10:23:32 EDT
Closing