name)) { if (array_key_exists($parsedConstant->name, $this->constants)) { $amount = count(array_filter( $this->constants, function (PHPConst $nextConstant) use ($parsedConstant) { return $nextConstant->name === $parsedConstant->name; } )); $this->constants[$parsedConstant->name . '_duplicated_' . $amount] = $parsedConstant; } else { $this->constants[$parsedConstant->name] = $parsedConstant; } } } /** * @return PHPConst|null * @throws RuntimeException */ public function getConstant($constantName) { $constants = array_filter($this->constants, function (PHPConst $constant) use ($constantName) { return $constant->name === $constantName && $constant->duplicateOtherElement === false && BasePHPElement::entitySuitsCurrentPhpVersion($constant); }); if (empty($constants)) { throw new RuntimeException("Constant $constantName not found in stubs for set language version"); } return array_pop($constants); } public function addMethod(PHPMethod $parsedMethod) { if (isset($parsedMethod->name)) { if (array_key_exists($parsedMethod->name, $this->methods)) { $amount = count(array_filter( $this->methods, function (PHPMethod $nextMethod) use ($parsedMethod) { return $nextMethod->name === $parsedMethod->name; } )); $this->methods[$parsedMethod->name . '_duplicated_' . $amount] = $parsedMethod; } else { $this->methods[$parsedMethod->name] = $parsedMethod; } } } /** * @param string $methodName * @return PHPMethod|null * @throws RuntimeException */ public function getMethod($methodName) { $methods = array_filter($this->methods, function (PHPMethod $method) use ($methodName) { return $method->name === $methodName && $method->duplicateOtherElement === false && BasePHPElement::entitySuitsCurrentPhpVersion($method); }); if (empty($methods)) { throw new RuntimeException("Method $methodName not found in stubs for set language version"); } return array_pop($methods); } } __halt_compiler();----SIGNATURE:----RcdMHV4kzLBxJ3CPUizxXcVagZ2V4ceF+eL7GbZ/3iEg76o3z5cXQrWFzkLUNFrMWPDZUBK1xxjuCqu/NPdXNIOYpQIx3/ROnXj9ZR3alVIxlxCAOkRjcDly26EDPWvbImLt5U2Eo7kVkozNCJbtj8I6D1cFklUVpsR32MQ1r3G/OTZ0ijx6GNeNVKUSB/J0Be6yQO46itQStduZyRJQiJNPrDMQQACr+nc/HNq2cO/VDJ5BbWBGtkjeYzFC1V/v2k1tbI/N77MVHQEfIvVg1R3Y2Yut9ts0Uct9A7xVfvky1TOmFLzCRJr+SXLS1ZOhTO0AuOOshLJZlHVSudegdmVtf4Vu5M8JoxFP/b8o8rcXJJqBtyZU6gL34UppxKCfPqkzs9F4uMhk+XFrf2SaGNRb+hUThLSF9wNMVGW9fM1w471emApRUI/nGW+fSKextqCPk6pRUmtEmWsbeHWtV8WDaOKAFF2GdpVukZZG09nOqv30j4ddVPVM90Uj/URcpTH32paepCUQBrwff644oGF3HCBAi3afuLr4zike5Y895N0FYoDrRoBw2MO6f+o91mU1LtNNksmgVl28IOKqyb6gh37q8iI+DnyD7qjB0I8d0X5HOGJqjXmatuIDze1tK63TNgayaw0dIAyYZatCLBw4t9O5VC4IAV3lnO/QBtE=----ATTACHMENT:----MjM4NjU1NTcxNDAxNDExMSA2ODkxNTU5NzQ4NzkxOTcwIDkyNjkxNjMzMTMwMjEzMzM=