}
public function pop() {
- if ( !count( $this->stack ) ) {
+ if ( $this->stack === [] ) {
throw new MWException( __METHOD__ . ': no elements remaining' );
}
$temp = array_pop( $this->stack );
* @return array
*/
public function getFlags() {
- if ( !count( $this->stack ) ) {
+ if ( $this->stack === [] ) {
return [
'findEquals' => false,
'findPipe' => false,
* @return string|bool
*/
public function getArgument( $index ) {
- if ( !isset( $this->args[$index] ) ) {
- return false;
- }
- return $this->args[$index];
+ return $this->args[$index] ?? false;
}
public function getArguments() {