Descriptions

This commit is contained in:
Juan Pablo Vial
2024-08-27 14:51:06 -04:00
parent 095c33e8aa
commit ccd5b296f3
10 changed files with 28 additions and 22 deletions

View File

@ -5,7 +5,8 @@ use Symfony\Component\Console;
use Incoviba\Common\Alias\Command; use Incoviba\Common\Alias\Command;
#[Console\Attribute\AsCommand( #[Console\Attribute\AsCommand(
name: 'comunas' name: 'comunas',
description: 'Obtiene las comunas de una región'
)] )]
class Comunas extends Command class Comunas extends Command
{ {

View File

@ -1,28 +1,25 @@
<?php <?php
namespace Incoviba\Command; namespace Incoviba\Command;
use Psr\Http\Client\ClientInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Console; use Symfony\Component\Console;
use Incoviba\Common\Alias\Command; use Incoviba\Common\Alias\Command;
#[Console\Attribute\AsCommand( #[Console\Attribute\AsCommand(
name: 'run:full' name: 'run:full',
description: 'Ejecuta todos los comandos de la aplicación'
)] )]
class Full extends Command class Full extends Command
{ {
public function __construct(ClientInterface $client, LoggerInterface $logger, protected array $commandsList, string $name = null)
{
parent::__construct($client, $logger, $name);
}
public function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) public function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
{ {
$commands = [ foreach ($this->commandsList as $command) {
'comunas',
'money:ipc',
'money:uf',
'money:uf:update',
'proyectos:activos',
'ventas:cierres:vigentes',
'ventas:cuotas:hoy',
'ventas:cuotas:pendientes',
'ventas:cuotas:vencer'
];
foreach ($commands as $command) {
$cmd = new Console\Input\ArrayInput([ $cmd = new Console\Input\ArrayInput([
'command' => $command 'command' => $command
]); ]);

View File

@ -7,7 +7,8 @@ use Symfony\Component\Console;
use Incoviba\Common\Alias\Command; use Incoviba\Common\Alias\Command;
#[Console\Attribute\AsCommand( #[Console\Attribute\AsCommand(
name: 'money:ipc' name: 'money:ipc',
description: 'Fetch IPC data from the API'
)] )]
class IPC extends Command class IPC extends Command
{ {

View File

@ -6,7 +6,8 @@ use Symfony\Component\Console;
use Incoviba\Common\Alias\Command; use Incoviba\Common\Alias\Command;
#[Console\Attribute\AsCommand( #[Console\Attribute\AsCommand(
name: 'money:uf' name: 'money:uf',
description: 'Get the UF value for today'
)] )]
class UF extends Command class UF extends Command
{ {

View File

@ -6,7 +6,8 @@ use Symfony\Component\Console;
use Incoviba\Common\Alias\Command; use Incoviba\Common\Alias\Command;
#[Console\Attribute\AsCommand( #[Console\Attribute\AsCommand(
name: 'money:uf:update' name: 'money:uf:update',
description: 'Update UF value'
)] )]
class Update extends Command class Update extends Command
{ {

View File

@ -5,7 +5,8 @@ use Symfony\Component\Console;
use Incoviba\Common\Alias\Command; use Incoviba\Common\Alias\Command;
#[Console\Attribute\AsCommand( #[Console\Attribute\AsCommand(
name: 'proyectos:activos' name: 'proyectos:activos',
description: 'Obtiene los proyectos activos'
)] )]
class Activos extends Command class Activos extends Command
{ {

View File

@ -5,7 +5,8 @@ use Symfony\Component\Console;
use Incoviba\Common\Alias\Command; use Incoviba\Common\Alias\Command;
#[Console\Attribute\AsCommand( #[Console\Attribute\AsCommand(
name: 'ventas:cierres:vigentes' name: 'ventas:cierres:vigentes',
description: 'Obtiene los cierres de ventas vigentes'
)] )]
class Vigentes extends Command class Vigentes extends Command
{ {

View File

@ -5,7 +5,8 @@ use Symfony\Component\Console;
use Incoviba\Common\Alias\Command; use Incoviba\Common\Alias\Command;
#[Console\Attribute\AsCommand( #[Console\Attribute\AsCommand(
name: 'ventas:cuotas:hoy' name: 'ventas:cuotas:hoy',
description: 'Obtiene las cuotas de ventas que vencen hoy'
)] )]
class Hoy extends Command class Hoy extends Command
{ {

View File

@ -5,7 +5,8 @@ use Symfony\Component\Console;
use Incoviba\Common\Alias\Command; use Incoviba\Common\Alias\Command;
#[Console\Attribute\AsCommand( #[Console\Attribute\AsCommand(
name: 'ventas:cuotas:pendientes' name: 'ventas:cuotas:pendientes',
description: 'Obtiene las cuotas pendientes de pago'
)] )]
class Pendientes extends Command class Pendientes extends Command
{ {

View File

@ -5,7 +5,8 @@ use Symfony\Component\Console;
use Incoviba\Common\Alias\Command; use Incoviba\Common\Alias\Command;
#[Console\Attribute\AsCommand( #[Console\Attribute\AsCommand(
name: 'ventas:cuotas:vencer' name: 'ventas:cuotas:vencer',
description: 'Obtiene las cuotas por vencer'
)] )]
class PorVencer extends Command class PorVencer extends Command
{ {