strict typing and php 7.1

This commit is contained in:
Robin Appelman 2019-02-20 15:43:12 +01:00
commit e8cf5e7644
25 changed files with 43 additions and 36 deletions

View file

@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/**
* @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/**
* @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/**
* @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl>
*
@ -60,7 +60,7 @@ class Operator {
* @param string $type
* @param array $arguments
*/
public function __construct($type = '', array $arguments = []) {
public function __construct(string $type = '', array $arguments = []) {
$this->type = $type;
$this->arguments = $arguments;
}

View file

@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/**
* @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl>
*
@ -46,7 +46,7 @@ class Order {
* @param SearchPropertyDefinition $property
* @param string $order
*/
public function __construct(SearchPropertyDefinition $property, $order) {
public function __construct(SearchPropertyDefinition $property, string $order) {
$this->property = $property;
$this->order = $order;
}

View file

@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/**
* @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/**
* @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl>
*
@ -52,7 +52,7 @@ class Scope {
* @param int|string $depth
* @param string|null $path
*/
public function __construct($href = '', $depth = 1, $path = null) {
public function __construct(string $href = '', $depth = 1, string $path = null) {
$this->href = $href;
$this->depth = $depth;
$this->path = $path;