<?php

namespace DICIT;

class ReferenceResolver
{
    const CONTAINER_REFERENCE = '$container';
    /**
     *
     * @var Container
     */
    private $container;

    public function __construct(Container $container)
    {
        $this->container = $container;
    }

    public function resolve($reference)
    {
        if ($reference === static::CONTAINER_REFERENCE) {
            return $this->container;
        }
        
        if (!is_string($reference)) {
            return $reference;
        }

        $prefix = substr($reference, 0, 1);

        switch ($prefix) {

            case '@' :
                return $this->container->get(substr($reference, 1));
            case '%' :
                return $this->container->getParameter(substr($reference, 1));
            default :
                return $reference;
        }
    }

    public function resolveMany(array $references)
    {
        $convertedParameters = array();

        foreach ($references as $reference) {
            $convertedValue = $this->resolve($reference);
            $convertedParameters[] = $convertedValue;
        }

        return $convertedParameters;
    }
}

<?php

namespace DICIT;

class ReferenceResolver
{
    const CONTAINER_REFERENCE = '$container';
    /**
     *
     * @var Container
     */
    private $container;

    public function __construct(Container $container)
    {
        $this->container = $container;
    }

    public function resolve($reference)
    {
        if ($reference === static::CONTAINER_REFERENCE) {
            return $this->container;
        }

        $prefix = substr($reference, 0, 1);

        switch ($prefix) {

            case '@' :
                $toReturn = $this->container->get(substr($reference, 1));
                break;
            case '%' :
                $toReturn = $this->container->getParameter(substr($reference, 1));
                break;
            default :
                $toReturn = $reference;
                break;
        }

        return $toReturn;
    }

    public function resolveMany(array $references)
    {
        $convertedParameters = array();

        foreach ($references as $reference) {
            $convertedValue = $this->resolve($reference);
            $convertedParameters[] = $convertedValue;
        }

        return $convertedParameters;
    }
}

--- 
+++ 
@@ -21,23 +21,22 @@
         if ($reference === static::CONTAINER_REFERENCE) {
             return $this->container;
         }
+        
+        if (!is_string($reference)) {
+            return $reference;
+        }
 
         $prefix = substr($reference, 0, 1);
 
         switch ($prefix) {
 
             case '@' :
-                $toReturn = $this->container->get(substr($reference, 1));
-                break;
+                return $this->container->get(substr($reference, 1));
             case '%' :
-                $toReturn = $this->container->getParameter(substr($reference, 1));
-                break;
+                return $this->container->getParameter(substr($reference, 1));
             default :
-                $toReturn = $reference;
-                break;
+                return $reference;
         }
-
-        return $toReturn;
     }
 
     public function resolveMany(array $references)
Allow to pass other things that string in args