| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I56b31870ce9be46d15fcd9095f9a12e0f2488ed9
|
|
|
|
|
|
| |
Mostly unspecific "array" type hints that can be made more specific.
Change-Id: I5ceb042d0a8740867ae7e5718dfed1f4b632596f
|
|
|
|
|
|
|
|
|
|
| |
… or with $this->fail() from the PHPUnit TestCase base class.
I hope this makes the code more readable, i.e. communicate the
intention better. The output should be the same, i.e. the test fails
as before in case of an error.
Change-Id: Ied8a045141ac92d6af6398682bb5d9ca7ca88c49
|
|
|
|
|
| |
Bug: T314096
Change-Id: Id689bf648f64e27585907ecf04a36d23b28b684e
|
|
|
|
|
|
| |
Also add missing properties
Change-Id: Ia2443348a40fc46afb9133c997db7120461373f4
|
|
|
|
|
|
|
|
|
| |
When the value is a constant, the initialization can be done
way up together with the property declaration. I believe
this makes the code easier to read because it's not spread
out so much.
Change-Id: I5af482feccb746c144c0f318e119165cf5a56cbe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
developer's intention
array_fill_keys() was introduced in PHP 5.2.0 and works like
array_flip() except that it does only one thing (copying keys) instead
of two things (copying keys and values). That makes it faster and more
obvious.
When array_flip() calls were paired, I left them as is, because that
pattern is too cute. I couldn't kill something so cute.
Sometimes it was hard to figure out whether the values in array_flip()
result were used. That's the point of this change. If you use
array_fill_keys(), the intention is obvious.
Change-Id: If8d340a8bc816a15afec37e64f00106ae45e10ed
|
|
|
|
|
| |
Followup-To: I8384f47bbcde7604efa41b83db0dbc4f429219a8
Change-Id: I6da8cefad8bc70631277f9b7bd5d1af5474259ab
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I had to write a little test to understand what this loop is supposed
to do: All it really does is counting the number of consecutive empty
lines in the $this->lines array, starting at the offset $this->pos.
The only edge-case is when the array does not contain anything but empty
lines. In this case, the last empty line is skipped. This is because
explode( …, "\n\n\n" ) returns 4 elements, but we want to count the
number of newline characters, which is 3.
Change-Id: I74ae1ed6ba0a8d65a92a1dd07f681fd7ae4221b4
|
|
|
|
|
| |
Bug: T182546
Change-Id: I91a9555893a08e4ec58da97c6cc4d1e70000ff6b
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first newline was missing so a block like:
!! hooks
source
!! endhooks
would turn into:
!! hookssource
!! endhooks
Change-Id: I2a4c5e52050d55fb0c9b4f5d0494eb00e34b233c
|
|
Add editTests.php, which provides an interactive interface to the
parser tests, with semi-automated editing.
Change-Id: I1a20d007ba4627d562a16c03849bbad7aec0e516
|