diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Activity/Event.php | 4 | ||||
-rw-r--r-- | lib/private/RichObjectStrings/Validator.php | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Activity/Event.php b/lib/private/Activity/Event.php index 810af5c0612..54274acea6b 100644 --- a/lib/private/Activity/Event.php +++ b/lib/private/Activity/Event.php @@ -34,7 +34,7 @@ class Event implements IEvent { protected $subjectParsed = ''; /** @var string */ protected $subjectRich = ''; - /** @var array */ + /** @var array<string, array<string, string>> */ protected $subjectRichParameters = []; /** @var string */ protected $message = ''; @@ -44,7 +44,7 @@ class Event implements IEvent { protected $messageParsed = ''; /** @var string */ protected $messageRich = ''; - /** @var array */ + /** @var array<string, array<string, string>> */ protected $messageRichParameters = []; /** @var string */ protected $objectType = ''; diff --git a/lib/private/RichObjectStrings/Validator.php b/lib/private/RichObjectStrings/Validator.php index f3d2ffd5723..adc4a8710f7 100644 --- a/lib/private/RichObjectStrings/Validator.php +++ b/lib/private/RichObjectStrings/Validator.php @@ -56,7 +56,7 @@ class Validator implements IValidator { throw new InvalidObjectExeption('Parameter is malformed'); } - $this->validateParameter($parameter); + $this->validateParameter($placeholder, $parameter); } } @@ -64,7 +64,7 @@ class Validator implements IValidator { * @param array $parameter * @throws InvalidObjectExeption */ - protected function validateParameter(array $parameter): void { + protected function validateParameter(string $placeholder, array $parameter): void { if (!isset($parameter['type'])) { throw new InvalidObjectExeption('Object type is undefined'); } @@ -74,15 +74,15 @@ class Validator implements IValidator { $missingKeys = array_diff($requiredParameters, array_keys($parameter)); if (!empty($missingKeys)) { - throw new InvalidObjectExeption('Object is invalid, missing keys:' . json_encode($missingKeys)); + throw new InvalidObjectExeption('Object for placeholder ' . $placeholder . ' is invalid, missing keys:' . json_encode($missingKeys)); } foreach ($parameter as $key => $value) { if (!is_string($key)) { - throw new InvalidObjectExeption('Object is invalid, key ' . $key . ' is not a string'); + throw new InvalidObjectExeption('Object for placeholder ' . $placeholder . ' is invalid, key ' . $key . ' is not a string'); } if (!is_string($value)) { - throw new InvalidObjectExeption('Object is invalid, value ' . $value . ' is not a string'); + throw new InvalidObjectExeption('Object for placeholder ' . $placeholder . ' is invalid, value ' . $value . ' for key ' . $key . ' is not a string'); } } } |