Commit Graph

13 Commits

Author SHA1 Message Date
00d021109c Move ModelValidator::validateNonRoleEmail() to a new Validator class
We want to remove/refactor the whole ModelValidator class as part of the
Doctrine refactor.

This commit moves the method ModelValidator::validateNonRoleEmail() to a
new Validator class as the method is not used by the validator system of
the Paris models. ModelValidator::validateEmail() was also moved as it
is called by ModelValidator::validateNonRoleEmail().

[MAILPOET-4343]
2023-05-17 12:37:22 +02:00
d760272678 Remove ModelValidator::validateIPAddress()
We want to remove/refactor the whole ModelValidator class as part of the
Doctrine refactor. As a first step, this commit removes the method
ModelValidator::validateIPAddress(). It was unused in a single place and
it was replaced with a direct call to the builtin PHP way to validate an
IP address.

[MAILPOET-4343]
2023-05-17 12:37:22 +02:00
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
daa5575d87 Reduce maximum records count in batch to exact size
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
5c57dd2006 Add saving tags for imported subscribers
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
24cca1ba04 Cache total subscribers count, add tests
[MAILPOET-4416]
2022-08-24 12:18:44 +02:00
b05e6d414c Remove WP\Functions::__ and other translate functions
Under the new sniffer rules, those functions produce errors and, when those methods
are used, the sniffer can not properly be applied.

[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
7c6f0b7777 Specify type of $fieldName to string on addField
[MAILPOET-3720]
2022-05-25 09:43:47 +02:00
94fe87008a Remove PHPStan level 6 errors from Import
Remove the following errors from Subscribers\ImportExport\Import\MailChimp:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).

[MAILPOET-3720]
2022-05-25 09:43:47 +02:00
34ce6cd329 Remove PHPStan level 6 errors from Import
Remove the following errors from Subscribers\ImportExport\Import\Import:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).

I have also added a few checks when using count and typed the arrays when possible.

[MAILPOET-3720]
2022-05-25 09:43:47 +02:00
f6dfb19362 Remove PHPStan level 6 errors from Segments\WP
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).
array_walk on import.php was expecting the key as the second parameter to the function. I have switched it to array_map.

[MAILPOET-3720]
2022-05-23 12:04:12 +02:00
9f822818c3 Make sure batch size is positive integer
Fixes PHPStan error array_chunk expects int<1, max>.

[MAILPOET-4131]
2022-03-07 16:07:16 +01:00
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00