Skip to content

Commit

Permalink
Replaced App::make() by app()
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Jan 8, 2022
1 parent 2228df6 commit 5073663
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
12 changes: 6 additions & 6 deletions classes/facades/Repo.inc.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @file classes/facade/Repo.inc.php
* @file classes/facades/Repo.inc.php
*
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2000-2021 John Willinsky
Expand All @@ -26,26 +26,26 @@ class Repo extends BaseRepo
{
public static function issue(): IssueRepository
{
return app()->make(IssueRepository::class);
return app(IssueRepository::class);
}

public static function publication(): PublicationRepository
{
return app()->make(PublicationRepository::class);
return app(PublicationRepository::class);
}

public static function submission(): SubmissionRepository
{
return app()->make(SubmissionRepository::class);
return app(SubmissionRepository::class);
}

public static function user(): UserRepository
{
return app()->make(UserRepository::class);
return app(UserRepository::class);
}

public static function submissionFile(): SubmissionFileRepository
{
return app()->make(SubmissionFileRepository::class);
return app(SubmissionFileRepository::class);
}
}
3 changes: 1 addition & 2 deletions classes/issue/DAO.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

use APP\facades\Repo;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\LazyCollection;
use PKP\cache\CacheManager;
Expand Down Expand Up @@ -106,7 +105,7 @@ public function _getCache(string $cacheId)
*/
public function newDataObject(): Issue
{
return App::make(Issue::class);
return app(Issue::class);
}

/**
Expand Down
3 changes: 1 addition & 2 deletions classes/issue/Repository.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use APP\journal\SectionDAO;
use APP\publication\Publication;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\App;
use Illuminate\Support\LazyCollection;
use PKP\db\DAORegistry;
use PKP\plugins\HookRegistry;
Expand Down Expand Up @@ -95,7 +94,7 @@ public function getMany(Collector $query): LazyCollection
/** @copydoc DAO::getCollector() */
public function getCollector(): Collector
{
return App::make(Collector::class);
return app(Collector::class);
}

/**
Expand Down
5 changes: 1 addition & 4 deletions classes/migration/upgrade/OJSv3_3_0UpgradeMigration.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
use APP\core\Services;
use Exception;
use Illuminate\Database\Schema\Blueprint;

use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\DB;

use Illuminate\Support\Facades\Schema;
use PKP\core\EntityDAO;
use PKP\db\DAORegistry;
Expand Down Expand Up @@ -99,7 +96,7 @@ private function _settingsAsJSON()

// Account for new EntityDAOs
if (!$dao) {
$dao = App::make($daoName);
$dao = app($daoName);
if (!$dao) {
throw new Exception("${daoName} could not be created when migrating serialized settings");
}
Expand Down

0 comments on commit 5073663

Please sign in to comment.