original_string: public function sliceProperties(array $properties)
      {
          $actions = $this->internalDataListActions;
          $actions[] = ['sliceProperties', $properties];
          $data = $this->internalDataListUpdateData($this->internalDataListData, $actions);
          $className = get_class($this);
          $list = new $className();
          $class = $this->internalDataListClasses['IvoPetkov\DataListObject'];
          $tempObject = new $class();
          foreach ($data as $index => $object) {
              $object = $this->internalDataListUpdateValueIfNeeded($data, $index);
              $newObject = clone($tempObject);
              foreach ($properties as $property) {
                  $newObject[$property] = isset($object->$property) ? $object->$property : null;
              }
              $list->push($newObject);
          }
          return $list;
      }
code: public function sliceProperties(array $properties)
      {
          $actions = $this->internalDataListActions;
          $actions[] = ['sliceProperties', $properties];
          $data = $this->internalDataListUpdateData($this->internalDataListData, $actions);
          $className = get_class($this);
          $list = new $className();
          $class = $this->internalDataListClasses['IvoPetkov\DataListObject'];
          $tempObject = new $class();
          foreach ($data as $index => $object) {
              $object = $this->internalDataListUpdateValueIfNeeded($data, $index);
              $newObject = clone($tempObject);
              foreach ($properties as $property) {
                  $newObject[$property] = isset($object->$property) ? $object->$property : null;
              }
              $list->push($newObject);
          }
          return $list;
      }
code_tokens: public function sliceProperties ( array $ properties ) { $ actions = $ this -> internalDataListActions ; $ actions [ ] = [ 'sliceProperties' , $ properties ] ; $ data = $ this -> internalDataListUpdateData ( $ this -> internalDataListData , $ actions ) ; $ className = get_class ( $ this ) ; $ list = new $ className ( ) ; $ class = $ this -> internalDataListClasses [ 'IvoPetkov\DataListObject' ] ; $ tempObject = new $ class ( ) ; foreach ( $ data as $ index => $ object ) { $ object = $ this -> internalDataListUpdateValueIfNeeded ( $ data , $ index ) ; $ newObject = clone ( $ tempObject ) ; foreach ( $ properties as $ property ) { $ newObject [ $ property ] = isset ( $ object -> $ property ) ? $ object -> $ property : null ; } $ list -> push ( $ newObject ) ; } return $ list ; }
docstring: Returns a new list of object that contain only the specified properties of the objects in the current list.
  
  @param array $properties The list of property names.
  @return mixed Returns a new list.
docstring_tokens: Returns a new list of object that contain only the specified properties of the objects in the current list .