diff --git a/src/Symfony/Component/Cache/Traits/MemcachedTrait.php b/src/Symfony/Component/Cache/Traits/MemcachedTrait.php index f86cb1c7a2244..b0c48d72a9797 100644 --- a/src/Symfony/Component/Cache/Traits/MemcachedTrait.php +++ b/src/Symfony/Component/Cache/Traits/MemcachedTrait.php @@ -255,7 +255,7 @@ protected function doSave(array $values, int $lifetime) protected function doFetch(array $ids) { try { - $encodedIds = array_map('self::encodeKey', $ids); + $encodedIds = array_map([__CLASS__, 'encodeKey'], $ids); $encodedResult = $this->checkResultCode($this->getClient()->getMulti($encodedIds)); @@ -284,7 +284,7 @@ protected function doHave($id) protected function doDelete(array $ids) { $ok = true; - $encodedIds = array_map('self::encodeKey', $ids); + $encodedIds = array_map([__CLASS__, 'encodeKey'], $ids); foreach ($this->checkResultCode($this->getClient()->deleteMulti($encodedIds)) as $result) { if (\Memcached::RES_SUCCESS !== $result && \Memcached::RES_NOTFOUND !== $result) { $ok = false; diff --git a/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/Symfony/Component/Console/Helper/QuestionHelper.php index 089de76bd63e0..0516545bc9bc7 100644 --- a/src/Symfony/Component/Console/Helper/QuestionHelper.php +++ b/src/Symfony/Component/Console/Helper/QuestionHelper.php @@ -207,7 +207,7 @@ protected function formatChoiceQuestionChoices(ChoiceQuestion $question, $tag) { $messages = []; - $maxWidth = max(array_map('self::strlen', array_keys($choices = $question->getChoices()))); + $maxWidth = max(array_map([__CLASS__, 'strlen'], array_keys($choices = $question->getChoices()))); foreach ($choices as $key => $value) { $padding = str_repeat(' ', $maxWidth - self::strlen($key));