* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* NEW add api for members statistics
* fix
* fix
* fix
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* adding function to set it to draft mode
* New API endpoint for controlling mass mailings
* report which id we could not find + unset some fields not on this object + write that source was com/propal/class/api_propal.class.php
* extending the fetch function for the mailing object so the API can show all columns in the database
* filling more data into the object and don't unset it later
* adding notrigger to clone creation
* still some cleaning up from when cloning api_proposals.class.php
* do not unset the ID, because we want the ID so we can use it
* adding endpoint to clone a mass mailing
* extending count function with 'all' that just returns all rows, no matter the status
* API endpoints to delete all targets of a mass mailing
* setting which http method to use
* pretty print clone endpoint in API explorer
* endpoint resetTargetsStatus of mass mailing
* Typo receipients fixed
* Update api_mailings.class.php
* Update api_mailings.class.php
* Update api_mailings.class.php
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* redoing PR Api objectlinks #33738
* loading objectlinks api from main api folder
* bringing $FIELDS up to develop branch standard
* trying to tell phan the expected array types
* phan return and input type specifications
* trying to fix 'Method ObjectLink::_makeobject() should return int but return statement is missing.'
* trying to return an ObjecTLink
* get returns an ObjectLink object
* making sure that function _makeobject always has an return
* making sure deleteByValues always has a return statement
* remove empty line
* making sure getByValues always has a return value
* trying to fix phan for _validate
* no < around objectlink
* trying to fix some phan and phan-stan errors
* public variable target should be fk_target
* making TRIGGER_PREFIX more like in core/class/commonobject.class.php
* trying to save and use the notrigger value
* typecast objectlink fk_source and fk_target to string in the hope that they are later made correctly to int
* whitespace to trigger a build of my branch
* back to being int - because that is what they are
* trying to typecast
* trying to help PHPStan to validate fk_source and fk_target
* trying to use the same way as are used
* splitting over multiple lines
* Fix: update ObjectLink return type in API methods
### FIX: Update ObjectLink return type in API methods
- Updated the return type of several methods from `ObjectLink` to `Object` to reflect a return type compatible with Luracast/Restler
* fix: refactor field setting in ObjectLinks class
# Fix: Refactor field setting in ObjectLinks class
- Removed the static `$INTFIELDS` array and moved its logic to a new private
method `_setObjectLinkField`.
- Updated `create`, `getByValues`, and `deleteByValues` methods to use
`_setObjectLinkField` for setting fields.
- Cleaned up the code by removing redundant field validation and type casting
logic.
* noting that relation type can both be string and null
* escaping strings before parsing them to the database
* -> not global
* trying to fix phpstan errors by flipping so the string part is first
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: MDW <mdeweerd@users.noreply.github.com>
* Qual: Enable & fix or ignore Invalid DimOffset
# Qual: Enable & fix or ignore Invalid DimOffset
The Invalid DimOffset notices occur when array keys are defined and
the index used is not amongst the known array keys.
This PR enables these notices and fixes array definitions when needed,
or ignores the notices locally if it's a false positive, or in the
baseline.txt when it does not seem to be a false positive so that
it can be fixed later
* Nullable object typing in function signature not ok for 7.0/8.4
Can't user '?User' as argument type for PHP7.0 which is required by PHP8.4.
Therefore, removing the typing specification in the function definition
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Qual: Fix notifications multiple files
# Qual: Fix notifications multiple files
Fixes to files with UnknownObject notices, fixing other
notices in these files as well
* Improve boxes typing
* Qual: Extend accepted types to reduce notices
* Fix type for GET/POST arguments of GETPOST* calls
* Qual: 🛟 Fix typing
Qual: Fix typing
Fix some typing currently failing ci in develop.
* Fix typing for grabimages
* Qual: Fix new UndeclaredGlobalVariable notices & enable
# Qual: Fix new UndeclaredGlobalVariable notices & enable
This fixes several new notices regarding 'undeclared globals' which
mostly correspond to missing initialisations in views and some real
bugs where the variable name was incorrect.
Some less obvious cases are unsolved and ignored (adherents/list,
and fourn/commande/card).
This is in preparation of fixing the notices in the other files
where the baseline was already set to ignore them where most just
need a phan-var-force declaration which will help with verifying
type compatibity and object member verifications
* Fix extraparams property typing
* Fix argument typing
* Fix 'status' argument type in calls to dolGetButtonTitle
* Fix argument2 for price to 1 (was 2)
* Fix deliveryreceipt argument
* Fix PHPDoc dol_sort_array
* Fix range for int argument
* Fix arg type for str_pad and add some PHPDoc
* Fix natsort value for dol_sort_array
* Fix arguments on calls to dol_sort_array
* Reduce phpstan exceptions
* Qual: Add type hints for Stripe objects
# Qual: Add type hints for Stripe objects
Suggest the more specific implementation of the StripObject.
* Typing, initialisation
* Qual: Fix undeclared variables
* Update phan baseline
* Update baseline
* Qual: Add type hints for Stripe objects
# Qual: Add type hints for Stripe objects
Suggest the more specific implementation of the StripObject.
* Add PHPDoc for host class properties
* Ignore false positive (phan) for deprecated property
* Improve typing
* Update baseline
* Fix phpdoc for phpstan
* Add abstract write_file to ModelePDFContract
And update phpdoc for derived classes
* Fix typing for php_standard_actions writefile
* Improve phpdoc for write_files (& related)
* Add abstract write_file to ModelePDFBom
* Add abstract write_file to ModelePDFDeliveryOrder
* Add abstract write_file to ModeleExpenseReport
* Add abstract write_file to ModelePDFFicheinter
* Add abstract write_file to ModelePDFEvaluation
* Add abstract write_file to ModelePDFFactures
* Add abstract write_file to ModelePDFSuppliersInvoices
* Update ModelePDFProjects and ModelePDFTask related classes
* Qual: Add abstract write_file to ModelePdfExpedition
And update phpdoc for derived classes
* Qual: Correct reference (doc) to ModelePDFEvaluation
* Qual: Add abstract write_file to ModelePDFKnowledgeRecord
And update phpdoc for derived classes
* Qual: Add abstract write_file to ModelePDFMo & ModelePDFMouvement
And update phpdoc for derived classes
* Qual: Set typehint to ModelePDFFicheinter
* Qual: Add abstract write_file to ModelePDFCommandes
And update phpdoc for derived classes
* Qual: Add abstract write_file to ModelePDFPropales
And update phpdoc for derived classes
* Qual: Add abstract write_file to ModelePdfReception
And update phpdoc for derived classes
* Qual: Add abstract write_file to ModelePDFSuppliersOrders
And update phpdoc for derived classes
* Qual: Add abstract write_file to ModelePDFSuppliersOrders
And update phpdoc for derived classes
* Qual: Add abstract write_file to ModelePDFSuppliersPayments
And update phpdoc for derived classes
* Qual: Add abstract write_file to ModelePDFSupplierProposal
And update phpdoc for derived classes
* Qual: Add abstract write_file to ModelePDFWorkstation
And update phpdoc for derived classes
* Set typing for doc generator (commonobject)
* Improve typing for write_file
* Set typing for doc generator
* Qual: Add abstract write_file to ModelePDFMember
And update phpdoc for derived classes
* Qual: Add abstract write_file to ModelePDFProduct
And update phpdoc for derived classes
* Qual: Add abstract write_file to ModelePDFProductBatch
And update phpdoc for derived classes
* Qual: Add abstract write_file to ModelePDFRecruitmentJobPosition
And update phpdoc for derived classes
* Add abstract write_file to ModelePDFTicket
* Add abstract write_file to ModelePDFUser
* Add abstract write_file to ModelePDFUserGroup
* Add abstract write_file to ModeleThirdPartyDoc
* Add abstract write_file to ModelePDFAsset
* Find all incompatible classes
* Qual: update phan baseline
* Set typing for doc generator (commonobject)
* Qual: update phan baseline
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>