protected function registerEntityScanner()
    {
        $app = $this->app;

        $app->singleton('datamapper.entity.scanner', function ($app) {
            $reader = $app['datamapper.annotationreader'];

            $validator = new EntityValidator;

            return new EntityScanner($reader, $validator);
        });
    }