{@inheritDoc}

@SuppressWarnings(PHPMD.UnusedFormalParameter)
489985
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $finder     = new Finder();
        $filesystem = new Filesystem();
        $filesystem->remove($finder->directories()->in($this->getLanguageBasePath()));
    }
485475
private function _checkUnusedFunctionParameters() {
		if ($this->_isActive('checkUnusedFunctionParameters')) {

			// If the docblock is inherited, this means that the function implements a parent function
			// We may have some unused parameters in this case, we don't generate a warnings
			if (!$this->statementStack->getParentStackItem()->docblocInheritDoc) {

				foreach ($this->_functionParameters as $variableName => $value) {
					if ($value !== "used") {
						$msg = $this->_getMessage('UNUSED_FUNCTION_PARAMETER', $this->_currentFunctionName, $variableName);
						$this->_writeError('checkUnusedFunctionParameters', $msg);
					}
				}
			}
		}
	}
844679
public function execute(array $parameters = [], $hydrationMode = self::HYDRATE_DOCUMENT)
    {
        if (null !== $this->maxResults) {
            $this->phpcrQuery->setLimit($this->maxResults);
        }

        if (null !== $this->firstResult) {
            $this->phpcrQuery->setOffset($this->firstResult);
        }

        foreach ($parameters as $key => $value) {
            $this->phpcrQuery->bindValue($key, $value);
        }

        if (self::HYDRATE_PHPCR === $hydrationMode) {
            return $this->phpcrQuery->execute();
        }

        if (self::HYDRATE_DOCUMENT !== $hydrationMode) {
            throw new DocumentManagerException(sprintf(
                'Unknown hydration mode "%s", should be either "document" or "phpcr_node"',
                $hydrationMode
            ));
        }

        $event = new QueryExecuteEvent($this, $this->options);
        $this->dispatcher->dispatch(Events::QUERY_EXECUTE, $event);

        return $event->getResult();
    }
1031791
public function getSourceModelArray($modelRef, $useCollection = false, $trimEmptyValues = false)
    {
        $model = Mage::getSingleton($modelRef);
        if (!$model) {
            throw new RuntimeException($this->__('Could not create source model (%s)', $modelRef));
        }

        $useCollection = (bool)$useCollection;

        if ($useCollection) {
            if (!$model instanceof Mage_Core_Model_Abstract) {
                throw new RuntimeException($this->__('Invalid source model type (%s)', $modelRef));
            }

            $collection = $model->getCollection();
            if (!$collection) {
                throw new RuntimeException($this->__('Could not create collection for source model (%s)', $modelRef));
            }

            $model = $collection;
        }

        $additionalArgs = func_get_args();
        array_shift($additionalArgs);
        array_shift($additionalArgs);
        array_shift($additionalArgs);

        if (method_exists($model, 'toOptionArray')) {
            $optionArray = call_user_func_array([$model, 'toOptionArray'], $additionalArgs);
        } elseif (method_exists($model, 'toOptionHash')) {
            $optionHash = call_user_func_array([$model, 'toOptionHash'], $additionalArgs);
            $optionArray = [];
            foreach ($optionHash as $value => $label) {
                $optionArray[] = [
                    'value' => $value,
                    'label' => $label
                ];
            }
        } else {
            if ($useCollection) {
                throw new RuntimeException($this->__('Source model (%s) collection does not have required method toOptionArray or toOptionHash', $modelRef));
            } else {
                throw new RuntimeException($this->__('Source model (%s) does not have required method toOptionArray or toOptionHash', $modelRef));
            }
        }

        if ($trimEmptyValues) {
            foreach ($optionArray as $k => $option) {
                if ($option['value'] == '') {
                    unset($optionArray[$k]);
                }
            }
        }

        return $optionArray;
    }
