original_string: public static function toJson($features)
  	{
  		if (is_null($features) || count($features) == 0) {
  			return null;
  		}
  
  		return Collection::make($features)->filter(function ($item) {
  			return trim($item) != '';
  		})->toJson();
  	}
code: public static function toJson($features)
  	{
  		if (is_null($features) || count($features) == 0) {
  			return null;
  		}
  
  		return Collection::make($features)->filter(function ($item) {
  			return trim($item) != '';
  		})->toJson();
  	}
code_tokens: public static function toJson ( $ features ) { if ( is_null ( $ features ) || count ( $ features ) == 0 ) { return null ; } return Collection :: make ( $ features ) -> filter ( function ( $ item ) { return trim ( $ item ) != '' ; } ) -> toJson ( ) ; }
docstring: Parses the given features to Json.
  
  @param  array|Collection $features
  
  @return null|string
docstring_tokens: Parses the given features to Json .