FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
fp4php/src/Bindable.php at master · fp4php/fp4php · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
fp4php
/
fp4php
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
8
Code
Issues
10
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
fp4php
/
src
/
Bindable.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (25 loc) · 636 Bytes
Breadcrumbs
fp4php
/
src
/
Bindable.php
Copy path
File metadata and controls
31 lines (25 loc) · 636 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
declare
(strict_types=
1
);
namespace
Fp4
\
PHP
;
use
Fp4
\
PHP
\
PsalmIntegration
\
Module
\
Bindable
\
BindableGetReturnTypeProvider
;
/**
* @template-covariant T of object
* @psalm-immutable
*/
final
class
Bindable
{
public
function
__construct
(
public
readonly
array
$
context
= [],
) {}
/**
* Type will be inferred by {@see BindableGetReturnTypeProvider} plugin hook.
*/
public
function
__get
(
string
$
name
):
mixed
{
return
$
this
->
context
[
$
name
];
}
public
function
with
(
string
$
name
,
mixed
$
value
):
self
{
return
new
self
([...
$
this
->
context
,
$
name
=>
$
value
]);
}
}
Back
|
FazBrowse Home
|
New Git URL