Skip to content

Commit

Permalink
Fixed minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
humandb committed Jan 19, 2013
1 parent 2fbd210 commit 8cb0564
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ private function findAndSortTaggedServices($tagName, ContainerBuilder $container
{
$services = $container->findTaggedServiceIds($tagName);

if(empty($services)) {
throw new \RuntimeException(sprintf("You must tag at least one service as '%s' to use the Serializer service", $tagName));
if (empty($services)) {
throw new \RuntimeException(sprintf('You must tag at least one service as "%s" to use the Serializer service', $tagName));
}

$sortedServices = array();
foreach ($services as $serviceId => $tags) {
foreach($tags as $tag) {
foreach ($tags as $tag) {
$priority = isset($tag['priority']) ? $tag['priority'] : 0;
$sortedServices[$priority][] = new Reference($serviceId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
*/
private function registerSerializerConfiguration(array $config, XmlFileLoader $loader)
{
if (!empty($config['enabled'])) {
if ($config['enabled']) {
$loader->load('serializer.xml');
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
class SerializerPassTest extends \PHPUnit_Framework_TestCase
{


public function testThrowExceptionWhenNoNormalizers()
{
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder');
Expand Down

0 comments on commit 8cb0564

Please sign in to comment.