phpcs:ignore SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint
489095
public function unserialize($serialized): void
    {
        $cachedData = json_decode($serialized, true);

        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new InvalidCachedResponse();
        }

        $this->protocolVersion     = $cachedData['protocolVersion'];
        $this->numericalStatusCode = $cachedData['numericalStatusCode'];
        $this->textualStatusCode   = $cachedData['textualStatusCode'];
        $this->headers             = $cachedData['headers'];
        $this->body                = $cachedData['body'];
    }
1143579
private function optionalTypeHint() {
    static $array_callable_types = [T_ARRAY, T_CALLABLE];
    $node = NULL;
    if ($node = $this->tryMatchToken($array_callable_types)) {
      return $node;
    }
    elseif (in_array($this->currentType, self::$namespacePathTypes)) {
      return $this->name();
    }
    return NULL;
  }
822395
private void throwCannotInstanciateUnsupported(EJBBinding binding,
                                                   JavaColonNamespace jndiType,
                                                   String lookupName,
                                                   String messageId) throws NameNotFoundException {
        J2EEName j2eeName = getJ2EEName(binding);
        String jndiName = jndiType.toString() + "/" + lookupName;
        String msgTxt = Tr.formatMessage(tc, messageId,
                                         binding.interfaceName,
                                         j2eeName.getComponent(),
                                         j2eeName.getModule(),
                                         j2eeName.getApplication(),
                                         jndiName);
        throw (new NameNotFoundException(msgTxt));
    }
421820
public static function phpTypeHintingToPhpTypeDeclaration(string $phpTypeHint): string
  {
    $phpType = '';

    switch ($phpTypeHint)
    {
      case 'array':
      case 'array[]':
      case 'bool':
      case 'float':
      case 'int':
      case 'string':
      case 'void':
        $phpType = $phpTypeHint;
        break;

      default:
        $parts = explode('|', $phpTypeHint);
        $key   = array_search('null', $parts);
        if (count($parts)==2 && $key!==false)
        {
          unset($parts[$key]);

          $tmp = static::phpTypeHintingToPhpTypeDeclaration(implode('|', $parts));
          if ($tmp!=='')
          {
            $phpType = '?'.$tmp;
          }
        }
    }

    return $phpType;
  }
18622
function modify( &$tpl, &$operatorName, &$operatorParameters, &$rootNamespace, &$currentNamespace, &$operatorValue, &$namedParameters ) {
        switch ($operatorName)
        {
            case 'washxml':
                $operatorValue = str_replace( array( '&', '"', "'", '<', '>' ), array( '&amp;', '&quot;', '&apos;', '&lt;', '&gt;' ), $operatorValue );
                break;
            case 'washxmlcomment':
                // in xml comments the -- string is not permitted
                $operatorValue = str_replace( '--', '_-', $operatorValue );
                break;
            case 'washxmlcdata':
                /// @todo
                eZDebug::writeWarning( 'Template operator washxmlcdata not yet implemented, it should not be used!', __METHOD__ );
                break;
            case 'xsdtype':
                $operatorValue = ggWSDLParser::phpType2xsdType( $operatorValue, $namedParameters['targetprefix'], $namedParameters['xsdprefix'], $namedParameters['soapencprefix'] );
                break;
            case 'classInspect':
                $operatorValue = ggeZWebservices::classInspect( $operatorValue );
                break;
        }
    }
496007
public function parse()
    {
        foreach ($this->_keys as $key) {
            if(empty($this->_rawRequest[$key['name']]) === true && $key['type'] === 'mandatory')
                throw new MissingParamsException();
        }

    }
897952
function(missingParams) {
      var errParts = [];
      missingParams = _.map(missingParams, function(missingParam) {
        return '`' + missingParam + '`';
      });
      errParts.push("Missing");
      errParts.push(missingParams.join(', '));
      errParts.push("parameter(s).");
      return new MuniError(errParts.join(' '), 400);
    }
634594
private function ensureRequiredEnvironment()
    {
        if (empty($GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFoundOnCHashError'])) {
            throw new Exception('$GLOBALS[\'TYPO3_CONF_VARS\'][\'FE\'][\'pageNotFoundOnCHashError\'] needs to be enabled when using out of bound typoscript rendering!', 1403808246);
        }
        if (empty($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['typoscript_rendering']['renderClasses']) || !is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['typoscript_rendering']['renderClasses'])) {
            throw new Exception('No renderer found in configuration: $GLOBALS[\'TYPO3_CONF_VARS\'][\'EXTCONF\'][\'typoscript_rendering\'][\'renderClasses\']', 1403808247);
        }
        if (!in_array('tx_typoscriptrendering[context]', $GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['requireCacheHashPresenceParameters'], true)) {
            throw new Exception('tx_typoscriptrendering[context] must be set as required cHash parameter', 1403808248);
        }
    }
619474
function (typeSpecs, values, location) {
	    checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);
	  }
475751
function missingParamError () {
	var params = new Parameterizer (null, null);
	params.get = function (key) {
		throw new Error ('missing param ' + key);
	};
	return params;
}
1312961
private void throwExStrParam(MethodVisitor mv, Class<?> exCls) {
		String exSig = Type.getInternalName(exCls);
		mv.visitTypeInsn(NEW, exSig);
		mv.visitInsn(DUP);
		mv.visitLdcInsn("mapping " + this.className + " failed to map field:");
		mv.visitVarInsn(ALOAD, 2);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "concat", "(Ljava/lang/String;)Ljava/lang/String;");
		mv.visitMethodInsn(INVOKESPECIAL, exSig, "<init>", "(Ljava/lang/String;)V");
		mv.visitInsn(ATHROW);
	}
