Skip to content

Commit

Permalink
Merge pull request #414 from PHPCSStandards/docs-website/update-docs
Browse files Browse the repository at this point in the history
Docs website: update for release of PHPCSUtils 1.0.0-rc1
  • Loading branch information
jrfnl committed Dec 27, 2022
2 parents ee693aa + 0fc7727 commit 289fa92
Show file tree
Hide file tree
Showing 13 changed files with 236 additions and 3,800 deletions.
1 change: 1 addition & 0 deletions PHPCSUtils/Tokens/Collections.php
Expand Up @@ -25,6 +25,7 @@
* @since 1.0.0-alpha4 Dropped support for PHPCS < 3.7.1.
* @since 1.0.0-alpha4 Direct property access is deprecated for forward-compatibility reasons.
* Use the methods of the same name as the property instead.
* @since 1.0.0-rc1 Direct property access has been removed.
*
* @method static array alternativeControlStructureSyntaxes() Tokens for control structures which can use the
* alternative control structure syntax.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
@@ -1,6 +1,6 @@
---
title: PHPCSUtils
description: "PHPCSUtils: A suite of utility functions for use with PHP_CodeSniffer."
description: "PHPCSUtils: A suite of utility functions for use with PHP_CodeSniffer"
anchor: home
permalink: /
seo:
Expand Down
2,927 changes: 150 additions & 2,777 deletions docs/phpdoc/classes/PHPCSUtils-Tokens-Collections.html

Large diffs are not rendered by default.

118 changes: 2 additions & 116 deletions docs/phpdoc/classes/PHPCSUtils-Utils-ControlStructures.html
Expand Up @@ -186,13 +186,6 @@ <h3 id="toc">
</dt>
<dd>Retrieve the exception(s) being caught in a CATCH condition.</dd>

<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/PHPCSUtils-Utils-ControlStructures.html#method_getDeclareScopeOpenClose">getDeclareScopeOpenClose()</a>
<span>
&nbsp;: array&lt;string|int, mixed&gt;|false </span>
</dt>
<dd>Get the scope opener and closer for a DECLARE statement.</dd>

<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/PHPCSUtils-Utils-ControlStructures.html#method_hasBody">hasBody()</a>
<span>
Expand Down Expand Up @@ -233,7 +226,7 @@ <h4 class="phpdocumentor-element__name" id="method_getCaughtExceptions">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="PHPCSUtils/Utils/ControlStructures.php"><a href="files/phpcsutils-utils-controlstructures.html"><abbr title="PHPCSUtils/Utils/ControlStructures.php">ControlStructures.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">278</span>
<span class="phpdocumentor-element-found-in__line">221</span>

</aside>

Expand Down Expand Up @@ -329,113 +322,6 @@ <h5 class="phpdocumentor-return-value__heading">Return values</h5>
</section>


</article>
<article
class="phpdocumentor-element
-method
-public
-deprecated -static "
>
<h4 class="phpdocumentor-element__name" id="method_getDeclareScopeOpenClose">
getDeclareScopeOpenClose()
<a href="classes/PHPCSUtils-Utils-ControlStructures.html#method_getDeclareScopeOpenClose" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="PHPCSUtils/Utils/ControlStructures.php"><a href="files/phpcsutils-utils-controlstructures.html"><abbr title="PHPCSUtils/Utils/ControlStructures.php">ControlStructures.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">224</span>

</aside>

<p class="phpdocumentor-summary">Get the scope opener and closer for a DECLARE statement.</p>

<code class="phpdocumentor-code phpdocumentor-signature -deprecated">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">getDeclareScopeOpenClose</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><abbr title="\PHP_CodeSniffer\Files\File">File</abbr>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$phpcsFile</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$stackPtr</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;|false</span></code>

<section class="phpdocumentor-description"><p>A <code class="prettyprint">declare</code> statement can be:</p>
<ul>
<li>applied to the rest of the file, like <code class="prettyprint">declare(ticks=1);</code>
</li>
<li>applied to a limited scope using curly braces;</li>
<li>applied to a limited scope using the alternative control structure syntax.</li>
</ul>
<p>In the first case, the statement - correctly - won't have a scope opener/closer.
In the second case, the statement will have the scope opener/closer indexes.
In the last case, due to a bug in the PHPCS Tokenizer, it won't have the scope opener/closer indexes,
while it really should. This bug was fixed in PHPCS 3.5.4.</p>
</section>

<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$phpcsFile</span>
: <span class="phpdocumentor-signature__argument__return-type"><abbr title="\PHP_CodeSniffer\Files\File">File</abbr></span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The file being scanned.</p>
</section>

</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$stackPtr</span>
: <span class="phpdocumentor-signature__argument__return-type">int</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The position of the token we are checking.</p>
</section>

</dd>
</dl>


<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">link</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<a class="phpdocumentor-tag-link" href="https://github.com/squizlabs/PHP_CodeSniffer/pull/2843"> <p>PHPCS PR #2843</p>
</a>

</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">since</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link">1.0.0</span>


</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">deprecated</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link">1.0.0-alpha4</span>

<section class="phpdocumentor-description"><p>Check the scope_opener/scope_closer instead.</p>
</section>

</dd>
</dl>

<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;|false</span>
&mdash;
<section class="phpdocumentor-description"><p>An array with the token pointers; or <code class="prettyprint">FALSE</code> if not a <code class="prettyprint">DECLARE</code> token
or if the opener/closer could not be determined.
The format of the array return value is:</p>
<pre class="prettyprint"><code class="language-php">array(
'opener' =&gt; integer, // Stack pointer to the scope opener.
'closer' =&gt; integer, // Stack pointer to the scope closer.
)
</code></pre>
</section>


</article>
<article
class="phpdocumentor-element
Expand Down Expand Up @@ -550,7 +436,7 @@ <h4 class="phpdocumentor-element__name" id="method_isElseIf">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="PHPCSUtils/Utils/ControlStructures.php"><a href="files/phpcsutils-utils-controlstructures.html"><abbr title="PHPCSUtils/Utils/ControlStructures.php">ControlStructures.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">153</span>
<span class="phpdocumentor-element-found-in__line">156</span>

</aside>

Expand Down

0 comments on commit 289fa92

Please sign in to comment.