Skip to content

Commit

Permalink
Typed properties
Browse files Browse the repository at this point in the history
- Return typed propertis
- Set version.
- Update the chaneglogs
  • Loading branch information
deanblackborough committed Jun 16, 2020
1 parent 04cc6b2 commit 2f4daf4
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 16 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

The complete changelog for the Costs to Expect REST API, our changelog follows the format defined at https://keepachangelog.com/en/1.0.0/

## [2.11.1] - 2020-06-16
## [v2.11.2] - 2020-06-17
### Changed
- We have split calls to clear public and private cache keys.
- We only clear public cache keys when modifying a public resource type.
- We have updated the web.config; the web.config file was referring to PHP7.3.
- Added removed class type hints now that we are running PHP7.4.

## [v2.11.1] - 2020-06-16
### Added
- We have added an application cache for collections; we include the ETag header however we are not yet returning a 304.

Expand Down
2 changes: 1 addition & 1 deletion app/Request/Parameter/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
class Filter
{
private static $parameters = [];
private static array $parameters = [];

/**
* Check the URI for the filter parameter, if the format is valid split the
Expand Down
2 changes: 1 addition & 1 deletion app/Request/Parameter/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
class Request
{
private static $parameters = [];
private static array $parameters = [];

/**
* Fetch any GET parameters from the URI and alter the type if necessary
Expand Down
2 changes: 1 addition & 1 deletion app/Request/Parameter/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class Search
{
private static $fields = [];
private static array $fields = [];

/**
* Check the URI for the search parameter, if the format is valid split the
Expand Down
2 changes: 1 addition & 1 deletion app/Request/Parameter/Sort.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class Sort
{
private static $fields = [];
private static array $fields = [];

/**
* Check the URI for the sort parameter, if the format is valid split the
Expand Down
2 changes: 1 addition & 1 deletion app/Response/Cache/Key.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class Key
{
private $hash;
private Hash $hash;

public function __construct()
{
Expand Down
5 changes: 1 addition & 4 deletions app/Response/Header/Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
*/
class Header
{
/**
* @var array
*/
private $headers;
private array $headers;

public function __construct()
{
Expand Down
2 changes: 1 addition & 1 deletion app/Response/Header/Headers.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
class Headers
{
private $headers;
private Header $headers;

public function __construct()
{
Expand Down
5 changes: 3 additions & 2 deletions app/Rules/ResourceTypeName.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);

namespace App\Rules;

Expand All @@ -8,8 +9,8 @@

class ResourceTypeName implements Rule
{
private $user_id;
private $resource_type_id;
private int $user_id;
private ?int $resource_type_id;

/**
* Create a new rule instance.
Expand Down
2 changes: 1 addition & 1 deletion app/Utilities/Hash.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
class Hash
{
private $hashers;
private array $hashers;

public function __construct()
{
Expand Down
4 changes: 2 additions & 2 deletions config/api/app/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
declare(strict_types=1);

return [
'version'=> '2.11.1',
'version'=> '2.11.2',
'prefix' => 'v2',
'release_date' => '2020-06-16',
'release_date' => '2020-06-17',
'changelog' => [
'api' => '/v2/changelog',
'markdown' => 'https://github.com/costs-to-expect/api/blob/master/CHANGELOG.md'
Expand Down
4 changes: 4 additions & 0 deletions resources/views/welcome.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ function gtag(){dataLayer.push(arguments);}
<li>We have moved our `RoutePermission` utility class; the `Permission` class sits inside the `App\Request` namespace.</li>
<li>We have moved and simplified our `Parameter` classes; the `Parameter` classes sit inside the `App\Request` namespace.</li>
<li>We have moved and renamed the `RequestUtility` class; the `BodyValidation` class sits in the `App\Request` namespace.</li>
<li>We have split calls to clear public and private cache keys.</li>
<li>We only clear public cache keys when modifying a public resource type.</li>
<li>We have updated the web.config; the web.config file was referring to PHP7.3.</li>
<li>Added removed class type hints now that we are running PHP7.4.</li>
</ul>

<h3>Fixed</h3>
Expand Down

0 comments on commit 2f4daf4

Please sign in to comment.