288606
private final void checkInvariants() throws Error {

        if (_lineBreak == null) {
            throw new Error("_lineBreak == null");
        } else if (_lineBreak == LineBreak.NONE && _indentation.length() > 0) {
            throw new Error("_lineBreak == LineBreak.NONE && _indentation = \"" + _indentation + "\".");
        } else if (_elementStack == null) {
            throw new Error("_elementStack (" + _elementStack + " == null");
        } else if (_elementStackSize < 0) {
            throw new Error("_elementStackSize (" + _elementStackSize + ") < 0");
        }
    }
1355738
private function _castInputParametersWithClosure($params) {
		$allowed_params = $this->_getAllowedParams();		
		foreach($params as $name => $value) {
			$array_idx = $name;
			$found = false;
			$found |= $this->_valueInArray($name, array_keys($allowed_params), $array_idx);
			$found |= $this->_valueInArray($this->_path . "[" . $name . "]", array_keys($allowed_params), $array_idx);
			// XML Response can't have dashes
			$found |= $this->_valueInArray(str_replace('-', '_', $name), array_keys($allowed_params), $array_idx);
			$found |= $this->_valueInArray($this->_path . "[" . str_replace('-', '_', $name) . "]", array_keys($allowed_params), $array_idx);

      if($found) {
        $closure = $allowed_params[$array_idx];
        $this->$array_idx = $closure ? $closure($value, $params) : $value;
      }
      if($array_idx == 0) {
        //print_r($params);
      }
		}
	}
446379
protected void initializeMissingFieldsFromVfs(CmsObject cms, CmsUUID structureId) {

        if (structureId == null) {
            return;
        }
        if ((m_title != null) && (m_description != null)) {
            return;
        }

        try {
            CmsResource res = cms.readResource(structureId);
            if (m_description == null) {
                CmsProperty descProp = cms.readPropertyObject(
                    res,
                    CmsPropertyDefinition.PROPERTY_DESCRIPTION,
                    CmsResourceTypeXmlContainerPage.isContainerPage(res));
                m_description = descProp.getValue();
            }

            if (m_title == null) {
                CmsProperty titleProp = cms.readPropertyObject(
                    res,
                    CmsPropertyDefinition.PROPERTY_TITLE,
                    CmsResourceTypeXmlContainerPage.isContainerPage(res));
                m_title = titleProp.getValue();
                if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_title)) {
                    m_title = res.getName();
                }
            }
        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);
            return;
        }
    }
1061590
private void fixSchema(CmsSetupDb dbCon) throws SQLException {

        Map<String, String> replacer = new HashMap<String, String>();
        String tableName;
        String fieldName;
        String fieldType;
        String nullAcceptInfo;
        String defaultValue;
        String query;
        for (int i = 0; i < DB_ARRAY.length; i++) {
            tableName = DB_ARRAY[i][0];
            fieldName = DB_ARRAY[i][1];
            fieldType = DB_ARRAY[i][2];
            nullAcceptInfo = DB_ARRAY[i][3];
            defaultValue = DB_ARRAY[i][4];

            if ((fieldType != null) && (fieldType.length() > 0)) {
                initReplacer(replacer, tableName, fieldName);
                replacer.put(REPLACEMENT_FIELD_TYPE, fieldType);
                query = readQuery(QUERY_ALTER_FIELD);
                dbCon.updateSqlStatement(query, replacer, null);
            }

            if ((nullAcceptInfo != null) && (!nullAcceptInfo.equals(NO_CHANGE))) {
                String q;
                if (nullAcceptInfo.equals(DROP_NOT_NULL)) {
                    q = QUERY_DROP_NOT_NULL;
                } else {
                    q = QUERY_SET_NOT_NULL;
                }
                query = readQuery(q);
                initReplacer(replacer, tableName, fieldName);
                dbCon.updateSqlStatement(query, replacer, null);
            }

            if ((defaultValue != null) && (defaultValue.length() > 0)) {
                initReplacer(replacer, tableName, fieldName);
                if (defaultValue.equals(DV_DROP)) {
                    query = readQuery(QUERY_DROP_DEFAULT_VALUE);
                    dbCon.updateSqlStatement(query, replacer, null);
                } else {
                    query = readQuery(QUERY_SET_DEFAULT_VALUE);
                    replacer.put(REPLACEMENT_FIELD_DEFAULT_VALUE, defaultValue);
                    dbCon.updateSqlStatement(query, replacer, null);
                }
            }

        }

    }
487298
protected void handleParameterConversionFailureException(ActionExecute execute, int index, Class<?> paramType, String plainValue,
            String decoded, RuntimeException cause) {
        final String msg = buildParameterConversionFailureMessage(execute, index, paramType, plainValue, decoded, cause);
        throwExecuteParameterMismatchException(msg); // treat it as no such execute
    }
728817
@SuppressWarnings("unchecked")
    protected void setParameters(PreparedStatement stmt, Object[] params) throws SQLException {
        for (int i = 0; i < params.length; i++) {
            if(params[i] == null){
                stmt.setObject(i + 1, null);
            } else {
                Class<?> propertType = params[i].getClass();
                @SuppressWarnings("rawtypes")
                ValueType valueType = MirageUtil.getValueType(propertType, null, dialect, valueTypes);
                if(valueType != null){
                    valueType.set(propertType, stmt, params[i], i + 1);
                } else {
                    if(logger.isWarnEnabled()) {
                        logger.warn("valueType for " + propertType.getName() + " not found.");
                    }
                }
            }
        }
    }