-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doctum does not yet support array shapes #81
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,11 +50,11 @@ | |
/** | ||
* 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 | ||
*/ | ||
public static function createFromArray($config): self | ||
Check failure on line 57 in src/Core/UriComponents.php GitHub Actions / build
Check failure on line 57 in src/Core/UriComponents.php GitHub Actions / build
Check failure on line 57 in src/Core/UriComponents.php GitHub Actions / build
|
||
{ | ||
if (!isset($config['stack'])) { | ||
throw new \RuntimeException('Stack has to be set'); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -766,12 +766,12 @@ | |
} | ||
|
||
/** | ||
* @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 GitHub Actions / build
Check failure on line 774 in src/Image.php GitHub Actions / build
|
||
{ | ||
$path = implode('/', [ | ||
self::SOURCEIMAGE_RESOURCE, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,19 +102,17 @@ | |
* ] | ||
* ``` | ||
* | ||
* @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) | ||
{ | ||
if (\is_array($components)) { | ||
Check failure on line 115 in src/UriHelper.php GitHub Actions / build
Check failure on line 115 in src/UriHelper.php GitHub Actions / build
Check failure on line 115 in src/UriHelper.php GitHub Actions / build
|
||
$components = UriComponents::createFromArray($components); | ||
} | ||
$stack = $components->getStack(); | ||
|
@@ -168,7 +166,6 @@ | |
// remote_path without seo-filename | ||
|| preg_match('#^/'.$stackPattern.'/'.$pathPattern.'.'.$formatPattern.'$#', $path, $matches) | ||
) { | ||
// @phpstan-ignore-next-line argument.type | ||
$uriComponents = UriComponents::createFromArray($matches); | ||
|
||
$inQuery = Query::parse($uri->getQuery()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should build the doc on pull requests too. just not deploy it - see the if statement in the deploy step