Code Duplication    Length = 20-20 lines in 3 locations

src/Table/Render.php 3 locations

@@ 50-69 (lines=20) @@
47
	 *
48
	 * @return array
49
	 */
50
	protected function buildRows(Table $table)
51
	{
52
		//Generate each row
53
		$rows = array();
54
55
		foreach ( $table->getRows() as $row )
56
		{
57
			//Build the cells for each row
58
			$cells = array();
59
60
			foreach ( $row as $cell )
61
			{
62
				$cells[] = $this->cell($cell);
63
			}
64
65
			$rows[] = $this->row($row, $cells);
66
		}
67
68
		return $rows;
69
	}
70
71
	/**
72
	 * Renders the header rows for the table
@@ 78-97 (lines=20) @@
75
	 *
76
	 * @return array
77
	 */
78
	protected function buildHeaders(Table $table)
79
	{
80
		//Generate each row
81
		$rows = array();
82
83
		foreach ( $table->getHeaderRows() as $row )
84
		{
85
			//Build the cells for each row
86
			$cells = array();
87
88
			foreach ( $row as $cell )
89
			{
90
				$cells[] = $this->headerCell($cell);
91
			}
92
93
			$rows[] = $this->headerRow($row, $cells);
94
		}
95
96
		return $rows;
97
	}
98
99
	/**
100
	 * Renders the footer rows for the table
@@ 106-125 (lines=20) @@
103
	 *
104
	 * @return array
105
	 */
106
	protected function buildFooters(Table $table)
107
	{
108
		//Generate each row
109
		$rows = array();
110
111
		foreach ( $table->getFooterRows() as $row )
112
		{
113
			//Build the cells for each row
114
			$cells = array();
115
116
			foreach ( $row as $cell )
117
			{
118
				$cells[] = $this->footerCell($cell);
119
			}
120
121
			$rows[] = $this->footerRow($row, $cells);
122
		}
123
124
		return $rows;
125
	}
126
127
	/**
128
	 * Should generate the container tag, eg: <table>