diff --git a/.sami.php b/.sami.php deleted file mode 100644 index 9a2fca35..00000000 --- a/.sami.php +++ /dev/null @@ -1,24 +0,0 @@ -files() - ->name('*.php') - ->in($dir = __DIR__ . '/src'); -$versions = GitVersionCollection::create($dir) - ->addFromTags(function ($version) { - return preg_match('~^\d+\.\d+\.\d+$~', $version); - }) - ->add('master'); - -return new Sami($iterator, [ - 'title' => 'PhpSpreadsheet', - 'versions' => $versions, - 'build_dir' => __DIR__ . '/build/%version%', - 'cache_dir' => __DIR__ . '/cache/%version%', - 'remote_repository' => new GitHubRemoteRepository('PHPOffice/PhpSpreadsheet', dirname($dir)), -]); diff --git a/.travis.yml b/.travis.yml index 45d67ef8..82e25cee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,6 @@ php: cache: directories: - - cache - vendor - $HOME/.composer/cache @@ -41,19 +40,17 @@ jobs: - wget https://scrutinizer-ci.com/ocular.phar - php ocular.phar code-coverage:upload --format=php-clover tests/coverage-clover.xml - - stage: API documentation - php: 7.2 + - stage: API documentations + if: tag is present + php: 7.4 before_script: - - curl -O https://get.sensiolabs.org/sami.phar + - curl -O https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.0.0-rc/phpDocumentor.phar script: - - git fetch origin master:master - - git fetch origin --tags - - php sami.phar update .sami.php - - echo '
If you are not automatically redirected, please go to the latest stable API documentation.
' > build/index.html + - php phpDocumentor.phar --directory src/ --target docs/api deploy: provider: pages skip-cleanup: true - local-dir: build + local-dir: docs/api github-token: $GITHUB_TOKEN on: all_branches: true diff --git a/README.md b/README.md index 71721220..df683a1e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ PhpSpreadsheet is a library written in pure PHP and providing a set of classes t ## Documentation -Read more about it, including install instructions, in the [official documentation](https://phpspreadsheet.readthedocs.io). Or check out the [API documentation](https://phpoffice.github.io/PhpSpreadsheet/master). +Read more about it, including install instructions, in the [official documentation](https://phpspreadsheet.readthedocs.io). Or check out the [API documentation](https://phpoffice.github.io/PhpSpreadsheet). Please ask your support questions on [StackOverflow](https://stackoverflow.com/questions/tagged/phpspreadsheet), or have a quick chat on [Gitter](https://gitter.im/PHPOffice/PhpSpreadsheet). diff --git a/docs/index.md b/docs/index.md index 7c276792..e7bb4660 100644 --- a/docs/index.md +++ b/docs/index.md @@ -89,7 +89,7 @@ architecture](./topics/architecture.md), [accessing cells](./topics/accessing-cells.md) and [reading and writing to files](./topics/reading-and-writing-to-file.md). -Or browse the [API documentation](https://phpoffice.github.io/PhpSpreadsheet/master). +Or browse the [API documentation](https://phpoffice.github.io/PhpSpreadsheet). # Credits diff --git a/docs/topics/recipes.md b/docs/topics/recipes.md index 71269108..b0956b6e 100644 --- a/docs/topics/recipes.md +++ b/docs/topics/recipes.md @@ -3,12 +3,12 @@ The following pages offer you some widely-used PhpSpreadsheet recipes. Please note that these do NOT offer complete documentation on specific PhpSpreadsheet API functions, but just a bump to get you started. If you -need specific API functions, please refer to the [API documentation](https://phpoffice.github.io/PhpSpreadsheet/master). +need specific API functions, please refer to the [API documentation](https://phpoffice.github.io/PhpSpreadsheet). For example, [setting a worksheet's page orientation and size ](#setting-a-worksheets-page-orientation-and-size) covers setting a page orientation to A4. Other paper formats, like US Letter, are not covered -in this document, but in the PhpSpreadsheet [API documentation](https://phpoffice.github.io/PhpSpreadsheet/master). +in this document, but in the PhpSpreadsheet [API documentation](https://phpoffice.github.io/PhpSpreadsheet). ## Setting a spreadsheet's metadata @@ -301,7 +301,7 @@ $spreadsheet->getActiveSheet()->getPageSetup() ``` Note that there are additional page settings available. Please refer to -the [API documentation](https://phpoffice.github.io/PhpSpreadsheet/master) for all possible options. +the [API documentation](https://phpoffice.github.io/PhpSpreadsheet) for all possible options. ### Page Setup: Scaling options diff --git a/src/PhpSpreadsheet/Worksheet/PageSetup.php b/src/PhpSpreadsheet/Worksheet/PageSetup.php index fa1810f3..38a09736 100644 --- a/src/PhpSpreadsheet/Worksheet/PageSetup.php +++ b/src/PhpSpreadsheet/Worksheet/PageSetup.php @@ -180,7 +180,7 @@ class PageSetup * Print scaling. Valid values range from 10 to 400 * This setting is overridden when fitToWidth and/or fitToHeight are in use * - * @var int? + * @var null|int */ private $scale = 100; @@ -196,7 +196,7 @@ class PageSetup * Fit To Height * Number of vertical pages to fit on. * - * @var int? + * @var null|int */ private $fitToHeight = 1; @@ -204,7 +204,7 @@ class PageSetup * Fit To Width * Number of horizontal pages to fit on. * - * @var int? + * @var null|int */ private $fitToWidth = 1; @@ -308,7 +308,7 @@ class PageSetup /** * Get Scale. * - * @return int? + * @return null|int */ public function getScale() { @@ -370,7 +370,7 @@ class PageSetup /** * Get Fit To Height. * - * @return int? + * @return null|int */ public function getFitToHeight() { @@ -398,7 +398,7 @@ class PageSetup /** * Get Fit To Width. * - * @return int? + * @return null|int */ public function getFitToWidth() {