486793
function handleResource( $tpl, &$resourceData, $method, &$extraParameters )
    {
        $path = $resourceData['template-name'];

        $matchKeys = $this->Keys;
        if ( isset( $GLOBALS['eZDesignKeys'] ) )
        {
            $matchKeys = array_merge( $matchKeys, $GLOBALS['eZDesignKeys'] );
            unset( $GLOBALS['eZDesignKeys'] );
            $this->Keys = $matchKeys;
        }
        if ( is_array( $extraParameters ) and
             isset( $extraParameters['ezdesign:keys'] ) )
        {
            $this->mergeKeys( $matchKeys, $extraParameters['ezdesign:keys'] );
        }
        $this->KeyStack[] = $this->Keys;
        $this->Keys = $matchKeys;

        eZDebug::accumulatorStart( 'override_cache', 'Override', 'Cache load' );

        if( !isset( $GLOBALS['eZOverrideTemplateCacheMap'] ) )
        {
            $overrideCacheFile = $this->createOverrideCache();

            if ( $overrideCacheFile )
            {
                include_once( $overrideCacheFile );
            }
        }

        if ( isset( $GLOBALS['eZOverrideTemplateCacheMap'] ) )
        {
            if( isset( $GLOBALS['eZOverrideTemplateCacheMap'][md5( '/' . $path )] ) )
            {
                $cacheMap = $GLOBALS['eZOverrideTemplateCacheMap'][md5( '/' . $path )];
                if ( !is_string( $cacheMap ) and trim( $cacheMap['code'] ) )
                {
                    eval( "\$matchFile = " . $cacheMap['code'] . ";" );
                }
                else
                {
                    $matchFile = $cacheMap;
                }
                $match['file'] = $matchFile;
            }
        }
        else
        {
            $template = "/" . $path;
            $matchFileArray = eZTemplateDesignResource::overrideArray( $this->OverrideSiteAccess );

            $matchFile = $matchFileArray[$template];

            if ( isset( $matchFile['custom_match'] ) )
            {
                $matchFound = false;
                foreach ( $matchFile['custom_match'] as $customMatch )
                {
                    $matchOverride = true;
                    if ( count( $customMatch['conditions'] ) > 0 )
                    {
                        foreach ( array_keys( $customMatch['conditions'] ) as $conditionKey )
                        {
                            // Create special substring match for subtree override
                            if ( $conditionKey == 'url_alias' )
                            {
                                if ( strpos( $matchKeys['url_alias'], $customMatch['conditions'][$conditionKey] ) === 0 )
                                {
                                }
                                else
                                {
                                    $matchOverride = false;
                                }
                            }
                            else if ( isset( $matchKeys[$conditionKey] ) and
                                      isset( $customMatch['conditions'][$conditionKey] ) )
                            {
                                if ( is_array( $matchKeys[$conditionKey] ) )
                                {
                                    if ( !in_array( $customMatch['conditions'][$conditionKey], $matchKeys[$conditionKey] ) )
                                    {
                                        $matchOverride = false;
                                    }
                                }
                                else if ( $matchKeys[$conditionKey] != $customMatch['conditions'][$conditionKey] )
                                {
                                    $matchOverride = false;
                                }
                            }
                            else
                            {
                                $matchOverride = false;
                            }
                        }
                        if ( $matchOverride == true )
                        {
                            $match['file'] = $customMatch['match_file'];
                            $matchFound = true;
                            break;
                        }
                        else
                        {
                        }
                    }
                    else
                    {
                        // Default match without conditions
                        $match['file'] = $customMatch['match_file'];
                        $matchFound = true;
                    }
                }
                if ( !$matchFound )
                    $match['file'] = $matchFile['base_dir'] . $matchFile['template'];
            }
            else
            {
                $match['file'] = $matchFile['base_dir'] . $matchFile['template'];
            }
        }
        eZDebug::accumulatorStop( 'override_cache' );
        if ( isset( $match ) )
        {
            $file = $match["file"];

            $matchedKeys = array();
            $usedKeys = array();
            foreach ( $matchKeys as $matchKeyName => $matchKeyValue )
            {
                $usedKeys[$matchKeyName] = $matchKeyValue;
            }
            $extraParameters['ezdesign:used_keys'] = $usedKeys;
            $extraParameters['ezdesign:matched_keys'] = $matchedKeys;
            $tpl->setVariable( 'used', $usedKeys, 'DesignKeys' );
            $tpl->setVariable( 'matched', $matchedKeys, 'DesignKeys' );
            $resourceData['template-filename'] = $file;
            $result = eZTemplateFileResource::handleResourceData( $tpl, $this, $resourceData, $method, $extraParameters );
        }
        else
        {
            $result = false;
        }
        $this->Keys = array_pop( $this->KeyStack );
        return $result;
    }
