Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Jobin committed May 31, 2023
1 parent ad4311e commit 0110ec8
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions rocket-parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ protected function parseIniFile() {

// create namespace if necessary
if(!isset($config[$name])) {
$config[$name] = array();
$config[$name] = array();
}

// inherit base namespace
if(isset($data[$extends])) {
foreach($data[$extends] as $prop => $val) {
$config[$name][$prop] = $val;
}
foreach($data[$extends] as $prop => $val) {
$config[$name][$prop] = $val;
}
}
// overwrite / set current namespace values
foreach($properties as $prop => $val) {
$config[$name][$prop] = $val;
$config[$name][$prop] = $val;
}
}

Expand Down Expand Up @@ -201,12 +201,11 @@ protected function getGeneratedQueryStringsToIgnore($queryStrings) {

$result .= 'set $rocket_args $args;' . "\n";
foreach ($queryStrings as $name => $value) {
$result .= 'if ($rocket_args ~ (.*)(?:&|^)' . $value . '=[^&]*(.*)) { ';
$result .= 'set $rocket_args $1$2; ';
$result .= "}\n";

$result .= 'if ($rocket_args ~ (.*)(?:&|^)' . $value . '=[^&]*(.*)) { ';
$result .= 'set $rocket_args $1$2; ';
$result .= "}\n";

$iteration++;
$iteration++;
}

$result .= "\n";
Expand Down Expand Up @@ -240,12 +239,11 @@ protected function getGeneratedQueryStringsToCache($queryStrings) {

$result .= 'set $rocket_args_tmp $rocket_args;' . "\n";
foreach ($queryStrings as $name => $value) {
$result .= 'if ($rocket_args_tmp ~ (.*)(?:&|^)' . $value . '=[^&]*(.*)) { ';
$result .= 'set $rocket_has_query_cache 1; ';
$result .= "}\n";

$result .= 'if ($rocket_args_tmp ~ (.*)(?:&|^)' . $value . '=[^&]*(.*)) { ';
$result .= 'set $rocket_has_query_cache 1; ';
$result .= "}\n";

$iteration++;
$iteration++;
}

$result .= "\n";
Expand Down Expand Up @@ -296,7 +294,7 @@ protected function checkConfigurationFile() {
if (file_exists($this->configFile) === false) {
die("Error: the file 'rocket-nginx.ini' could not be found to generate the configuration. " .
"You must rename the orginal 'rocket-nginx.ini.disabled' file to 'rocket-nginx.ini' and run this script again.");
}
}
}

/**
Expand Down

0 comments on commit 0110ec8

Please sign in to comment.