src/Amadeus/Client/Struct/Pnr/AddMultiElements.php
protected function addReceivedFrom($explicitRf, $doAutoAdd, $defaultRf, &$tattooCounter)
    {
        if ($this->dataElementsMaster === null) {
            $this->dataElementsMaster = new DataElementsMaster();
        }

        if (!empty($explicitRf) || ($doAutoAdd && !empty($defaultRf))) {
            //Set a received from if explicitly provided or if auto received from is enabled

            $tattooCounter++;

            $rfToAdd = (!empty($explicitRf)) ? $explicitRf : $defaultRf;

            $this->dataElementsMaster->dataElementsIndiv[] = $this->createElement(
                new ReceivedFrom(['receivedFrom' => $rfToAdd]),
                $tattooCounter
            );
        }
    }
protected function addReceivedFrom($explicitRf, $doAutoAdd, $defaultRf, &$tattooCounter)
    {
        if ($this->dataElementsMaster === null) {
            $this->dataElementsMaster = new DataElementsMaster();
        }

        if (!empty($explicitRf) || ($doAutoAdd && !empty($defaultRf))) {
            //Set a received from if explicitly provided or if auto received from is enabled

            $tattooCounter++;

            $rfToAdd = (!empty($explicitRf)) ? $explicitRf : $defaultRf;

            $this->dataElementsMaster->dataElementsIndiv[] = $this->createElement(
                new ReceivedFrom(['receivedFrom' => $rfToAdd]),
                $tattooCounter
            );
        }
    }
Add Received From field - if needed.

@param string|null $explicitRf Explicitly provided RF string on request.
@param bool $doAutoAdd Wether to automatically add an RF field.
@param string|null $defaultRf The default RF string set in the client.
@param int $tattooCounter (BYREF)
@throws \ReflectionException