Skip to content

Commit 631f8a2

Browse files
committed
Merge branch 'feature/minor-doc-fixes' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents 4a08484 + bb69ce1 commit 631f8a2

File tree

10 files changed

+30
-24
lines changed

10 files changed

+30
-24
lines changed

autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Autoload
2323
/**
2424
* The composer autoloader.
2525
*
26-
* @var Composer\Autoload\ClassLoader
26+
* @var \Composer\Autoload\ClassLoader
2727
*/
2828
private static $composerAutoloader = null;
2929

src/Config.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class Config
188188
* @param string $name The name of the property.
189189
*
190190
* @return mixed
191-
* @throws RuntimeException If the setting name is invalid.
191+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the setting name is invalid.
192192
*/
193193
public function __get($name)
194194
{
@@ -208,7 +208,7 @@ public function __get($name)
208208
* @param mixed $value The value of the property.
209209
*
210210
* @return void
211-
* @throws RuntimeException If the setting name is invalid.
211+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the setting name is invalid.
212212
*/
213213
public function __set($name, $value)
214214
{
@@ -1555,7 +1555,7 @@ public static function getExecutablePath($name)
15551555
*
15561556
* @return bool
15571557
* @see getConfigData()
1558-
* @throws RuntimeException If the config file can not be written.
1558+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the config file can not be written.
15591559
*/
15601560
public static function setConfigData($key, $value, $temp=false)
15611561
{

src/Reporter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class Reporter
9292
* @param \PHP_CodeSniffer\Config $config The config data for the run.
9393
*
9494
* @return void
95-
* @throws RuntimeException If a report is not available.
95+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If a report is not available.
9696
*/
9797
public function __construct(Config $config)
9898
{

src/Ruleset.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public function explain()
305305
* is only used for debug output.
306306
*
307307
* @return string[]
308-
* @throws RuntimeException If the ruleset path is invalid.
308+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the ruleset path is invalid.
309309
*/
310310
public function processRuleset($rulesetPath, $depth=0)
311311
{
@@ -660,7 +660,7 @@ private function expandSniffDirectory($directory, $depth=0)
660660
* is only used for debug output.
661661
*
662662
* @return array
663-
* @throws RuntimeException If the reference is invalid.
663+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the reference is invalid.
664664
*/
665665
private function expandRulesetReference($ref, $rulesetDir, $depth=0)
666666
{
@@ -836,13 +836,13 @@ private function expandRulesetReference($ref, $rulesetDir, $depth=0)
836836
/**
837837
* Processes a rule from a ruleset XML file, overriding built-in defaults.
838838
*
839-
* @param SimpleXMLElement $rule The rule object from a ruleset XML file.
840-
* @param string[] $newSniffs An array of sniffs that got included by this rule.
841-
* @param int $depth How many nested processing steps we are in.
842-
* This is only used for debug output.
839+
* @param \SimpleXMLElement $rule The rule object from a ruleset XML file.
840+
* @param string[] $newSniffs An array of sniffs that got included by this rule.
841+
* @param int $depth How many nested processing steps we are in.
842+
* This is only used for debug output.
843843
*
844844
* @return void
845-
* @throws RuntimeException If rule settings are invalid.
845+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If rule settings are invalid.
846846
*/
847847
private function processRule($rule, $newSniffs, $depth=0)
848848
{
@@ -1073,7 +1073,7 @@ private function processRule($rule, $newSniffs, $depth=0)
10731073
/**
10741074
* Determine if an element should be processed or ignored.
10751075
*
1076-
* @param SimpleXMLElement $element An object from a ruleset XML file.
1076+
* @param \SimpleXMLElement $element An object from a ruleset XML file.
10771077
*
10781078
* @return bool
10791079
*/
@@ -1174,7 +1174,7 @@ public function registerSniffs($files, $restrictions, $exclusions)
11741174
* Populates the array of PHP_CodeSniffer_Sniff's for this file.
11751175
*
11761176
* @return void
1177-
* @throws RuntimeException If sniff registration fails.
1177+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If sniff registration fails.
11781178
*/
11791179
public function populateTokenListeners()
11801180
{

src/Runner.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ public function runPHPCBF()
233233
* Exits if the minimum requirements of PHP_CodSniffer are not met.
234234
*
235235
* @return array
236+
* @throws \PHP_CodeSniffer\Exceptions\DeepExitException
236237
*/
237238
public function checkRequirements()
238239
{
@@ -254,6 +255,7 @@ public function checkRequirements()
254255
* Init the rulesets and other high-level settings.
255256
*
256257
* @return void
258+
* @throws \PHP_CodeSniffer\Exceptions\DeepExitException
257259
*/
258260
public function init()
259261
{
@@ -312,6 +314,8 @@ public function init()
312314
* Performs the run.
313315
*
314316
* @return int The number of errors and warnings found.
317+
* @throws \PHP_CodeSniffer\Exceptions\DeepExitException
318+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException
315319
*/
316320
private function run()
317321
{
@@ -558,6 +562,7 @@ private function run()
558562
* @param int $line The line number the error was raised at.
559563
*
560564
* @return void
565+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException
561566
*/
562567
public function handleErrors($code, $message, $file, $line)
563568
{
@@ -577,6 +582,7 @@ public function handleErrors($code, $message, $file, $line)
577582
* @param \PHP_CodeSniffer\Files\File $file The file to be processed.
578583
*
579584
* @return void
585+
* @throws \PHP_CodeSniffer\Exceptions\DeepExitException
580586
*/
581587
public function processFile($file)
582588
{
@@ -726,14 +732,14 @@ private function processChildProcs($childProcs)
726732
/**
727733
* Print progress information for a single processed file.
728734
*
729-
* @param File $file The file that was processed.
730-
* @param int $numFiles The total number of files to process.
731-
* @param int $numProcessed The number of files that have been processed,
732-
* including this one.
735+
* @param \PHP_CodeSniffer\Files\File $file The file that was processed.
736+
* @param int $numFiles The total number of files to process.
737+
* @param int $numProcessed The number of files that have been processed,
738+
* including this one.
733739
*
734740
* @return void
735741
*/
736-
public function printProgress($file, $numFiles, $numProcessed)
742+
public function printProgress(File $file, $numFiles, $numProcessed)
737743
{
738744
if (PHP_CODESNIFFER_VERBOSITY > 0
739745
|| $this->config->showProgress === false

src/Sniffs/AbstractPatternSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private function getPatternTokenTypes($pattern)
153153
*
154154
* @return int The position in the pattern that this test should register
155155
* as the listener.
156-
* @throws RuntimeException If we could not determine a token to listen for.
156+
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If we could not determine a token to listen for.
157157
*/
158158
private function getListenerTokenPos($pattern)
159159
{

src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class IncludeSystemSniff extends AbstractScopeSniff
4242

4343

4444
/**
45-
* Constructs a Squiz_Sniffs_Scope_MethodScopeSniff.
45+
* Constructs an AbstractScopeSniff.
4646
*/
4747
public function __construct()
4848
{

src/Tokenizers/CSS.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class CSS extends PHP
2727
* @param string $eolChar The EOL char used in the content.
2828
*
2929
* @return void
30-
* @throws TokenizerException If the file appears to be minified.
30+
* @throws \PHP_CodeSniffer\Exceptions\TokenizerException If the file appears to be minified.
3131
*/
3232
public function __construct($content, Config $config, $eolChar='\n')
3333
{

src/Tokenizers/JS.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ class JS extends Tokenizer
257257
* @param string $eolChar The EOL char used in the content.
258258
*
259259
* @return void
260-
* @throws TokenizerException If the file appears to be minified.
260+
* @throws \PHP_CodeSniffer\Exceptions\TokenizerException If the file appears to be minified.
261261
*/
262262
public function __construct($content, Config $config, $eolChar='\n')
263263
{

src/Tokenizers/Tokenizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ abstract class Tokenizer
5959
* @param string $eolChar The EOL char used in the content.
6060
*
6161
* @return void
62-
* @throws TokenizerException If the file appears to be minified.
62+
* @throws \PHP_CodeSniffer\Exceptions\TokenizerException If the file appears to be minified.
6363
*/
6464
public function __construct($content, $config, $eolChar='\n')
6565
{

0 commit comments

Comments
 (0)