for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the PHP Translation package.
*
* (c) PHP Translation team <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Translation\Bundle\Command;
use Translation\Bundle\Service\StorageManager;
trait StorageTrait
{
/**
* @var StorageManager
private $storageManager;
private function getStorage($configName)
if (null === $storage = $this->storageManager->getStorage($configName)) {
$availableStorages = $this->storageManager->getNames();
throw new \InvalidArgumentException(sprintf('Unknown storage "%s". Available storages are "%s".', $configName, implode('", "', $availableStorages)));
}