@@ -61,7 +61,7 @@ public function __construct(ReadableStreamInterface $input, WritableStreamInterf
6161 "\033[D " => 'onKeyLeft ' ,
6262
6363 "\033[1~ " => 'onKeyHome ' ,
64- "\033[2~ " => 'onKeyInsert ' ,
64+ // "\033[2~" => 'onKeyInsert',
6565 "\033[3~ " => 'onKeyDelete ' ,
6666 "\033[4~ " => 'onKeyEnd ' ,
6767
@@ -547,12 +547,6 @@ public function onKeyDelete()
547547 $ this ->deleteChar ($ this ->linepos );
548548 }
549549
550- /** @internal */
551- public function onKeyInsert ()
552- {
553- // TODO: toggle insert mode
554- }
555-
556550 /** @internal */
557551 public function onKeyHome ()
558552 {
@@ -838,6 +832,11 @@ protected function processLine($eol)
838832 $ this ->emit ('data ' , array ($ line . $ eol ));
839833 }
840834
835+ /**
836+ * @param string $str
837+ * @return int
838+ * @codeCoverageIgnore
839+ */
841840 private function strlen ($ str )
842841 {
843842 // prefer mb_strlen() if available
@@ -849,6 +848,13 @@ private function strlen($str)
849848 return strlen (preg_replace ('/./us ' , '. ' , $ str ));
850849 }
851850
851+ /**
852+ * @param string $str
853+ * @param int $start
854+ * @param ?int $len
855+ * @return string
856+ * @codeCoverageIgnore
857+ */
852858 private function substr ($ str , $ start = 0 , $ len = null )
853859 {
854860 if ($ len === null ) {
@@ -866,7 +872,12 @@ private function substr($str, $start = 0, $len = null)
866872 return implode ('' , array_slice ($ matches [0 ], $ start , $ len ));
867873 }
868874
869- /** @internal */
875+ /**
876+ * @internal
877+ * @param string $str
878+ * @return int
879+ * @codeCoverageIgnore
880+ */
870881 public function strwidth ($ str )
871882 {
872883 // prefer mb_strwidth() if available
@@ -891,6 +902,10 @@ public function strwidth($str)
891902 ));
892903 }
893904
905+ /**
906+ * @param string $str
907+ * @return string[]
908+ */
894909 private function strsplit ($ str )
895910 {
896911 return preg_split ('//u ' , $ str , null , PREG_SPLIT_NO_EMPTY );
0 commit comments