original_string: public function getCollectionForItem(ItemInterface $item)
      {
          foreach ($this->colectionItemCollection as $name => $collection) {
              $itemPath = $item->getPath(ItemInterface::SNAPSHOT_PATH_RELATIVE).'/';
              $collectionPath = $collection->getPath().'/';
  
              if (strpos($itemPath, $collectionPath) === 0) {
                  return $collection;
              }
          }
  
          return $this->colectionItemCollection->get('pages');
      }
code: public function getCollectionForItem(ItemInterface $item)
      {
          foreach ($this->colectionItemCollection as $name => $collection) {
              $itemPath = $item->getPath(ItemInterface::SNAPSHOT_PATH_RELATIVE).'/';
              $collectionPath = $collection->getPath().'/';
  
              if (strpos($itemPath, $collectionPath) === 0) {
                  return $collection;
              }
          }
  
          return $this->colectionItemCollection->get('pages');
      }
code_tokens: public function getCollectionForItem ( ItemInterface $ item ) { foreach ( $ this -> colectionItemCollection as $ name => $ collection ) { $ itemPath = $ item -> getPath ( ItemInterface :: SNAPSHOT_PATH_RELATIVE ) . '/' ; $ collectionPath = $ collection -> getPath ( ) . '/' ; if ( strpos ( $ itemPath , $ collectionPath ) === 0 ) { return $ collection ; } } return $ this -> colectionItemCollection -> get ( 'pages' ) ; }
docstring: Collection matching of a item.
  
  @return \Yosymfony\Spress\Core\ContentManager\Collection\CollectionInterface
docstring_tokens: Collection matching of a item .