original_string: public function isCreate()
      {
          $entity = $this->_context['entity'];
          if (is_array($entity) || $entity instanceof Traversable) {
              foreach ($entity as $e) {
                  $entity = $e;
                  break;
              }
          }
          if ($entity instanceof EntityInterface) {
              return $entity->isNew() !== false;
          }
  
          return true;
      }
code: public function isCreate()
      {
          $entity = $this->_context['entity'];
          if (is_array($entity) || $entity instanceof Traversable) {
              foreach ($entity as $e) {
                  $entity = $e;
                  break;
              }
          }
          if ($entity instanceof EntityInterface) {
              return $entity->isNew() !== false;
          }
  
          return true;
      }
code_tokens: public function isCreate ( ) { $ entity = $ this -> _context [ 'entity' ] ; if ( is_array ( $ entity ) || $ entity instanceof Traversable ) { foreach ( $ entity as $ e ) { $ entity = $ e ; break ; } } if ( $ entity instanceof EntityInterface ) { return $ entity -> isNew ( ) !== false ; } return true ; }
docstring: Check whether or not this form is a create or update.
  
  If the context is for a single entity, the entity's isNew() method will
  be used. If isNew() returns null, a create operation will be assumed.
  
  If the context is for a collection or array the first object in the
  collection will be used.
  
  @return bool
docstring_tokens: Check whether or not this form is a create or update .