Skip to content

Commit e5997ac

Browse files
committed
Upgrade examples
1 parent 739f023 commit e5997ac

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

example/class-wp-nav-menu-args.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Data-only class for displaying navigation menu.
3+
* Data object for displaying navigation menu.
44
* Created to aid static analysis.
55
*
66
* @package WordPress

example/class-wp-nav-menu-item.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Data-only class for nav menu item objects.
3+
* Data object for nav menu item objects.
44
* Created to aid static analysis.
55
*
66
* @package WordPress

example/fix-parse_url.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
* Example of parse_url() usage.
44
*/
55

6-
/** @var string[] */
6+
/** @var array<string, string> */
77
$parsed_url = parse_url( urldecode( $url ) );

example/fix-php-errors.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<?php
2+
/**
3+
* Forward PHP errors to PHPStan.
4+
*/
25

3-
// Add this to your tests/phpstan/bootstrap.php file.
6+
// Add this to tests/phpstan/bootstrap.php in your project.
47
function phpstan_error_handler( $errno, $errstr, $errfile, $errline ) {
5-
if ( E_NOTICE !== $errno && strpos($errstr, '/tmp/phpstan/') === false ) {
8+
if ( E_NOTICE !== $errno && strpos( $errstr, '/tmp/phpstan/' ) === false ) {
69
throw new \ErrorException( $errstr, 0, $errno, $errfile, $errline );
710
}
811
return true;

example/phpstan.neon.dist

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
includes:
55
# @see https://github.com/phpstan/phpstan/blob/master/conf/bleedingEdge.neon
6-
# Regular phpstan installation
7-
#- vendor/phpstan/phpstan/conf/bleedingEdge.neon
8-
# PHAR installation
96
- phar://phpstan.phar/conf/bleedingEdge.neon
107
# Include this extension
118
- vendor/szepeviktor/phpstan-wordpress/extension.neon

0 commit comments

Comments
 (0)