Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
CommunityUpdatesConverter_2_0_0 | |
0.00% |
0 / 4 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
upgradeFromOlder | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
downgradeToPrevious | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace GrowthExperiments\Config\Schemas\Converters; |
4 | |
5 | use MediaWiki\Extension\CommunityConfiguration\Schema\ISchemaConverter; |
6 | use stdClass; |
7 | |
8 | // phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps |
9 | // phpcs:disable Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase |
10 | class CommunityUpdatesConverter_2_0_0 implements ISchemaConverter { |
11 | |
12 | public function upgradeFromOlder( stdClass $data ): stdClass { |
13 | $data->GEHomepageCommunityUpdatesMinEdits = 0; |
14 | return $data; |
15 | } |
16 | |
17 | public function downgradeToPrevious( stdClass $data ): stdClass { |
18 | unset( $data->GEHomepageCommunityUpdatesMinEdits ); |
19 | return $data; |
20 | } |
21 | } |