@@ -56,7 +56,7 @@ public function __construct(ReadableStreamInterface $input, WritableStreamInterf
5656 "\033[D " => 'onKeyLeft ' ,
5757
5858 "\033[1~ " => 'onKeyHome ' ,
59- "\033[2~ " => 'onKeyInsert ' ,
59+ // "\033[2~" => 'onKeyInsert',
6060 "\033[3~ " => 'onKeyDelete ' ,
6161 "\033[4~ " => 'onKeyEnd ' ,
6262
@@ -514,12 +514,6 @@ public function onKeyDelete()
514514 $ this ->deleteChar ($ this ->linepos );
515515 }
516516
517- /** @internal */
518- public function onKeyInsert ()
519- {
520- // TODO: toggle insert mode
521- }
522-
523517 /** @internal */
524518 public function onKeyHome ()
525519 {
@@ -796,6 +790,11 @@ protected function processLine($eol)
796790 $ this ->emit ('data ' , array ($ line . $ eol ));
797791 }
798792
793+ /**
794+ * @param string $str
795+ * @return int
796+ * @codeCoverageIgnore
797+ */
799798 private function strlen ($ str )
800799 {
801800 // prefer mb_strlen() if available
@@ -807,6 +806,13 @@ private function strlen($str)
807806 return strlen (preg_replace ('/./us ' , '. ' , $ str ));
808807 }
809808
809+ /**
810+ * @param string $str
811+ * @param int $start
812+ * @param ?int $len
813+ * @return string
814+ * @codeCoverageIgnore
815+ */
810816 private function substr ($ str , $ start = 0 , $ len = null )
811817 {
812818 if ($ len === null ) {
@@ -824,7 +830,12 @@ private function substr($str, $start = 0, $len = null)
824830 return implode ('' , array_slice ($ matches [0 ], $ start , $ len ));
825831 }
826832
827- /** @internal */
833+ /**
834+ * @internal
835+ * @param string $str
836+ * @return int
837+ * @codeCoverageIgnore
838+ */
828839 public function strwidth ($ str )
829840 {
830841 // prefer mb_strwidth() if available
@@ -849,6 +860,10 @@ public function strwidth($str)
849860 ));
850861 }
851862
863+ /**
864+ * @param string $str
865+ * @return string[]
866+ */
852867 private function strsplit ($ str )
853868 {
854869 return preg_split ('//u ' , $ str , null , PREG_SPLIT_NO_EMPTY );
0 commit comments