Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/wp-includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7595,6 +7595,8 @@ function _device_can_upload() {
*
* @param string $path The resource path or URL.
* @return bool True if the path is a stream URL.
*
* @phpstan-assert-if-true =non-falsy-string $path
*/
function wp_is_stream( $path ) {
$scheme_separator = strpos( $path, '://' );
Expand Down Expand Up @@ -8227,6 +8229,7 @@ function wp_generate_uuid4() {
* to accept any UUID version. Otherwise, only version allowed is `4`.
* @return bool The string is a valid UUID or false on failure.
*
* @phpstan-assert-if-true =lowercase-string&non-falsy-string $uuid
* @phpstan-return ( $version is 4|null ? bool : false )
*/
function wp_is_uuid( $uuid, $version = null ) {
Expand Down
4 changes: 4 additions & 0 deletions src/wp-includes/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ function remove_all_shortcodes() {
*
* @param string $tag Shortcode tag to check.
* @return bool Whether the given shortcode exists.
*
* @phpstan-assert-if-true =non-empty-string $tag
*/
function shortcode_exists( $tag ) {
global $shortcode_tags;
Expand All @@ -148,6 +150,8 @@ function shortcode_exists( $tag ) {
* @param string $tag Shortcode tag to check.
* @return bool Whether the passed content contains the given shortcode.
*
* @phpstan-assert-if-true =non-falsy-string $content
* @phpstan-assert-if-true =non-empty-string $tag
* @phpstan-return ( $tag is '' ? false : ( $content is empty ? false : bool ) )
*/
function has_shortcode( $content, $tag ) {
Expand Down
1 change: 1 addition & 0 deletions src/wp-includes/taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ function get_taxonomy( $taxonomy ) {
* @param string $taxonomy Name of taxonomy object.
* @return bool Whether the taxonomy exists.
*
* @phpstan-assert-if-true =non-falsy-string $taxonomy
* @phpstan-return ( $taxonomy is non-falsy-string ? bool : false )
*/
function taxonomy_exists( $taxonomy ) {
Expand Down
Loading