Skip to content

Commit

Permalink
Merge pull request Dolibarr#33027 from frederic34/public_member_card
Browse files Browse the repository at this point in the history
fix phpstan
  • Loading branch information
eldy authored Feb 12, 2025
2 parents 5015034 + cba2737 commit 966cfeb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
12 changes: 0 additions & 12 deletions dev/build/phpstan/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -24444,18 +24444,6 @@ parameters:
count: 1
path: ../../../htdocs/public/members/public_card.php

-
message: '#^Variable \$db might not be defined\.$#'
identifier: variable.undefined
count: 5
path: ../../../htdocs/public/members/public_card.php

-
message: '#^Variable \$langs might not be defined\.$#'
identifier: variable.undefined
count: 17
path: ../../../htdocs/public/members/public_card.php

-
message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
Expand Down
6 changes: 5 additions & 1 deletion htdocs/public/members/public_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -52,6 +52,10 @@
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
/**
* @var DoliDB $db
* @var Translate $langs
*/

// Security check
if (!isModEnabled('member')) {
Expand Down
5 changes: 3 additions & 2 deletions htdocs/societe/canvas/company/tpl/card_view.tpl.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -19,6 +19,7 @@
* @var Canvas $this
* @var Conf $conf
* @var CommonObject $this
* @var DoliDB $db
* @var Translate $langs
* @var User $user
*
Expand Down

0 comments on commit 966cfeb

Please sign in to comment.