Skip to content

Commit 8afe830

Browse files
authored
Merge pull request #576 from nicoeg/fix-helpers
Fix missed references to removed helper functions
2 parents 741f6d1 + c53c1c9 commit 8afe830

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Tools/ResponseStrategies/ResponseCallStrategy.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Mpociot\ApiDoc\Tools\ResponseStrategies;
44

55
use Dingo\Api\Dispatcher;
6+
use Illuminate\Support\Str;
67
use Illuminate\Http\Request;
78
use Illuminate\Http\Response;
89
use Illuminate\Routing\Route;
@@ -330,7 +331,7 @@ protected function transformHeadersToServerVars(array $headers)
330331
$prefix = 'HTTP_';
331332
foreach ($headers as $name => $value) {
332333
$name = strtr(strtoupper($name), '-', '_');
333-
if (! starts_with($name, $prefix) && $name !== 'CONTENT_TYPE') {
334+
if (! Str::startsWith($name, $prefix) && $name !== 'CONTENT_TYPE') {
334335
$name = $prefix.$name;
335336
}
336337
$server[$name] = $value;

tests/Unit/RouteMatcherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function testRespectsPrefixesRuleForLaravelRouter()
102102
$routes = $this->matcher->getRoutesToBeDocumented($routeRules);
103103
$this->assertCount(4, $routes);
104104
foreach ($routes as $route) {
105-
$this->assertTrue(str_is('prefix1/*', $route['route']->uri()));
105+
$this->assertTrue(Str::is('prefix1/*', $route['route']->uri()));
106106
}
107107

108108
$routeRules[0]['match']['prefixes'] = ['prefix2/*'];

0 commit comments

Comments
 (0)