Skip to content

Commit

Permalink
More PHPDocs work
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed Jun 15, 2024
1 parent 6797131 commit 911ae97
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion upload/system/engine/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* Class Controller
*
* @mixin Registry
* @mixin \Registry
*/
class Controller {
/**
Expand Down
2 changes: 2 additions & 0 deletions upload/system/engine/event.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
*
* Event System Userguide
* https://github.com/opencart/opencart/wiki/Events-(script-notifications)-2.2.x.x
*
* @mixin \Registry
*/
class Event {
/**
Expand Down
2 changes: 1 addition & 1 deletion upload/system/engine/loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
class Loader {
/**
* @var object
* @var object $registry
*/
protected object $registry;

Expand Down
12 changes: 6 additions & 6 deletions upload/system/engine/proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* Class Proxy
*
* @template TWraps of Model
* @template TWraps of \Model
*
* @mixin TWraps
*/
Expand All @@ -23,7 +23,7 @@ class Proxy {
protected array $data = [];

/**
* Get
* __get
*
* @param mixed $key
*
Expand All @@ -34,7 +34,7 @@ public function __get($key) {
}

/**
* Set
* __set
*
* @param string $key
* @param object $value
Expand All @@ -46,10 +46,10 @@ public function __set(string $key, object $value): void {
}

/**
* Call
* __call
*
* @param string $key
* @param mixed $args
* @param array $args
*
* @return mixed
*/
Expand All @@ -67,7 +67,7 @@ public function __call(string $key, $args) {
} else {
$trace = debug_backtrace();

exit('<b>Notice</b>: Undefined property: Proxy::' . $key . ' in <b>' . $trace[1]['file'] . '</b> on line <b>' . $trace[1]['line'] . '</b>');
throw new \Exception('<b>Notice</b>: Undefined property: Proxy::' . $key . ' in <b>' . $trace[1]['file'] . '</b> on line <b>' . $trace[1]['line'] . '</b>');
}
}
}
6 changes: 6 additions & 0 deletions upload/system/engine/router.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
* Class Router
*/
class Router {
/**
* @var object $registry
*/
private object $registry;
/**
* @var array<string, mixed> $pre_action
*/
private array $pre_action = [];
private $error;

Expand Down

0 comments on commit 911ae97

Please sign in to comment.