Skip to content

Commit

Permalink
refactor: fix path and classes to comply with psr-4
Browse files Browse the repository at this point in the history
Fix some paths and classes fileneme to comply with psr-4.

Remove classmap from composer.json autoload
  • Loading branch information
dfranco committed Jan 6, 2024
1 parent 9150ba9 commit cface17
Show file tree
Hide file tree
Showing 37 changed files with 48 additions and 52 deletions.
2 changes: 1 addition & 1 deletion application/Command/SetupAuthCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace App\Command;

use App\Tables\UserTable;
use App\Table\UserTable;
use Core\Db\DatabaseFactory;
use PDOException;
use Symfony\Component\Console\Command\Command;
Expand Down
2 changes: 1 addition & 1 deletion application/Controller/BackupJobController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
namespace App\Controller;

use App\Libs\FileConfig;
use App\Tables\JobTable;
use App\Table\JobTable;
use Core\Db\CDBQuery;
use Core\Exception\AppException;
use Core\Exception\ConfigFileException;
Expand Down
4 changes: 2 additions & 2 deletions application/Controller/ClientController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
use Core\Utils\DateTimeUtil;
use Core\Utils\CUtils;
use Core\Helpers\Sanitizer;
use App\Tables\JobTable;
use App\Tables\ClientTable;
use App\Table\JobTable;
use App\Table\ClientTable;
use Psr\Http\Message\ServerRequestInterface as Request;
use GuzzleHttp\Psr7\Response;
use Slim\Views\Twig;
Expand Down
12 changes: 6 additions & 6 deletions application/Controller/DirectorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@

use Core\Db\DatabaseFactory;
use App\Libs\FileConfig;
use App\Tables\ClientTable;
use App\Tables\JobTable;
use App\Tables\CatalogTable;
use App\Tables\VolumeTable;
use App\Tables\PoolTable;
use App\Tables\FileSetTable;
use App\Table\ClientTable;
use App\Table\JobTable;
use App\Table\CatalogTable;
use App\Table\VolumeTable;
use App\Table\PoolTable;
use App\Table\FileSetTable;
use Core\Exception\ConfigFileException;
use Core\Utils\CUtils;
use Odan\Session\PhpSession;
Expand Down
6 changes: 3 additions & 3 deletions application/Controller/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
namespace App\Controller;

use App\Libs\FileConfig;
use App\Tables\JobTable;
use App\Tables\PoolTable;
use App\Tables\VolumeTable;
use App\Table\JobTable;
use App\Table\PoolTable;
use App\Table\VolumeTable;
use Odan\Session\SessionInterface;
use Slim\Views\Twig;
use Core\Db\CDBQuery;
Expand Down
14 changes: 7 additions & 7 deletions application/Controller/JobController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
namespace App\Controller;

use App\Libs\FileConfig;
use App\Tables\JobFileTable;
use App\Tables\LogTable;
use Core\Db\CDBPagination;
use App\Table\JobFileTable;
use App\Table\LogTable;
use Core\Db\DBPagination;
use Core\Db\CDBQuery;
use Core\Exception\ConfigFileException;
use Core\Helpers\Sanitizer;
use Core\Utils\CUtils;
use Core\Utils\DateTimeUtil;
use App\Tables\JobTable;
use App\Tables\ClientTable;
use App\Tables\PoolTable;
use App\Table\JobTable;
use App\Table\ClientTable;
use App\Table\PoolTable;
use Exception;
use GuzzleHttp\Psr7\Response;
use Odan\Session\SessionInterface;
Expand Down Expand Up @@ -337,7 +337,7 @@ public function index(Request $request, Response $response, $args): Response
$tplData['result_order_asc_checked'] = '';
}

$pagination = new CDBPagination($request);
$pagination = new DBPagination($request);

// Parsing jobs result
$sqlQuery = CDBQuery::get_Select(array('table' => 'Job',
Expand Down
2 changes: 1 addition & 1 deletion application/Controller/PoolController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
namespace App\Controller;

use Core\Utils\CUtils;
use App\Tables\PoolTable;
use App\Table\PoolTable;
use Exception;
use Psr\Http\Message\ServerRequestInterface as Request;
use GuzzleHttp\Psr7\Response;
Expand Down
2 changes: 1 addition & 1 deletion application/Controller/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
namespace App\Controller;

use App\Libs\FileConfig;
use App\Tables\UserTable;
use App\Table\UserTable;
use Slim\Views\Twig;
use Core\Exception\AppException;
use Core\Helpers\Sanitizer;
Expand Down
2 changes: 1 addition & 1 deletion application/Controller/TestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

namespace App\Controller;

use App\Tables\CatalogTable;
use App\Table\CatalogTable;
use Core\Exception\AppException;
use Psr\Http\Message\ServerRequestInterface as Request;
use GuzzleHttp\Psr7\Response;
Expand Down
2 changes: 1 addition & 1 deletion application/Controller/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace App\Controller;

use App\Tables\UserTable;
use App\Table\UserTable;
use Core\App\UserAuth;
use Slim\Views\Twig;
use Core\Helpers\Sanitizer;
Expand Down
8 changes: 4 additions & 4 deletions application/Controller/VolumesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@

use App\Libs\FileConfig;
use Core\Db\CDBQuery;
use Core\Db\CDBPagination;
use Core\Db\DBPagination;
use Core\Exception\ConfigFileException;
use Core\Utils\CUtils;
use App\Tables\VolumeTable;
use App\Tables\PoolTable;
use App\Table\VolumeTable;
use App\Table\PoolTable;
use Date_HumanDiff;
use Psr\Http\Message\ServerRequestInterface as Request;
use GuzzleHttp\Psr7\Response;
Expand Down Expand Up @@ -169,7 +169,7 @@ public function index(Request $request, Response $response): Response
'Pool.Name AS pool_name'
];

$pagination = new CDBPagination($request);
$pagination = new DBPagination($request);

$sqlQuery = CDBQuery::get_Select(array('table' => $this->volumeTable->getTableName(),
'fields' => $fields,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* <https://www.gnu.org/licenses/>.
*/

namespace App\Tables;
namespace App\Table;

use Core\Db\Table;
use App\Libs\FileConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* <https://www.gnu.org/licenses/>.
*/

namespace App\Tables;
namespace App\Table;

use Core\Db\Table;
use Core\Db\CDBQuery;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* <https://www.gnu.org/licenses/>.
*/

namespace App\Tables;
namespace App\Table;

use Core\Db\Table;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @copyright 2018-2021 Gabriele Orlando
*/

namespace App\Tables;
namespace App\Table;

use Core\Db\CDBQuery;
use Core\Db\Database;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* <https://www.gnu.org/licenses/>.
*/

namespace App\Tables;
namespace App\Table;

use App\Entity\Job;
use Core\Db\CDBQuery;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* <https://www.gnu.org/licenses/>.
*/

namespace App\Tables;
namespace App\Table;

use Core\Db\Table;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* <https://www.gnu.org/licenses/>.
*/

namespace App\Tables;
namespace App\Table;

use Core\Db\Table;
use Core\Db\CDBQuery;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* <https://www.gnu.org/licenses/>.
*/

namespace App\Tables;
namespace App\Table;

use App\Entity\User;
use Core\App\CErrorHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* <https://www.gnu.org/licenses/>.
*/

namespace App\Tables;
namespace App\Table;

use Core\Db\Table;
use Core\Db\CDBQuery;
Expand Down
16 changes: 8 additions & 8 deletions application/config/container-bindings.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

use App\CsrfErrorHandler;
use App\Libs\FileConfig;
use App\Tables\CatalogTable;
use App\Tables\ClientTable;
use App\Tables\JobFileTable;
use App\Tables\JobTable;
use App\Tables\LogTable;
use App\Tables\PoolTable;
use App\Tables\UserTable;
use App\Tables\VolumeTable;
use App\Table\CatalogTable;
use App\Table\ClientTable;
use App\Table\JobFileTable;
use App\Table\JobTable;
use App\Table\LogTable;
use App\Table\PoolTable;
use App\Table\UserTable;
use App\Table\VolumeTable;
use Core\Db\DatabaseFactory;
use Odan\Session\PhpSession;
use Odan\Session\SessionInterface;
Expand Down
6 changes: 1 addition & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,8 @@
"Core\\": "core/",
"App\\": "application/"
},
"classmap": [
"core",
"application"
],
"files": [
"core/helpers/request.php"
"core/Helpers/request.php"
]
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion core/App/UserAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace Core\App;

use App\Tables\UserTable;
use App\Table\UserTable;
use Core\Db\DatabaseFactory;
use Core\Exception\AppException;
use Core\Exception\DatabaseException;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
use Psr\Http\Message\ServerRequestInterface;
use function Core\Helpers\getRequestParams;

class CDBPagination
class DBPagination
{
/**
* @var int
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit cface17

Please sign in to comment.