platform/api/laravel/Conditionable/Traits/Conditionable.yaml
2024-09-02 10:44:11 -07:00

67 lines
1.5 KiB
YAML

name: Conditionable
class_comment: null
dependencies:
- name: Closure
type: class
source: Closure
- name: HigherOrderWhenProxy
type: class
source: Illuminate\Support\HigherOrderWhenProxy
properties: []
methods:
- name: when
visibility: public
parameters:
- name: value
default: 'null'
- name: callback
default: 'null'
- name: default
default: 'null'
comment: '# * Apply the callback if the given "value" is (or resolves to) truthy.
# *
# * @template TWhenParameter
# * @template TWhenReturnType
# *
# * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
# * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback
# * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default
# * @return $this|TWhenReturnType'
- name: unless
visibility: public
parameters:
- name: value
default: 'null'
- name: callback
default: 'null'
- name: default
default: 'null'
comment: '# * Apply the callback if the given "value" is (or resolves to) falsy.
# *
# * @template TUnlessParameter
# * @template TUnlessReturnType
# *
# * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value
# * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback
# * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default
# * @return $this|TUnlessReturnType'
traits:
- Closure
- Illuminate\Support\HigherOrderWhenProxy
interfaces: []