سؤال

I am using the base64_decode() and base64_encode() in my code but PHPCS says

The use of function base64_decode() is discouraged so what's the equivalence of this core PHP function in Magento2?

هل كانت مفيدة؟

المحلول

Magento does not have equivalence function of base64_decode() and base64_encode() method.

Using phpcs:ignore you can use these two methods.Like Below

// phpcs:ignore Magento2.Functions.DiscouragedFunction
    base64_decode($content);
// phpcs:ignore Magento2.Security.LanguageConstruct.ExitUsage
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top