Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelfolaron committed Nov 16, 2024
1 parent 332bfdb commit d9587b9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
1 change: 1 addition & 0 deletions app/Command/BackupDbCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
case 1:
$io->error('There was an issue backing up the database');
$io->listing($output);

return Command::FAILURE;
}

Expand Down
1 change: 0 additions & 1 deletion app/Core/Configuration/laravelConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/
\Leantime\Core\Providers\AppServiceProvider::class,


\Leantime\Core\Providers\Cache::class, //\Illuminate\Cache\CacheServiceProvider::class,
\Leantime\Core\Providers\Redis::class,

Expand Down
10 changes: 5 additions & 5 deletions app/Core/Events/EventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,16 +293,16 @@ public static function add_event_listener(
): void {

//Some backwards compatibility rules
if(str_starts_with($eventName, "leantime.core.template.tpl")) {
$eventParts = explode(".", $eventName);
if (str_starts_with($eventName, 'leantime.core.template.tpl')) {
$eventParts = explode('.', $eventName);

$count = count($eventParts);

$eventName = "leantime.*.".($eventParts[$count-2] ?? '').".".($eventParts[$count-1] ?? '');
$eventName = 'leantime.*.'.($eventParts[$count - 2] ?? '').'.'.($eventParts[$count - 1] ?? '');
}

if($eventName == "leantime.core.*.afterFooterOpen") {
$eventName = "leantime.*.afterFooterOpen";
if ($eventName == 'leantime.core.*.afterFooterOpen') {
$eventName = 'leantime.*.afterFooterOpen';
}

if (! array_key_exists($eventName, self::$eventRegistry)) {
Expand Down
2 changes: 1 addition & 1 deletion app/Domain/Plugins/Services/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function __construct(
/**
* Retrieves all plugins, optionally filtering only the enabled ones.
*
* @param bool $enabledOnly If set to true, only enabled plugins will be returned.
* @param bool $enabledOnly If set to true, only enabled plugins will be returned.
* @return false|array<InstalledPlugin> Returns an array of all plugins or false if an error occurs.
*
* @api
Expand Down
11 changes: 4 additions & 7 deletions app/Domain/Projects/Repositories/Projects.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,14 @@ public function getUsersAssignedToProject($id, $includeApiUsers = false): array|
/**
* Retrieves the relationship of users assigned to a specific project.
*
* @param int $id The ID of the project.
* @param bool $includeApiUsers Flag to determine whether to include API users. Default is false.
* @param int $id The ID of the project.
* @param bool $includeApiUsers Flag to determine whether to include API users. Default is false.
* @return array|bool Returns an array of users assigned to the project or false on failure.
*
* @Deprecated
*
*/
public function getProjectUserRelation($id, $includeApiUsers = false): array|bool {
public function getProjectUserRelation($id, $includeApiUsers = false): array|bool
{
return $this->getUsersAssignedToProject($id, $includeApiUsers);
}

Expand Down Expand Up @@ -318,9 +318,6 @@ public function getProjectsUserHasAccessTo($userId, string $status = 'all', stri
return $values;
}




/**
* @return int|mixed
*/
Expand Down

0 comments on commit d9587b9

Please sign in to comment.