bavix/laravel-wallet

View on GitHub
deptrac.yaml

Summary

Maintainability
Test Coverage
parameters:
  paths:
    - ./src

  layers:
    - name: Legacy
      collectors:
        - type: className
          regex: ^Bavix\\.*\\Objects\\Cart$

    - name: Contract
      collectors:
        - type: className
          regex: ^Bavix\\Wallet\\Interfaces\\.*
        - type: className
          regex: ^Bavix\\Wallet\\External\\Contracts\\.*
        - type: className
          regex: ^Bavix\\Wallet\\External\\Dto\\.*

    - name: Api
      collectors:
        - type: className
          regex: ^Bavix\\Wallet\\External\\Api\\.*Interface$

    - name: ApiQuery
      collectors:
        - type: className
          regex: ^Bavix\\Wallet\\External\\Api\\.*Query$

    - name: ApiHandler
      collectors:
        - type: className
          regex: ^Bavix\\Wallet\\External\\Api\\.*Handler$

    - name: UI
      collectors:
        - type: className
          regex: ^Bavix\\.*\\Traits\\.*

    - name: UIException
      collectors:
        - type: className
          regex: ^Illuminate\\Database\\Eloquent\\ModelNotFoundException$
        - type: className
          regex: ^Bavix\\Wallet\\Exceptions\\.*

    # internal
    - name: InternalException
      collectors:
        - type: className
          regex: ^Bavix\\.*\\Internal\\Exceptions\\.*

    - name: InternalListener
      collectors:
        - type: className
          regex: ^Bavix\\.*\\Internal\\Listeners\\.*

    - name: Event
      collectors:
        - type: className
          regex: ^Bavix\\.*\\Internal\\Events\\.*Event$

    - name: EventInterface
      collectors:
        - type: className
          regex: ^Bavix\\.*\\Internal\\Events\\.*EventInterface$

    - name: Dto
      collectors:
        - type: className
          regex: ^Bavix\\.*\\Internal\\Dto\\.*Dto$

    - name: DtoInterface
      collectors:
        - type: className
          regex: ^Bavix\\.*\\Internal\\Dto\\.*DtoInterface$

    - name: AssemblerDto
      collectors:
        - type: className
          regex: ^Bavix\\.*\\Internal\\Assembler\\.*DtoAssembler$

    - name: AssemblerDtoInterface
      collectors:
        - type: className
          regex: ^Bavix\\.*\\Internal\\Assembler\\.*DtoAssemblerInterface$

    - name: QueryInterface
      collectors:
        - type: className
          regex: ^Bavix\\.*Internal\\Query\\.*QueryInterface$

    - name: Query
      collectors:
        - type: className
          regex: ^Bavix\\.*Internal\\Query\\.*Query$

    - name: RepositoryInterface
      collectors:
        - type: className
          regex: ^Bavix\\.*Internal\\Repository\\.*RepositoryInterface$

    - name: Repository
      collectors:
        - type: className
          regex: ^Bavix\\.*Internal\\Repository\\.*Repository$

    - name: Transform
      collectors:
        - type: className
          regex: ^Bavix\\.*Internal\\Transform\\.*DtoTransformer$

    - name: TransformInterface
      collectors:
        - type: className
          regex: ^Bavix\\.*Internal\\Transform\\.*DtoTransformerInterface$

    - name: Infra
      collectors:
        - type: className
          regex: ^Bavix\\.*Internal\\Service\\.*Service$

    - name: ServiceDecorator
      collectors:
        - type: className
          regex: ^Bavix\\.*Decorator\\.*Decorator

    # contracts
    - name: Model
      collectors:
        - type: className
          regex: ^Bavix\\.*Models\\Transaction$
        - type: className
          regex: ^Bavix\\.*Models\\Transfer$
        - type: className
          regex: ^Bavix\\.*Models\\Wallet$

    - name: Service
      collectors:
        - type: className
          regex: ^Bavix\\.*Services\\.*Service$

    - name: ServiceInterface
      collectors:
        - type: className
          regex: ^Bavix\\.*Service\\.*ServiceInterface$
        - type: className
          regex: ^Bavix\\.*Services\\.*ServiceInterface$

    # framework
    - name: EloquentModel
      collectors:
        - type: className
          regex: ^Illuminate\\Database\\Eloquent\\Model$

    - name: Config
      collectors:
        - type: className
          regex: ^Illuminate\\Config\\Repository$

    - name: Cache
      collectors:
        - type: className
          regex: ^Illuminate\\Contracts\\Cache\\Repository$

  ruleset:
    Contract:
      - InternalException
      - DtoInterface
      - UIException
      - Model

    ApiQuery:
      - Api
      - Model
      - Contract
      - ServiceInterface

    Api:
      - Model
      - Contract
      - InternalException

    ApiHandler:
      - Api
      - Model
      - ApiQuery
      - Contract
      - ServiceInterface
      - InternalException

    UI:
      - AssemblerDtoInterface # delete as soon as possible
      - InternalException
      - ServiceInterface
      - UIException
      - Contract
      - Model
      - Legacy # delete as soon as possible

    UIException:
      - InternalException

    Infra:
      - InternalException
      - ServiceInterface
      - EventInterface
      - Config
      - Cache

    ServiceDecorator:
      - InternalException
      - ServiceInterface

    EventInterface:
    Event:
      - EventInterface

    DtoInterface:
      - Contract
    Dto:
      - DtoInterface
      - Contract

    Model:
      - AssemblerDtoInterface
      - InternalException
      - ServiceInterface
      - EloquentModel
      - UIException
      - Contract
      - Legacy
      - UI

    TransformInterface:
      - DtoInterface
    Transform:
      - TransformInterface
      - DtoInterface

    QueryInterface:
    Query:
      - QueryInterface

    RepositoryInterface:
      - InternalException
      - QueryInterface
      - DtoInterface
      - Model
    Repository:
      - RepositoryInterface
      - TransformInterface
      - InternalException
      - ServiceInterface # json service only
      - QueryInterface
      - DtoInterface
      - UIException
      - Model

    InternalListener:
      - ServiceInterface

    ServiceInterface:
      - InternalException
      - EventInterface
      - EloquentModel
      - DtoInterface
      - UIException
      - Contract
      - Model
    Service:
      - AssemblerDtoInterface
      - RepositoryInterface
      - InternalException
      - ServiceInterface
      - EloquentModel
      - DtoInterface
      - UIException
      - Contract
      - Model

    AssemblerDtoInterface:
      - EloquentModel
      - DtoInterface
      - Contract
    AssemblerDto:
      - AssemblerDtoInterface
      - QueryInterface
      - ServiceInterface # UUID
      - EloquentModel
      - DtoInterface
      - Contract
      - Dto

    Legacy:
      - InternalException
      - ServiceInterface
      - DtoInterface
      - Contract
      - Dto # Cart from objects