Use strict type hinting in all tests.
Todas las comprobaciones han sido exitosas
The build was successful.
Todas las comprobaciones han sido exitosas
The build was successful.
Este commit está contenido en:
@@ -1,6 +1,6 @@
|
|||||||
class Program {
|
class Program {
|
||||||
|
|
||||||
private function num2Roman($num) {
|
private function num2Roman(int $num) {
|
||||||
$n = intval($num);
|
$n = intval($num);
|
||||||
$result = '';
|
$result = '';
|
||||||
$lookup = array('M' => 1000, 'CM' => 900, 'D' => 500, 'CD' => 400,
|
$lookup = array('M' => 1000, 'CM' => 900, 'D' => 500, 'CD' => 400,
|
||||||
|
@@ -4,7 +4,7 @@ class Program {
|
|||||||
$this->b($this->a('First A'), $this->a('Second A'), $this->a('Third A'));
|
$this->b($this->a('First A'), $this->a('Second A'), $this->a('Third A'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function a($p) {
|
function a(string $p) {
|
||||||
$backtrace = debug_backtrace();
|
$backtrace = debug_backtrace();
|
||||||
if(isset($backtrace[0]['args'])) {
|
if(isset($backtrace[0]['args'])) {
|
||||||
var_export($backtrace[0]['args']);
|
var_export($backtrace[0]['args']);
|
||||||
@@ -14,7 +14,7 @@ class Program {
|
|||||||
return $p;
|
return $p;
|
||||||
}
|
}
|
||||||
|
|
||||||
function b($p1, $p2, $p3) {
|
function b(string $p1, string $p2, string $p3) {
|
||||||
print("$p1, $p2, $p3");
|
print("$p1, $p2, $p3");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@ final class Test {
|
|||||||
return $this->value;
|
return $this->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function set($value = 0) {
|
public function set(int $value = 0) {
|
||||||
$this->value = $value;
|
$this->value = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
class Unicode {
|
class Unicode {
|
||||||
|
|
||||||
public function unicon($str, $to_uni = true) {
|
public function unicon(string $str, bool $to_uni = true) {
|
||||||
$cp = array('А' => 'А', 'а' => 'а',
|
$cp = array('А' => 'А', 'а' => 'а',
|
||||||
"Б" => "Б", "б" => "б",
|
"Б" => "Б", "б" => "б",
|
||||||
"В" => "В", "в" => "в",
|
"В" => "В", "в" => "в",
|
||||||
|
@@ -12,7 +12,7 @@ class Program {
|
|||||||
print($this->概要 + "\n");
|
print($this->概要 + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
private function isUTF8($str) {
|
private function isUTF8(string $str) {
|
||||||
$b = 0;
|
$b = 0;
|
||||||
$c = 0;
|
$c = 0;
|
||||||
$bits = 0;
|
$bits = 0;
|
||||||
|
Referencia en una nueva incidencia
Block a user