original_string: protected function getValidAliases()
      {
          $aliases = new Collection();
  
          // Get all aliases
          foreach ($this->getAliases() as $name => $facade) {
              // Skip the Redis facade, if not available (otherwise Fatal PHP Error)
              if ($facade == 'Illuminate\Support\Facades\Redis' && $name == 'Redis' && !class_exists('Predis\Client')) {
                  continue;
              }
  
              $magicMethods = array_key_exists($name, $this->magic) ? $this->magic[$name] : array();
              $alias = new Alias($this->config, $name, $facade, $magicMethods, $this->interfaces);
              if ($alias->isValid()) {
                  //Add extra methods, from other classes (magic static calls)
                  if (array_key_exists($name, $this->extra)) {
                      $alias->addClass($this->extra[$name]);
                  }
  
                  $aliases[] = $alias;
              }
          }
  
          return $aliases;
      }
code: protected function getValidAliases()
      {
          $aliases = new Collection();
  
          // Get all aliases
          foreach ($this->getAliases() as $name => $facade) {
              // Skip the Redis facade, if not available (otherwise Fatal PHP Error)
              if ($facade == 'Illuminate\Support\Facades\Redis' && $name == 'Redis' && !class_exists('Predis\Client')) {
                  continue;
              }
  
              $magicMethods = array_key_exists($name, $this->magic) ? $this->magic[$name] : array();
              $alias = new Alias($this->config, $name, $facade, $magicMethods, $this->interfaces);
              if ($alias->isValid()) {
                  //Add extra methods, from other classes (magic static calls)
                  if (array_key_exists($name, $this->extra)) {
                      $alias->addClass($this->extra[$name]);
                  }
  
                  $aliases[] = $alias;
              }
          }
  
          return $aliases;
      }
code_tokens: protected function getValidAliases ( ) { $ aliases = new Collection ( ) ; // Get all aliases foreach ( $ this -> getAliases ( ) as $ name => $ facade ) { // Skip the Redis facade, if not available (otherwise Fatal PHP Error) if ( $ facade == 'Illuminate\Support\Facades\Redis' && $ name == 'Redis' && ! class_exists ( 'Predis\Client' ) ) { continue ; } $ magicMethods = array_key_exists ( $ name , $ this -> magic ) ? $ this -> magic [ $ name ] : array ( ) ; $ alias = new Alias ( $ this -> config , $ name , $ facade , $ magicMethods , $ this -> interfaces ) ; if ( $ alias -> isValid ( ) ) { //Add extra methods, from other classes (magic static calls) if ( array_key_exists ( $ name , $ this -> extra ) ) { $ alias -> addClass ( $ this -> extra [ $ name ] ) ; } $ aliases [ ] = $ alias ; } } return $ aliases ; }
docstring: Find all aliases that are valid for us to render
  
  @return Collection
docstring_tokens: Find all aliases that are valid for us to render