Skip to content

Commit 261d9a9

Browse files
committed
Make sure pre and post merge return strings
1 parent 1f2c7dc commit 261d9a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/PhpMerge/GitMerge.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ protected static function getConflicts($file, $baseText, $remoteText, $localText
293293
* @param $text
294294
* @return string
295295
*/
296-
protected static function preMergeAlter($text)
296+
protected static function preMergeAlter($text) : string
297297
{
298298
// Append new lines so that conflicts at the end of the text work.
299299
return $text . "\nthe\nend";
@@ -303,10 +303,10 @@ protected static function preMergeAlter($text)
303303
* @param $text
304304
* @return bool|string
305305
*/
306-
protected static function postMergeAlter($text)
306+
protected static function postMergeAlter($text) : string
307307
{
308308
// Remove the appended lines.
309-
return substr($text, 0, -8);
309+
return (string) substr($text, 0, -8);
310310
}
311311

312312
/**

0 commit comments

Comments
 (0)