Page MenuHomePhorge

Simplify setStatusAttribute
ClosedPublic

Authored by mollekopf on Feb 26 2023, 2:36 PM.
Tags
None
Referenced Files
F12263127: D4085.id11702.diff
Sun, May 19, 11:21 PM
Unknown Object (File)
Wed, May 8, 4:11 AM
Unknown Object (File)
Mon, May 6, 4:12 AM
Unknown Object (File)
Sun, May 5, 7:12 AM
Unknown Object (File)
Sat, May 4, 12:57 PM
Unknown Object (File)
Sat, May 4, 2:55 AM
Unknown Object (File)
Sun, Apr 28, 9:25 PM
Unknown Object (File)
Sat, Apr 27, 8:40 AM
Subscribers

Details

Summary

To me this is easier to understand, and I suppose it's theoretically the more performant solution (I doubt it matters).
Discard if you don't like it.

Diff Detail

Repository
rK kolab
Lint
Lint Errors
SeverityLocationCodeMessage
Errorsrc/app/Group.php:47phpstanProperty App\Group::$allowed_states is never read, only written.
Errorsrc/app/Resource.php:48phpstanProperty App\Resource::$allowed_states is never read, only written.
Errorsrc/app/SharedFolder.php:51phpstanProperty App\SharedFolder::$allowed_states is never read, only written.
Errorsrc/app/User.php:64phpstanProperty App\User::$allowed_states is never read, only written.
Unit
No Test Coverage
Build Status
Buildable 41846
Build 16793: arc lint + arc unit

Event Timeline

mollekopf created this revision.
mollekopf added a reviewer: Restricted Project.

I fine with it, but it would make sense to unify the similar code in App\Domain and App\Traits\StatusPropertyTrait.

Unified the status attribute handling

machniak requested changes to this revision.Mar 5 2023, 8:36 AM

Nice. We have to silence the linting error: Property App\SharedFolder::$allowed_states is never read, only written.

This revision now requires changes to proceed.Mar 5 2023, 8:36 AM

Nice. We have to silence the linting error: Property App\SharedFolder::$allowed_states is never read, only written.

I'm not getting that in the codebase, just here. I suppose because the arc linting has no visibility on the trait.

This revision is now accepted and ready to land.Mar 6 2023, 2:21 PM
This revision was landed with ongoing or failed builds.Mar 7 2023, 9:42 PM
This revision was automatically updated to reflect the committed changes.