for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Anax\DI;
use Anax\DI\Exception\Exception;
/**
* Trait to use to make a DI container use magic for
* getting services. A class using a DI container can
* access $this->di->session; as an alternative to
* $this->di->get("session");
*/
trait DIMagicTrait
{
* Magic method to get a service.
*
* @param string $service name of the service.
* @return mixed as the service requested.
public function __get($service)
return $this->get($service);
get()
Anax\DI\DIMagicTrait
__call
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
return $this->/** @scrutinizer ignore-call */ get($service);
}
* Magic method to get and call a service.
* @param array $arguments currently NOT USED.
public function __call($service, $arguments = [])