Autofix style code with phpcs

The entire project now pass phpcs check
This commit is contained in:
Adrien Crivelli 2016-08-13 23:31:22 +09:00
parent 2da06e5b03
commit 49d821f093
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
12 changed files with 11 additions and 22 deletions

View File

@ -215,7 +215,6 @@ class TextData
}
return \PHPExcel\Style\NumberFormat::toFormattedString($value, $mask);
}

View File

@ -427,7 +427,6 @@ class Properties
if (isset($this->customProperties[$propertyName])) {
return $this->customProperties[$propertyName]['value'];
}
}
/**
@ -441,7 +440,6 @@ class Properties
if (isset($this->customProperties[$propertyName])) {
return $this->customProperties[$propertyName]['type'];
}
}
/**

View File

@ -1628,7 +1628,6 @@ class Excel5 extends BaseReader implements IReader
// ->setAuthor($author)
}
}
}
@ -2503,7 +2502,6 @@ class Excel5 extends BaseReader implements IReader
$offset += $cb;
}
}
}
@ -5258,7 +5256,6 @@ class Excel5 extends BaseReader implements IReader
);
return $splicedData;
}

View File

@ -112,7 +112,8 @@ class Date
* @return \DateTimeZone The timezone as a timezone object
* @throws \Exception
*/
protected static function validateTimeZone($timeZone) {
protected static function validateTimeZone($timeZone)
{
if (is_object($timeZone) && $timeZone instanceof \DateTimeZone) {
return $timeZone;
} elseif (is_string($timeZone)) {
@ -130,14 +131,15 @@ class Date
* @return \DateTime PHP date/time object
* @throws \Exception
*/
public static function excelToDateTimeObject($excelTimestamp = 0, $timeZone = null) {
public static function excelToDateTimeObject($excelTimestamp = 0, $timeZone = null)
{
$timeZone = ($timeZone === null) ? self::getDefaultTimezone() : self::validateTimeZone($timeZone);
if (self::$excelCalendar == self::CALENDAR_WINDOWS_1900) {
$baseDate = ($excelTimestamp < 60) ? new \DateTime('1899-12-31', $timeZone) : new \DateTime('1899-12-30', $timeZone);
} else {
$baseDate = new \DateTime('1904-01-01', $timeZone);
}
$days = floor($excelTimestamp);
$days = floor($excelTimestamp);
$partDay = $excelTimestamp - $days;
$hours = floor($partDay * 24);
$partDay = $partDay * 24 - $hours;
@ -147,9 +149,9 @@ class Date
// $fraction = $partDay - $seconds;
$interval = '+' . $days . ' days';
return $baseDate->modify($interval)
return $baseDate->modify($interval)
->setTime($hours, $minutes, $seconds);
}
}
/**
* Convert a MS serialized datetime value from Excel to a unix timestamp
@ -158,10 +160,11 @@ class Date
* @return integer Unix timetamp for this date/time
* @throws \Exception
*/
public static function excelToTimestamp($excelTimestamp = 0, $timeZone = null) {
return self::excelToDateTimeObject($excelTimestamp, $timeZone)
public static function excelToTimestamp($excelTimestamp = 0, $timeZone = null)
{
return self::excelToDateTimeObject($excelTimestamp, $timeZone)
->format('U');
}
}
/**

View File

@ -428,7 +428,6 @@ class SingularValueDecomposition
break;
} // end switch
} // end while
} // end constructor

View File

@ -563,7 +563,6 @@ class Spreadsheet
($pIndex > count($this->workSheetCollection) - 1)) {
--$this->activeSheetIndex;
}
}
/**

View File

@ -59,6 +59,5 @@ class RelsVBA extends WriterPart
$objWriter->endElement();
return $objWriter->getData();
}
}

View File

@ -232,7 +232,6 @@ class Workbook extends BIFFwriter
$this->addColor($phpSheet->getTabColor()->getRGB());
}
}
}
/**

View File

@ -151,7 +151,6 @@ class Xf
$this->rightBorderColor = 0x40;
$this->_diag_color = 0x40;
$this->_style = $style;
}

View File

@ -26,7 +26,6 @@ class DefaultValueBinderTest extends \PHPUnit_Framework_TestCase
$this->cellStub->expects($this->any())
->method('setValueExplicit')
->will($this->returnValue(true));
}
/**

View File

@ -18,7 +18,6 @@ class TimeZoneTest extends \PHPUnit_Framework_TestCase
$result = call_user_func(array('\PHPExcel\Shared\TimeZone','setTimezone'), $timezoneValue);
$this->assertTrue($result);
}
}
public function testSetTimezoneWithInvalidValue()

View File

@ -25,5 +25,4 @@ class SettingsTest extends \PHPUnit_Framework_TestCase
$result = call_user_func(array('PHPExcel\\Settings','getLibXmlLoaderOptions'));
$this->assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID) & $result));
}
}