public function merge(ClassMetadata $object)
    {
        $properties = $this->properties;
        $methods = $this->methods;

        foreach ($object->getProperties() as $property) {
            $properties[$property->getName()] = $property;
        }

        foreach ($object->getMethods() as $method) {
            $methods[$method->getName()] = $method;
        }

        $createdAt = $this->createdAt;

        if (($otherCreatedAt = $object->getCreatedAt()) > $createdAt) {
            $createdAt = $otherCreatedAt;
        }

        return new static($this->className, $properties, $methods, $createdAt);
    }
public function merge(ClassMetadata $object)
    {
        $properties = $this->properties;
        $methods = $this->methods;

        foreach ($object->getProperties() as $property) {
            $properties[$property->getName()] = $property;
        }

        foreach ($object->getMethods() as $method) {
            $methods[$method->getName()] = $method;
        }

        $createdAt = $this->createdAt;

        if (($otherCreatedAt = $object->getCreatedAt()) > $createdAt) {
            $createdAt = $otherCreatedAt;
        }

        return new static($this->className, $properties, $methods, $createdAt);
    }
public function merge ( ClassMetadata $ object ) { $ properties = $ this -> properties ; $ methods = $ this -> methods ; foreach ( $ object -> getProperties ( ) as $ property ) { $ properties [ $ property -> getName ( ) ] = $ property ; } foreach ( $ object -> getMethods ( ) as $ method ) { $ methods [ $ method -> getName ( ) ] = $ method ; } $ createdAt = $ this -> createdAt ; if ( ( $ otherCreatedAt = $ object -> getCreatedAt ( ) ) > $ createdAt ) { $ createdAt = $ otherCreatedAt ; } return new static ( $ this -> className , $ properties , $ methods , $ createdAt ) ; }
Merge the ClassMetadata of the object with the current ClassMetadata
into a new object.

Note: instead of modifying the current ClassMetadata
you should instead return a new object.

@param ClassMetadata $object Another MergeableClassMetadata object.

@return self New ClassMetadata instance with
the merged class metadata.
Merge the ClassMetadata of the object with the current ClassMetadata into a new object .