public function generateReplacement($replacementId)
    {
        $replacementMethodName = str_replace(self::PREFIX, '', $replacementId);

        if (strpos($replacementMethodName,'->') !== false) {

            $modifierAndMethod = explode('->',$replacementMethodName);
            $modifierName = $modifierAndMethod[0];
            $replacementMethodName = $modifierAndMethod[1];

            $this->validateReplacementConfiguredModifier($modifierName, $replacementMethodName);

            return (string)$this->faker->$modifierName->$replacementMethodName;
        } else {
            $this->validateReplacementConfigured($replacementMethodName);
            return (string)$this->faker->$replacementMethodName;
        }
    }
public function generateReplacement($replacementId)
    {
        $replacementMethodName = str_replace(self::PREFIX, '', $replacementId);

        if (strpos($replacementMethodName,'->') !== false) {

            $modifierAndMethod = explode('->',$replacementMethodName);
            $modifierName = $modifierAndMethod[0];
            $replacementMethodName = $modifierAndMethod[1];

            $this->validateReplacementConfiguredModifier($modifierName, $replacementMethodName);

            return (string)$this->faker->$modifierName->$replacementMethodName;
        } else {
            $this->validateReplacementConfigured($replacementMethodName);
            return (string)$this->faker->$replacementMethodName;
        }
    }
public function generateReplacement ( $ replacementId ) { $ replacementMethodName = str_replace ( self :: PREFIX , '' , $ replacementId ) ; if ( strpos ( $ replacementMethodName , '->' ) !== false ) { $ modifierAndMethod = explode ( '->' , $ replacementMethodName ) ; $ modifierName = $ modifierAndMethod [ 0 ] ; $ replacementMethodName = $ modifierAndMethod [ 1 ] ; $ this -> validateReplacementConfiguredModifier ( $ modifierName , $ replacementMethodName ) ; return ( string ) $ this -> faker -> $ modifierName -> $ replacementMethodName ; } else { $ this -> validateReplacementConfigured ( $ replacementMethodName ) ; return ( string ) $ this -> faker -> $ replacementMethodName ; } }
wrapper method which removes the prefix calls the defined faker method
@param string $replacementId
@return string
wrapper method which removes the prefix calls the defined faker method