protected function isDuplicateScript(
        PhpRenderer $view,
        $container
    ) {
        /** @var \Zend\View\Helper\HeadScript $headScript */
        $headScript = $view->headScript();

        $container = $headScript->getContainer();

        foreach ($container as &$item) {
            if (($item->source === null)
                && !empty($item->attributes['src'])
                && !empty($container->attributes['src'])
                && ($container->attributes['src'] == $item->attributes['src'])
            ) {
                return true;
            }
        }

        return false;
    }
protected function isDuplicateScript(
        PhpRenderer $view,
        $container
    ) {
        /** @var \Zend\View\Helper\HeadScript $headScript */
        $headScript = $view->headScript();

        $container = $headScript->getContainer();

        foreach ($container as &$item) {
            if (($item->source === null)
                && !empty($item->attributes['src'])
                && !empty($container->attributes['src'])
                && ($container->attributes['src'] == $item->attributes['src'])
            ) {
                return true;
            }
        }

        return false;
    }
protected function isDuplicateScript ( PhpRenderer $ view , $ container ) { /** @var \Zend\View\Helper\HeadScript $headScript */ $ headScript = $ view -> headScript ( ) ; $ container = $ headScript -> getContainer ( ) ; foreach ( $ container as & $ item ) { if ( ( $ item -> source === null ) && ! empty ( $ item -> attributes [ 'src' ] ) && ! empty ( $ container -> attributes [ 'src' ] ) && ( $ container -> attributes [ 'src' ] == $ item -> attributes [ 'src' ] ) ) { return true ; } } return false ; }
Check to see if Scripts are duplicated

@param PhpRenderer                  $view
@param \Zend\View\Helper\HeadScript $container

@return bool
Check to see if Scripts are duplicated