Issues

ZF-11013: headTitle helper

Issue Type: Improvement Created: 2011-01-31T07:39:46.000+0000 Last Updated: 2011-02-18T07:27:59.000+0000 Status: Resolved Fix version(s): - 1.11.4 (03/Mar/11)

Reporter: Marcos Gil Fuertes (marcis) Assignee: Rob Keplin (rkeplin) Tags: - Zend_View

Related issues: Attachments: - ZF-11013.diff

Description

First lines of method "headTitle" at Zend_View_Helper_HeadTitle could be simplified from:

    if ($setType === null && $this->getDefaultAttachOrder() === null) {
        $setType = Zend_View_Helper_Placeholder_Container_Abstract::APPEND;
    } elseif ($setType === null && $this->getDefaultAttachOrder() !== null) {
        $setType = $this->getDefaultAttachOrder();
    }

To:

    if ($setType === null) {
            if ($this->getDefaultAttachOrder() === null) {
                $setType = Zend_View_Helper_Placeholder_Container_Abstract::APPEND;
            } else {
                $setType = $this->getDefaultAttachOrder();
            }
    }

Or even more... using ternary operator.

Comments

Posted by Alexander Veremyev (alexander) on 2011-02-18T07:27:58.000+0000

Patch is applied.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts