for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Copyright 2017 NanoSector
*
* You should have received a copy of the MIT license with the project.
* See the LICENSE file for more information.
*/
namespace Yoshi2889\Container;
trait ComponentTrait
{
* @param ComponentContainer $container
* @return static
NoType
This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.
array
* @throws NotFoundException
public static function fromContainer(ComponentContainer $container)
$obj = $container->get(__CLASS__);
if ($obj && $obj instanceof static)
return $obj;
throw new NotFoundException();
}
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.