Skip to content

Add --objects option to add only object types - #40

Merged
TomasVotruba merged 1 commit into
string-literal-unresolved-argsfrom
objects-option
Sep 25, 2026
Merged

TomasVotruba merged 1 commit into
string-literal-unresolved-argsfrom
objects-option

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Stacked on #39 (reuses its option plumbing) - GitHub retargets it to main once #39 merges.

argtyper add-types . --objects
argtyper add-types . --literals --objects

--objects only adds object types:

  • a single class, \Foo or ?\Foo
  • a union made only of classes, \Foo|\Bar or \Foo|\Bar|null
  • object defaults too, e.g. $status = Status::Active
  • a union with a scalar, like int|\Money, is skipped

Combined with --literals, both kinds are added. The literalsOnly bool becomes apply.Options{Literals, Objects}.

On mautic: 87 types (86 object, 1 object-only union).

@TomasVotruba
TomasVotruba merged commit b3a47f0 into string-literal-unresolved-args Sep 25, 2026
4 checks passed
@TomasVotruba
TomasVotruba deleted the objects-option branch September 25, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant