Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

@color of method isn't merged to @color of the class #3

Closed
tolk-vm opened this issue Jun 27, 2021 · 1 comment · Fixed by #4
Closed

@color of method isn't merged to @color of the class #3

tolk-vm opened this issue Jun 27, 2021 · 1 comment · Fixed by #4
Labels
bug Something isn't working

Comments

@tolk-vm
Copy link
Contributor

tolk-vm commented Jun 27, 2021

Describe the bug
I have a class with @color and its method with another @color.
I expect the method to have both colors (in order class-color + method-color), but it works somehow differently.

To Reproduce
PHP code

/** @color controller */
class Controller {
  /** @color allow-model-call */
  static function act() {
    Model::act();
  }
}

/** @color model */
class Model {
  static function act() {}
}

palette.yaml

demo:
- controller model: restricted dependency
- controller allow-model-call model: ""

Expected behavior
No error (the second rule should be matched);

Actual behavior
An error (the first rule is matched)
BTW, if I add @color allow-model-call as a second color to the Controller class itself, everything works as expected. So, the problem is only in class+method case.

@tolk-vm tolk-vm added the bug Something isn't working label Jun 27, 2021
@tolk-vm tolk-vm changed the title @color of methods isn't merged to @color of classes @color of method isn't merged to @color of the class Jun 27, 2021
@i582 i582 closed this as completed in #4 Jun 27, 2021
@i582
Copy link
Contributor

i582 commented Jun 27, 2021

Fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants