Skip to content

Commit

Permalink
doctum does not yet support array shapes code-lts/doctum#56
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Jun 5, 2024
1 parent 79aa5e5 commit 62b7334
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 19 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
env:
COMPOSER_FLAGS: "--prefer-lowest"
- php: '8.2'
- php: '8.3'

env:
COMPOSER_FLAGS: ${{ matrix.env.COMPOSER_FLAGS }}
Expand All @@ -32,7 +33,7 @@ jobs:
coverage: none

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install composer dependencies
run: |
Expand All @@ -44,4 +45,4 @@ jobs:
vendor/bin/phpunit
- name: composer audit
run: composer audit
run: composer audit
7 changes: 5 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: deploy documentation

on:
push:
branches: [master]
branches:
- master
pull_request:

jobs:
build:
Expand All @@ -18,7 +20,7 @@ jobs:
php-version: '8.1'

- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepate documentation with doctum
run: ./scripts/prepare_doctum_docs_on_github.sh
Expand All @@ -35,6 +37,7 @@ jobs:
cli-args: "--output-format=github --no-ansi --no-progress -v"

- name: Deploy
if: github.ref == 'refs/head/master'
uses: reggionick/s3-deploy@v3
with:
folder: doctum-output/build/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
coverage: none

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install composer dependencies
run: |
composer update --prefer-dist --no-interaction --no-progress --no-ansi ${COMPOSER_FLAGS}
- name: PHP CS Fixer Tests
run: composer lint
run: composer lint
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
coverage: none

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install composer dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion src/Core/UriComponents.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __construct($stack, $hash = null, $format = null, $filename = nu
/**
* Creates a UriComponent object from an array with 'stack', 'hash', 'format', 'filename' and 'stack' as keys.
*
* @param array{stack: string, hash?: ?string, format?: ?string, filename?: ?string} $config
* @param array $config array shape array{stack: string, hash?: ?string, format?: ?string, filename?: ?string} (not yet supported by doctum)
*
* @since 1.2.0
*/
Expand Down
8 changes: 4 additions & 4 deletions src/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -766,10 +766,10 @@ public function addAutolabels($hash, $organization = null): SourceImage
}

/**
* @param string[] $languages
* @param string $hash
* @param string|null $organization
* @param array{force?: bool} $options if force is true, the description is generated again even if it already exists
* @param string[] $languages
* @param string $hash
* @param string|null $organization
* @param array $options if force is true, the description is generated again even if it already exists. array shape array{force?: bool} (not yet supported by doctum)
*/
public function addAutodescription($languages, $hash, $organization = null, array $options = []): SourceImage

Check failure on line 774 in src/Image.php

View workflow job for this annotation

GitHub Actions / build

Invalid @param tag on "addAutodescription": "array{force?: bool} $options if force is true, the description is generated again even if it already exists" on "Rokka\Client\Image::addAutodescription"

Check failure on line 774 in src/Image.php

View workflow job for this annotation

GitHub Actions / build

The method "addAutodescription" has "1" invalid @param tags. on "Rokka\Client\Image::addAutodescription"
{
Expand Down
12 changes: 5 additions & 7 deletions src/UriHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,13 @@ public static function addOptionsToUri(UriInterface $uri, $options, $shortNames
* ]
* ```
*
* @since 1.2.0
*
* @param array{stack: string, hash?: ?string, format?: ?string, filename?: ?string}|UriComponents $components
* @param UriInterface $uri If this is provided, it will change the path for that object and return
* @param bool $shortNames if short names (like o for option or v for variables) should be used
*
* @throws \RuntimeException
* @param array|UriComponents $components array shape is array{stack: string, hash?: ?string, format?: ?string, filename?: ?string} (not yet supported by doctum)
* @param UriInterface|null $uri If this is provided, it will change the path for that object and return
* @param bool $shortNames if short names (like o for option or v for variables) should be used
*
* @return UriInterface
*
* @since 1.2.0
*/
public static function composeUri($components, ?UriInterface $uri = null, $shortNames = true)
{
Expand Down

0 comments on commit 62b7334

Please sign in to comment.