Skip to content

Commit d8648b2

Browse files
committed
Add script to generate docs
Change-Id: I639b7123c6b3b9d32ee7544f8d015c0c0b27de43 Reviewed-on: http://review.couchbase.org/c/php-couchbase/+/141555 Tested-by: Build Bot <[email protected]> Reviewed-by: Sergey Avseyev <[email protected]>
1 parent 6858261 commit d8648b2

File tree

4 files changed

+42
-3
lines changed

4 files changed

+42
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@
4545
/test.cache
4646
/tests/CouchbaseMock.jar
4747
/phpunit.result.cache
48+
.phpdoc

api/couchbase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2389,7 +2389,7 @@ public function consistentWith(string $index, MutationState $state): SearchOptio
23892389
* If empty, no field values are included. This drives the inclusion of the fields in each hit.
23902390
* Note that to be highlighted, the fields must be stored in the FTS index.
23912391
*
2392-
* @param string ...$fields
2392+
* @param string[] $fields
23932393
* @return SearchOptions
23942394
*/
23952395
public function fields(array $fields): SearchOptions
@@ -2404,7 +2404,7 @@ public function fields(array $fields): SearchOptions
24042404
*
24052405
* Note that to be faceted, a field's value must be stored in the FTS index.
24062406
*
2407-
* @param array[SearchFacet] $facet
2407+
* @param SearchFacet[] $facets
24082408
* @return SearchOptions
24092409
*
24102410
* @see \SearchFacet

bin/docs.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright 2020 Couchbase, Inc.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
PROJECT_ROOT="$( cd "$(dirname "$0"/..)" >/dev/null 2>&1 ; pwd -P )"
18+
19+
set -x
20+
set -e
21+
22+
CB_VERSION=${CB_VERSION:-$(git describe | sed 's/^v//g')}
23+
CB_PHP_PREFIX=${CB_PHP_PREFIX:-/usr}
24+
25+
CB_PHPDOC_PHAR=${CB_PHPDOC_PHAR:-"${PROJECT_ROOT}/build/phpdoc.phar"}
26+
if [ ! -f "${CB_PHPDOC_PHAR}" ]
27+
then
28+
curl -L -o "${CB_PHPDOC_PHAR}" https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.0.0/phpDocumentor.phar
29+
fi
30+
31+
cd ${PROJECT_ROOT}
32+
33+
PHP_EXECUTABLE="${CB_PHP_PREFIX}/bin/php"
34+
35+
${PHP_EXECUTABLE} \
36+
${CB_PHPDOC_PHAR} \
37+
-t ${PROJECT_ROOT}/build/couchbase-php-client-${CB_VERSION} \
38+
-d ${PROJECT_ROOT}/api

bin/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ CB_PASSWORD=${CB_PASSWORD:-password}
3030
CB_PHPUNIT_PHAR=${CB_PHPUNIT_PHAR:-"${PROJECT_ROOT}/build/phpunit.phar"}
3131
if [ ! -f "${CB_PHPUNIT_PHAR}" ]
3232
then
33-
curl -o "${CB_PHPUNIT_PHAR}" https://phar.phpunit.de/phpunit-9.4.3.phar
33+
curl -L -o "${CB_PHPUNIT_PHAR}" https://phar.phpunit.de/phpunit-9.4.3.phar
3434
fi
3535

3636
${CB_PHP_PREFIX}/bin/php --version

0 commit comments

Comments
 (0)