protected function registerContracts(): void
    {
        $reflection = new \ReflectionClass($this);
        $reader = new AnnotationReader();

        foreach ($reader->getClassAnnotations($reflection) as $annotation) {
            if ($annotation instanceof Drivers) {
                foreach ($annotation->install as $contract => $driver) {
                    $driverInstance = $this->drivers->get($driver);

                    if (!is_subclass_of($driverInstance, $contract)) {
                        throw new BrokenContractException($contract);
                    }

                    $this->{$driver} = $driverInstance;
                }
            }

            if ($annotation instanceof Repository) {
                $repository = $this->drivers->get($annotation->repositoryProvider)->getRepository($annotation->name);

                if (!is_subclass_of($repository, $annotation->contract)) {
                    throw new BrokenContractException($annotation->contract);
                }

                $repositoryReflection = new \ReflectionClass($annotation->contract);
                $property = str_replace('Interface', '', $repositoryReflection->getShortName());

                $this->{lcfirst($property)} = $repository;
            }
        }
    }