Revert "[LanguageConverter] Added some cache code based on the problems in r97512."
[lhc/web/wiklou.git] / includes / ConfEditor.php
index 42a7173..8fa6233 100644 (file)
@@ -139,6 +139,7 @@ class ConfEditor {
         * insert
         *    Insert a new element at the start of the array.
         *
+        * @return string
         */
        public function edit( $ops ) {
                $this->parse();
@@ -371,6 +372,7 @@ class ConfEditor {
         * Finds the source byte region which you would want to delete, if $pathName
         * was to be deleted. Includes the leading spaces and tabs, the trailing line
         * break, and any comments in between.
+        * @return array
         */
        function findDeletionRegion( $pathName ) {
                if ( !isset( $this->pathInfo[$pathName] ) ) {
@@ -428,6 +430,7 @@ class ConfEditor {
         * or semicolon.
         *
         * The end position is the past-the-end (end + 1) value as per convention.
+        * @return array
         */
        function findValueRegion( $pathName ) {
                if ( !isset( $this->pathInfo[$pathName] ) ) {
@@ -444,6 +447,7 @@ class ConfEditor {
         * Find the path name of the last element in the array.
         * If the array is empty, this will return the \@extra interstitial element.
         * If the specified path is not found or is not an array, it will return false.
+        * @return bool|int|string
         */
        function findLastArrayElement( $path ) {
                // Try for a real element
@@ -480,6 +484,7 @@ class ConfEditor {
         * Find the path name of first element in the array.
         * If the array is empty, this will return the \@extra interstitial element.
         * If the specified path is not found or is not an array, it will return false.
+        * @return bool|int|string
         */
        function findFirstArrayElement( $path ) {
                // Try for an ordinary element
@@ -504,6 +509,7 @@ class ConfEditor {
        /**
         * Get the indent string which sits after a given start position.
         * Returns false if the position is not at the start of the line.
+        * @return array
         */
        function getIndent( $pos, $key = false, $arrowPos = false ) {
                $arrowIndent = ' ';
@@ -725,6 +731,7 @@ class ConfEditor {
 
        /**
         * Create a ConfEditorToken from an element of token_get_all()
+        * @return ConfEditorToken
         */
        function newTokenObj( $internalToken ) {
                if ( is_array( $internalToken ) ) {
@@ -776,6 +783,7 @@ class ConfEditor {
        /**
         * Get the token $offset steps ahead of the current position.
         * $offset may be negative, to get tokens behind the current position.
+        * @return ConfEditorToken
         */
        function getTokenAhead( $offset ) {
                $pos = $this->pos + $offset;
@@ -821,6 +829,7 @@ class ConfEditor {
 
        /**
         * Pop a state from the state stack.
+        * @return mixed
         */
        function popState() {
                return array_pop( $this->stateStack );
@@ -829,6 +838,7 @@ class ConfEditor {
        /**
         * Returns true if the user input path is valid.
         * This exists to allow "/" and "@" to be reserved for string path keys
+        * @return bool
         */
        function validatePath( $path ) {
                return strpos( $path, '/' ) === false && substr( $path, 0, 1 ) != '@';
@@ -949,6 +959,7 @@ class ConfEditor {
 
        /**
         * Get a readable name for the given token type.
+        * @return string
         */
        function getTypeName( $type ) {
                if ( is_int( $type ) ) {
@@ -962,6 +973,7 @@ class ConfEditor {
         * Looks ahead to see if the given type is the next token type, starting
         * from the current position plus the given offset. Skips any intervening
         * whitespace.
+        * @return bool
         */
        function isAhead( $type, $offset = 0 ) {
                $ahead = $offset;