We are deprecating the non-tidy modes of the parser.
While we're at it, remove the output wrapper by default (in
both tidy and no-tidy modes).
Bug: T198214
Change-Id: Ieb51cb0f3a8a62e272d76c368f29fb63c030c522
I wasn't sure how to convert the rest of the occurrences in core (there
are a significant number).
Bug: T200881
Change-Id: I114bba946cd3ea8a293121e275588c3c4d174f94
- Place commas correct
- Moved comments
- Add space after if/foreach/catch
- Reformat some conditions
- Removed trailing spaces/tabs
Change-Id: I40ccda72c418c4a33fcd675773cb08d971510cdb
Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81.
Also updated usage in text in documentation and the
installer LocalSettingsGenerator.
Most of them were handled by this regex:
- find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$
- replace: $1 $2;
Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
Squiz.WhiteSpace.LanguageConstructSpacing:
Language constructs must be followed by a single space;
expected "require_once expression" but found
"require_once(expression)"
It is a keyword (e.g. like `new`, `return` and `print`). As
such the parentheses don't make sense.
Per our code conventions, we use a space after keywords like
these. We appeared to have an unwritten exception for `require`
that doesn't make sense. About 60% of require/include usage
was missing the space and/or had superfluous parentheses.
It is as silly as print("foo") or return("foo"), it works
because keywords have no significance for whitespace between
it and the expression that follows, and since experessions can
be wrapped in parentheses for clarity (e.g. when doing string
concatenation or mathematical operations) the parenthesis
before and after basiclaly just ignored.
Change-Id: I2df2f80b8123714bea7e0771bf94b51ad5bb4b87
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !
Fixed windows newline style
Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
Removed left over uses of dirname( __FILE__ ) to __DIR__, even in comments.
Running the PHP version test in maintenance/Maintenance.php earlier, so that
we no longer have to stay PHP < 5.3 compatible in there.
Change-Id: I5a00bd5c6af44b7f826c4e5576a7b3de7b5026d8
Follow up:
1fc2bb9 - parse.php note about using ^D to end output
The previous patch assumed ^D to be the standard.
Change-Id: If573c1a03eb9679d74fcb24c1be6931eee361158
--file did not make that many sense, it is easier to just pass the filename
as an argument
Call to parent constructor was misplaced, that made the script specific
options pretends they were generic maintenance parameters.
Wikitext can be given by stdin or using a file. The wikitext will be parsed
using 'CLIParser' as a title. This can be overriden with --title option.
Example1:
$ php parse.php --title foo
''[[foo]]''^D
<p><i><strong class="selflink">foo</strong></i>
</p>
Example2:
$ echo "'''bold'''" > /tmp/foo
$ php parse.php --file /tmp/foo
<p><b>bold</b>
</p>$
Example3:
$ cat /tmp/foo | php parse.php
<p><b>bold</b>
</p>$