Types   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 5
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BEAR\Resource;
6
7
use BEAR\Resource\Annotation\Embed;
8
use BEAR\Resource\Annotation\Link;
9
use BEAR\Resource\DataLoader\DataLoaderInterface;
10
use Ray\WebContextParam\Annotation\AbstractWebContextParam;
11
use ReflectionParameter;
12
13
/**
14
 * Type definitions for BEAR.Resource
15
 *
16
 * @phpcs:disable SlevomatCodingStandard.Commenting.DocCommentSpacing
17
 *
18
 * Domain Types
19
 * @psalm-type ResourceClassName = class-string<ResourceObject>
20
 *
21
 * Base Types
22
 * @psalm-type Query = array<string, mixed>
23
 * @psalm-type QueryList = list<Query>
24
 * @psalm-type StringList = list<string>
25
 * @psalm-type Body = array<array-key, mixed>
26
 * @psalm-type BodyOrStringList = array<Body|string>
27
 * @psalm-type Schema = array<array-key, mixed>
28
 * @psalm-type ObjectList = list<object>
29
 *
30
 * Options Method Types
31
 * @psalm-type ParameterMetadata = array{
32
 *     type?: string,
33
 *     description?: string,
34
 *     default?: string,
35
 *     in?: string
36
 * }
37
 * @psalm-type ParametersMap = array<string, ParameterMetadata>
38
 * @psalm-type RequiredParameterList = list<string>
39
 * @psalm-type OptionsResponse = array{
40
 *     parameters?: ParametersMap,
41
 *     required?: RequiredParameterList
42
 * }
43
 * @psalm-type OptionsDocumentation = array{
44
 *     summary?: string,
45
 *     description?: string
46
 * }
47
 * @psalm-type OptionsDocBlock = array{
48
 *     0: OptionsDocumentation,
49
 *     1: array<string, array{type: string, description?: string}>
50
 * }
51
 * @psalm-type DocBlockParams = array<string, array{type: string, description?: string}>
52
 * @psalm-type EmbedList = non-empty-list<Embed>
53
 * @psalm-type LinkList = non-empty-list<Link>
54
 * @psalm-type SchemaArray = non-empty-array<array-key, mixed>
55
 * @psalm-type OptionsMethodsResponse = array{
56
 *     summary?: string,
57
 *     description?: string,
58
 *     request?: OptionsResponse,
59
 *     links?: LinkList,
60
 *     embed?: EmbedList,
61
 *     schema?: SchemaArray
62
 * }
63
 * @psalm-type OptionsEntityBody = array<string, array<Body|string>>
64
 *
65
 * HTTP Request/Response Types
66
 * @psalm-type Headers = array<string, string>
67
 * @psalm-type HttpHeaders = array<string, string>
68
 * @psalm-type HttpBody = array<mixed>
69
 * @psalm-type HttpResponse = array{
70
 *     body: HttpBody,
71
 *     code: int,
72
 *     headers: HttpHeaders,
73
 *     view: string
74
 * }
75
 * @psalm-type RequestOptions = array<null>|array{
76
 *     body?: string,
77
 *     headers?: HttpHeaders
78
 * }
79
 *
80
 * HAL+JSON Types
81
 * @psalm-type HalLinkData = array{
82
 *     href: string,
83
 *     templated?: bool,
84
 *     type?: string,
85
 *     deprecation?: string,
86
 *     name?: string,
87
 *     profile?: string,
88
 *     title?: string,
89
 *     hreflang?: string
90
 * }
91
 * @psalm-type HalLinks = array<string, HalLinkData|list<HalLinkData>>
92
 *
93
 * Resource Metadata Types
94
 * @psalm-type PackageMetadata = array{
95
 *     vendor?: string,
96
 *     package?: string
97
 * }
98
 * @psalm-type ResourceObjectBody = array{
99
 *     0: ResourceObject,
100
 *     1: array<array-key, mixed>
101
 * }
102
 *
103
 * Link Relation Types
104
 * @psalm-type MethodUri = array{0: string, 1: string}
105
 *
106
 * Annotation Types
107
 * @psalm-type Annotations = array<class-string, object>
108
 * @psalm-type MethodAnnotations = array<string, Annotations>
109
 * @psalm-type WebContextParam = class-string
110
 * @psalm-type InsMap = array<string, string>
111
 *
112
 * Parameter/Injection Types
113
 * @psalm-type ParamMap = array<string, ParamInterface>
114
 * @psalm-type WebContextParamMap = array<string, AbstractWebContextParam>
115
 * @psalm-type SuperGlobalsMap = array<string, Query>
116
 * @psalm-type ReflectionParameterList = list<ReflectionParameter>
117
 * @psalm-type ReflectionParameterMap = array<string, ReflectionParameter>
118
 *
119
 * Request Types
120
 * @psalm-type RequestQuery = array<string, mixed>
121
 *
122
 * App/Module Types
123
 * @psalm-type MetaMap = array<string, Meta>
124
 * @psalm-type ClassNameList = list<class-string>
125
 * @psalm-type StatusMessageMap = array<int, string>
126
 *
127
 * DataLoader Types
128
 * @psalm-type DataLoaderQuery = array<string, string>
129
 * @psalm-type DataLoaderRow = array<string, mixed>
130
 * @psalm-type DataLoaderQueries = list<DataLoaderQuery>
131
 * @psalm-type DataLoaderRows = list<DataLoaderRow>
132
 * @psalm-type DataLoaderClass = class-string<DataLoaderInterface>
133
 *
134
 * @phpcs:enable
135
 */
136
final class Types
137
{
138
    /** @codeCoverageIgnore */
139
    private function __construct()
140
    {
141
    }
142
}
143