@@ -51,7 +51,7 @@ public static function render( $msg ) {
5151 */
5252 public static function out ( $ msg ) {
5353 $ args = func_get_args ();
54- fwrite ( self ::$ out , call_user_func_array ( array ( '\\cli \\Streams ' , 'render ' ), $ args ) );
54+ fwrite ( static ::$ out , call_user_func_array ( array ( '\\cli \\Streams ' , 'render ' ), $ args ) );
5555 }
5656
5757 /**
@@ -94,7 +94,7 @@ public static function err( $msg = '' ) {
9494 // func_get_args is empty if no args are passed even with the default above.
9595 $ args = array_merge ( func_get_args (), array ( '' ) );
9696 $ args [0 ] .= "\n" ;
97- fwrite ( self ::$ err , call_user_func_array ( array ( '\\cli \\Streams ' , 'render ' ), $ args ) );
97+ fwrite ( static ::$ err , call_user_func_array ( array ( '\\cli \\Streams ' , 'render ' ), $ args ) );
9898 }
9999
100100 /**
@@ -109,9 +109,9 @@ public static function err( $msg = '' ) {
109109 */
110110 public static function input ( $ format = null ) {
111111 if ( $ format ) {
112- fscanf ( self ::$ in , $ format . "\n" , $ line );
112+ fscanf ( static ::$ in , $ format . "\n" , $ line );
113113 } else {
114- $ line = fgets ( self ::$ in );
114+ $ line = fgets ( static ::$ in );
115115 }
116116
117117 if ( $ line === false ) {
@@ -207,7 +207,7 @@ public static function menu( $items, $default = false, $title = 'Choose an item'
207207 \cli \Streams::line ();
208208
209209 while ( true ) {
210- fwrite ( self ::$ out , sprintf ( '%s: ' , $ title ) );
210+ fwrite ( static ::$ out , sprintf ( '%s: ' , $ title ) );
211211 $ line = \cli \Streams::input ();
212212
213213 if ( is_numeric ( $ line ) ) {
@@ -229,7 +229,7 @@ public static function setStream( $whichStream, $stream ) {
229229 if ( !is_resource ( $ stream ) || get_resource_type ( $ stream ) !== 'stream ' )
230230 throw new \Exception ( 'Invalid resource type! ' );
231231 if ( property_exists ( __CLASS__ , $ whichStream ) ) {
232- self ::$ {$ whichStream } = $ stream ;
232+ static ::$ {$ whichStream } = $ stream ;
233233 }
234234 }
235235
0 commit comments