Remove exception that can never happen
Because of type hinting in the constructor the spreadsheet object can never be null anymore.
This commit is contained in:
parent
edc608782f
commit
925205ed59
|
@ -344,11 +344,6 @@ class Html extends BaseWriter
|
||||||
*/
|
*/
|
||||||
public function generateHTMLHeader($pIncludeStyles = false)
|
public function generateHTMLHeader($pIncludeStyles = false)
|
||||||
{
|
{
|
||||||
// Spreadsheet object known?
|
|
||||||
if ($this->spreadsheet === null) {
|
|
||||||
throw new WriterException('Internal Spreadsheet object not set to an instance of an object.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Construct HTML
|
// Construct HTML
|
||||||
$properties = $this->spreadsheet->getProperties();
|
$properties = $this->spreadsheet->getProperties();
|
||||||
$html = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' . PHP_EOL;
|
$html = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' . PHP_EOL;
|
||||||
|
@ -404,11 +399,6 @@ class Html extends BaseWriter
|
||||||
*/
|
*/
|
||||||
public function generateSheetData()
|
public function generateSheetData()
|
||||||
{
|
{
|
||||||
// Spreadsheet object known?
|
|
||||||
if ($this->spreadsheet === null) {
|
|
||||||
throw new WriterException('Internal Spreadsheet object not set to an instance of an object.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ensure that Spans have been calculated?
|
// Ensure that Spans have been calculated?
|
||||||
if ($this->sheetIndex !== null || !$this->spansAreCalculated) {
|
if ($this->sheetIndex !== null || !$this->spansAreCalculated) {
|
||||||
$this->calculateSpans();
|
$this->calculateSpans();
|
||||||
|
@ -525,11 +515,6 @@ class Html extends BaseWriter
|
||||||
*/
|
*/
|
||||||
public function generateNavigation()
|
public function generateNavigation()
|
||||||
{
|
{
|
||||||
// Spreadsheet object known?
|
|
||||||
if ($this->spreadsheet === null) {
|
|
||||||
throw new WriterException('Internal Spreadsheet object not set to an instance of an object.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fetch sheets
|
// Fetch sheets
|
||||||
$sheets = [];
|
$sheets = [];
|
||||||
if ($this->sheetIndex === null) {
|
if ($this->sheetIndex === null) {
|
||||||
|
@ -756,11 +741,6 @@ class Html extends BaseWriter
|
||||||
*/
|
*/
|
||||||
public function generateStyles($generateSurroundingHTML = true)
|
public function generateStyles($generateSurroundingHTML = true)
|
||||||
{
|
{
|
||||||
// Spreadsheet object known?
|
|
||||||
if ($this->spreadsheet === null) {
|
|
||||||
throw new WriterException('Internal Spreadsheet object not set to an instance of an object.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build CSS
|
// Build CSS
|
||||||
$css = $this->buildCSS($generateSurroundingHTML);
|
$css = $this->buildCSS($generateSurroundingHTML);
|
||||||
|
|
||||||
|
@ -800,11 +780,6 @@ class Html extends BaseWriter
|
||||||
*/
|
*/
|
||||||
public function buildCSS($generateSurroundingHTML = true)
|
public function buildCSS($generateSurroundingHTML = true)
|
||||||
{
|
{
|
||||||
// Spreadsheet object known?
|
|
||||||
if ($this->spreadsheet === null) {
|
|
||||||
throw new WriterException('Internal Spreadsheet object not set to an instance of an object.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Cached?
|
// Cached?
|
||||||
if ($this->cssStyles !== null) {
|
if ($this->cssStyles !== null) {
|
||||||
return $this->cssStyles;
|
return $this->cssStyles;
|
||||||
|
|
Loading…
Reference in New Issue