Server IP : 184.154.167.98 / Your IP : 3.137.174.253 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/puertode/public_html/contratos/3rdparty/mtdowling/jmespath.php/src/ |
Upload File : |
<?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(' ', $token['pos']) . "^\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'] ); } }