package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -11,6 +11,8 @@
namespace Symfony\Component\Translation\Extractor;
trigger_deprecation('symfony/translation', '6.2', '"%s" is deprecated.', PhpStringTokenParser::class);
/*
* The following is derived from code at http://github.com/nikic/PHP-Parser
*
@@ -47,6 +49,9 @@ namespace Symfony\Component\Translation\Extractor;
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* @deprecated since Symfony 6.2
*/
class PhpStringTokenParser
{
protected static $replacements = [
@@ -64,10 +69,8 @@ class PhpStringTokenParser
* Parses a string token.
*
* @param string $str String token content
*
* @return string
*/
public static function parse(string $str)
public static function parse(string $str): string
{
$bLength = 0;
if ('b' === $str[0]) {
@@ -90,10 +93,8 @@ class PhpStringTokenParser
*
* @param string $str String without quotes
* @param string|null $quote Quote type
*
* @return string
*/
public static function parseEscapeSequences(string $str, string $quote = null)
public static function parseEscapeSequences(string $str, string $quote = null): string
{
if (null !== $quote) {
$str = str_replace('\\'.$quote, $quote, $str);
@@ -124,10 +125,8 @@ class PhpStringTokenParser
*
* @param string $startToken Doc string start token content (<<<SMTHG)
* @param string $str String token content
*
* @return string
*/
public static function parseDocString(string $startToken, string $str)
public static function parseDocString(string $startToken, string $str): string
{
// strip last newline (thanks tokenizer for sticking it into the string!)
$str = preg_replace('~(\r\n|\n|\r)$~', '', $str);