Типы для php-lint v2

This commit is contained in:
origami11 2021-02-22 14:07:51 +03:00
parent f570da257d
commit 6173eb4892
31 changed files with 83 additions and 76 deletions

View file

@ -111,7 +111,7 @@ class Tools_SQLStatementExtractor {
if ($check === "" || $check === $string) {
return true;
} else {
return (strpos($string, $check) === 0) ? true : false;
return (strpos($string, $check) === 0);
}
}
@ -121,11 +121,11 @@ class Tools_SQLStatementExtractor {
* @param string $string The string to check in (haystack).
* @return boolean True if $string ends with $check, or they are equal, or $check is empty.
*/
protected static function endsWith(/*.string.*/$check, $string) {
protected static function endsWith($check/*: string*/, $string) {
if ($check === "" || $check === $string) {
return true;
} else {
return (strpos(strrev($string), strrev($check)) === 0) ? true : false;
return (strpos(strrev($string), strrev($check)) === 0);
}
}

View file

@ -26,7 +26,7 @@ class Tools_TemplateImage
'miriad' => 'MyriadPro-Cond.ttf',
'miriadbd' => 'MyriadPro-BoldCond.ttf'
);
);
protected $src;
protected $context = array();
@ -35,6 +35,8 @@ class Tools_TemplateImage
protected $image;
protected $prepare = true;
public $debug = false;
public $filename;
public $resource;
function __construct ($template = false)
{
@ -116,7 +118,7 @@ class Tools_TemplateImage
return "";
}
function imageText($text, $value)
function imageText($text, $value/*: stdClass*/)
{
assert(is_string($text));