Skip to content

Commit ceb4f12

Browse files
committed
refactor: remove unneeded override
The parent method is fixed.
1 parent fa10bc8 commit ceb4f12

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

system/HTTP/SiteURI.php

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -252,36 +252,6 @@ public function getRoutePath(): string
252252
return $this->routePath;
253253
}
254254

255-
/**
256-
* Returns the value of a specific segment of the URI path.
257-
* Allows to get only existing segments or the next one.
258-
*
259-
* @param int $number Segment number starting at 1
260-
* @param string $default Default value
261-
*
262-
* @return string The value of the segment. If you specify the last +1
263-
* segment, the $default value. If you specify the last +2
264-
* or more throws HTTPException.
265-
*
266-
* @TODO remove this method after merging #7267
267-
*/
268-
public function getSegment(int $number, string $default = ''): string
269-
{
270-
if ($number < 1) {
271-
throw HTTPException::forURISegmentOutOfRange($number);
272-
}
273-
274-
if ($number > count($this->segments) + 1 && ! $this->silent) {
275-
throw HTTPException::forURISegmentOutOfRange($number);
276-
}
277-
278-
// The segment should treat the array as 1-based for the user
279-
// but we still have to deal with a zero-based array.
280-
$number--;
281-
282-
return $this->segments[$number] ?? $default;
283-
}
284-
285255
/**
286256
* Formats the URI as a string.
287257
*/

0 commit comments

Comments
 (0)