refactoring

This commit is contained in:
Roland Gruber 2025-07-29 07:56:34 +02:00
parent 6c589065ad
commit e52cfd54b6
13 changed files with 34 additions and 16 deletions

View file

@ -966,7 +966,7 @@ function ldapGetDN($dn, $attributes = ['dn'], $handle = null): ?array {
* @param String $dn DN
* @param String $filter LDAP filter
* @param array $attributes list of attributes to fetch
* @param handle $handle LDAP handle (optional for admin interface pages)
* @param Connection|null $handle LDAP handle (optional for admin interface pages)
* @param int $limit result limit
* @return array attributes or null if not found
*/

View file

@ -306,8 +306,8 @@ class imapAccess extends baseModule {
* Display the mailbox quota.
*
* @param htmlResponsiveRow $container structure that contained information to be displayed
* @param Horde_Imap_Client_Socket $client IMAP client
* @param String $username user name to connect to IMAP server
* @param Client $client IMAP client
* @param String $username username to connect to IMAP server
* @return htmlResponsiveRow table with added information about user quotas or controls to add quota
*/
function renderQuotasForMailbox($container, $client, $username) {

View file

@ -23,6 +23,8 @@ namespace LAM\PLUGINS\EXTRA_INVALID_CREDENTIALS;
*/
use LDAP\Connection;
/**
* Extra messages for invalid credentials.
*
@ -39,7 +41,7 @@ class ExtraInvalidCredentials {
/**
* Tries to get additional information why invalid credentials was returned. E.g. account is locked.
*
* @param LDAP\Connection $ldap LDAP object to connect for getting extra data
* @param Connection $ldap LDAP object to connect for getting extra data
* @param string $userDn failed DN
* @return null|string extra message
*/
@ -99,7 +101,7 @@ class ExtraInvalidCredentials {
*
* @param string $userDn user DN
* @param array $attributes attribute names
* @param LDAP\Connection $ldap LDAP handle
* @param Connection $ldap LDAP handle
* @return array|null attribute values
*/
protected function getLdapData(string $userDn, array $attributes, $ldap) {
@ -116,7 +118,7 @@ class ExtraInvalidCredentials {
*
* @param ExtraInvalidCredentialsProvider[] $providers providers
* @param array $userData LDAP data
* @param LDAP\Connection $ldap LDAP handle
* @param Connection $ldap LDAP handle
* @return null|string extra message
*/
protected function getMessageFromProviders(array $providers, array $userData, $ldap) {
@ -149,7 +151,7 @@ interface ExtraInvalidCredentialsProvider {
* Returns an extra message if any.
*
* @param array $attributes LDAP attributes
* @param LDAP\Connection $ldap LDAP handle
* @param Connection $ldap LDAP handle
* @return null|string message
*/
public function getExtraMessage(array $attributes, $ldap);

View file

@ -4,7 +4,7 @@
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2009 - 2012 Pozdnyak Pavel
2010 - 2024 Roland Gruber
2010 - 2025 Roland Gruber
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
@ -30,6 +30,8 @@
* @author Roland Gruber
*/
use LAM\TYPES\ConfiguredType;
/**
* The account type for Asterisk extensions.
*

View file

@ -1,5 +1,6 @@
<?php
use LAM\TYPES\ConfiguredType;
use \LAM\TYPES\TypeManager;
/*

View file

@ -2,7 +2,7 @@
/*
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2005 - 2024 Roland Gruber
Copyright (C) 2005 - 2025 Roland Gruber
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
@ -27,6 +27,8 @@
* @author Roland Gruber
*/
use LAM\TYPES\ConfiguredType;
/**
* The account type for host accounts (e.g. Samba).
*

View file

@ -2,7 +2,7 @@
/*
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2013 - 2024 Roland Gruber
Copyright (C) 2013 - 2025 Roland Gruber
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
@ -27,6 +27,8 @@
* @author Roland Gruber
*/
use LAM\TYPES\ConfiguredType;
/**
* The account type for Kolab shared folders.
*

View file

@ -2,7 +2,7 @@
/*
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2005 - 2024 Roland Gruber
Copyright (C) 2005 - 2025 Roland Gruber
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
@ -27,6 +27,8 @@
* @author Roland Gruber
*/
use LAM\TYPES\ConfiguredType;
/**
* The account type for mail aliases.
*

View file

@ -2,7 +2,7 @@
/*
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2009 - 2024 Roland Gruber
Copyright (C) 2009 - 2025 Roland Gruber
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
@ -27,6 +27,8 @@
* @author Roland Gruber
*/
use LAM\TYPES\ConfiguredType;
/**
* The account type for NIS netgroups.
*

View file

@ -2,7 +2,7 @@
/*
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2013 - 2024 Roland Gruber
Copyright (C) 2013 - 2025 Roland Gruber
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
@ -27,6 +27,8 @@
* @author Roland Gruber
*/
use LAM\TYPES\ConfiguredType;
/**
* The account type for PyKota billing codes.
*

View file

@ -2,7 +2,7 @@
/*
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2013 - 2024 Roland Gruber
Copyright (C) 2013 - 2025 Roland Gruber
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
@ -27,6 +27,8 @@
* @author Roland Gruber
*/
use LAM\TYPES\ConfiguredType;
/**
* The account type for PyKota printers.
*

View file

@ -2,7 +2,7 @@
/*
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2005 - 2024 Roland Gruber
Copyright (C) 2005 - 2025 Roland Gruber
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
@ -27,6 +27,8 @@
* @author Roland Gruber
*/
use LAM\TYPES\ConfiguredType;
/**
* The account type for Samba domains.
*

View file

@ -15,7 +15,6 @@ parameters:
analyseAndScan:
- */lists/changePassword.php
ignoreErrors:
- '#.* has invalid type .*#'
- '#Function [a-zA-Z0-9\\_-]+ not found.#'
- '#Used function [a-zA-Z0-9\\_-]+ not found.#'
- '#Variable \$helpArray might not be defined.#'