for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Kreta package.
*
* (c) Beñat Espiña <[email protected]>
* (c) Gorka Laucirica <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Kreta\TaskManager\Infrastructure\Symfony\DoctrineDataFixtures;
use Kreta\TaskManager\Infrastructure\Persistence\Doctrine\DataFixtures\LoadTaskData as BaseLoadTaskData;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
class LoadTaskData extends BaseLoadTaskData implements ContainerAwareInterface
{
public function setContainer(ContainerInterface $container = null)
$this->commandBus = $container->get('kreta.task_manager.command_bus');
$container
null
If a variable is not always an object, we recommend to add an additional type check to ensure your method call is safe:
function someFunction(A $objectMaybe = null) { if ($objectMaybe instanceof A) { $objectMaybe->doSomething(); } }
$this->queryBus = $container->get('kreta.task_manager.query_bus');
}
If a variable is not always an object, we recommend to add an additional type check to ensure your method call is safe: