Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
CommunityUpdatesConverter_2_0_1 | |
0.00% |
0 / 6 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
upgradeFromOlder | |
0.00% |
0 / 4 |
|
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_1 implements ISchemaConverter { |
11 | |
12 | public function upgradeFromOlder( stdClass $data ): stdClass { |
13 | $data->GEHomepageCommunityUpdatesThumbnailFile = new StdClass(); |
14 | $data->GEHomepageCommunityUpdatesThumbnailFile->title = ''; |
15 | $data->GEHomepageCommunityUpdatesThumbnailFile->url = ''; |
16 | return $data; |
17 | } |
18 | |
19 | public function downgradeToPrevious( stdClass $data ): stdClass { |
20 | unset( $data->GEHomepageCommunityUpdatesThumbnailFile ); |
21 | return $data; |
22 | } |
23 | } |