| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare( strict_types=1 ); |
||
| 38 | protected function addMsg( string $user, int $ricNum ) { |
||
| 39 | $this->getLogger()->info( "Leaving msg to $user" ); |
||
| 40 | $msg = $this->msg( 'user-notice-msg' )->params( [ '$num' => $ricNum ] )->text(); |
||
| 41 | |||
| 42 | $params = [ |
||
| 43 | 'title' => "User talk:$user", |
||
| 44 | 'section' => 'new', |
||
| 45 | 'text' => $msg, |
||
| 46 | 'sectiontitle' => $this->getConfig()->get( 'user-notice-title' ), |
||
| 47 | 'summary' => $this->getConfig()->get( 'user-notice-summary' ) |
||
| 48 | ]; |
||
| 49 | |||
| 50 | $this->getController()->editPage( $params ); |
||
| 51 | } |
||
| 53 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)or! empty(...)instead.