for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Gewaer\Providers;
use Phalcon\Di\ServiceProviderInterface;
use Phalcon\DiInterface;
class SessionProvider implements ServiceProviderInterface
{
/**
* @param DiInterface $container
*/
public function register(DiInterface $container)
$container->setShared(
'session',
function () {
$memcache = new \Phalcon\Session\Adapter\Memcache([
'host' => envValue('DATA_API_MEMCACHED_HOST', '127.0.0.1'),
envValue
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
'host' => /** @scrutinizer ignore-call */ envValue('DATA_API_MEMCACHED_HOST', '127.0.0.1'),
'post' => envValue('DATA_API_MEMCACHED_PORT', 11211),
'lifetime' => 8600, // optional (standard: 8600)
'prefix' => 'baka-api', // optional (standard: [empty_string]), means memcache key is my-app_31231jkfsdfdsfds3
'persistent' => false, // optional (standard: false)
]);
$memcache->start();
return $memcache;
}
);