Skip to content

Commit

Permalink
style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelfolaron committed Nov 16, 2024
1 parent c66d964 commit fd0305b
Show file tree
Hide file tree
Showing 9 changed files with 510 additions and 381 deletions.
2 changes: 1 addition & 1 deletion app/Core/Bootstrap/SetRequestForConsole.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function bootstrap(Application $app)
], $server);
}

if(! defined('BASE_URL')) {
if (! defined('BASE_URL')) {
define('BASE_URL', $uri);
}

Expand Down
6 changes: 3 additions & 3 deletions app/Core/Controller/Frontcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,17 @@ public function parseRequestParts(IncomingRequest $request)
}

//If a third segment is set it is the id
if(isset($segments[3])) {
if (isset($segments[3])) {
$id = $segments[3];
$method = $segments[2];
$request_parts = join('.', array_slice($segments, 3));
$request_parts = implode('.', array_slice($segments, 3));
$this->incomingRequest->query->set('request_parts', $request_parts);
}

$this->incomingRequest->query->set('act', $moduleName.'.'.$controllerName.'.'.$method);
$this->incomingRequest->setCurrentRoute($moduleName.'.'.$controllerName);

if ($id === "0" || !empty($id)) {
if ($id === '0' || ! empty($id)) {
$this->incomingRequest->query->set('id', $id);
}

Expand Down
2 changes: 1 addition & 1 deletion app/Core/Events/EventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public static function add_event_listener(
): void {

//Some backwards compatibility rules
$eventName = str_replace("leantime.core.template.tpl", "leantime.*", $eventName);
$eventName = str_replace('leantime.core.template.tpl', 'leantime.*', $eventName);

if (! array_key_exists($eventName, self::$eventRegistry)) {
self::$eventRegistry[$eventName] = [];
Expand Down
1 change: 0 additions & 1 deletion app/Core/Middleware/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Leantime\Core\Events\DispatchesEvents;
use Leantime\Core\Http\IncomingRequest;
use Leantime\Domain\Auth\Services\Auth as AuthService;
use Leantime\Domain\Projects\Services\Projects as ProjectsService;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Response;

Expand Down
3 changes: 2 additions & 1 deletion app/Core/UI/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,8 @@ protected function setHookContext($templateParts, $path)

}

public function clearViewPathCache() {
public function clearViewPathCache()
{

$viewPathCachePath = storage_path('framework/viewPaths.php');
$this->files->delete($viewPathCachePath);
Expand Down
2 changes: 0 additions & 2 deletions app/Domain/Plugins/Services/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Str;
use League\Flysystem\Filesystem;
use Leantime\Core\Configuration\Environment as EnvironmentCore;
use Leantime\Core\Console\ConsoleKernel;
use Leantime\Core\Events\DispatchesEvents;
Expand Down Expand Up @@ -298,7 +297,6 @@ public function enablePlugin(int $id): bool
}
}


return $this->pluginRepository->enablePlugin($id);
}

Expand Down
1 change: 0 additions & 1 deletion app/Domain/Projects/Services/Projects.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Leantime\Core\Events\EventDispatcher as EventCore;
use Leantime\Core\Language as LanguageCore;
use Leantime\Core\Support\FromFormat;
use Leantime\Core\UI\Template as TemplateCore;
use Leantime\Domain\Auth\Models\Roles;
use Leantime\Domain\Files\Repositories\Files as FileRepository;
use Leantime\Domain\Goalcanvas\Repositories\Goalcanvas as GoalcanvaRepository;
Expand Down
5 changes: 1 addition & 4 deletions app/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use Leantime\Core\Support\FromFormat;
use Symfony\Component\HttpFoundation\RedirectResponse;


if (! function_exists('__')) {
/**
* Translate a string.
Expand Down Expand Up @@ -212,16 +211,14 @@ function get_domain_key()
/**
* Get the path to a versioned Mix file. Customized for Leantime.
*
* @param string $path
* @param string $manifestDirectory
* @return Mix|string
*
* @throws BindingResolutionException
*/
function mix(string $path = '', string $manifestDirectory = ''): \Leantime\Core\Support\Mix|string
{
if (! ($app = app())->bound(\Leantime\Core\Support\Mix::class)) {
$app->instance(\Leantime\Core\Support\Mix::class, new \Leantime\Core\Support\Mix());
$app->instance(\Leantime\Core\Support\Mix::class, new \Leantime\Core\Support\Mix);
}

$mix = $app->make(\Leantime\Core\Support\Mix::class);
Expand Down
Loading

0 comments on commit fd0305b

Please sign in to comment.