68 lines
1.5 KiB
YAML
68 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: []
|