original_string: protected function parseAssociation($propertyName, \ReflectionProperty $reflectionProperty, AnnotationBag $propertyAnnotations) {
  		if ($propertyAnnotations->has('OneToOne')) {
  			$association = new OneToOne($propertyName, $reflectionProperty, $propertyAnnotations);
  			
  			if ($association->isForeignKey()) {
  				$attribute = $association->getAttribute()->getArgument();
  				$this->foreignKeys[$attribute] = $propertyName;
  			}
  			elseif ($association->isCascade())
  				$this->references[] = $propertyName;
  		}
  		elseif ($propertyAnnotations->has('OneToMany')) {
  			$association = new OneToMany($propertyName, $reflectionProperty, $propertyAnnotations);
  			
  			if ($association->isCascade())
  				$this->references[] = $propertyName;
  		}
  		elseif ($propertyAnnotations->has('ManyToOne')) {
  			$association = new ManyToOne($propertyName, $reflectionProperty, $propertyAnnotations);
  			$attribute = $association->getAttribute()->getArgument();
  			$this->foreignKeys[$attribute] = $propertyName;
  		}
  		elseif ($propertyAnnotations->has('ManyToMany')) {
  			$association = new ManyToMany($propertyName, $reflectionProperty, $propertyAnnotations);
  			
  			if ($association->isCascade())
  				$this->references[] = $propertyName;
  		}
  		
  		$this->associations[$propertyName] = $association;
  	}
code: protected function parseAssociation($propertyName, \ReflectionProperty $reflectionProperty, AnnotationBag $propertyAnnotations) {
  		if ($propertyAnnotations->has('OneToOne')) {
  			$association = new OneToOne($propertyName, $reflectionProperty, $propertyAnnotations);
  			
  			if ($association->isForeignKey()) {
  				$attribute = $association->getAttribute()->getArgument();
  				$this->foreignKeys[$attribute] = $propertyName;
  			}
  			elseif ($association->isCascade())
  				$this->references[] = $propertyName;
  		}
  		elseif ($propertyAnnotations->has('OneToMany')) {
  			$association = new OneToMany($propertyName, $reflectionProperty, $propertyAnnotations);
  			
  			if ($association->isCascade())
  				$this->references[] = $propertyName;
  		}
  		elseif ($propertyAnnotations->has('ManyToOne')) {
  			$association = new ManyToOne($propertyName, $reflectionProperty, $propertyAnnotations);
  			$attribute = $association->getAttribute()->getArgument();
  			$this->foreignKeys[$attribute] = $propertyName;
  		}
  		elseif ($propertyAnnotations->has('ManyToMany')) {
  			$association = new ManyToMany($propertyName, $reflectionProperty, $propertyAnnotations);
  			
  			if ($association->isCascade())
  				$this->references[] = $propertyName;
  		}
  		
  		$this->associations[$propertyName] = $association;
  	}
code_tokens: protected function parseAssociation ( $ propertyName , \ ReflectionProperty $ reflectionProperty , AnnotationBag $ propertyAnnotations ) { if ( $ propertyAnnotations -> has ( 'OneToOne' ) ) { $ association = new OneToOne ( $ propertyName , $ reflectionProperty , $ propertyAnnotations ) ; if ( $ association -> isForeignKey ( ) ) { $ attribute = $ association -> getAttribute ( ) -> getArgument ( ) ; $ this -> foreignKeys [ $ attribute ] = $ propertyName ; } elseif ( $ association -> isCascade ( ) ) $ this -> references [ ] = $ propertyName ; } elseif ( $ propertyAnnotations -> has ( 'OneToMany' ) ) { $ association = new OneToMany ( $ propertyName , $ reflectionProperty , $ propertyAnnotations ) ; if ( $ association -> isCascade ( ) ) $ this -> references [ ] = $ propertyName ; } elseif ( $ propertyAnnotations -> has ( 'ManyToOne' ) ) { $ association = new ManyToOne ( $ propertyName , $ reflectionProperty , $ propertyAnnotations ) ; $ attribute = $ association -> getAttribute ( ) -> getArgument ( ) ; $ this -> foreignKeys [ $ attribute ] = $ propertyName ; } elseif ( $ propertyAnnotations -> has ( 'ManyToMany' ) ) { $ association = new ManyToMany ( $ propertyName , $ reflectionProperty , $ propertyAnnotations ) ; if ( $ association -> isCascade ( ) ) $ this -> references [ ] = $ propertyName ; } $ this -> associations [ $ propertyName ] = $ association ; }
docstring: Parses an entity association
  @param string $propertyName
  @param \ReflectionProperty $reflectionProperty
  @param \Omocha\AnnotationBag $propertyAnnotations
docstring_tokens: Parses an entity association