Merge "Add 'since <version>' to @deprecated annotations"
[lhc/web/wiklou.git] / maintenance / checkSyntax.php
index 0d701eb..ef88545 100644 (file)
@@ -21,7 +21,7 @@
  * @ingroup Maintenance
  */
 
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
 
 /**
  * Maintenance script to check syntax of all PHP files in MediaWiki.
@@ -153,17 +153,14 @@ class CheckSyntax extends Maintenance {
                if ( file_exists( "$IP/LocalSettings.php" ) ) {
                        $this->mFiles[] = "$IP/LocalSettings.php";
                }
-               if ( file_exists( "$IP/AdminSettings.php" ) ) {
-                       $this->mFiles[] = "$IP/AdminSettings.php";
-               }
 
                $this->output( 'done.', 'listfiles' );
        }
 
        /**
         * Returns a list of tracked files in a Git work tree differing from the master branch.
-        * @param $path string: Path to the repository
-        * @return array: Resulting list of changed files
+        * @param string $path Path to the repository
+        * @return array Resulting list of changed files
         */
        private function getGitModifiedFiles( $path ) {
 
@@ -215,7 +212,7 @@ class CheckSyntax extends Maintenance {
 
        /**
         * Returns true if $file is of a type we can check
-        * @param $file string
+        * @param string $file
         * @return bool
         */
        private function isSuitableFile( $file ) {
@@ -235,7 +232,7 @@ class CheckSyntax extends Maintenance {
 
        /**
         * Add given path to file list, searching it in include path if needed
-        * @param $path string
+        * @param string $path
         * @return bool
         */
        private function addPath( $path ) {
@@ -245,7 +242,7 @@ class CheckSyntax extends Maintenance {
 
        /**
         * Add given file to file list, or, if it's a directory, add its content
-        * @param $path string
+        * @param string $path
         * @return bool
         */
        private function addFileOrDir( $path ) {
@@ -262,7 +259,7 @@ class CheckSyntax extends Maintenance {
        /**
         * Add all suitable files in given directory or its subdirectories to the file list
         *
-        * @param $dir String: directory to process
+        * @param string $dir Directory to process
         */
        private function addDirectoryContent( $dir ) {
                $iterator = new RecursiveIteratorIterator(
@@ -279,8 +276,8 @@ class CheckSyntax extends Maintenance {
        /**
         * Check a file for syntax errors using Parsekit. Shamelessly stolen
         * from tools/lint.php by TimStarling
-        * @param $file String Path to a file to check for syntax errors
-        * @return boolean
+        * @param string $file Path to a file to check for syntax errors
+        * @return bool
         */
        private function checkFileWithParsekit( $file ) {
                static $okErrors = array(
@@ -307,8 +304,8 @@ class CheckSyntax extends Maintenance {
 
        /**
         * Check a file for syntax errors using php -l
-        * @param $file String Path to a file to check for syntax errors
-        * @return boolean
+        * @param string $file Path to a file to check for syntax errors
+        * @return bool
         */
        private function checkFileWithCli( $file ) {
                $res = exec( 'php -l ' . wfEscapeShellArg( $file ) );
@@ -324,8 +321,8 @@ class CheckSyntax extends Maintenance {
         * Check a file for non-fatal coding errors, such as byte-order marks in the beginning
         * or pointless ?> closing tags at the end.
         *
-        * @param $file String String Path to a file to check for errors
-        * @return boolean
+        * @param string $file String Path to a file to check for errors
+        * @return bool
         */
        private function checkForMistakes( $file ) {
                foreach ( $this->mNoStyleCheckPaths as $regex ) {