Skip to content

Commit

Permalink
add type param and return function
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-GregM committed Jan 15, 2025
1 parent 19c8eae commit f8464cf
Show file tree
Hide file tree
Showing 194 changed files with 304 additions and 304 deletions.
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_accountancy_last_manual_entries.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void

Check failure on line 62 in htdocs/core/boxes/box_accountancy_last_manual_entries.php

View workflow job for this annotation

GitHub Actions / phan / Run phan

box_accountancy_last_manual_entries.php: PhanCompatibleVoidTypePHP70: Return type 'void' means the absence of a return value starting in PHP 7.1. In PHP 7.0, void refers to a class/interface with the name 'void'
{
global $user, $langs, $conf;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_accountancy_suspense_account.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 1)
public function loadBox(int $max = 1): void

Check failure on line 62 in htdocs/core/boxes/box_accountancy_suspense_account.php

View workflow job for this annotation

GitHub Actions / phan / Run phan

box_accountancy_suspense_account.php: PhanCompatibleVoidTypePHP70: Return type 'void' means the absence of a return value starting in PHP 7.1. In PHP 7.0, void refers to a class/interface with the name 'void'
{
global $user, $langs, $conf;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void

Check failure on line 69 in htdocs/core/boxes/box_actions.php

View workflow job for this annotation

GitHub Actions / phan / Run phan

box_actions.php: PhanCompatibleVoidTypePHP70: Return type 'void' means the absence of a return value starting in PHP 7.1. In PHP 7.0, void refers to a class/interface with the name 'void'
{
global $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_actions_future.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void

Check failure on line 66 in htdocs/core/boxes/box_actions_future.php

View workflow job for this annotation

GitHub Actions / phan / Run phan

box_actions_future.php: PhanCompatibleVoidTypePHP70: Return type 'void' means the absence of a return value starting in PHP 7.1. In PHP 7.0, void refers to a class/interface with the name 'void'
{
global $user, $langs, $conf;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void

Check failure on line 69 in htdocs/core/boxes/box_activity.php

View workflow job for this annotation

GitHub Actions / phan / Run phan

box_activity.php: PhanCompatibleVoidTypePHP70: Return type 'void' means the absence of a return value starting in PHP 7.1. In PHP 7.0, void refers to a class/interface with the name 'void'
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_birthdays.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 20)
public function loadBox(int $max = 20): void

Check failure on line 64 in htdocs/core/boxes/box_birthdays.php

View workflow job for this annotation

GitHub Actions / phan / Run phan

box_birthdays.php: PhanCompatibleVoidTypePHP70: Return type 'void' means the absence of a return value starting in PHP 7.1. In PHP 7.0, void refers to a class/interface with the name 'void'
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_birthdays_members.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 20)
public function loadBox(int $max = 20): void

Check failure on line 64 in htdocs/core/boxes/box_birthdays_members.php

View workflow job for this annotation

GitHub Actions / phan / Run phan

box_birthdays_members.php: PhanCompatibleVoidTypePHP70: Return type 'void' means the absence of a return value starting in PHP 7.1. In PHP 7.0, void refers to a class/interface with the name 'void'
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_boms.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void

Check failure on line 64 in htdocs/core/boxes/box_boms.php

View workflow job for this annotation

GitHub Actions / phan / Run phan

box_boms.php: PhanCompatibleVoidTypePHP70: Return type 'void' means the absence of a return value starting in PHP 7.1. In PHP 7.0, void refers to a class/interface with the name 'void'
{
global $user, $langs, $conf;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_bookmarks.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void

Check failure on line 60 in htdocs/core/boxes/box_bookmarks.php

View workflow job for this annotation

GitHub Actions / phan / Run phan

box_bookmarks.php: PhanCompatibleVoidTypePHP70: Return type 'void' means the absence of a return value starting in PHP 7.1. In PHP 7.0, void refers to a class/interface with the name 'void'
{
global $user, $langs, $conf;
$langs->load("boxes");
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_clients.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void

Check failure on line 72 in htdocs/core/boxes/box_clients.php

View workflow job for this annotation

GitHub Actions / phan / Run phan

box_clients.php: PhanCompatibleVoidTypePHP70: Return type 'void' means the absence of a return value starting in PHP 7.1. In PHP 7.0, void refers to a class/interface with the name 'void'
{
global $user, $langs, $hookmanager;
$langs->load("boxes");
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_commandes.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5):void
{
global $user, $langs, $conf;
$langs->load('orders');
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_comptes.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $user, $langs, $conf;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_contacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $user, $langs, $conf, $hookmanager;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_contracts.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $user, $langs, $conf;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $user, $langs, $conf;
$langs->load("boxes");
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_dolibarr_state_board.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $user, $langs;
$langs->load("boxes");
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_external_rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function __construct($db, $param)
* @param int $cachedelay Delay we accept for cache file
* @return void
*/
public function loadBox($max = 5, $cachedelay = 3600)
public function loadBox(int $max = 5,int $cachedelay = 3600): void
{
global $user, $langs, $conf;
$langs->load("boxes");
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_factures.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_factures_fourn.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_factures_fourn_imp.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_factures_imp.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_fediverse.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct($db, $param)
* @param int $cachedelay Delay we accept for cache file
* @return void
*/
public function loadBox($max = 5, $cachedelay = 3600)
public function loadBox(int $max = 5,int $cachedelay = 3600): void
{
global $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_ficheinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 10)
public function loadBox(int $max = 10): void
{
global $user, $langs, $conf;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_fournisseurs.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $user, $langs, $hookmanager;
$langs->load("boxes");
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_funnel_of_prospection.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_goodcustomers.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $user, $langs, $conf;
$langs->load("boxes");
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_graph_invoices_permonth.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_graph_invoices_peryear.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_graph_invoices_supplier_permonth.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;
$dataseries = array();
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_graph_nb_tickets_type.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;
global $theme_datacolor, $badgeStatus8;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_graph_new_vs_close_ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_graph_orders_permonth.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_graph_orders_supplier_permonth.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_graph_product_distribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_graph_propales_permonth.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_graph_ticket_by_severity.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_last_knowledgerecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_last_modified_knowledgerecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_last_modified_ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_last_ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_lastlogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __construct($db, $param)
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $conf, $user, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_members_by_tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $user, $langs;
$langs->load("boxes");
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/boxes/box_members_by_type.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function __construct($db, $param = '')
* @param int $max Maximum number of records to load
* @return void
*/
public function loadBox($max = 5)
public function loadBox(int $max = 5): void
{
global $user, $langs;
$langs->loadLangs(array("boxes", "members"));
Expand Down
Loading

0 comments on commit f8464cf

Please sign in to comment.