$ajax = true;
}
- $raw_type = null;
-
switch ($type) {
case 'transactions':
$raw_type = 'transactions';
case 'contributions':
$raw_type = 'contributions';
break;
+ default:
+ Analog::log(
+ 'Trying to load unknown contribution type ' . $type,
+ Analog::WARNING
+ );
+ return $response
+ ->withStatus(301)
+ ->withHeader(
+ 'Location',
+ $this->router->pathFor('me')
+ );
}
$filter_name = 'filter_' . $raw_type;
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2009-02-28
*
- * @param string $login
- * @param string $name
- * @param string $surname
- * @param integer $id
- * @param string $lang
- * @param array $managed_groups
+ * @property string $login
+ * @property string $name
+ * @property string $surname
+ * @property integer $id
+ * @property string $lang
+ * @property array $managed_groups
*/
abstract class Authentication
* @property string $saddress Concatened address and continuation
* @property string $contribstatus State of member contributions
* @property string $days_remaining
+ * @property-read integer $parent_id
*/
class Adherent
{
$fields = self::getDbFields($this->zdb);
- //reset company name if needeed
+ //reset company name if needed
if (!isset($values['is_company'])) {
unset($values['is_company']);
$values['societe_adh'] = '';
}
foreach ($fields as $key) {
- //first of all, let's sanitize values
+ //first, let's sanitize values
$key = strtolower($key);
$prop = '_' . $this->fields[$key]['propname'];
$value = 0;
break;
case 'activite_adh':
- //values that are setted at object instanciation
+ //values that are set at object instantiation
$value = true;
break;
case 'date_crea_adh':
case 'id_statut':
case 'pref_lang':
case 'parent_id':
- //values that are setted at object instanciation
+ //values that are set at object instantiation
$value = $this->$prop;
break;
default:
*
* @return boolean
*/
- public function canCreate(Login $login)
+ public function canCreate(Login $login): bool
{
global $preferences;
*
* @return boolean
*/
- public function canEdit(Login $login)
+ public function canEdit(Login $login): bool
{
//admin and staff users can edit, as well as member itself
if ($this->id && $login->id == $this->id || $login->isAdmin() || $login->isStaff()) {
}
/**
- * Can current logged in user display member
+ * Can current logged-in user display member
*
* @param Login $login Login instance
*
* @return boolean
*/
- public function canShow(Login $login)
+ public function canShow(Login $login): bool
{
return $this->canEdit($login);
}
*
* @return boolean
*/
- public function isDuplicate()
+ public function isDuplicate(): bool
{
return $this->_duplicate;
}
*
* @return Adherent
*/
- public function setSendmail($send = true)
+ public function setSendmail($send = true): self
{
$this->sendmail = $send;
return $this;
* @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-11
+ *
+ * @property integer $id
+ * @property date $date
+ * @property integer $amount
+ * @property string $description
+ * @property integer $member
*/
class Transaction
{
* @copyright 2016-2021 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
+ *
+ * @property date $start_date_filter
+ * @property date $end_date_filter
+ * @property integer $filtre_cotis_adh
+ * @property boolean $filtre_cotis_children
+ * @property string $date_field
+ * @property integer $payment_type_filter
+ * @property boolean $filtre_transactions
+ * @property integer|false $from_transaction
+ * @property integer $max_amount
+ * @property string $rstart_date_filter
+ * @property string $rend_date_filter
*/
class ContributionsList extends Pagination
}
} 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
* @copyright 2016-2021 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
+ *
+ * @property date $start_date_filter
+ * @property date $end_date_filter
+ * @property integer $filtre_cotis_adh
+ * @property boolean $filtre_cotis_children
+ * @property string $rstart_date_filter
+ * @property string $rend_date_filter
*/
class TransactionsList extends Pagination