Skip to content

Commit a5bf1f7

Browse files
committed
fix namespaces in examples
1 parent 3674048 commit a5bf1f7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The Decoration Repo Provides 3 Factories which instantiate the Decorators. They
4242
<?php
4343

4444
use Nyholm\Psr7\Factory\Psr17Factory;
45-
use Slim\Http\Decorators\Factory\DecoratedResponseFactory;
45+
use Slim\Http\Factory\DecoratedResponseFactory;
4646

4747
$nyholmFactory = new Psr17Factory();
4848

@@ -55,8 +55,8 @@ $nyholmFactory = new Psr17Factory();
5555
$decoratedResponseFactory = new DecoratedResponseFactory($nyholmFactory, $nyholmFactory);
5656

5757
/**
58-
* @var \Slim\Http\Decorators\DecoratedResponse $response
59-
* The returned variable is a DecoratedResponse which has methods like withJson()
58+
* @var \Slim\Http\Decorators\ResponseDecorator $response
59+
* The returned variable is a ResponseDecorator which has methods like withJson()
6060
*/
6161
$response = $decoratedResponseFactory->createResponse(200, 'OK');
6262
$response = $response->withJson(['data' => [1, 2, 3]]);
@@ -70,7 +70,7 @@ $response = $response->withJson(['data' => [1, 2, 3]]);
7070

7171
use Zend\Diactoros\ResponseFactory;
7272
use Zend\Diactoros\StreamFactory;
73-
use Slim\Http\Decorators\Factory\DecoratedResponseFactory;
73+
use Slim\Http\Factory\DecoratedResponseFactory;
7474

7575
$responseFactory = new ResponseFactory();
7676
$streamFactory = new StreamFactory();
@@ -83,8 +83,8 @@ $streamFactory = new StreamFactory();
8383
$decoratedResponseFactory = new DecoratedResponseFactory($responseFactory, $streamFactory);
8484

8585
/**
86-
* @var \Slim\Http\Decorators\DecoratedResponse $response
87-
* The returned variable is a DecoratedResponse which has methods like withJson()
86+
* @var \Slim\Http\Decorators\ResponseDecorator $response
87+
* The returned variable is a ResponseDecorator which has methods like withJson()
8888
*/
8989
$response = $decoratedResponseFactory->createResponse(200, 'OK');
9090
$response = $response->withJson(['data' => [1, 2, 3]]);

0 commit comments

Comments
 (0)