Skip to content

Commit

Permalink
Change prettyPrint default values to true
Browse files Browse the repository at this point in the history
  • Loading branch information
jsor committed Nov 4, 2014
1 parent 4e4f46a commit db86701
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/EventListener/ExceptionConversionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ExceptionConversionListener implements EventSubscriberInterface
private $logger;

public function __construct(LoggerInterface $logger = null,
$prettyPrint = false,
$prettyPrint = true,
$debug = false)
{
$this->logger = $logger;
Expand Down
2 changes: 1 addition & 1 deletion src/EventListener/ResponseConversionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ResponseConversionListener implements EventSubscriberInterface
{
private $prettyPrint;

public function __construct($prettyPrint = false)
public function __construct($prettyPrint = true)
{
$this->prettyPrint = (bool) $prettyPrint;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ExceptionConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ExceptionConverter implements HttpKernelInterface

public function __construct(HttpKernelInterface $app,
LoggerInterface $logger = null,
$prettyPrint = false,
$prettyPrint = true,
$debug = false,
$passThroughCatch = false)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Response/CreatedResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class CreatedResponse extends HalResponse
{
public function __construct(Hal $hal, $headers = array(), $prettyPrint = false)
public function __construct(Hal $hal, $headers = array(), $prettyPrint = true)
{
parent::__construct($hal, 204, $headers, $prettyPrint);

Expand All @@ -15,7 +15,7 @@ public function __construct(Hal $hal, $headers = array(), $prettyPrint = false)
}
}

public static function create($hal = null, $status = 204, $headers = array(), $prettyPrint = false)
public static function create($hal = null, $status = 204, $headers = array(), $prettyPrint = true)
{
return new static($hal, $headers, $prettyPrint);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Response/HalResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class HalResponse extends Response
protected $requestFormat;
protected $prettyPrint;

public function __construct(Hal $hal, $status = 200, $headers = array(), $prettyPrint = false)
public function __construct(Hal $hal, $status = 200, $headers = array(), $prettyPrint = true)
{
parent::__construct(null, $status, $headers);

Expand All @@ -23,7 +23,7 @@ public function __construct(Hal $hal, $status = 200, $headers = array(), $pretty
$this->headers->set('Content-Type', 'application/hal+json');
}

public static function create($hal = null, $status = 200, $headers = array(), $prettyPrint = false)
public static function create($hal = null, $status = 200, $headers = array(), $prettyPrint = true)
{
return new static($hal, $status, $headers, $prettyPrint);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Response/VndErrorResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@

class VndErrorResponse extends HalResponse
{
public function __construct(Hal $hal, $status = 500, $headers = array(), $prettyPrint = false)
public function __construct(Hal $hal, $status = 500, $headers = array(), $prettyPrint = true)
{
parent::__construct($hal, $status, $headers, $prettyPrint);

$this->headers->set('Content-Type', 'application/vnd.error+json');
}

public static function create($hal = null, $status = 500, $headers = array(), $prettyPrint = false)
public static function create($hal = null, $status = 500, $headers = array(), $prettyPrint = true)
{
return new static($hal, $status, $headers, $prettyPrint);
}

public static function fromException(\Exception $exception, $prettyPrint = false, $debug = false)
public static function fromException(\Exception $exception, $prettyPrint = true, $debug = false)
{
$statusCode = 500;
$headers = [];
Expand Down

0 comments on commit db86701

Please sign in to comment.