![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/framework/Image/Test/Unit/Adapter/_files/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\Framework\Image\Adapter; use Magento\Framework\Image\Test\Unit\Adapter\Gd2Test; /** * Mocking global functions crucial for this adapter */ /** * @param $paramName * @throws \InvalidArgumentException * @return string */ function ini_get($paramName) { if ('memory_limit' == $paramName) { return Gd2Test::$memoryLimit; } throw new \InvalidArgumentException('Unexpected parameter ' . $paramName); } /** * @param $file * @return mixed * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function getimagesize($file) { return Gd2Test::$imageData; } /** * @param $file * @return mixed * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function filesize($file) { return Gd2Test::$imageSize; } /** * @param $file * @return bool * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function file_exists($file) { return !($file === 'not_exist'); } /** * @param $real * @return int * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function memory_get_usage($real) { return 1000000; } /** * @param $callable * @param $param * @return bool * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function call_user_func($callable, $param) { return false; }