-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
119 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ vendor_prefixed | |
!vendor_prefixed/.gitkeep | ||
!build/strauss.phar | ||
!build/vendor_prefixed/.gitkeep | ||
phpstan.neon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
declare( strict_types=1 ); | ||
|
||
/** | ||
* @param string|mixed[] $filter The name of the filter. | ||
* @param mixed $value The value to filter. | ||
* @param mixed ...$extra_values Extra values. | ||
* | ||
* @return mixed The filtered value. | ||
*/ | ||
function gf_apply_filters( $filter, $value, ...$extra_values ) { | ||
return $value; | ||
} | ||
|
||
/** | ||
* @param string|mixed[] $action The action. | ||
* @param mixed ...$extra_values The extra values. | ||
*/ | ||
function gf_do_action( $action, ...$extra_values ): void { | ||
} | ||
|
||
/** | ||
* Get a specific property of an array without needing to check if that property exists. | ||
* | ||
* Provide a default value if you want to return a specific value if the property is not set. | ||
* | ||
* @since Unknown | ||
* @access public | ||
* | ||
* @param array<mixed> $array Array from which the property's value should be retrieved. | ||
* @param string $prop Name of the property to be retrieved. | ||
* @param mixed $default Optional. Value that should be returned if the property is not set or empty. Defaults to null. | ||
* | ||
* @return null|string|mixed The value | ||
*/ | ||
function rgar( $array, $prop, $default = null ) { | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#$ composer update --optimize-autoloader | ||
#$ vendor/bin/phpstan analyze | ||
|
||
includes: | ||
# @see https://github.com/phpstan/phpstan-src/blob/master/conf/bleedingEdge.neon | ||
- phar://phpstan.phar/conf/bleedingEdge.neon | ||
# Include this extension | ||
- vendor/szepeviktor/phpstan-wordpress/extension.neon | ||
parameters: | ||
level: 5 | ||
bootstrapFiles: | ||
- gfexcel.php | ||
- tests/phpstan/bootstrap.php | ||
editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%' | ||
|
||
inferPrivatePropertyTypeFromConstructor: true | ||
# autoload_files: | ||
# # Missing constants, function and class stubs | ||
# - %currentWorkingDirectory%/tests/phpstan/bootstrap.php | ||
# # Plugin stubs | ||
# - %currentWorkingDirectory%/tests/phpstan/PLUGIN-stubs.php | ||
# # Procedural code | ||
# - %currentWorkingDirectory%/myplugin-functions.php | ||
# autoload_directories: | ||
# - %currentWorkingDirectory%/inc/ | ||
paths: | ||
- src | ||
- tests | ||
|
||
scanDirectories: | ||
- vendor/gravityforms/gravityforms # Gravity Forms has no `autoload` section, so we need to configure the path. | ||
|
||
scanFiles: | ||
- phpstan-stubs/gravityforms.php.stub # Needed until https://github.com/phpstan/phpstan/issues/11559 is resolved. | ||
|
||
# excludes_analyse: | ||
# - %currentWorkingDirectory%/inc/views/ | ||
ignoreErrors: | ||
# Unit tests edge cases | ||
- '/MockObject|stdClass>? given.$/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters