Skip to content

Commit

Permalink
Renamed returned object with actions
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed May 8, 2024
1 parent 97291d5 commit 9d399f6
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions upload/admin/controller/common/reset.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class ControllerCommonReset extends Controller {
/**
* Index
*
* @return \Action|object|null
* @return \Action|null
*/
public function index(): ?object {
public function index(): ?\Action {
if ($this->user->isLogged() && isset($this->request->get['user_token']) && ($this->request->get['user_token'] == $this->session->data['user_token'])) {
$this->response->redirect($this->url->link('common/dashboard', '', true));
}
Expand Down
4 changes: 2 additions & 2 deletions upload/admin/controller/customer/customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1078,9 +1078,9 @@ protected function validateUnlock(): bool {
/**
* Login
*
* @return \Action|object|null
* @return \Action|null
*/
public function login(): ?object {
public function login(): ?\Action {
if (isset($this->request->get['customer_id'])) {
$customer_id = (int)$this->request->get['customer_id'];
} else {
Expand Down
4 changes: 2 additions & 2 deletions upload/admin/controller/extension/other/db_schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ public function report(): string {
/**
* Get Report
*
* @return ?object
* @return \Action|null
*/
public function getReport(): ?object {
public function getReport(): ?\Action {
$this->load->language('extension/other/db_schema');

$data['title'] = $this->language->get('text_report');
Expand Down
8 changes: 4 additions & 4 deletions upload/admin/controller/extension/other/recurring.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,9 @@ protected function getList(): void {
/**
* Info
*
* @return \Action|object|null
* @return \Action|null
*/
public function info(): ?object {
public function info(): ?\Action {
$this->load->model('extension/other/recurring');

if (isset($this->request->get['order_recurring_id'])) {
Expand Down Expand Up @@ -536,9 +536,9 @@ public function info(): ?object {
/**
* Get Report
*
* @return ?object
* @return \Action|null
*/
public function getReport(): ?object {
public function getReport(): ?\Action {
$this->load->language('extension/other/recurring');

$data['title'] = $this->language->get('text_report');
Expand Down
4 changes: 2 additions & 2 deletions upload/admin/controller/startup/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ class ControllerStartupLogin extends Controller {
/**
* Index
*
* @return \Action|object|null
* @return \Action|null
*/
public function index(): ?object {
public function index(): ?\Action {
$route = $this->request->get['route'] ?? '';

$ignore = [
Expand Down
4 changes: 2 additions & 2 deletions upload/admin/controller/startup/permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ class ControllerStartupPermission extends Controller {
/**
* Index
*
* @return \Action|object|null
* @return \Action|null
*/
public function index(): ?object {
public function index(): ?\Action {
if (isset($this->request->get['route'])) {
$route = '';

Expand Down
2 changes: 1 addition & 1 deletion upload/admin/model/extension/payment/amazon_login_pay.php
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ public function isOrderInState(string $order_reference_id, array $states = []):
*
* @param string $order_reference_id
*
* @return object
* @return object|null
*/
public function fetchOrder(string $order_reference_id): ?object {
$order = $this->offAmazon('GetOrderReferenceDetails', [
Expand Down
2 changes: 1 addition & 1 deletion upload/admin/model/extension/payment/cardinity.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function getOrder(int $order_id): array {
*
* @param array<string, mixed> $credentials
*
* @return ?object
* @return object
*/
public function createClient(array $credentials): ?object {
if ($credentials) {
Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/controller/account/order.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ public function index(): void {
/**
* Info
*
* @return \Action|object|null
* @return \Action|null
*/
public function info(): ?object {
public function info(): ?\Action {
$this->load->language('account/order');

if (isset($this->request->get['order_id'])) {
Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/controller/account/reset.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ class ControllerAccountReset extends Controller {
private array $error = [];

/**
* @return \Action|object|null
* @return \Action|null
*/
public function index(): ?object {
public function index(): ?\Action {
if ($this->customer->isLogged()) {
$this->response->redirect($this->url->link('account/account', '', true));
}
Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/controller/account/tracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ class ControllerAccountTracking extends Controller {
/**
* Index
*
* @return \Action|object|null
* @return \Action|null
*/
public function index(): ?object {
public function index(): ?\Action {
if (!$this->customer->isLogged() || (!isset($this->request->get['customer_token']) || !isset($this->session->data['customer_token']) || ($this->request->get['customer_token'] != $this->session->data['customer_token']))) {
$this->session->data['redirect'] = $this->url->link('account/tracking', '', true);

Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/controller/extension/subscription/opayo.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class ControllerExtensionRecurringOpayo extends Controller {
/**
* @var array<string, string>
*/
private $error = [];
private array $error = [];

/**
* Index
Expand Down
12 changes: 6 additions & 6 deletions upload/catalog/controller/information/gdpr.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ class ControllerInformationGdpr extends Controller {
/**
* Index
*
* @return \Action|object|null
* @return \System\Engine\Action|null
*/
public function index(): ?object {
public function index(): ?\Action {
// Information
$this->load->model('catalog/information');

Expand Down Expand Up @@ -49,11 +49,11 @@ public function index(): ?object {
$data['header'] = $this->load->controller('common/header');

$this->response->setOutput($this->load->view('information/gdpr', $data));

return null;
} else {
return new \Action('error/not_found');
}

return null;
}

/**
Expand Down Expand Up @@ -145,9 +145,9 @@ public function action(): void {
/**
* Success
*
* @return \Action|object|null
* @return \Action|null
*/
public function success(): ?object {
public function success(): ?\Action {
if (isset($this->request->get['code'])) {
$code = (string)$this->request->get['code'];
} else {
Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/controller/startup/maintenance.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ class ControllerStartupMaintenance extends Controller {
/**
* Index
*
* @return \Action|object|null
* @return \Action|null
*/
public function index(): ?object {
public function index(): ?\Action {
if ($this->config->get('config_maintenance')) {
// Route
if (isset($this->request->get['route'])) {
Expand Down

0 comments on commit 9d399f6

Please sign in to comment.