Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return a formatted string
<?php sprintf(string $format, mixed ...$values): string
<?php     private static function getWordsFromStub(string $preset): array

    {

        $path = sprintf('%s/%s.stub', self::PRESET_STUBS_DIRECTORY, $preset);



        return array_values(array_filter(array_map('trim', explode("\n", (string) file_get_contents($path)))));

    }
<?php     private static function stubExists(string $preset): bool

    {

        return file_exists(sprintf('%s/%s.stub', self::PRESET_STUBS_DIRECTORY, $preset));

    }

}