Proof-of-concept, has slight logic changes compared to orIf() and andIf()
Closes #3452631
Merge request reports
Activity
- Resolved by Kristiaan Van den Eynde
- Resolved by Kristiaan Van den Eynde
80 81 return $condition ? static::allowed() : static::neutral(); 81 82 } 82 83 84 /** 85 * Optionally combines this access result with another using OR. 86 * 87 * @param \Closure $closure Using a generic term like closure might not convey this requirement clearly. Instead, a term such as predicate explicitly indicates that the function should return a boolean value. While it is a more specific concept, it is widely used in programming, and developers can quickly learn its definition if they are not already familiar with it.
Since we are dealing with programming APIs, the audience is likely familiar with—or capable of learning—terms like "predicate functions." This precise terminology can help avoid confusion and ensure that developers understand the expectations without needing to check the parameter definition.
https://dcl-prog.stanford.edu/function-predicate.html
Does anyone have a better suggestion, or is there another term that might strike a balance between clarity and conciseness?
changed this line in version 2 of the diff
- Resolved by Kristiaan Van den Eynde
- Resolved by Kristiaan Van den Eynde
- Resolved by Kristiaan Van den Eynde
added 226 commits
-
b016895f...15838422 - 223 commits from branch
project:11.x
- df0e2381 - Merge remote-tracking branch 'origin/11.x' into 3452631-replace-accessresultandif-and
- 8485b097 - Update return type to static
- 6eefb415 - Update param docs
Toggle commit list-
b016895f...15838422 - 223 commits from branch
- Resolved by Kristiaan Van den Eynde
- Resolved by Kristiaan Van den Eynde
- Resolved by Kristiaan Van den Eynde
- Resolved by Kristiaan Van den Eynde
- Resolved by Kristiaan Van den Eynde
added 3 commits
added 2 commits
- Resolved by Kristiaan Van den Eynde
- Resolved by Kristiaan Van den Eynde
added 2 commits