for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Gr8abbasi\Container\Repository;
class InMemoryServiceRepository implements ServiceRepositoryInterface
{
/**
* @var array $serviceStore
*/
private $serviceStore;
* @inheritdoc
public function get($serviceId)
if (!isset($this->serviceStore[$serviceId]) || !isset($serviceId)) {
return null;
}
return $this->serviceStore[$serviceId];
public function add($id, $service)
$this->serviceStore[$id] = $service;