Passed
Push — master ( 7ddfc7...8dcdb6 )
by Jakub
01:29
created

src/RssResponse.php (1 issue)

Severity
1
<?php
2
declare(strict_types=1);
3
4
namespace Nexendrie\Rss;
5
6
use Nette\Http\IRequest;
7
use Nette\Http\IResponse;
8
9
/**
10
 * RSS channel response
11
 *
12
 * @author Jakub Konečný
13
 *
14
 * @property-read string $source
15
 */
16 1
final class RssResponse implements \Nette\Application\IResponse {
17
  /** @var string */
18
  private $source;
19
  
20 1
  use \Nette\SmartObject;
21
  
22
  public function __construct(string $source) {
23 1
    $this->source = $source;
24 1
  }
25
  
26
  public function getSource(): string {
27 1
    return $this->source;
28
  }
29
  
30
  public function send(IRequest $httpRequest, IResponse $httpResponse): void {
1 ignored issue
show
The method parameter $httpRequest is never used
Loading history...
31 1
    $httpResponse->setContentType("application/rss+xml");
32 1
    echo $this->source;
33 1
  }
34
}
35
?>