Skip to content

Commit

Permalink
More PHPDocs work
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed May 8, 2024
1 parent 017ab99 commit c3f9608
Show file tree
Hide file tree
Showing 17 changed files with 218 additions and 32 deletions.
2 changes: 1 addition & 1 deletion upload/catalog/controller/startup/router.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ControllerStartupRouter extends Controller {
*
* @return mixed
*/
public function index(): mixed {
public function index() {
// Route
if (isset($this->request->get['route']) && $this->request->get['route'] != 'startup/router') {
$route = $this->request->get['route'];
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/model/extension/advertise/google.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function getRemarketingItems(array $products, int $store_id): array {
*
* @return mixed
*/
protected function getRemarketingProductId(array $product, int $store_id): mixed {
protected function getRemarketingProductId(array $product, int $store_id) {
$found_color = '';
$found_size = '';

Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/model/extension/payment/alipay_cross.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ private function getSignVerify(array $para_temp, string $sign): bool {
*
* @return mixed
*/
private function getResponse(string $notify_id): mixed {
private function getResponse(string $notify_id) {
$partner = trim($this->alipay_config['partner']);

$verify_url = $this->config->get('payment_alipay_cross_test') == 'sandbox' ? $this->https_verify_url_test : $this->https_verify_url;
Expand Down Expand Up @@ -218,7 +218,7 @@ private function argSort(array $para): array {
*
* @return mixed
*/
private function getHttpResponseGET(string $url, string $cacert_url): mixed {
private function getHttpResponseGET(string $url, string $cacert_url) {
$curl = curl_init($url);

curl_setopt($curl, CURLOPT_HEADER, 0);
Expand Down
2 changes: 1 addition & 1 deletion upload/system/engine/action.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function getId(): string {
*
* @return mixed
*/
public function execute(object $registry, array $args = []): mixed {
public function execute(object $registry, array $args = []) {
// Stop any magical methods being called
if (substr($this->method, 0, 2) == '__') {
return new \Exception('Error: Calls to magic methods are not allowed!');
Expand Down
3 changes: 3 additions & 0 deletions upload/system/library/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
* Config class
*/
class Config {
/**
* @var array<string, mixed> $data
*/
private array $data = [];

/**
Expand Down
18 changes: 18 additions & 0 deletions upload/system/library/document.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,29 @@
* Document class
*/
class Document {
/**
* @var string
*/
private string $title = '';
/**
* @var string
*/
private string $description = '';
/**
* @var string
*/
private string $keywords = '';
/**
* @var array<string, array<string, string>>
*/
private array $links = [];
/**
* @var array<string, array<string, string>>
*/
private array $styles = [];
/**
* @var array<string, array<string, array<string, string>>>
*/
private array $scripts = [];

/**
Expand Down
4 changes: 2 additions & 2 deletions upload/system/library/googleshopping/googleshopping.php
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ public function setPurchaseData($total): void {
*
* @return mixed
*/
public function getPurchaseData(): mixed {
public function getPurchaseData() {
return $this->purchase_data;
}

Expand Down Expand Up @@ -1519,7 +1519,7 @@ public function isConnected(): ?object {
*
* @return mixed
*/
public function isStoreUrlClaimed(): mixed {
public function isStoreUrlClaimed() {
// No need to check the connection here - this method is called immediately after checking it

$request = [
Expand Down
28 changes: 23 additions & 5 deletions upload/system/library/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,30 @@
* Image class
*/
class Image {
/**
* @var string
*/
private string $file;
private object $image;
private int $width = 0;
private int $height = 0;
private string $bits = '';
private string $mime = '';
/**
* @var mixed
*/
private $image;
/**
* @var int
*/
private int $width;
/**
* @var int
*/
private int $height;
/**
* @var string
*/
private string $bits;
/**
* @var string
*/
private string $mime;

/**
* Constructor
Expand Down
15 changes: 12 additions & 3 deletions upload/system/library/language.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,18 @@
* Language class
*/
class Language {
private $default = 'en-gb';
private $directory;
public $data = [];
/**
* @var string
*/
protected string $default;
/**
* @var string
*/
protected string $directory;
/**
* @var array<string, string>
*/
public array $data = [];

/**
* Constructor
Expand Down
16 changes: 8 additions & 8 deletions upload/system/library/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(string $adaptor = 'mail', array $option = []) {
}

/**
* setTo
* Set To
*
* @param string $to
*
Expand All @@ -46,7 +46,7 @@ public function setTo($to): void {
}

/**
* setFrom
* Set From
*
* @param string $from
*
Expand All @@ -57,7 +57,7 @@ public function setFrom(string $from): void {
}

/**
* setSender
* Set Sender
*
* @param string $sender
*
Expand All @@ -68,7 +68,7 @@ public function setSender(string $sender): void {
}

/**
* setReplyTo
* Set Reply To
*
* @param string $reply_to
*
Expand All @@ -79,7 +79,7 @@ public function setReplyTo(string $reply_to): void {
}

/**
* setSubject
* Set Subject
*
* @param string $subject
*
Expand All @@ -90,7 +90,7 @@ public function setSubject(string $subject): void {
}

/**
* setText
* Set Text
*
* @param string $text
*
Expand All @@ -101,7 +101,7 @@ public function setText(string $text): void {
}

/**
* setHtml
* Set Html
*
* @param string $html
*
Expand All @@ -112,7 +112,7 @@ public function setHtml(string $html): void {
}

/**
* addAttachment
* Add Attachment
*
* @param string $filename
*
Expand Down
27 changes: 27 additions & 0 deletions upload/system/library/pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,41 @@
* Pagination class
*/
class Pagination {
/**
* @var int
*/
public int $total = 0;
/**
* @var int
*/
public int $page = 1;
/**
* @var int
*/
public int $limit = 20;
/**
* @var int
*/
public int $num_links = 8;
/**
* @var string
*/
public string $url = '';
/**
* @var string
*/
public string $text_first = '|&lt;';
/**
* @var string
*/
public string $text_last = '&gt;|';
/**
* @var string
*/
public string $text_next = '&gt;';
/**
* @var string
*/
public string $text_prev = '&lt;';

/**
Expand Down
2 changes: 1 addition & 1 deletion upload/system/library/paypal/paypal.php
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ private function execute(string $method, string $command, array $params = [], bo
*
* @return mixed
*/
private function buildQuery($params, bool $json): mixed {
private function buildQuery($params, bool $json) {
if (is_string($params)) {
return $params;
}
Expand Down
15 changes: 15 additions & 0 deletions upload/system/library/request.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,25 @@
* Request class
*/
class Request {
/**
* @var array<string, mixed>
*/
public array $get = [];
/**
* @var array<string, mixed>
*/
public array $post = [];
/**
* @var array<string, mixed>
*/
public array $cookie = [];
/**
* @var array<string, mixed>
*/
public array $files = [];
/**
* @var array<string, mixed>
*/
public array $server = [];

/**
Expand Down
9 changes: 9 additions & 0 deletions upload/system/library/response.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,17 @@
* Response class
*/
class Response {
/**
* @var array<string, mixed>
*/
private array $headers = [];
/**
* @var int
*/
private int $level = 0;
/**
* @var string
*/
private string $output = '';

/**
Expand Down
Loading

0 comments on commit c3f9608

Please sign in to comment.