:octocat: remove remaining instances of empty()

(cherry picked from commit 2b7c9b7020)
This commit is contained in:
smiley
2025-10-09 21:31:41 +02:00
parent 8104863841
commit b1efebb7c2
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ final class GenericGFPoly{
public function __construct(array $coefficients, ?int $degree = null){
$degree ??= 0;
if(empty($coefficients)){
if($coefficients === []){
throw new QRCodeException('arg $coefficients is empty');
}
+1 -1
View File
@@ -46,7 +46,7 @@ final class DecoderResult{
*/
public function __construct(?iterable $properties = null){
if(!empty($properties)){
if($properties !== null){
foreach($properties as $property => $value){
+1 -1
View File
@@ -56,7 +56,7 @@ final class Detector{
$alignmentPattern = null;
// Anything above version 1 has an alignment pattern
if(!empty($provisionalVersion->getAlignmentPattern())){
if($provisionalVersion->getAlignmentPattern() !== []){
// Guess where a "bottom right" finder pattern would have been
$bottomRightX = ($topRight->getX() - $topLeft->getX() + $bottomLeft->getX());
$bottomRightY = ($topRight->getY() - $topLeft->getY() + $bottomLeft->getY());
+1 -1
View File
@@ -134,7 +134,7 @@ class QREps extends QROutputAbstract{
foreach($paths as $M_TYPE => $path){
if(empty($path)){
if($path === []){
continue;
}
+2 -2
View File
@@ -74,7 +74,7 @@ class QRMarkupSVG extends QRMarkup{
protected function createMarkup(bool $saveToFile):string{
$svg = $this->header();
if(!empty($this->options->svgDefs)){
if($this->options->svgDefs !== ''){
$svg .= sprintf('<defs>%1$s%2$s</defs>%2$s', $this->options->svgDefs, $this->eol);
}
@@ -144,7 +144,7 @@ class QRMarkupSVG extends QRMarkup{
$path = implode($this->eol, $chonks);
if(empty($path)){
if($path === ''){
continue;
}