return $this->accum;
}
+ /**
+ * @return bool|PPDPart
+ */
public function getCurrentPart() {
if ( $this->top === false ) {
return false;
}
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,
$this->parts[] = new $class( $s );
}
+ /**
+ * @return PPDPart
+ */
public function getCurrentPart() {
return $this->parts[count( $this->parts ) - 1];
}