| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | public function invalidateCaches( Title $title ) { |
||
| 42 | $pageSegments = explode( '/', $title->getDBkey() ); |
||
| 43 | |||
| 44 | $rootTitle = Title::newFromText( $pageSegments[0] ); |
||
| 45 | |||
| 46 | if ( $rootTitle === null ) { |
||
| 47 | return; |
||
| 48 | } |
||
| 49 | |||
| 50 | $subPages = $this->subPageFinder->getSubPagesFor( $rootTitle ); |
||
| 51 | |||
| 52 | foreach ( $subPages as $subPage ) { |
||
| 53 | $subPage->invalidateCache(); |
||
| 54 | } |
||
| 55 | } |
||
| 56 | |||
| 58 |