original_string: protected function clearPreviousCollection(Collection $collection)
      {
          if ($collection->count()) {
              foreach ($collection as $item) {
                  $collection->removeElement($item);
              }
          }
      }
code: protected function clearPreviousCollection(Collection $collection)
      {
          if ($collection->count()) {
              foreach ($collection as $item) {
                  $collection->removeElement($item);
              }
          }
      }
code_tokens: protected function clearPreviousCollection ( Collection $ collection ) { if ( $ collection -> count ( ) ) { foreach ( $ collection as $ item ) { $ collection -> removeElement ( $ item ) ; } } }
docstring: Resets previous photo collection
  
  @param Collection $collection
docstring_tokens: Resets previous photo collection