src/Hades/Container/Container.php
public function bind($contract, $class, $args = [])
    {
        $closure = function($class, $args) {
            $reflect = new \ReflectionClass($class);
            return $reflect->newInstanceArgs($args);
        };

        $this->bindings[$contract] = [
            'type' => 'closure',
            'closure' => $closure,
            'class' => $class,
            'args' => $args
        ];

        if (!class_exists($contract, false)) {
            eval("class {$contract} extends \Hades\Container\Facade {} ");
        }
    }
public function bind($contract, $class, $args = [])
    {
        $closure = function($class, $args) {
            $reflect = new \ReflectionClass($class);
            return $reflect->newInstanceArgs($args);
        };

        $this->bindings[$contract] = [
            'type' => 'closure',
            'closure' => $closure,
            'class' => $class,
            'args' => $args
        ];

        if (!class_exists($contract, false)) {
            eval("class {$contract} extends \Hades\Container\Facade {} ");
        }
    }
public function bind ( $ contract , $ class , $ args = [ ] ) { $ closure = function ( $ class , $ args ) { $ reflect = new \ ReflectionClass ( $ class ) ; return $ reflect -> newInstanceArgs ( $ args ) ; } ; $ this -> bindings [ $ contract ] = [ 'type' => 'closure' , 'closure' => $ closure , 'class' => $ class , 'args' => $ args ] ; if ( ! class_exists ( $ contract , false ) ) { eval ( "class {$contract} extends \Hades\Container\Facade {} " ) ; } }
the class will have new instance when use
the class will have new instance when use