866478
public function resolve(
        Parameter $parameter,
        ParameterBag $unresolvedParameters,
        ParameterBag $resolvedParameters,
        ResolvingContext $context = null
    ): ParameterBag {
        $context = ResolvingContext::createFrom($context, $parameter->getKey());

        $self = $this;
        $value = preg_replace_callback(
            self::PATTERN,
            function ($match) use ($self, $context, $unresolvedParameters, &$resolvedParameters, $parameter) {
                $key = $match['parameter'];
                $resolvedParameters = $self->resolveStringKey(
                    $self->resolver,
                    $parameter,
                    $key,
                    $unresolvedParameters,
                    $resolvedParameters,
                    $context
                );

                return $resolvedParameters->get($key);
            },
            $parameter->getValue()
        );

        return $resolvedParameters->with($parameter->withValue($value));
    }
966858
public function _execute(array $params = null)
    {
        if (!$this->_stmt) {
            return false;
        }

        // if no params were given as an argument to execute(),
        // then default to the _bindParam array
        if ($params === null) {
            $params = $this->_bindParam;
        }
        // send $params as input parameters to the statement
        if ($params) {
            array_unshift($params, str_repeat('s', count($params)));
            $stmtParams = array();
            foreach ($params as $k => &$value) {
                $stmtParams[$k] = &$value;
            }
            call_user_func_array(
                array($this->_stmt, 'bind_param'),
                $stmtParams
                );
        }

        // execute the statement
        $retval = $this->_stmt->execute();
        if ($retval === false) {
            /**
             * @see Zend_Db_Statement_Mysqli_Exception
             */
            // require_once 'Zend/Db/Statement/Mysqli/Exception.php';
            throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement execute error : " . $this->_stmt->error, $this->_stmt->errno);
        }


        // retain metadata
        if ($this->_meta === null) {
            $this->_meta = $this->_stmt->result_metadata();
            if ($this->_stmt->errno) {
                /**
                 * @see Zend_Db_Statement_Mysqli_Exception
                 */
                // require_once 'Zend/Db/Statement/Mysqli/Exception.php';
                throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement metadata error: " . $this->_stmt->error, $this->_stmt->errno);
            }
        }

        // statements that have no result set do not return metadata
        if ($this->_meta !== false) {

            // get the column names that will result
            $this->_keys = array();
            foreach ($this->_meta->fetch_fields() as $col) {
                $this->_keys[] = $this->_adapter->foldCase($col->name);
            }

            // set up a binding space for result variables
            $this->_values = array_fill(0, count($this->_keys), null);

            // set up references to the result binding space.
            // just passing $this->_values in the call_user_func_array()
            // below won't work, you need references.
            $refs = array();
            foreach ($this->_values as $i => &$f) {
                $refs[$i] = &$f;
            }

            $this->_stmt->store_result();
            // bind to the result variables
            call_user_func_array(
                array($this->_stmt, 'bind_result'),
                $this->_values
            );
        }
        return $retval;
    }
5365
public function filter($value)
    {
        // Formats are applied exclusively and supersed filters
        if ($this->format) {
            if (!$this->serviceDescription) {
                throw new \RuntimeException('No service description was set so '
                    . 'the value cannot be formatted.');
            }
            return $this->serviceDescription->format($this->format, $value);
        }

        // Convert Boolean values
        if ($this->type == 'boolean' && !is_bool($value)) {
            $value = filter_var($value, FILTER_VALIDATE_BOOLEAN);
        }

        // Apply filters to the value
        if ($this->filters) {
            foreach ($this->filters as $filter) {
                if (is_array($filter)) {
                    // Convert complex filters that hold value place holders
                    foreach ($filter['args'] as &$data) {
                        if ($data == '@value') {
                            $data = $value;
                        } elseif ($data == '@api') {
                            $data = $this;
                        }
                    }
                    $value = call_user_func_array(
                        $filter['method'],
                        $filter['args']
                    );
                } else {
                    $value = call_user_func($filter, $value);
                }
            }
        }

        return $value;
    }
344655
public static function unserialize($value, array $params)
    {
        if (empty($value)) {
            return null;
        }
        if (!empty($params['key'])) {
            return ArrayHelper::getValue(
                Serialize::unserialize($value, false),
                explode(Helper::getValue($params['separator'], '.'), $params['key'])
            );
        }

        return Serialize::unserialize($value, false);
    }
