src/Extracting/Strategies/Responses/UseApiResourceTags.php 1 location
|
@@ 184-193 (lines=10) @@
|
181 |
|
* |
182 |
|
* @return Tag|null |
183 |
|
*/ |
184 |
|
private function getApiResourceTag(array $tags) |
185 |
|
{ |
186 |
|
$apiResourceTags = array_values( |
187 |
|
array_filter($tags, function ($tag) { |
188 |
|
return ($tag instanceof Tag) && in_array(strtolower($tag->getName()), ['apiresource', 'apiresourcecollection']); |
189 |
|
}) |
190 |
|
); |
191 |
|
|
192 |
|
return Arr::first($apiResourceTags); |
193 |
|
} |
194 |
|
} |
195 |
|
|
src/Extracting/TransformerHelpers.php 1 location
|
@@ 107-116 (lines=10) @@
|
104 |
|
* |
105 |
|
* @return Tag|null |
106 |
|
*/ |
107 |
|
private function getTransformerTag(array $tags) |
108 |
|
{ |
109 |
|
$transformerTags = array_values( |
110 |
|
array_filter($tags, function ($tag) { |
111 |
|
return ($tag instanceof Tag) && in_array(strtolower($tag->getName()), ['transformer', 'transformercollection']); |
112 |
|
}) |
113 |
|
); |
114 |
|
|
115 |
|
return Arr::first($transformerTags); |
116 |
|
} |
117 |
|
} |
118 |
|
|