Use strict type hinting in all tests.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2018-09-14 21:32:08 +02:00
parent 8b48786f29
commit ca00cadba7
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
5 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
class Program {
private function num2Roman($num) {
private function num2Roman(int $num) {
$n = intval($num);
$result = '';
$lookup = array('M' => 1000, 'CM' => 900, 'D' => 500, 'CD' => 400,

View File

@ -4,7 +4,7 @@ class Program {
$this->b($this->a('First A'), $this->a('Second A'), $this->a('Third A'));
}
function a($p) {
function a(string $p) {
$backtrace = debug_backtrace();
if(isset($backtrace[0]['args'])) {
var_export($backtrace[0]['args']);
@ -14,7 +14,7 @@ class Program {
return $p;
}
function b($p1, $p2, $p3) {
function b(string $p1, string $p2, string $p3) {
print("$p1, $p2, $p3");
}

View File

@ -17,7 +17,7 @@ final class Test {
return $this->value;
}
public function set($value = 0) {
public function set(int $value = 0) {
$this->value = $value;
}
}

View File

@ -1,6 +1,6 @@
class Unicode {
public function unicon($str, $to_uni = true) {
public function unicon(string $str, bool $to_uni = true) {
$cp = array('А' => 'А', 'а' => 'а',
"Б" => "Б", "б" => "б",
"В" => "В", "в" => "в",

View File

@ -12,7 +12,7 @@ class Program {
print($this->概要 + "\n");
}
private function isUTF8($str) {
private function isUTF8(string $str) {
$b = 0;
$c = 0;
$bits = 0;