565636
function DBParameter($param)
	{
		if (empty($this->settings[$param])) return false;
		$sql = $this->settings[$param][1];
		return $this->_DBParameter($sql);
	}
598850
private function convertParameters(array $parameters, $type, \DOMElement $parent, $keyAttribute = 'key')
    {
        $withKeys = array_keys($parameters) !== range(0, \count($parameters) - 1);
        foreach ($parameters as $key => $value) {
            $element = $this->document->createElement($type);
            if ($withKeys) {
                $element->setAttribute($keyAttribute, $key);
            }

            if ($value instanceof ServiceClosureArgument) {
                $value = $value->getValues()[0];
            }
            if (\is_array($tag = $value)) {
                $element->setAttribute('type', 'collection');
                $this->convertParameters($value, $type, $element, 'key');
            } elseif ($value instanceof TaggedIteratorArgument || ($value instanceof ServiceLocatorArgument && $tag = $value->getTaggedIteratorArgument())) {
                $element->setAttribute('type', $value instanceof TaggedIteratorArgument ? 'tagged' : 'tagged_locator');
                $element->setAttribute('tag', $tag->getTag());

                if (null !== $tag->getIndexAttribute()) {
                    $element->setAttribute('index-by', $tag->getIndexAttribute());

                    if (null !== $tag->getDefaultIndexMethod()) {
                        $element->setAttribute('default-index-method', $tag->getDefaultIndexMethod());
                    }
                }
            } elseif ($value instanceof IteratorArgument) {
                $element->setAttribute('type', 'iterator');
                $this->convertParameters($value->getValues(), $type, $element, 'key');
            } elseif ($value instanceof ServiceLocatorArgument) {
                $element->setAttribute('type', 'service_locator');
                $this->convertParameters($value->getValues(), $type, $element, 'key');
            } elseif ($value instanceof Reference) {
                $element->setAttribute('type', 'service');
                $element->setAttribute('id', (string) $value);
                $behavior = $value->getInvalidBehavior();
                if (ContainerInterface::NULL_ON_INVALID_REFERENCE == $behavior) {
                    $element->setAttribute('on-invalid', 'null');
                } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE == $behavior) {
                    $element->setAttribute('on-invalid', 'ignore');
                } elseif (ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE == $behavior) {
                    $element->setAttribute('on-invalid', 'ignore_uninitialized');
                }
            } elseif ($value instanceof Definition) {
                $element->setAttribute('type', 'service');
                $this->addService($value, null, $element);
            } elseif ($value instanceof Expression) {
                $element->setAttribute('type', 'expression');
                $text = $this->document->createTextNode(self::phpToXml((string) $value));
                $element->appendChild($text);
            } elseif (\is_string($value) && !preg_match('/^[^\x00-\x08\x0B\x0E-\x1A\x1C-\x1F\x7F]*+$/u', $value)) {
                $element->setAttribute('type', 'binary');
                $text = $this->document->createTextNode(self::phpToXml(base64_encode($value)));
                $element->appendChild($text);
            } else {
                if (\in_array($value, ['null', 'true', 'false'], true)) {
                    $element->setAttribute('type', 'string');
                }
                $text = $this->document->createTextNode(self::phpToXml($value));
                $element->appendChild($text);
            }
            $parent->appendChild($element);
        }
    }
