for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Jaxon\Container\Traits;
use Closure;
use Jaxon\Contracts\Session as SessionContract;
use Jaxon\Session\Manager as SessionManager;
trait SessionTrait
{
/**
* Register the values into the container
*
* @return void
*/
private function registerSessions()
// Set the default session manager
$this->set(SessionContract::class, function() {
set()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$this->/** @scrutinizer ignore-call */
set(SessionContract::class, function() {
return new SessionManager();
});
}
* Get the session manager
* @return SessionContract
public function getSessionManager()
return $this->g(SessionContract::class);
g()
return $this->/** @scrutinizer ignore-call */ g(SessionContract::class);
* Set the session manager
* @param Closure $xClosure A closure to create the session manager instance
public function setSessionManager(Closure $xClosure)
$this->set(SessionContract::class, $xClosure);