private function checkSquare() { if (!$this->isSquare()) { throw new MatrixException('Operation can only be called on square matrix: ' . print_r($this->internal, true)); } }