mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-02-10 08:28:41 +00:00
autofixes
This commit is contained in:
parent
19d9a0e7a1
commit
03a46f6ef4
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
return [
|
return [
|
||||||
'target_php_version' => null,
|
'target_php_version' => null,
|
||||||
'strict_param_checking' => true,
|
'strict_param_checking' => true,
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
ini_set('display_errors', 1);
|
\ini_set('display_errors', 1);
|
||||||
ini_set('display_startup_errors', 1);
|
\ini_set('display_startup_errors', 1);
|
||||||
error_reporting(E_ALL);
|
\error_reporting(\E_ALL);
|
||||||
|
|
||||||
$fh = fopen('GeoIPCountryWhois.csv', 'r');
|
$fh = \fopen('GeoIPCountryWhois.csv', 'r');
|
||||||
$fo = fopen('output.csv', 'w');
|
$fo = \fopen('output.csv', 'w');
|
||||||
|
|
||||||
function ip2int(string $ip) : float {
|
function ip2int(string $ip) : float {
|
||||||
$split = \explode('.', $ip);
|
$split = \explode('.', $ip);
|
||||||
return $split[0] * (256 ** 3) + $split[1] * (256 ** 2) + $split[2] * (256 ** 1) + $split[3];
|
return $split[0] * (256 ** 3) + $split[1] * (256 ** 2) + $split[2] * (256 ** 1) + $split[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
while (($data = fgetcsv($fh, 150, ",")) !== FALSE) {
|
while (($data = \fgetcsv($fh, 150, ",")) !== false) {
|
||||||
fputcsv($fo, [ip2int($data[0]), ip2int($data[1]), $data[4]]);
|
\fputcsv($fo, [ip2int($data[0]), ip2int($data[1]), $data[4]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose($fo);
|
\fclose($fo);
|
||||||
fclose($fh);
|
\fclose($fh);
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ function printUsage() : void
|
||||||
$destination = ($key = \array_search('-d', $argv)) === false || $key === \count($argv) - 1 ? null : \trim($argv[$key + 1], '" ');
|
$destination = ($key = \array_search('-d', $argv)) === false || $key === \count($argv) - 1 ? null : \trim($argv[$key + 1], '" ');
|
||||||
$modulePath = ($key = \array_search('-m', $argv)) === false || $key === \count($argv) - 1 ? null : \trim($argv[$key + 1], '" ');
|
$modulePath = ($key = \array_search('-m', $argv)) === false || $key === \count($argv) - 1 ? null : \trim($argv[$key + 1], '" ');
|
||||||
|
|
||||||
if (!isset($destination) || !isset($modulePath) ) {
|
if (!isset($destination) || !isset($modulePath)) {
|
||||||
printUsage();
|
printUsage();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -78,4 +78,4 @@ foreach($langs as $lang => $data) {
|
||||||
|
|
||||||
echo 'Language files have different length: ' . ($unequalLength ? 'yes' : 'no') . "\n";
|
echo 'Language files have different length: ' . ($unequalLength ? 'yes' : 'no') . "\n";
|
||||||
echo 'Unused language components: ' . "\n";
|
echo 'Unused language components: ' . "\n";
|
||||||
var_dump($unusedLanguage);
|
\var_dump($unusedLanguage);
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
$postBody = $_POST['payload'] ?? '';
|
$postBody = $_POST['payload'] ?? '';
|
||||||
$payload = \json_decode($postBody, true);
|
$payload = \json_decode($postBody, true);
|
||||||
|
|
||||||
if (isset($payload['organization'], $payload['organization']['login']) && $payload['organization']['login'] === 'Orange-Management') {
|
if (isset($payload['organization'], $payload['organization']['login']) && $payload['organization']['login'] === 'Orange-Management') {
|
||||||
shell_exec('./buildProject.sh > /dev/null 2>/dev/null &');
|
\shell_exec('./buildProject.sh > /dev/null 2>/dev/null &');
|
||||||
|
|
||||||
echo 'Installing';
|
echo 'Installing';
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user