Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
RecentChangeFactory | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
newFromRow | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace Flow\Data\Utils; |
4 | |
5 | use RecentChange; |
6 | use stdClass; |
7 | |
8 | /** |
9 | * Provides access to static methods of RecentChange so they |
10 | * can be swapped out during tests |
11 | */ |
12 | class RecentChangeFactory { |
13 | /** |
14 | * @param stdClass $obj |
15 | * @return RecentChange |
16 | */ |
17 | public function newFromRow( stdClass $obj ): RecentChange { |
18 | $rc = RecentChange::newFromRow( $obj ); |
19 | // status key is always "changed" for now. |
20 | $rc->setExtra( [ 'pageStatus' => 'changed' ] ); |
21 | return $rc; |
22 | } |
23 | } |