for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Moodle component manager.
*
* @author Luke Carrier <[email protected]>
* @copyright 2016 Luke Carrier
* @license GPL-3.0+
*/
namespace ComponentManager\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerInterface;
trait ContainerAwareTrait {
* Dependency injection container.
* @var \Symfony\Component\DependencyInjection\ContainerInterface
protected $container;
* Set the dependency injection container.
* @param \Symfony\Component\DependencyInjection\ContainerInterface $container
$container
null|ContainerInterface
This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.
@param
It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.
* @return void
public function setContainer(ContainerInterface $container=null) {
$this->container = $container;
}
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.