Skip to content

Commit

Permalink
Merge pull request #1943 from Leantime/codeCleanUp
Browse files Browse the repository at this point in the history
Code clean up
Everything resolved
  • Loading branch information
marcelfolaron authored Oct 4, 2023
2 parents 2ffcffc + fb3907b commit 0880025
Show file tree
Hide file tree
Showing 462 changed files with 8,006 additions and 2,390 deletions.
34 changes: 2 additions & 32 deletions .dev/docker-compose.tests.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,14 @@
version: "3.9"
networks:
leantime:
external: false
driver: bridge
volumes:
mysql:

services:
leantime-dev:
privileged: true
build: .
ports:
- "8090:8080"
volumes:
- "../:/var/www/html"
- "./xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
- "./error_reporting.ini:/usr/local/etc/php/conf.d/error_reporting.ini"
- ${PWD}/test.env:/var/www/html/config/.env
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
db:
condition: service_healthy
networks:
- leantime
db:
image: mysql:8.0
ports:
- 3307:3306
environment:
MYSQL_ROOT_PASSWORD: leantime
MYSQL_USER: leantime
MYSQL_PASSWORD: leantime
MYSQL_DATABASE: leantime_test
networks:
- leantime
volumes:
- mysql:/var/lib/mysql:rw
healthcheck:
test: "mysql -u$$MYSQL_USER -p$$MYSQL_PASSWORD -e 'SELECT 1'"
interval: 5s
timeout: 5s
retries: 20
ports:
- 3307:3306
88 changes: 44 additions & 44 deletions .idea/leantime-oss.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

89 changes: 45 additions & 44 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 13 additions & 5 deletions app/Command/AddUserCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Leantime\Command;

use Illuminate\Contracts\Container\BindingResolutionException;
use Leantime\Domain\Clients\Repositories\Clients;
use Leantime\Domain\Users\Repositories\Users;
use Symfony\Component\Console\Command\Command;
Expand All @@ -12,12 +13,18 @@
use Leantime\Domain\Auth\Models\Roles;
use Symfony\Component\Console\Style\SymfonyStyle;

/**
*
*/
class AddUserCommand extends Command
{
protected static $defaultName = 'user:add';
protected static $defaultDescription = 'Add a new User';

protected function configure()
/**
* @return void
*/
protected function configure(): void
{
parent::configure();
$this->addOption('email', null, InputOption::VALUE_REQUIRED, "User's Email")
Expand All @@ -40,9 +47,10 @@ function (CompletionInput $input) {
/**
* Execute the command
*
* @param InputInterface $input
* @param OutputInterface $output
* @return integer 0 if everything went fine, or an exit code.
* @param InputInterface $input
* @param OutputInterface $output
* @return int 0 if everything went fine, or an exit code.
* @throws BindingResolutionException
*/
protected function execute(InputInterface $input, OutputInterface $output): int
{
Expand Down Expand Up @@ -121,7 +129,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$io->error("Failed to Add User");
return Command::FAILURE;
}
} catch (Exception $ex) {
} catch (\Exception $ex) {
$io->error($ex);
return Command::FAILURE;
}
Expand Down
Loading

0 comments on commit 0880025

Please sign in to comment.