Skip to content

Commit ec43479

Browse files
committed
Added parameter tags to methods
Added parameter tags to the methods markString and getExcerpt.
1 parent c5952ea commit ec43479

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/Utilities/Text.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,13 @@ static public function findDate( $string ) {
219219
/**
220220
* Mark a string
221221
*
222-
* @return String
222+
* @param string $text
223+
* @param int $position
224+
* @param int $length
225+
* @param array $mark
226+
* @return string
223227
*/
224-
static function markString(String $text, int $position, int $length, Array $mark)
228+
static function markString(string $text, int $position, int $length, array $mark) : string
225229
{
226230
$text = substr_replace($text, $mark[0], $position, 0);
227231
$text = substr_replace($text, $mark[1], $position + $length + strlen($mark[0]), 0);
@@ -232,9 +236,13 @@ static function markString(String $text, int $position, int $length, Array $mark
232236
/**
233237
* Get a excerpt from a string by a neddle postion and its length
234238
*
235-
* @return String
239+
* @param string $text
240+
* @param int $needlePosition
241+
* @param int $needleLength
242+
* @param int $contextLength
243+
* @return string
236244
*/
237-
static function getExcerpt(String $text, int $needlePosition, int $needleLength, int $contextLength)
245+
static function getExcerpt(String $text, int $needlePosition, int $needleLength, int $contextLength) : string
238246
{
239247
$left = max($needlePosition - $contextLength, 0);
240248
$bufferLength = $needleLength + (2 * $contextLength);

0 commit comments

Comments
 (0)