Allow CompositeBlock::appliesToRight to return null when unsure
authorThalia <thalia.e.chan@googlemail.com>
Fri, 30 Aug 2019 18:37:15 +0000 (19:37 +0100)
committerThalia <thalia.e.chan@googlemail.com>
Sun, 1 Sep 2019 20:41:18 +0000 (21:41 +0100)
commit136054d95e7db157ffbe286460d63ab7484228a5
treebc8dc0f563090c007042af82f9210ef8f7d69390
parenta07fe8efb4971290b904b25115c668e76208a624
Allow CompositeBlock::appliesToRight to return null when unsure

CompositeBlock::appliesToRight checks $block->appliesToRight()
for each of the original blocks from which it is made.

AbstractBlock::appliesToRight returns:
* true if the block applies to the right
* false if the block does not apply to the right
* null if unsure

Before this, CompositeBlock::appliesToRight can only return true
or false. After this, it returns:
* false if false for all of the original blocks
* true if true for one or more original blocks
* null otherwise

Bug: T229417
Bug: T231145
Change-Id: Ie93b7691b57ac6a8f86b3641ad07a1d54babcd42
includes/block/AbstractBlock.php
includes/block/CompositeBlock.php
tests/phpunit/includes/block/CompositeBlockTest.php