original_string: public function createPolicy(
          array $properties,
          array $policies = [],
          array $addAces = [],
          array $removeAces = [],
          OperationContextInterface $context = null
      ) {
          $newObjectId = $this->getSession()->createPolicy($properties, $this, $policies, $addAces, $removeAces);
  
          $policy = $this->getNewlyCreatedObject($newObjectId, $context);
  
          if ($policy === null) {
              return null;
          } elseif (!$policy instanceof PolicyInterface) {
              throw new CmisRuntimeException('Newly created object is not a policy! New id: ' . $policy->getId());
          }
  
          return $policy;
      }
code: public function createPolicy(
          array $properties,
          array $policies = [],
          array $addAces = [],
          array $removeAces = [],
          OperationContextInterface $context = null
      ) {
          $newObjectId = $this->getSession()->createPolicy($properties, $this, $policies, $addAces, $removeAces);
  
          $policy = $this->getNewlyCreatedObject($newObjectId, $context);
  
          if ($policy === null) {
              return null;
          } elseif (!$policy instanceof PolicyInterface) {
              throw new CmisRuntimeException('Newly created object is not a policy! New id: ' . $policy->getId());
          }
  
          return $policy;
      }
code_tokens: public function createPolicy ( array $ properties , array $ policies = [ ] , array $ addAces = [ ] , array $ removeAces = [ ] , OperationContextInterface $ context = null ) { $ newObjectId = $ this -> getSession ( ) -> createPolicy ( $ properties , $ this , $ policies , $ addAces , $ removeAces ) ; $ policy = $ this -> getNewlyCreatedObject ( $ newObjectId , $ context ) ; if ( $ policy === null ) { return null ; } elseif ( ! $ policy instanceof PolicyInterface ) { throw new CmisRuntimeException ( 'Newly created object is not a policy! New id: ' . $ policy -> getId ( ) ) ; } return $ policy ; }
docstring: Creates a new policy in this folder.
  
  @param array $properties The property values that MUST be applied to the newly-created policy object.
  @param PolicyInterface[] $policies A list of policy ids that MUST be applied to the newly-created policy object.
  @param AceInterface[] $addAces A list of ACEs that MUST be added to the newly-created policy object, either
  using the ACL from folderId if specified, or being applied if no folderId is specified.
  @param AceInterface[] $removeAces A list of ACEs that MUST be removed from the newly-created policy object,
  either using the ACL from folderId if specified, or being ignored if no folderId is specified.
  @param OperationContextInterface|null $context
  @return PolicyInterface|null the new policy object
  @throws CmisRuntimeException Exception is thrown if the created object is not a policy
docstring_tokens: Creates a new policy in this folder .