original_string: public function assets( $args, $assoc_args ) {
  		list( $type ) = $args;
  		$global = self::get_flag( 'global', $assoc_args );
  		if ( false === array_search( $type, [ 'css', 'js' ] ) ) {
  			self::e( $this->__( 'Only css and js are supported.' ) );
  		}
  		$header = [
  			'Handle',
  			'Source',
  			'Dependency',
  			'Version',
  			'css' === $type ? 'Media' : 'Footer',
  		];
  		$rows   = [];
  		if ( $global ) {
  			switch ( $type ) {
  				case 'js':
  
  					break;
  				case 'css':
  
  					break;
  				default:
  					// Do nothing
  					break;
  			}
  		} else {
  			$assets = Library::all_assets()[ $type ];
  			foreach ( $assets as $handle => $asset ) {
  				$rows[] = array_merge( [ $handle ], array_map( function ( $var ) {
  					if ( is_bool( $var ) ) {
  						return $var ? 'Yes' : 'No';
  					} elseif ( is_array( $var ) ) {
  						return empty( $var ) ? '-' : implode( ', ', $var );
  					} elseif ( is_null( $var ) ) {
  						return '-';
  					} else {
  						return $var;
  					}
  				}, $asset ) );
  			}
  		}
  
  		self::table( $header, $rows );
  		self::l( '' );
  		self::s( sprintf( '%d %s are available on WPametu.', count( $rows ), $type ) );
  	}
code: public function assets( $args, $assoc_args ) {
  		list( $type ) = $args;
  		$global = self::get_flag( 'global', $assoc_args );
  		if ( false === array_search( $type, [ 'css', 'js' ] ) ) {
  			self::e( $this->__( 'Only css and js are supported.' ) );
  		}
  		$header = [
  			'Handle',
  			'Source',
  			'Dependency',
  			'Version',
  			'css' === $type ? 'Media' : 'Footer',
  		];
  		$rows   = [];
  		if ( $global ) {
  			switch ( $type ) {
  				case 'js':
  
  					break;
  				case 'css':
  
  					break;
  				default:
  					// Do nothing
  					break;
  			}
  		} else {
  			$assets = Library::all_assets()[ $type ];
  			foreach ( $assets as $handle => $asset ) {
  				$rows[] = array_merge( [ $handle ], array_map( function ( $var ) {
  					if ( is_bool( $var ) ) {
  						return $var ? 'Yes' : 'No';
  					} elseif ( is_array( $var ) ) {
  						return empty( $var ) ? '-' : implode( ', ', $var );
  					} elseif ( is_null( $var ) ) {
  						return '-';
  					} else {
  						return $var;
  					}
  				}, $asset ) );
  			}
  		}
  
  		self::table( $header, $rows );
  		self::l( '' );
  		self::s( sprintf( '%d %s are available on WPametu.', count( $rows ), $type ) );
  	}
code_tokens: public function assets ( $ args , $ assoc_args ) { list ( $ type ) = $ args ; $ global = self :: get_flag ( 'global' , $ assoc_args ) ; if ( false === array_search ( $ type , [ 'css' , 'js' ] ) ) { self :: e ( $ this -> __ ( 'Only css and js are supported.' ) ) ; } $ header = [ 'Handle' , 'Source' , 'Dependency' , 'Version' , 'css' === $ type ? 'Media' : 'Footer' , ] ; $ rows = [ ] ; if ( $ global ) { switch ( $ type ) { case 'js' : break ; case 'css' : break ; default : // Do nothing break ; } } else { $ assets = Library :: all_assets ( ) [ $ type ] ; foreach ( $ assets as $ handle => $ asset ) { $ rows [ ] = array_merge ( [ $ handle ] , array_map ( function ( $ var ) { if ( is_bool ( $ var ) ) { return $ var ? 'Yes' : 'No' ; } elseif ( is_array ( $ var ) ) { return empty ( $ var ) ? '-' : implode ( ', ' , $ var ) ; } elseif ( is_null ( $ var ) ) { return '-' ; } else { return $ var ; } } , $ asset ) ) ; } } self :: table ( $ header , $ rows ) ; self :: l ( '' ) ; self :: s ( sprintf ( '%d %s are available on WPametu.' , count ( $ rows ) , $ type ) ) ; }
docstring: Show all asset libraries of WPametu
  
  ## OPTIONS
  
  <type>
  : Assets type. 'css', 'js' are supported.
  
  [--global]
  : Show global assets registered without WPametu
  
  ## EXAMPLES
  
  wp ametu assets css
  
  @synopsis <type> [--global]
docstring_tokens: Show all asset libraries of WPametu