1131785
function nullify($authorizationCode, $authorizedAmount, $buyOrder, $nullifyAmount, $commercecode) {

        try {
            $nullificationInput = new nullificationInput();

            /** Código de autorización de la transacción que se requiere anular. Para el caso que se esté anulando una transacción de captura en línea,
             *  este código corresponde al código de autorización de la captura */
            $nullificationInput->authorizationCode = $authorizationCode; // string

            /** Monto autorizado de la transacción que se requiere anular.
             * Para el caso que se esté anulando una transacción de captura en línea,
             * este monto corresponde al monto de la captura */
            $nullificationInput->authorizedAmount = $authorizedAmount; // decimal

            $nullificationInput->buyOrder = $buyOrder; // string

            if ($commercecode == null){
                $nullificationInput->commerceId = floatval($this->config->getCommerceCode());
            } else {
                $nullificationInput->commerceId = floatval($commercecode);
            }

            $nullificationInput->nullifyAmount = $nullifyAmount;

            $nullifyResponse = $this->_nullify(
                    array("nullificationInput" => $nullificationInput));

            /** Validación de firma del requerimiento de respuesta enviado por Webpay */
            $xmlResponse = $this->soapClient->__getLastResponse();
            $soapValidation = new SoapValidation($xmlResponse, $this->config->getWebpayCert());
            $validationResult = $soapValidation->getValidationResult();

            /** Valida conexion a Webpay */
            if ($validationResult === TRUE) {

                $nullificationOutput = $nullifyResponse->return;
                return $nullificationOutput;
            } else {
                $error["error"] = "Error validando conexión a Webpay";
                $error["error"] = "No se pudo completar la conexión con Webpay";
            }

        } catch (\Exception $e) {

            $error["error"] = "Error conectando a Webpay (Verificar que la informaci&oacute;n del certificado sea correcta)";

            $replaceArray = array('<!--' => '', '-->' => '');
            $error["detail"] = str_replace(array_keys($replaceArray), array_values($replaceArray), $e->getMessage());
        }

        return $error;
    }
168780
public static void checkUnusedParameters(SQLiteModelMethod method, Set<String> usedMethodParameters, TypeName excludedClasses) {
		int paramsCount = method.getParameters().size();
		int usedCount = usedMethodParameters.size();

		if (paramsCount > usedCount) {
			StringBuilder sb = new StringBuilder();
			String separator = "";
			for (Pair<String, TypeName> item : method.getParameters()) {
				if (excludedClasses != null && item.value1.equals(excludedClasses)) {
					usedCount++;
				} else {
					if (!usedMethodParameters.contains(item.value0)) {
						sb.append(separator + "'" + item.value0 + "'");
						separator = ", ";
					}
				}
			}

			if (paramsCount > usedCount) {
				throw (new InvalidMethodSignException(method, "unused parameter(s) " + sb.toString()));
			}
		}
	}
835812
public function get_update_data_params(
		/** @noinspection PhpUnusedParameterInspection */
		$post, $update
	) {
		$params = [];
		foreach ( $this->get_data_field_settings() as $k => $v ) {
			$params[ $k ] = $this->get_post_field( $k, $update || ! $v['required'] ? null : $v['default'], null, $v );
			$params[ $k ] = $this->sanitize_input( $params[ $k ], $v['type'] );
			if ( ! isset( $params[ $k ] ) && ! $update && $v['unset_if_null'] ) {
				unset( $params[ $k ] );
				continue;
			}
		}

		return $params;
	}
9021
public function bindValues(
        /*# string */ $sql,
        array &$bindings,
        array $settings
    )/*# : string */ {
        // make sure escape function ok
        $this->setEscapeCallable($settings['escapeFunction']);

        // replace each placeholder with corresponding ?/:name/value
        return preg_replace_callback(
            '/\b__PHQUERY_[^_]++__\b/',
            function ($m) use (&$bindings, $settings) {
                return $this->replacePlaceholders($m[0], $bindings, $settings);
            },
            $sql
        );
    }
1067706
public function obj()
    {
        if ($this->obj === null) {
            $formGroup = $this->formGroup();
            if ($formGroup instanceof self) {
                $prop = $formGroup->storageProperty();
                $val  = $formGroup->obj()->propertyValue($prop->ident());

                $this->obj = $prop->structureVal($val, [ 'default_data' => true ]);
                if ($this->obj === null) {
                    $this->obj = clone $prop->structureProto();
                }
            } elseif ($this->form() instanceof ObjectContainerInterface) {
                $this->obj = $this->form()->obj();
            }

            if ($this->obj === null) {
                throw new RuntimeException(sprintf(
                    'The [%1$s] widget has no data model.',
                    static::CLASS
                ));
            }
        }

        return $this->obj;
    }
18960
public function formatParameters(array $parameters, $keyString = null, $nested = false)
    {
        foreach ($parameters as $key => $value) {
            if (null !== $keyString && true === $nested) {
                $keyString = sprintf('%s[%s]', $keyString, $key);
            } else {
                $keyString = $key;
            }

            if (is_array($value)) {
                $this->formatParameters($value, $keyString, true);

                continue;
            } else {
                $this->formatedParameters[$keyString] = $value;
            }
        }

        return $this->formatedParameters;
    }