Skip to content

Commit 7ce020b

Browse files
committed
CLIRequest testing & docs, and a minor fix
1 parent 55ae897 commit 7ce020b

4 files changed

Lines changed: 581 additions & 1 deletion

File tree

system/HTTP/CLIRequest.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,18 @@ public function getOptions(): array
124124

125125
//--------------------------------------------------------------------
126126

127+
/**
128+
* Returns the path segments.
129+
*
130+
* @return array
131+
*/
132+
public function getSegments(): array
133+
{
134+
return $this->segments;
135+
}
136+
137+
//--------------------------------------------------------------------
138+
127139
/**
128140
* Returns the value for a single CLI option that was passed in.
129141
*
@@ -178,7 +190,7 @@ public function getOptionString(): string
178190
$out .= "-{$name} $value ";
179191
}
180192

181-
return $out;
193+
return trim($out);
182194
}
183195

184196
//--------------------------------------------------------------------

0 commit comments

Comments
 (0)