diff --git a/composer.json b/composer.json index 3f2c5950..2a90156b 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,6 @@ "phpstan/phpstan": "^1.12", "phan/phan": "^5.4", "phpstan/extension-installer": "^1.4", - "phpstan/phpstan-strict-rules": "^1.6", "phpunit/phpunit": "^9", "phpstan/phpstan-deprecation-rules": "^1.2", "yamadashy/phpstan-friendly-formatter": "^1.1" diff --git a/www/admin/class_test.convert.colors.php b/www/admin/class_test.convert.colors.php index a4c980cb..6754aa51 100644 --- a/www/admin/class_test.convert.colors.php +++ b/www/admin/class_test.convert.colors.php @@ -54,7 +54,7 @@ function display(string $color, string $text, string $text_add): string ["{COLOR}", "{TEXT}", "{CSS}"], [ $color, - $text . ($text_add ? '
' . $text_add : ''), + $text . (!empty($text_add) ? '
' . $text_add : ''), $css ], $template diff --git a/www/admin/class_test.math.php b/www/admin/class_test.math.php index 287dc78f..d3af1f39 100644 --- a/www/admin/class_test.math.php +++ b/www/admin/class_test.math.php @@ -23,7 +23,6 @@ $log = new CoreLibs\Logging\Logging([ 'log_file_id' => $LOG_FILE_ID, 'log_per_date' => true, ]); -$_math = new CoreLibs\Convert\Math(); $math_class = 'CoreLibs\Convert\Math'; // define a list of from to color sets for conversion test @@ -35,13 +34,9 @@ print ""; print '
Class Test Master
'; print '

' . $PAGE_NAME . '

'; -print "FCEIL: " . $_math->fceil(5.1234567890, 5) . "
"; -print "FLOORP: " . $_math->floorp(5123456, -3) . "
"; -print "FLOORP: " . $_math->floorp(5123456, -10) . "
"; -print "INITNUMERIC: " . $_math->initNumeric('123') . "
"; - print "S-FCEIL: " . $math_class::fceil(5.1234567890, 5) . "
"; print "S-FLOORP: " . $math_class::floorp(5123456, -3) . "
"; +print "S-FLOORP: " . $math_class::floorp(5123456, -10) . "
"; print "S-INITNUMERIC: " . $math_class::initNumeric(123) . "
"; print "S-INITNUMERIC: " . $math_class::initNumeric(123.456) . "
"; print "S-INITNUMERIC: " . $math_class::initNumeric('123') . "
"; diff --git a/www/lib/CoreLibs/Convert/Color/CieXyz.php b/www/lib/CoreLibs/Convert/Color/CieXyz.php index d8fd927c..2784f3e8 100644 --- a/www/lib/CoreLibs/Convert/Color/CieXyz.php +++ b/www/lib/CoreLibs/Convert/Color/CieXyz.php @@ -264,7 +264,7 @@ class CieXyz private static function linRgbToXyzD65(RGB $rgb): XYZ { // if not linear, convert to linear - if (!$rgb->get('linear')) { + if (!(bool)$rgb->get('linear')) { $rgb = (new RGB($rgb->returnAsArray()))->toLinear(); } return new XYZ(self::convertArray(Math::multiplyMatrices(