Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@
.DS_Store

# Testing @ QA
/.php-cs-fixer.cache
/.php-cs-fixer.php
/.phpunit.result.cache
.php-cs-fixer.cache
.php-cs-fixer.php
.phpunit.result.cache
.codacy/logs/

# Environment
/.env
/clover.xml
/.codacy

# Documentation
/venv/**
/.cache/**
/site

venv/**
.cache/**
site/**
.DS_Store
2 changes: 1 addition & 1 deletion src/EduFramework/Commands/CreateApiCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CreateApiCommand extends Command

protected function configure(): void
{
$this->AddArgument('controller-name', InputArgument::REQUIRED, 'Controller name');
$this->addArgument('controller-name', InputArgument::REQUIRED, 'Controller name');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/EduFramework/Commands/CreateCliCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CreateCliCommand extends Command

protected function configure(): void
{
$this->AddArgument('command-name', InputArgument::REQUIRED, 'Commande name');
$this->addArgument('command-name', InputArgument::REQUIRED, 'Commande name');
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/EduFramework/Commands/CreateControllerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class CreateControllerCommand extends Command

protected function configure(): void
{
$this->AddArgument('controller-name', InputArgument::REQUIRED, 'Controller name');
$this->addArgument('controller-name', InputArgument::REQUIRED, 'Controller name');
}

/**
Expand All @@ -63,7 +63,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
$io = new SymfonyStyle($input, $output);

//Format controller-name arg
$namesCollection = self::getNamesCollection($input->getArgument('controller-name'));
$namesCollection = $this->getNamesCollection($input->getArgument('controller-name'));
//Generate route params in app/Config/routes.yaml
$this->generateRoute($namesCollection["uri"], $namesCollection["uri"], $namesCollection["className"]);
//Generate Controller Class
Expand Down
14 changes: 10 additions & 4 deletions src/EduFramework/Commands/StartCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,20 @@ protected function execute(InputInterface $input, ConsoleOutputInterface|OutputI
$port = $input->getOption('port');
$noCheck = $input->getOption('no-start');

if ($noCheck === false && $output instanceof ConsoleOutputInterface) {
$animationSlash = $output->section();
if ($noCheck === false) {
// Calcule le nombre de lignes de la bannière (ajuste si nécessaire)
$bannerLines = count(explode("\n", CommandBanner::getBanner(0)));
for ($slash = 0; $slash <= 5; $slash++) {
$animationSlash->writeln([
if ($slash > 0) {
// Efface uniquement les lignes de la bannière précédente
for ($i = 0; $i < $bannerLines; $i++) {
$output->write("\033[1A\033[2K"); // Remonte d'une ligne et efface
}
}
$output->writeln([
CommandBanner::getBanner($slash)
]);
usleep(500000); // (0.5 seconde)
$slash < 5 ? $animationSlash->clear() : "";
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/EduFramework/Core/Controller/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Request
* Nom de la classe du controller
* @var string $hander
*/
private string $hander;
private string $hander = '';

/**
* Les variables de la requête HTTP
Expand Down
Loading