PHPCS: is_string() → \is_string(), is_array() → \is_array(), etc.
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3570564. --> Reported by: [wim leers](https://www.drupal.org/user/99777) Related to !634 >>> <h3 id="overview">Overview</h3> <p>Expand what <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3567950" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3567950</a></span> did.</p> <h3 id="proposed-resolution">Proposed resolution</h3> <ol> <li>Add these functions (all the <code>is_*()</code> functions listed at <a href="https://www.php.net/manual/en/ref.var.php">https://www.php.net/manual/en/ref.var.php</a>) to the list of global functions that must be fully qualified, to Canvas' <code>phpcs.xml</code>:<br> <pre>&nbsp; &lt;rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions"&gt;<br>&nbsp;&nbsp;&nbsp; &lt;properties&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- @todo Keep expanding this list until it applies to all global functions. --&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="include" type="array" value="assert,sprintf" /&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/properties&gt;<br>&nbsp; &lt;/rule&gt;</pre></li> <li>Update the code until CI is green. Updating the existing codebase is easy: simple search &amp; replace works fine. <p>For example:<br> <img src="https://www.drupal.org/files/issues/2026-01-16/Screenshot%202026-01-16%20at%202.27.31%E2%80%AFPM.png"></p> <p>Two replace actions sufficed:</p> <ol> <li><code> sprintf(</code> &rarr; <code> \sprintf(</code> (note the leading space) </li><li><code>(sprintf(</code> &rarr; <code>(\sprintf(</code> </li></ol> </li></ol> <h3 id="ui-changes">User interface changes</h3> <p>None.</p> > Related issue: [Issue #3567950](https://www.drupal.org/node/3567950)
issue