Commit Graph

17 Commits

Author SHA1 Message Date
Gabriel Caruso dfcab0c13f Use assertInstanceOf (#286) 2017-12-06 18:46:31 +09:00
Adrien Crivelli 8d76020590
Consistent `stringFromColumnIndex()` and `columnIndexFromString()`
Column indexes are always based on 1 everywhere in PhpSpreadsheet.
This is consistent with rows starting at 1, as well as Excel
function `COLUMN()`. It should also make it easier to reason about
columns and rows and remove any doubts whether a specific method is
expecting 0 based or 1 based indexes.

Fixes #273
Fixes https://github.com/PHPOffice/PHPExcel/issues/307
Fixes https://github.com/PHPOffice/PHPExcel/issues/476
2017-11-26 15:29:08 +09:00
Adrien Crivelli e0150fd43e
Extract coordinate methods to `Coordinate` class 2017-11-18 23:52:38 +09:00
Gabriel Caruso aed27a0bed Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase (#271)
Use the `PHPUnit\Framework\TestCase` notation instead of `PHPUnit_Framework_TestCase` while extending our TestCases. This will help us migrate to PHPUnit 6, that [no longer support snake case class names](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-6.0.md#changed-1).
2017-11-09 00:48:01 +09:00
Maxim Bulygin 6561494e32
Add possibility to check validity of a cell value, based on data validation rules
`$cell->hasValidValue()` returns true if the cell has a value which conform to the
rules defined in `$cell->getDataValidation()`.

Closes #257
2017-10-31 14:07:24 +09:00
Adrien Crivelli 557e80dc03
Rename classes to keep them in their related namespaces 2017-10-29 17:39:42 +09:00
Adrien Crivelli aef4d711f5
Use `self::assert*()` instead of `$this->assert*()`
Because even if it doesn't make a difference in practice, it is
technically more correct to call static methods statically. It
also better advertise that those methods can be used from any context.
2017-09-22 14:22:44 +09:00
Zharikov Viktor 07455d24f6
Make global usage of `use` instead of FQCN
Closes #78
Closes #147
2017-05-18 00:10:16 +02:00
Adrien Crivelli fd9c925a7b
Refactor CachedObjectStorage to PSR-16
This drop a lot of non-core features code and delegate their maintainance
to third parties. Also it open the door to any missing implementation
out of the box, such as Redis for the moment.

Finally this consistently enforce a constraint where there can be one and
only one active cell at any point in time in code. This used to be true for
non-default implementation of cache, but it was not true for default
implementation where all cells were kept in-memory and thus were never
detached from their worksheet and thus were all kept functionnal at any
point in time.

This inconsistency of behavior between in-memory and off-memory could
lead to bugs when changing cache system if the end-user code was badly
written. Now end-user will never be able to write buggy code in the first
place, avoiding future headache when introducing caching.

Closes #3
2017-04-14 16:56:27 +09:00
Adrien Crivelli 9e835676a6
Update dev dependencies 2017-01-23 16:02:59 +09:00
Adrien Crivelli 909353ea39
Simplify bootstrap for tests 2017-01-23 15:05:41 +09:00
Adrien Crivelli 8dddf56c2e
Use proper syntax for variadic functions
This simplify code, increase readability and improve the function
signature for API users.
2017-01-23 15:01:20 +09:00
Adrien Crivelli ec928d393f
Fix indentation as suggested by Scrunitizer 2017-01-05 12:26:20 +09:00
Adrien Crivelli 8c66afe39a
Upgrade to PHP-CS-Fixer 2.0 2016-12-22 23:46:26 +09:00
Adrien Crivelli 47cde0dadc
Introduce vendor prefix `PhpOffice` to namespace 2016-09-01 02:20:47 +09:00
Adrien Crivelli f917b3b1f4
Avoid `call_user_func()` whenever possible 2016-08-26 15:39:29 +09:00
Adrien Crivelli 29bdbd4e0b
Respect PSR-0 with matching folder name and namespace `PhpSpreadsheetTests` 2016-08-25 13:53:15 +09:00