@@ -36,9 +36,9 @@ |
||
| 36 | 36 | protected const DIRECTIVES = []; |
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | - * @param Template $document |
|
| 40 | - * @return string |
|
| 41 | - */ |
|
| 39 | + * @param Template $document |
|
| 40 | + * @return string |
|
| 41 | + */ |
|
| 42 | 42 | protected function compile(Template $document): string |
| 43 | 43 | { |
| 44 | 44 | $compiler = new Compiler(); |
@@ -30,7 +30,6 @@ |
||
| 30 | 30 | * |
| 31 | 31 | * |
| 32 | 32 | * @param bool|string $implode Implode header lines, false to return header as array. |
| 33 | - |
|
| 34 | 33 | * @return string|array |
| 35 | 34 | */ |
| 36 | 35 | public function get(string $name, $default = null, $implode = ',') |
@@ -132,12 +132,12 @@ |
||
| 132 | 132 | { |
| 133 | 133 | $body = 'Example body'; |
| 134 | 134 | $response = $this->createResponse(200, [], $body) |
| 135 | - ->withHeader('X-Test', '1') |
|
| 136 | - ->withAddedHeader('X-Test', '2') |
|
| 137 | - ->withAddedHeader('X-Test', '3; 3.5') |
|
| 138 | - ->withHeader('Cookie-Set', '1') |
|
| 139 | - ->withAddedHeader('cookie-Set', '2') |
|
| 140 | - ->withAddedHeader('Cookie-set', '3'); |
|
| 135 | + ->withHeader('X-Test', '1') |
|
| 136 | + ->withAddedHeader('X-Test', '2') |
|
| 137 | + ->withAddedHeader('X-Test', '3; 3.5') |
|
| 138 | + ->withHeader('Cookie-Set', '1') |
|
| 139 | + ->withAddedHeader('cookie-Set', '2') |
|
| 140 | + ->withAddedHeader('Cookie-set', '3'); |
|
| 141 | 141 | |
| 142 | 142 | (new SapiEmitter())->emit($response); |
| 143 | 143 | $this->assertEquals(200, $this->getResponseCode()); |
@@ -20,151 +20,151 @@ |
||
| 20 | 20 | interface ReaderInterface |
| 21 | 21 | { |
| 22 | 22 | /** |
| 23 | - * Gets a list of attributes and/or annotations applied to a class. |
|
| 24 | - * |
|
| 25 | - * @template T |
|
| 26 | - * |
|
| 23 | + * Gets a list of attributes and/or annotations applied to a class. |
|
| 24 | + * |
|
| 25 | + * @template T |
|
| 26 | + * |
|
| 27 | 27 | * @param ReflectionClass $class The reflection instance of the class from |
| 28 | 28 | which the class annotations should be read. |
| 29 | - * @param class-string<T>|null $name The class name of the annotation |
|
| 30 | - * and/or attribute. |
|
| 31 | - * |
|
| 32 | - * @return iterable<T> A list of class annotations and/or attributes. |
|
| 33 | - */ |
|
| 29 | + * @param class-string<T>|null $name The class name of the annotation |
|
| 30 | + * and/or attribute. |
|
| 31 | + * |
|
| 32 | + * @return iterable<T> A list of class annotations and/or attributes. |
|
| 33 | + */ |
|
| 34 | 34 | public function getClassMetadata(ReflectionClass $class, string $name = null): iterable; |
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | - * Gets the attribute or annotation applied to a class. |
|
| 38 | - * |
|
| 39 | - * @template T |
|
| 40 | - * |
|
| 37 | + * Gets the attribute or annotation applied to a class. |
|
| 38 | + * |
|
| 39 | + * @template T |
|
| 40 | + * |
|
| 41 | 41 | * @param ReflectionClass $class The reflection instance of the class from |
| 42 | 42 | which the class annotations should be read. |
| 43 | - * @param class-string<T> $name The class name of the annotation |
|
| 44 | - * and/or attribute. |
|
| 45 | - * |
|
| 46 | - * @return T|null The annotation/attribute or {@see null}, if the requested |
|
| 47 | - * annotation does not exist. |
|
| 48 | - */ |
|
| 43 | + * @param class-string<T> $name The class name of the annotation |
|
| 44 | + * and/or attribute. |
|
| 45 | + * |
|
| 46 | + * @return T|null The annotation/attribute or {@see null}, if the requested |
|
| 47 | + * annotation does not exist. |
|
| 48 | + */ |
|
| 49 | 49 | public function firstClassMetadata(ReflectionClass $class, string $name): ?object; |
| 50 | 50 | |
| 51 | 51 | /** |
| 52 | - * Gets a list of attributes and/or annotations applied to a function |
|
| 53 | - * or method. |
|
| 54 | - * |
|
| 55 | - * @template T |
|
| 56 | - * |
|
| 52 | + * Gets a list of attributes and/or annotations applied to a function |
|
| 53 | + * or method. |
|
| 54 | + * |
|
| 55 | + * @template T |
|
| 56 | + * |
|
| 57 | 57 | * @param ReflectionFunctionAbstract $function The reflection instance of |
| 58 | 58 | the function or method from which the function annotations should |
| 59 | 59 | be read. |
| 60 | - * @param class-string<T>|null $name The class name of the annotation |
|
| 61 | - * and/or attribute. |
|
| 62 | - * |
|
| 63 | - * @return iterable<T> A list of function annotations and/or attributes. |
|
| 64 | - */ |
|
| 60 | + * @param class-string<T>|null $name The class name of the annotation |
|
| 61 | + * and/or attribute. |
|
| 62 | + * |
|
| 63 | + * @return iterable<T> A list of function annotations and/or attributes. |
|
| 64 | + */ |
|
| 65 | 65 | public function getFunctionMetadata(ReflectionFunctionAbstract $function, string $name = null): iterable; |
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | - * Gets the attribute or annotation applied to a function or method. |
|
| 69 | - * |
|
| 70 | - * @template T |
|
| 71 | - * |
|
| 68 | + * Gets the attribute or annotation applied to a function or method. |
|
| 69 | + * |
|
| 70 | + * @template T |
|
| 71 | + * |
|
| 72 | 72 | * @param ReflectionFunctionAbstract $function The reflection instance of |
| 73 | 73 | the function or method from which the function annotations should |
| 74 | 74 | be read. |
| 75 | - * @param class-string<T> $name The class name of the annotation and/or |
|
| 76 | - * attribute. |
|
| 77 | - * |
|
| 78 | - * @return T|null The annotation/attribute or {@see null}, if the requested |
|
| 79 | - * annotation does not exist. |
|
| 80 | - */ |
|
| 75 | + * @param class-string<T> $name The class name of the annotation and/or |
|
| 76 | + * attribute. |
|
| 77 | + * |
|
| 78 | + * @return T|null The annotation/attribute or {@see null}, if the requested |
|
| 79 | + * annotation does not exist. |
|
| 80 | + */ |
|
| 81 | 81 | public function firstFunctionMetadata(ReflectionFunctionAbstract $function, string $name): ?object; |
| 82 | 82 | |
| 83 | 83 | /** |
| 84 | - * Gets a list of attributes and/or annotations applied to a class property. |
|
| 85 | - * |
|
| 86 | - * @template T |
|
| 87 | - * |
|
| 84 | + * Gets a list of attributes and/or annotations applied to a class property. |
|
| 85 | + * |
|
| 86 | + * @template T |
|
| 87 | + * |
|
| 88 | 88 | * @param ReflectionProperty $property The reflection instance of the |
| 89 | 89 | property from which the property annotations should be read. |
| 90 | - * @param class-string<T>|null $name The class name of the annotation |
|
| 91 | - * and/or attribute. |
|
| 92 | - * |
|
| 93 | - * @return iterable<T> A list of property annotations and/or attributes. |
|
| 94 | - */ |
|
| 90 | + * @param class-string<T>|null $name The class name of the annotation |
|
| 91 | + * and/or attribute. |
|
| 92 | + * |
|
| 93 | + * @return iterable<T> A list of property annotations and/or attributes. |
|
| 94 | + */ |
|
| 95 | 95 | public function getPropertyMetadata(ReflectionProperty $property, string $name = null): iterable; |
| 96 | 96 | |
| 97 | 97 | /** |
| 98 | - * Gets the attribute or annotation applied to a property. |
|
| 99 | - * |
|
| 100 | - * @template T |
|
| 101 | - * |
|
| 98 | + * Gets the attribute or annotation applied to a property. |
|
| 99 | + * |
|
| 100 | + * @template T |
|
| 101 | + * |
|
| 102 | 102 | * @param ReflectionProperty $property The reflection instance of the |
| 103 | 103 | property from which the property annotations should be read. |
| 104 | - * @param class-string<T> $name The class name of the annotation and/or |
|
| 105 | - * attribute. |
|
| 106 | - * |
|
| 107 | - * @return T|null The annotation/attribute or {@see null}, if the requested |
|
| 108 | - * annotation does not exist. |
|
| 109 | - */ |
|
| 104 | + * @param class-string<T> $name The class name of the annotation and/or |
|
| 105 | + * attribute. |
|
| 106 | + * |
|
| 107 | + * @return T|null The annotation/attribute or {@see null}, if the requested |
|
| 108 | + * annotation does not exist. |
|
| 109 | + */ |
|
| 110 | 110 | public function firstPropertyMetadata(ReflectionProperty $property, string $name): ?object; |
| 111 | 111 | |
| 112 | 112 | /** |
| 113 | - * Gets a list of attributes and/or annotations applied to a class constant. |
|
| 114 | - * |
|
| 115 | - * @template T |
|
| 116 | - * |
|
| 113 | + * Gets a list of attributes and/or annotations applied to a class constant. |
|
| 114 | + * |
|
| 115 | + * @template T |
|
| 116 | + * |
|
| 117 | 117 | * @param ReflectionClassConstant $constant The reflection instance of the |
| 118 | 118 | class constant from which the constant annotations should be read. |
| 119 | - * @param class-string<T>|null $name The class name of the annotation |
|
| 120 | - * and/or attribute. |
|
| 121 | - * |
|
| 122 | - * @return iterable<T> A list of constant annotations and/or attributes. |
|
| 123 | - */ |
|
| 119 | + * @param class-string<T>|null $name The class name of the annotation |
|
| 120 | + * and/or attribute. |
|
| 121 | + * |
|
| 122 | + * @return iterable<T> A list of constant annotations and/or attributes. |
|
| 123 | + */ |
|
| 124 | 124 | public function getConstantMetadata(ReflectionClassConstant $constant, string $name = null): iterable; |
| 125 | 125 | |
| 126 | 126 | /** |
| 127 | - * Gets the attribute or annotation applied to a class constant. |
|
| 128 | - * |
|
| 129 | - * @template T |
|
| 130 | - * |
|
| 127 | + * Gets the attribute or annotation applied to a class constant. |
|
| 128 | + * |
|
| 129 | + * @template T |
|
| 130 | + * |
|
| 131 | 131 | * @param ReflectionClassConstant $constant The reflection instance of the |
| 132 | 132 | class constant from which the constant annotations should be read. |
| 133 | - * @param class-string<T> $name The class name of the annotation and/or |
|
| 134 | - * attribute. |
|
| 135 | - * |
|
| 136 | - * @return T|null The annotation/attribute or {@see null}, if the requested |
|
| 137 | - * annotation does not exist. |
|
| 138 | - */ |
|
| 133 | + * @param class-string<T> $name The class name of the annotation and/or |
|
| 134 | + * attribute. |
|
| 135 | + * |
|
| 136 | + * @return T|null The annotation/attribute or {@see null}, if the requested |
|
| 137 | + * annotation does not exist. |
|
| 138 | + */ |
|
| 139 | 139 | public function firstConstantMetadata(ReflectionClassConstant $constant, string $name): ?object; |
| 140 | 140 | |
| 141 | 141 | /** |
| 142 | - * Gets a list of attributes and/or annotations applied to a parameter of |
|
| 143 | - * a function or method. |
|
| 144 | - * |
|
| 145 | - * @template T |
|
| 146 | - * |
|
| 142 | + * Gets a list of attributes and/or annotations applied to a parameter of |
|
| 143 | + * a function or method. |
|
| 144 | + * |
|
| 145 | + * @template T |
|
| 146 | + * |
|
| 147 | 147 | * @param ReflectionParameter $parameter The reflection instance of the |
| 148 | 148 | parameter from which the parameter annotations should be read. |
| 149 | - * @param class-string<T>|null $name The class name of the annotation |
|
| 150 | - * and/or attribute. |
|
| 151 | - * |
|
| 152 | - * @return iterable<T> A list of parameter annotations and/or attributes. |
|
| 153 | - */ |
|
| 149 | + * @param class-string<T>|null $name The class name of the annotation |
|
| 150 | + * and/or attribute. |
|
| 151 | + * |
|
| 152 | + * @return iterable<T> A list of parameter annotations and/or attributes. |
|
| 153 | + */ |
|
| 154 | 154 | public function getParameterMetadata(ReflectionParameter $parameter, string $name = null): iterable; |
| 155 | 155 | |
| 156 | 156 | /** |
| 157 | - * Gets the attribute or annotation applied to a function's parameter. |
|
| 158 | - * |
|
| 159 | - * @template T |
|
| 160 | - * |
|
| 157 | + * Gets the attribute or annotation applied to a function's parameter. |
|
| 158 | + * |
|
| 159 | + * @template T |
|
| 160 | + * |
|
| 161 | 161 | * @param ReflectionParameter $parameter The reflection instance of the |
| 162 | 162 | parameter from which the parameter annotations should be read. |
| 163 | - * @param class-string<T> $name The class name of the annotation and/or |
|
| 164 | - * attribute. |
|
| 165 | - * |
|
| 166 | - * @return T|null The annotation/attribute or {@see null}, if the requested |
|
| 167 | - * annotation does not exist. |
|
| 168 | - */ |
|
| 163 | + * @param class-string<T> $name The class name of the annotation and/or |
|
| 164 | + * attribute. |
|
| 165 | + * |
|
| 166 | + * @return T|null The annotation/attribute or {@see null}, if the requested |
|
| 167 | + * annotation does not exist. |
|
| 168 | + */ |
|
| 169 | 169 | public function firstParameterMetadata(ReflectionParameter $parameter, string $name): ?object; |
| 170 | 170 | } |