11<?php
2+ declare (strict_types=1 );
23namespace jblond \Diff \Renderer \Html ;
34
45/**
3839 * @author Chris Boulton <[email protected] > 3940 * @copyright (c) 2009 Chris Boulton
4041 * @license New BSD License http://www.opensource.org/licenses/bsd-license.php
41- * @version 1.5
42+ * @version 1.6
4243 * @link https://github.com/JBlond/php-diff
4344 */
4445
@@ -53,7 +54,7 @@ class SideBySide extends HtmlArray
5354 *
5455 * @return string The generated side by side diff.
5556 */
56- public function render ()
57+ public function render () : string
5758 {
5859 $ changes = parent ::render ();
5960
@@ -102,7 +103,7 @@ public function render()
102103 *
103104 * @return string Html code representation of the table's header.
104105 */
105- private function generateTableHeader ()
106+ private function generateTableHeader () : string
106107 {
107108 $ html = '<table class="Differences DifferencesSideBySide"> ' ;
108109 $ html .= '<thead> ' ;
@@ -119,7 +120,7 @@ private function generateTableHeader()
119120 *
120121 * @return string Html code representing empty table body.
121122 */
122- private function generateSkippedTable ()
123+ private function generateSkippedTable () : string
123124 {
124125 $ html = '<tbody class="Skipped"> ' ;
125126 $ html .= '<th>…</th><td> </td> ' ;
@@ -134,7 +135,7 @@ private function generateSkippedTable()
134135 * @param array &$change Array with data about changes.
135136 * @return string Html code representing one or more rows of text with no difference.
136137 */
137- private function generateTableRowsEqual (&$ change )
138+ private function generateTableRowsEqual (&$ change ) : string
138139 {
139140 $ html = "" ;
140141 foreach ($ change ['base ' ]['lines ' ] as $ no => $ line ) {
@@ -156,7 +157,7 @@ private function generateTableRowsEqual(&$change)
156157 * @param array &$change Array with data about changes.
157158 * @return string Html code representing one or more rows of added text.
158159 */
159- private function generateTableRowsInsert (&$ change )
160+ private function generateTableRowsInsert (&$ change ) : string
160161 {
161162 $ html = "" ;
162163 foreach ($ change ['changed ' ]['lines ' ] as $ no => $ line ) {
@@ -177,7 +178,7 @@ private function generateTableRowsInsert(&$change)
177178 * @param array &$change Array with data about changes.
178179 * @return string Html code representing one or more rows of removed text.
179180 */
180- private function generateTableRowsDelete (&$ change )
181+ private function generateTableRowsDelete (&$ change ) : string
181182 {
182183 $ html = "" ;
183184 foreach ($ change ['base ' ]['lines ' ] as $ no => $ line ) {
@@ -198,7 +199,7 @@ private function generateTableRowsDelete(&$change)
198199 * @param array &$change Array with data about changes.
199200 * @return string Html code representing one or more rows of modified.
200201 */
201- private function generateTableRowsReplace (&$ change )
202+ private function generateTableRowsReplace (&$ change ) : string
202203 {
203204 $ html = "" ;
204205
0 commit comments