private function processStringPlaceholders($string, array $variables)
    {
        foreach ($variables as $key => $value) {
            if (!is_string($value) && !is_numeric($value) && !is_bool($value)) {
                continue;
            }

            $string = str_replace('{'.$key.'}', $value, (string) $string);
        }

        return $string;
    }
private function processStringPlaceholders($string, array $variables)
    {
        foreach ($variables as $key => $value) {
            if (!is_string($value) && !is_numeric($value) && !is_bool($value)) {
                continue;
            }

            $string = str_replace('{'.$key.'}', $value, (string) $string);
        }

        return $string;
    }
private function processStringPlaceholders ( $ string , array $ variables ) { foreach ( $ variables as $ key => $ value ) { if ( ! is_string ( $ value ) && ! is_numeric ( $ value ) && ! is_bool ( $ value ) ) { continue ; } $ string = str_replace ( '{' . $ key . '}' , $ value , ( string ) $ string ) ; } return $ string ; }
It interpolates the given string replacing its placeholders with the
values defined in the given variables array.

@param string $string
@param array  $variables

@return string
It interpolates the given string replacing its placeholders with the values defined in the given variables array .