src/LightSaml/Model/Metadata/EntityDescriptor.php
public function addItem($item)
    {
        if (false == $item instanceof IdpSsoDescriptor &&
            false == $item instanceof SpSsoDescriptor
        ) {
            throw new \InvalidArgumentException('EntityDescriptor item must be IdpSsoDescriptor or SpSsoDescriptor');
        }

        if (false == is_array($this->items)) {
            $this->items = array();
        }

        $this->items[] = $item;

        return $this;
    }
public function addItem($item)
    {
        if (false == $item instanceof IdpSsoDescriptor &&
            false == $item instanceof SpSsoDescriptor
        ) {
            throw new \InvalidArgumentException('EntityDescriptor item must be IdpSsoDescriptor or SpSsoDescriptor');
        }

        if (false == is_array($this->items)) {
            $this->items = array();
        }

        $this->items[] = $item;

        return $this;
    }
@param \LightSaml\Model\Metadata\IdpSsoDescriptor|\LightSaml\Model\Metadata\SpSsoDescriptor $item

@throws \InvalidArgumentException

@return EntityDescriptor