![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/medad.corals.io/vendor/mtdowling/jmespath.php/src/ |
<?php namespace JmesPath; /** * Syntax errors raise this exception that gives context */ class SyntaxErrorException extends \InvalidArgumentException { /** * @param string $expectedTypesOrMessage Expected array of tokens or message * @param array $token Current token * @param string $expression Expression input */ public function __construct( $expectedTypesOrMessage, array $token, $expression ) { $message = "Syntax error at character {$token['pos']}\n" . $expression . "\n" . str_repeat(' ', max($token['pos'], 0)) . "^\n"; $message .= !is_array($expectedTypesOrMessage) ? $expectedTypesOrMessage : $this->createTokenMessage($token, $expectedTypesOrMessage); parent::__construct($message); } private function createTokenMessage(array $token, array $valid) { return sprintf( 'Expected one of the following: %s; found %s "%s"', implode(', ', array_keys($valid)), $token['type'], $token['value'] ); } }