galette/vendor/bin/composer-require-checker check --config-file=.composer-require-checker.config.json galette/composer.json
if: matrix.php-versions == '8.1'
+ - name: PHPStan checks
+ run: |
+ galette/vendor/bin/phpstan analyze --ansi --memory-limit=2G --no-interaction --no-progress
+ if: matrix.php-versions == '8.1'
+
- name: Init for PostgreSQL (update)
env:
POSTGRES_HOST: localhost
"require-dev": {
"atoum/atoum": "dev-main",
"squizlabs/php_codesniffer": "^3.7",
- "friendsoftwig/twigcs": "^6.2"
+ "friendsoftwig/twigcs": "^6.2",
+ "phpstan/phpstan": "^1.9"
},
"config": {
"optimize-autoloader": true,
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "fc0eb853acc9435fefa693ecc3fc211d",
+ "content-hash": "5aed357bf9e755bbbb4b1204cbe57ecd",
"packages": [
{
"name": "akrabat/rka-slim-session-middleware",
},
"time": "2023-01-13T16:02:00+00:00"
},
+ {
+ "name": "phpstan/phpstan",
+ "version": "1.9.14",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan.git",
+ "reference": "e5fcc96289cf737304286a9b505fbed091f02e58"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e5fcc96289cf737304286a9b505fbed091f02e58",
+ "reference": "e5fcc96289cf737304286a9b505fbed091f02e58",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2|^8.0"
+ },
+ "conflict": {
+ "phpstan/phpstan-shim": "*"
+ },
+ "bin": [
+ "phpstan",
+ "phpstan.phar"
+ ],
+ "type": "library",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "PHPStan - PHP Static Analysis Tool",
+ "keywords": [
+ "dev",
+ "static analysis"
+ ],
+ "support": {
+ "issues": "https://github.com/phpstan/phpstan/issues",
+ "source": "https://github.com/phpstan/phpstan/tree/1.9.14"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/ondrejmirtes",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/phpstan",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2023-01-19T10:47:09+00:00"
+ },
{
"name": "squizlabs/php_codesniffer",
"version": "3.7.1",
*/
public function telemetryRegistered(Request $request, Response $response): Response
{
- $this->get('preferences')->pref_registration_date = date('Y-m-d H:i:s');
- $this->get('preferences')->store();
+ $this->preferences->pref_registration_date = date('Y-m-d H:i:s');
+ $this->preferences->store();
return $this->withJson($response, ['message' => _T('Thank you for registering!')]);
}
public function filter(Request $request, Response $response): Response
{
//no filtering
+ return $response;
}
// /CRUD - Read
'error_detected',
_T("Requested field does not exists!")
);
- return $response
- ->withStatus(301)
- ->withHeader(
- 'Location',
- $this->routeparser->urlFor('configureDynamicFields', ['form_name' => $args['form_name']])
- );
+ return _T("Requested field does not exists!");
}
return sprintf(
*
* PHP version 5
*
- * Copyright © 2020-2022 The Galette Team
+ * Copyright © 2020-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2020-2022 The Galette Team
+ * @copyright 2020-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.4dev - 2019-12-09
* @name EntitledsController
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2020-2022 The Galette Team
+ * @copyright 2020-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.4dev - 2020-06-07
public function add(Request $request, Response $response): Response
{
//no new page (included on list), just to satisfy inheritance
+ return $response;
}
/**
public function filter(Request $request, Response $response): Response
{
//no filters
+ return $response;
}
// /CRUD - Read
_T('No member selected for mailing!')
);
- if (isset($profiler)) {
- $profiler->stop();
- }
-
$redirect_url = ($this->session->redirect_mailing !== null) ?
$this->session->redirect_mailing : $this->routeparser->urlFor('members');
public function edit(Request $request, Response $response, int $id): Response
{
//no edit page, just to satisfy inheritance
+ return $response;
}
/**
public function doEdit(Request $request, Response $response, int $id): Response
{
//no edit page, just to satisfy inheritance
+ return $response;
}
// /CRUD - Update
*
* PHP version 5
*
- * Copyright © 2019-2022 The Galette Team
+ * Copyright © 2019-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2019-2022 The Galette Team
+ * @copyright 2019-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.4dev - 2019-12-09
* @name PaymentTypeController
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2019-2022 The Galette Team
+ * @copyright 2019-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.4dev - 2019-12-09
public function add(Request $request, Response $response): Response
{
//no new page (included on list), just to satisfy inheritance
+ return $response;
}
/**
public function filter(Request $request, Response $response): Response
{
//no filters
+ return $response;
}
// /CRUD - Read
*
* PHP version 5
*
- * Copyright © 2019-2022 The Galette Team
+ * Copyright © 2019-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2019-2022 The Galette Team
+ * @copyright 2019-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.4dev - 2019-12-06
* @name TitlesController
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2019-2022 The Galette Team
+ * @copyright 2019-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.4dev - 2019-12-08
public function add(Request $request, Response $response): Response
{
//no new page (included on list), just to satisfy inheritance
+ return $response;
}
/**
public function filter(Request $request, Response $response): Response
{
//no filtering
+ return $response;
}
// /CRUD - Read
*
* PHP version 5
*
- * Copyright © 2011-2022 The Galette Team
+ * Copyright © 2011-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2011-2022 The Galette Team
+ * @copyright 2011-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2011-07-27
* @name Db
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2011-2022 The Galette Team
+ * @copyright 2011-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://framework.zend.com/apidoc/2.2/namespaces/Zend.Db.html
* @since Available since 0.7dev - 2011-07-27
case 'type_db':
return true;
}
+ return property_exists($this, $name);
}
/**
*
* PHP version 5
*
- * Copyright © 2009-2022 The Galette Team
+ * Copyright © 2009-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2009-2022 The Galette Team
+ * @copyright 2009-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2009-02-09
* @name History
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2009-2022 The Galette Team
+ * @copyright 2009-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2009-02-09
*
* @param Select $select Original select
*
- * @return string SQL WHERE clause
+ * @return void
*/
private function buildWhereClause(Select $select)
{
*
* @param string $name name of the property we want to retrive
*
- * @return false|object the called property
+ * @return mixed the called property
*/
public function __get($name)
{
'0.704' => '0.76'
);
- private $_step;
+ protected $_step;
private $_mode;
private $_version;
private $_installed_version;
* @param string $type Database type
* @param array $errs Errors array
*
- * @return boolean
+ * @return Install
*/
public function setDbType($type, &$errs)
{
default:
$errs[] = _T("Database type unknown");
}
+ return $this;
}
/**
$fc = new \Galette\Entity\FieldsConfig(
$zdb,
\Galette\Entity\Adherent::TABLE,
+ //@phpstan-ignore-next-line
$members_fields,
+ //@phpstan-ignore-next-line
$members_fields_cats,
true
);
return true;
}
+ return false;
}
/**
*
* PHP version 5
*
- * Copyright © 2020-2021 The Galette Team
+ * Copyright © 2020-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2020-2021 The Galette Team
+ * @copyright 2020-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.4 - 2020-03-11
* @name Links
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2020-2021 The Galette Team
+ * @copyright 2020-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.4 - 2020-03-11
Analog::DEBUG
);
}
+ return $del;
} catch (Throwable $e) {
Analog::log(
'An error has occurred removing old temporary link ' .
);
throw $e;
}
+ return false;
}
/**
*
* PHP version 5
*
- * Copyright © 2009-2022 The Galette Team
+ * Copyright © 2009-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2009-2022 The Galette Team
+ * @copyright 2009-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2009-03-07
* @name Mailing
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2009-2022 The Galette Team
+ * @copyright 2009-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2009-03-07
* @property-read array $errors
* @property-read array $recipients
* @property-read string|false $tmp_path
- * @property-read array $attachments
+ * @property array $attachments
* @property-read string $sender_name
* @property-read string $sender_address
*/
}
$this->history_id = $rs->mailing_id;
}
+ return true;
}
/**
*
* @param int $id Mailing history id
*
- * @return boolean
+ * @return void
*/
public function moveAttachments($id)
{
*
* PHP version 5
*
- * Copyright © 2009-2021 The Galette Team
+ * Copyright © 2009-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2011-2021 The Galette Team
+ * @copyright 2011-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2011-08-27
* @name MailingHistory
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2011-2021 The Galette Team
+ * @copyright 2011-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2011-08-27
*
* @param Select $select Original select
*
- * @return string SQL WHERE clause
+ * @return void
*/
private function buildWhereClause($select)
{
//existing stored mailing. Just update row.
$this->update();
}
+ return true;
} else {
Analog::log(
'[' . __METHOD__ .
);
return false;
}
+ return false;
}
/**
*
* PHP version 5
*
- * Copyright © 2010-2022 The Galette Team
+ * Copyright © 2010-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2010-2022 The Galette Team
+ * @copyright 2010-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2010-03-03
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2010-2022 The Galette Team
+ * @copyright 2010-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
*
*/
public function setSmartyPagination(RouteParser $routeparser, $view, $restricted = true)
{
- return $this->setViewPagination($routeparser, $view, $restricted);
+ $this->setViewPagination($routeparser, $view, $restricted);
}
/**
*
* @param string $name name of the property we want to retrive
*
- * @return object the called property
+ * @return mixed the called property
*/
public function __get($name)
{
*
* PHP version 5
*
- * Copyright © 2003-2021 The Galette Team
+ * Copyright © 2003-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @author Frédéric Jacquot <unknown@unknow.com>
* @author Georges Khaznadar (password encryption, images) <unknown@unknow.com>
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2003-2021 The Galette Team
+ * @copyright 2003-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2009-02-28
* @author Frédéric Jacquot <unknown@unknow.com>
* @author Georges Khaznadar (password encryption, images) <unknown@unknow.com>
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2009-2021 The Galette Team
+ * @copyright 2009-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2011-06-16
);
return false;
}
+ return false;
}
}
} catch (Throwable $e) {
return false;
}
+ return false;
}
/**
*
* PHP version 5
*
- * Copyright © 2017 The Galette Team
+ * Copyright © 2017-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2017 The Galette Team
+ * @copyright 2017-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9dev - 2017-01-08
* @name Install
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2017 The Galette Team
+ * @copyright 2017-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9dev - 2017-01-08
*/
public function getTemplatesPathFromName($name)
{
- $id = null;
foreach (array_keys($this->getModules()) as $r) {
$mod = $this->getModules($r);
if ($mod['name'] === $name) {
return $this->getTemplatesPath($r);
}
}
+ return '';
}
/**
if (file_exists($f)) {
include_once $f;
if (isset($_preferences)) {
+ //@phpstan-ignore-next-line
foreach ($_preferences as $k => $v) {
if (in_array($k, $overridables)) {
$this->preferences->$k = $v;
*
* @param string $name name of the property we want to retrieve
*
- * @return false|object the called property
+ * @return mixed the called property
*/
public function __get($name)
{
*
* PHP version 5
*
- * Copyright © 2011-2021 The Galette Team
+ * Copyright © 2011-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2011-2021 The Galette Team
+ * @copyright 2011-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2011-06-20
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2011-2021 The Galette Team
+ * @copyright 2011-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
*/
/**
* Handle values that have been removed
*
- * @return boolean
+ * @return void
*/
private function handleRemovals()
{
*
* PHP version 5
*
- * Copyright © 2009-2021 The Galette Team
+ * Copyright © 2009-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2009-2021 The Galette Team
+ * @copyright 2009-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2009-03-28
* @name FieldsCategories
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2009-2021 The Galette Team
+ * @copyright 2009-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2009-03-28
$stmt->execute($params);
}
$zdb->connection->commit();
+ return true;
} catch (Throwable $e) {
$zdb->connection->rollBack();
throw $e;
}
+ return false;
}
/**
*
* PHP version 5
*
- * Copyright © 2019-2022 The Galette Team
+ * Copyright © 2019-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2019-2022 The Galette Team
+ * @copyright 2019-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.3dev - 2019-03-25
* @name SavedSearch
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2019-2022 The Galette Team
+ * @copyright 2019-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.3dev - 2019-03-25
$parameters = [];
foreach ((array)$this->parameters as $key => $parameter) {
if (isset($members_fields[$key])) {
+ //@phpstan-ignore-next-line
$key = $members_fields[$key]['label'];
}
if (is_array($parameter) || is_object($parameter)) {
return property_exists($this, $name);
}
}
+ return false;
}
/**
);
throw $e;
}
+ return false;
}
/**
include GALETTE_ROOT . 'includes/fields_defs/texts_fields.php';
$texts = [];
+ //@phpstan-ignore-next-line
foreach ($texts_fields as $text_field) {
unset($text_field['tid']);
$text_field['tlang'] = $lang;
*
* @param string $name name of the property we want to retrive
*
- * @return false|object the called property
+ * @return mixed the called property
*/
public function __get($name)
{
*
* PHP version 5
*
- * Copyright © 2017-2021 The Galette Team
+ * Copyright © 2017-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2017-2021 The Galette Team
+ * @copyright 2017-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9dev - 2017-05-26
* @name Dynamics
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2017-2021 The Galette Team
+ * @copyright 2017-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9dev - 2017-05-26
return $valid;
}
+ return false;
}
/**
*
* PHP version 5
*
- * Copyright © 2012-2022 The Galette Team
+ * Copyright © 2012-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2012-2022 The Galette Team
+ * @copyright 2012-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since 0.73dev 2012-10-16
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2012-2022 The Galette Team
+ * @copyright 2012-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
*
*
* @param string $name name of the property we want to retrieve
*
- * @return object the called property
+ * @return mixed the called property
*/
public function __get($name)
{
*
* PHP version 5
*
- * Copyright © 2016-2022 The Galette Team
+ * Copyright © 2016-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2016-2022 The Galette Team
+ * @copyright 2016-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since june, 12th 2016
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2016-2022 The Galette Team
+ * @copyright 2016-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
*
*
* @param string $name name of the property we want to retrive
*
- * @return object the called property
+ * @return mixed the called property
*/
public function __get($name)
{
*
* PHP version 5
*
- * Copyright © 2016-2022 The Galette Team
+ * Copyright © 2016-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2016-2022 The Galette Team
+ * @copyright 2016-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since june, 12th 2016
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2016-2022 The Galette Team
+ * @copyright 2016-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
*/
*
* @param string $name name of the property we want to retrive
*
- * @return object the called property
+ * @return mixed the called property
*/
public function __get($name)
{
*
* PHP version 5
*
- * Copyright © 2016-2022 The Galette Team
+ * Copyright © 2016-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2016-2022 The Galette Team
+ * @copyright 2016-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since 2016-11-26
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2016-2022 The Galette Team
+ * @copyright 2016-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
*/
*
* @param string $name name of the property we want to retrive
*
- * @return object the called property
+ * @return mixed the called property
*/
public function __get($name)
{
}
} catch (Throwable $e) {
Analog::log(
- 'Wrong date format. field: ' . $key .
+ 'Wrong date format. field: ' . $name .
', value: ' . $value . ', expected fmt: ' .
__("Y-m-d") . ' | ' . $e->getMessage(),
Analog::INFO
*
* PHP version 5
*
- * Copyright © 2009-2022 The Galette Team
+ * Copyright © 2009-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2009-2022 The Galette Team
+ * @copyright 2009-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since march, 3rd 2009
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2009-2022 The Galette Team
+ * @copyright 2009-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
*
*
* @param string $name name of the property we want to retrive
*
- * @return object the called property
+ * @return mixed the called property
*/
public function __get($name)
{
*
* PHP version 5
*
- * Copyright © 2016-2022 The Galette Team
+ * Copyright © 2016-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2016-2022 The Galette Team
+ * @copyright 2016-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since june, 12th 2016
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2016-2022 The Galette Team
+ * @copyright 2016-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
*
*
* @param string $name name of the property we want to retrive
*
- * @return object the called property
+ * @return mixed the called property
*/
public function __get($name)
{
if (isset($contribution->{Adherent::PK})) {
$contribution->{Adherent::PK} = Adherent::getSName($this->zdb, $contribution->{Adherent::PK});
}
-
- //handle booleans
- if (isset($member->activite_adh)) {
- $member->activite_adh
- = ($member->activite_adh) ? _T("Yes") : _T("No");
- }
- /*if (isset($member->bool_admin_adh)) {
- $member->bool_admin_adh
- = ($member->bool_admin_adh) ? _T("Yes") : _T("No");
- }
- if (isset($member->bool_exempt_adh)) {
- $member->bool_exempt_adh
- = ($member->bool_exempt_adh) ? _T("Yes") : _T("No");
- }
- if (isset($member->bool_display_info)) {
- $member->bool_display_info
- = ($member->bool_display_info) ? _T("Yes") : _T("No");
- }*/
}
$fp = fopen($this->path, 'w');
*
* @param string $id Parameted export identifier
*
- * @return string
+ * @return ?string
*/
public function getParamedtedExportName($id)
{
*
* PHP version 5
*
- * Copyright © 2019 The Galette Team
+ * Copyright © 2019-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2019 The Galette Team
+ * @copyright 2019-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.4-dev - 2019-12-03
* @name Csv
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2019 The Galette Team
+ * @copyright 2019-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.4-dev - 2019-12-03
$export_fields = null;
if (file_exists(GALETTE_CONFIG_PATH . 'local_export_fields.inc.php')) {
include_once GALETTE_CONFIG_PATH . 'local_export_fields.inc.php';
+ //@phpstan-ignore-next-line
$export_fields = $fields;
}
* PDF class for galette
* Traps tcpdf errors by overloading tcpdf::error method
* Adds convenient method to convert color html codes
- * Adds a _parsegif function to convert gif to png
*
* PHP version 5
*
return $dec;
}
- /** FIXME: is this function used somewhere? */
- /**
- * Extract info from a GIF file
- * (In fact: converts gif image to png and feeds it to _parsepng)
- *
- * @param string $file path to the gif file
- *
- * @return void
- * @access protected
- */
- protected function parsegif($file)
- {
- $a = getimagesize($file);
- if (empty($a)) {
- $this->Error(_T("Missing or incorrect image file ") . $file);
- }
- if ($a[2] != 1) {
- $this->Error(_T("Not a GIF file ") . $file);
- }
-
- // Tentative d'ouverture du fichier
- if (function_exists('gd_info')) {
- $data = @imagecreatefromgif($file);
-
- // Test d'échec & Affichage d'un message d'erreur
- if (!$data) {
- $this->Error(_T("Error loading ") . $file);
- }
- if (imagepng($data, GALETTE_ROOT . 'tempimages/gif2png.png')) {
- return $this->_parsepng(GALETTE_ROOT . 'tempimages/gif2png.png');
- } else {
- $this->Error(_T("Error creating temporary png file from ") . $file);
- }
- } else {
- $this->Error(_T("Unable to convert GIF file ") . $file);
- }
- }
-
/**
* Draws PDF page Header
*
/**
* Download PDF from browser
*
- * @return string
+ * @return void
*/
public function download()
{
*
* PHP version 5
*
- * Copyright © 2016 The Galette Team
+ * Copyright © 2016-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2016 The Galette Team
+ * @copyright 2016-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.0dev - 2016-02-21
* @package Galette
* @abstract Class for expanding TCPDF.
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2016 The Galette Team
+ * @copyright 2016-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.0dev - 2016-02-21
public function withImages()
{
$this->wimages = true;
+ return $this;
}
}
*
* @param Select $select Original select
*
- * @return string SQL WHERE clause
+ * @return void
*/
private function buildWhereClause(Select $select)
{
*
* PHP version 5
*
- * Copyright © 2018-2021 The Galette Team
+ * Copyright © 2018-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2018-2021 The Galette Team
+ * @copyright 2018-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.2dev - 2018-07-23
* @name PaymentTypes
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2018-2021 The Galette Team
+ * @copyright 2018-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.9.2dev - 2018-07-23
}
throw $e;
}
+ return false;
}
/**
*
* PHP version 5
*
- * Copyright © 2013-2014 The Galette Team
+ * Copyright © 2013-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2011-2014 The Galette Team
+ * @copyright 2011-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7.5dev - 2013-02-25
* @name PdfModels
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2013-2014 The Galette Team
+ * @copyright 2013-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7.5dev - 2013-02-25
}
if ($exists === false) {
- //model does not exists in database, insert it.
+ //model does not exist in database, insert it.
$missing[] = $default;
}
}
}
throw $e;
}
+ return false;
}
/**
{
if (!count($this->defaults)) {
include GALETTE_ROOT . 'includes/fields_defs/pdfmodels_fields.php';
+ //@phpstan-ignore-next-line
$this->defaults = $pdfmodels_fields;
}
return parent::loadDefaults();
*
* PHP version 5
*
- * Copyright © 2011-2021 The Galette Team
+ * Copyright © 2011-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2011-2021 The Galette Team
+ * @copyright 2011-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2011-07-31
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2011-2021 The Galette Team
+ * @copyright 2011-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
*/
*
* @param Select $select Original select
*
- * @return string SQL WHERE clause
+ * @return void
*/
private function buildWhereClause($select)
{
*
* PHP version 5
*
- * Copyright © 2013 The Galette Team
+ * Copyright © 2013-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
*
* @package Galette
*
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2013 The Galette Team
+ * @copyright 2013-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7.6dev - 2013-07-21
* @name AbstractUpdater
* @package Galette
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2013 The Galette Team
+ * @copyright 2013-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7.6dev - 2013-07-21
* @param Db $zdb Database instance
* @param Install $installer Installer instance
*
- * @return Boolean|Exception
+ * @return void
*/
final public function run($zdb, $installer)
{
return true;
}
}
+ return false;
}
/**
--- /dev/null
+parameters:
+ parallel:
+ maximumNumberOfProcesses: 2
+ level: 0
+ paths:
+ - galette/lib/
+ scanDirectories:
+ - galette/includes/
+ ignoreErrors:
+ - '/Instantiated class XHProfRuns_Default not found/'
+ - '/Attribute class .*\\Inject does not exist./'
+