original_string: public function visible()
      {
          $visible = [];
  
          foreach ($this->items as $path => $slug) {
              $page = $this->pages->get($path);
              if ($page !== null && $page->visible()) {
                  $visible[$path] = $slug;
              }
          }
          $this->items = $visible;
  
          return $this;
      }
code: public function visible()
      {
          $visible = [];
  
          foreach ($this->items as $path => $slug) {
              $page = $this->pages->get($path);
              if ($page !== null && $page->visible()) {
                  $visible[$path] = $slug;
              }
          }
          $this->items = $visible;
  
          return $this;
      }
code_tokens: public function visible ( ) { $ visible = [ ] ; foreach ( $ this -> items as $ path => $ slug ) { $ page = $ this -> pages -> get ( $ path ) ; if ( $ page !== null && $ page -> visible ( ) ) { $ visible [ $ path ] = $ slug ; } } $ this -> items = $ visible ; return $ this ; }
docstring: Creates new collection with only visible pages
  
  @return Collection The collection with only visible pages
docstring_tokens: Creates new collection with only visible pages