Code Duplication    Length = 12-12 lines in 2 locations

main/inc/lib/pear/HTML/Table/Storage.php 2 locations

@@ 650-661 (lines=12) @@
647
     *                                    of table row attributes
648
     * @access   public
649
     */
650
    function setColAttributes($col, $attributes = null)
651
    {
652
        $multiAttr = $this->_isAttributesArray($attributes);
653
        for ($i = 0; $i < $this->_rows; $i++) {
654
            if ($multiAttr) {
655
                $this->setCellAttributes($i, $col,
656
                    $attributes[$i - ((ceil(($i + 1) / count($attributes))) - 1) * count($attributes)]);
657
            } else {
658
                $this->setCellAttributes($i, $col, $attributes);
659
            }
660
        }
661
    }
662
663
    /**
664
     * Updates the column attributes for an existing column
@@ 670-681 (lines=12) @@
667
     *                                    of table row attributes
668
     * @access   public
669
     */
670
    function updateColAttributes($col, $attributes = null)
671
    {
672
        $multiAttr = $this->_isAttributesArray($attributes);
673
        for ($i = 0; $i < $this->_rows; $i++) {
674
            if ($multiAttr) {
675
                $this->updateCellAttributes($i, $col,
676
                    $attributes[$i - ((ceil(($i + 1) / count($attributes))) - 1) * count($attributes)]);
677
            } else {
678
                $this->updateCellAttributes($i, $col, $attributes);
679
            }
680
        }
681
    }
682
683
    /**
684
     * Sets the attributes for all cells