chg: [inboxProcessors] Change deprecated `notEmpty` to `notEmptyString`

pull/93/head
Sami Mokaddem 2022-03-01 11:40:18 +01:00
parent a78864912e
commit 04bd67e082
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
2 changed files with 5 additions and 5 deletions

View File

@ -159,9 +159,9 @@ class LocalToolInboxProcessor extends GenericInboxProcessor
{ {
return $validator return $validator
->requirePresence('connectorName') ->requirePresence('connectorName')
->notEmpty('connectorName', 'The connector name must be provided') ->notEmptyString('connectorName', 'The connector name must be provided')
->requirePresence('cerebrateURL') ->requirePresence('cerebrateURL')
->notEmpty('cerebrateURL', 'A url must be provided') ->notEmptyString('cerebrateURL', 'A url must be provided')
->requirePresence('local_tool_id') ->requirePresence('local_tool_id')
->numeric('local_tool_id', 'A local_tool_id must be provided') ->numeric('local_tool_id', 'A local_tool_id must be provided')
->requirePresence('remote_tool_id') ->requirePresence('remote_tool_id')

View File

@ -37,13 +37,13 @@ class RegistrationProcessor extends UserInboxProcessor implements GenericInboxPr
protected function addValidatorRules($validator) protected function addValidatorRules($validator)
{ {
return $validator return $validator
->notEmpty('username', 'A username must be provided.') ->notEmptyString('username', 'A username must be provided.')
->add('email', 'validFormat', [ ->add('email', 'validFormat', [
'rule' => 'email', 'rule' => 'email',
'message' => 'E-mail must be valid' 'message' => 'E-mail must be valid'
]) ])
->notEmpty('first_name', 'A first name must be provided') ->notEmptyString('first_name', 'A first name must be provided')
->notEmpty('last_name', 'A last name must be provided') ->notEmptyString('last_name', 'A last name must be provided')
->add('password', 'password_complexity', [ ->add('password', 'password_complexity', [
'rule' => function($value, $context) { 'rule' => function($value, $context) {
if (!preg_match('/^((?=.*\d)|(?=.*\W+))(?![\n])(?=.*[A-Z])(?=.*[a-z]).*$|.{16,}/s', $value) || strlen($value) < 12) { if (!preg_match('/^((?=.*\d)|(?=.*\W+))(?![\n])(?=.*[A-Z])(?=.*[a-z]).*$|.{16,}/s', $value) || strlen($value) < 12) {