1
0

test adding condorcet vote

This commit is contained in:
2022-09-21 12:39:11 +02:00
parent 1e8adfa5d5
commit 0a30f39eb4
349 changed files with 36658 additions and 0 deletions

View File

@ -0,0 +1,40 @@
<?php
declare(strict_types=1);
use CondorcetPHP\Condorcet\Dev\CondorcetDocumentationGenerator\Generate;
require_once __DIR__.str_replace('/', \DIRECTORY_SEPARATOR, '/../vendor/../vendor/autoload.php');
// Build command
$path = mb_substr(__DIR__, 0, mb_strlen(__DIR__) - 4);
$path .= \DIRECTORY_SEPARATOR.'Documentation';
// Clear folder
function rrmdir(string $dir, string $path): void
{
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object !== '.' && $object !== '..') {
if (filetype($dir.\DIRECTORY_SEPARATOR.$object) === 'dir') {
rrmdir($dir.\DIRECTORY_SEPARATOR.$object, $path);
} else {
unlink($dir.\DIRECTORY_SEPARATOR.$object);
}
}
}
reset($objects);
if ($dir !== $path) {
rmdir($dir);
}
}
}
rrmdir($path, $path);
// Execute command
new Generate($path);