Skip to content

Commit

Permalink
chore: remove useless constants includes
Browse files Browse the repository at this point in the history
Remove useless constants file requirement from several controllers.
  • Loading branch information
dfranco committed Dec 29, 2023
1 parent 61c8330 commit ab85bdd
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions application/Controller/BackupJobController.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ public function __construct(Twig $view, JobTable $jobTable, SessionInterface $se
*/
public function index(Request $request, Response $response): Response
{
require_once BW_ROOT . '/core/const.inc.php';

$tplData = [];

$interval = array();
Expand Down
2 changes: 0 additions & 2 deletions application/Controller/ClientController.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ public function __construct(Twig $view, JobTable $jobTable, ClientTable $clientT
*/
public function index(Request $request, Response $response): Response
{
require_once BW_ROOT . '/core/const.inc.php';

$tplData = [];

$period = 7;
Expand Down
2 changes: 0 additions & 2 deletions application/Controller/DirectorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ public function __construct(Twig $view, SessionInterface $session)
*/
public function index(Request $request, Response $response): Response
{
require_once BW_ROOT . '/core/const.inc.php';

$tplData = [];

$no_period = [
Expand Down
2 changes: 0 additions & 2 deletions application/Controller/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ public function __construct(
*/
public function prepare(Request $request, Response $response): Response
{
require_once BW_ROOT . '/core/const.inc.php';

$view = Twig::fromRequest($request);
$tplData = [];

Expand Down
3 changes: 0 additions & 3 deletions application/Controller/JobController.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ public function index(Request $request, Response $response, $args): Response
$params = [];
$postRequestData = getRequestParams($request);

// TODO: Improve how these constants are declared and used
require_once BW_ROOT . '/core/const.inc.php';

FileConfig::open(CONFIG_FILE);

$fields = [
Expand Down

0 comments on commit ab85bdd

Please sign in to comment.