[DOC-CVS] [doc-base] check-ci-without-jing: minor code cleanup

[email protected] (Jordi Kroon) Fri, 24 Jul 2026 13:52:47 +0000
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Jordi Kroon (jordikroon)
Date: 2026-07-24T15:52:39+02:00

Commit: https://github.com/php/doc-base/commit/555018e00be4ca3f471d2e3799dc0a7901488053
Raw diff: https://github.com/php/doc-base/commit/555018e00be4ca3f471d2e3799dc0a7901488053.diff

minor code cleanup

Changed paths:
  M  configure.php


Diff:

diff --git a/configure.php b/configure.php
index 2cba6feee2..fe7f54042d 100755
--- a/configure.php
+++ b/configure.php
@@ -429,8 +429,8 @@ function find_xml_files($path) // {{{
             break;
 
         case 'jing':
-            if (!in_array($v, ['auto', 'yes', 'no'])) {
-                errbox("Invalid value for --with-jing: {$v} (expected auto, yes or no)");
+            if (!in_array($v, ['auto', 'yes', 'no'], true)) {
+                errbox("Invalid value for --with-jing: $v (expected auto, yes or no)");
                 errors_are_bad(1);
             }
             $ac['JING'] = $v;
@@ -1002,15 +1002,13 @@ function xml_validate( $dom )
 
     $jing = $GLOBALS['ac']['JING'];
 
-    if ( $jing == 'auto' )
+    if ( $jing === 'auto' )
     {
-        $out = null;
-        $ret = null;
         exec( "java -version 2>&1" , $out , $ret );
-        $jing = $ret == 0 ? 'yes' : 'no';
+        $jing = $ret === 0 ? 'yes' : 'no';
     }
 
-    if ( $jing == 'yes' )
+    if ( $jing === 'yes' )
         xml_validate_jing();
     else
         xml_validate_libxml( $dom );
@@ -1023,8 +1021,6 @@ function xml_validate_jing()
 
     echo "Validating temp/manual.xml (jing)... ";
 
-    $out = null;
-    $ret = null;
     $schema = RNG_SCHEMA_FILE;
     $cmdJing = "java -Djdk.xml.totalEntitySizeLimit=300000 -jar {$srcdir}/docbook/jing.jar {$schema} {$idempath}";
     exec( $cmdJing , $out , $ret );
@@ -1032,7 +1028,7 @@ function xml_validate_jing()
     if ( ! is_array( $out ) )
         $out = [];
 
-    if ( $ret == 0 )
+    if ( !$ret )
     {
         echo "done.\n";
         return;