original_string: public function getEntityId(EntityInterface $entity)
      {
          $pk = [];
          $keys = $this->_table->primaryKey();
          $keys = !is_array($keys) ? [$keys] : $keys;
          foreach ($keys as $key) {
              $pk[] = $entity->get($key);
          }
  
          return implode(':', $pk);
      }
code: public function getEntityId(EntityInterface $entity)
      {
          $pk = [];
          $keys = $this->_table->primaryKey();
          $keys = !is_array($keys) ? [$keys] : $keys;
          foreach ($keys as $key) {
              $pk[] = $entity->get($key);
          }
  
          return implode(':', $pk);
      }
code_tokens: public function getEntityId ( EntityInterface $ entity ) { $ pk = [ ] ; $ keys = $ this -> _table -> primaryKey ( ) ; $ keys = ! is_array ( $ keys ) ? [ $ keys ] : $ keys ; foreach ( $ keys as $ key ) { $ pk [ ] = $ entity -> get ( $ key ) ; } return implode ( ':' , $ pk ) ; }
docstring: Calculates entity's primary key.
  
  If PK is composed of multiple columns they will be merged with `:` symbol.
  For example, consider `Users` table with composed PK <nick, email>, then for
  certain User entity this method could return:
  
  john-locke:john@the-island.com
  
  @param \Cake\Datasource\EntityInterface $entity The entity
  @return string
docstring_tokens: Calculates entity s primary key .