laravel-6 support
This commit is contained in:
40
vendor/sebastian/global-state/.github/stale.yml
vendored
Normal file
40
vendor/sebastian/global-state/.github/stale.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
# Configuration for probot-stale - https://github.com/probot/stale
|
||||
|
||||
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
||||
daysUntilStale: 60
|
||||
|
||||
# Number of days of inactivity before a stale Issue or Pull Request is closed.
|
||||
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
|
||||
daysUntilClose: 7
|
||||
|
||||
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
|
||||
exemptLabels:
|
||||
- enhancement
|
||||
|
||||
# Set to true to ignore issues in a project (defaults to false)
|
||||
exemptProjects: false
|
||||
|
||||
# Set to true to ignore issues in a milestone (defaults to false)
|
||||
exemptMilestones: false
|
||||
|
||||
# Label to use when marking as stale
|
||||
staleLabel: stale
|
||||
|
||||
# Comment to post when marking as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had activity within the last 60 days. It will be closed after 7 days if no further activity occurs. Thank you for your contributions.
|
||||
|
||||
# Comment to post when removing the stale label.
|
||||
# unmarkComment: >
|
||||
# Your comment here.
|
||||
|
||||
# Comment to post when closing a stale Issue or Pull Request.
|
||||
closeComment: >
|
||||
This issue has been automatically closed because it has not had activity since it was marked as stale. Thank you for your contributions.
|
||||
|
||||
# Limit the number of actions per hour, from 1-30. Default is 30
|
||||
limitPerRun: 30
|
||||
|
||||
# Limit to only `issues` or `pulls`
|
||||
only: issues
|
||||
|
2
vendor/sebastian/global-state/.gitignore
vendored
2
vendor/sebastian/global-state/.gitignore
vendored
@@ -1,4 +1,6 @@
|
||||
/.idea
|
||||
/.php_cs
|
||||
/.php_cs.cache
|
||||
/.phpunit.result.cache
|
||||
/composer.lock
|
||||
/vendor
|
||||
|
79
vendor/sebastian/global-state/.php_cs
vendored
79
vendor/sebastian/global-state/.php_cs
vendored
@@ -1,79 +0,0 @@
|
||||
<?php
|
||||
$header = <<<'EOF'
|
||||
This file is part of sebastian/global-state.
|
||||
|
||||
(c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
|
||||
For the full copyright and license information, please view the LICENSE
|
||||
file that was distributed with this source code.
|
||||
EOF;
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
->setRiskyAllowed(true)
|
||||
->setRules(
|
||||
[
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'binary_operator_spaces' => [
|
||||
'align_double_arrow' => true,
|
||||
'align_equals' => true
|
||||
],
|
||||
'blank_line_after_namespace' => true,
|
||||
'blank_line_before_return' => true,
|
||||
'braces' => true,
|
||||
'cast_spaces' => true,
|
||||
'concat_space' => ['spacing' => 'one'],
|
||||
'elseif' => true,
|
||||
'encoding' => true,
|
||||
'full_opening_tag' => true,
|
||||
'function_declaration' => true,
|
||||
#'header_comment' => ['header' => $header, 'separate' => 'none'],
|
||||
'indentation_type' => true,
|
||||
'line_ending' => true,
|
||||
'lowercase_constants' => true,
|
||||
'lowercase_keywords' => true,
|
||||
'method_argument_space' => true,
|
||||
'native_function_invocation' => true,
|
||||
'no_alias_functions' => true,
|
||||
'no_blank_lines_after_class_opening' => true,
|
||||
'no_blank_lines_after_phpdoc' => true,
|
||||
'no_closing_tag' => true,
|
||||
'no_empty_phpdoc' => true,
|
||||
'no_empty_statement' => true,
|
||||
'no_extra_consecutive_blank_lines' => true,
|
||||
'no_leading_namespace_whitespace' => true,
|
||||
'no_singleline_whitespace_before_semicolons' => true,
|
||||
'no_spaces_after_function_name' => true,
|
||||
'no_spaces_inside_parenthesis' => true,
|
||||
'no_trailing_comma_in_list_call' => true,
|
||||
'no_trailing_whitespace' => true,
|
||||
'no_unused_imports' => true,
|
||||
'no_whitespace_in_blank_line' => true,
|
||||
'phpdoc_align' => true,
|
||||
'phpdoc_indent' => true,
|
||||
'phpdoc_no_access' => true,
|
||||
'phpdoc_no_empty_return' => true,
|
||||
'phpdoc_no_package' => true,
|
||||
'phpdoc_scalar' => true,
|
||||
'phpdoc_separation' => true,
|
||||
'phpdoc_to_comment' => true,
|
||||
'phpdoc_trim' => true,
|
||||
'phpdoc_types' => true,
|
||||
'phpdoc_var_without_name' => true,
|
||||
'self_accessor' => true,
|
||||
'simplified_null_return' => true,
|
||||
'single_blank_line_at_eof' => true,
|
||||
'single_import_per_statement' => true,
|
||||
'single_line_after_imports' => true,
|
||||
'single_quote' => true,
|
||||
'ternary_operator_spaces' => true,
|
||||
'trim_array_spaces' => true,
|
||||
'visibility_required' => true,
|
||||
]
|
||||
)
|
||||
->setFinder(
|
||||
PhpCsFixer\Finder::create()
|
||||
->files()
|
||||
->in(__DIR__ . '/src')
|
||||
->in(__DIR__ . '/tests')
|
||||
->name('*.php')
|
||||
);
|
197
vendor/sebastian/global-state/.php_cs.dist
vendored
Normal file
197
vendor/sebastian/global-state/.php_cs.dist
vendored
Normal file
@@ -0,0 +1,197 @@
|
||||
<?php declare(strict_types=1);
|
||||
$header = <<<'EOF'
|
||||
This file is part of sebastian/global-state.
|
||||
|
||||
(c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
|
||||
For the full copyright and license information, please view the LICENSE
|
||||
file that was distributed with this source code.
|
||||
EOF;
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
->setRiskyAllowed(true)
|
||||
->setRules(
|
||||
[
|
||||
'align_multiline_comment' => true,
|
||||
'array_indentation' => true,
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'binary_operator_spaces' => [
|
||||
'operators' => [
|
||||
'=' => 'align',
|
||||
'=>' => 'align',
|
||||
],
|
||||
],
|
||||
'blank_line_after_namespace' => true,
|
||||
'blank_line_before_statement' => [
|
||||
'statements' => [
|
||||
'break',
|
||||
'continue',
|
||||
'declare',
|
||||
'do',
|
||||
'for',
|
||||
'foreach',
|
||||
'if',
|
||||
'include',
|
||||
'include_once',
|
||||
'require',
|
||||
'require_once',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'while',
|
||||
'yield',
|
||||
],
|
||||
],
|
||||
'braces' => true,
|
||||
'cast_spaces' => true,
|
||||
'class_attributes_separation' => ['elements' => ['const', 'method', 'property']],
|
||||
'combine_consecutive_issets' => true,
|
||||
'combine_consecutive_unsets' => true,
|
||||
'compact_nullable_typehint' => true,
|
||||
'concat_space' => ['spacing' => 'one'],
|
||||
'declare_equal_normalize' => ['space' => 'none'],
|
||||
'declare_strict_types' => true,
|
||||
'dir_constant' => true,
|
||||
'elseif' => true,
|
||||
'encoding' => true,
|
||||
'full_opening_tag' => true,
|
||||
'function_declaration' => true,
|
||||
'header_comment' => ['header' => $header, 'separate' => 'none'],
|
||||
'indentation_type' => true,
|
||||
'is_null' => true,
|
||||
'line_ending' => true,
|
||||
'list_syntax' => ['syntax' => 'short'],
|
||||
'logical_operators' => true,
|
||||
'lowercase_cast' => true,
|
||||
'lowercase_constants' => true,
|
||||
'lowercase_keywords' => true,
|
||||
'lowercase_static_reference' => true,
|
||||
'magic_constant_casing' => true,
|
||||
'method_argument_space' => ['ensure_fully_multiline' => true],
|
||||
'modernize_types_casting' => true,
|
||||
'multiline_comment_opening_closing' => true,
|
||||
'multiline_whitespace_before_semicolons' => true,
|
||||
'native_constant_invocation' => true,
|
||||
'native_function_casing' => true,
|
||||
'native_function_invocation' => true,
|
||||
'new_with_braces' => false,
|
||||
'no_alias_functions' => true,
|
||||
'no_alternative_syntax' => true,
|
||||
'no_blank_lines_after_class_opening' => true,
|
||||
'no_blank_lines_after_phpdoc' => true,
|
||||
'no_blank_lines_before_namespace' => true,
|
||||
'no_closing_tag' => true,
|
||||
'no_empty_comment' => true,
|
||||
'no_empty_phpdoc' => true,
|
||||
'no_empty_statement' => true,
|
||||
'no_extra_blank_lines' => true,
|
||||
'no_homoglyph_names' => true,
|
||||
'no_leading_import_slash' => true,
|
||||
'no_leading_namespace_whitespace' => true,
|
||||
'no_mixed_echo_print' => ['use' => 'print'],
|
||||
'no_multiline_whitespace_around_double_arrow' => true,
|
||||
'no_null_property_initialization' => true,
|
||||
'no_php4_constructor' => true,
|
||||
'no_short_bool_cast' => true,
|
||||
'no_short_echo_tag' => true,
|
||||
'no_singleline_whitespace_before_semicolons' => true,
|
||||
'no_spaces_after_function_name' => true,
|
||||
'no_spaces_inside_parenthesis' => true,
|
||||
'no_superfluous_elseif' => true,
|
||||
'no_superfluous_phpdoc_tags' => true,
|
||||
'no_trailing_comma_in_list_call' => true,
|
||||
'no_trailing_comma_in_singleline_array' => true,
|
||||
'no_trailing_whitespace' => true,
|
||||
'no_trailing_whitespace_in_comment' => true,
|
||||
'no_unneeded_control_parentheses' => true,
|
||||
'no_unneeded_curly_braces' => true,
|
||||
'no_unneeded_final_method' => true,
|
||||
'no_unreachable_default_argument_value' => true,
|
||||
'no_unset_on_property' => true,
|
||||
'no_unused_imports' => true,
|
||||
'no_useless_else' => true,
|
||||
'no_useless_return' => true,
|
||||
'no_whitespace_before_comma_in_array' => true,
|
||||
'no_whitespace_in_blank_line' => true,
|
||||
'non_printable_character' => true,
|
||||
'normalize_index_brace' => true,
|
||||
'object_operator_without_whitespace' => true,
|
||||
'ordered_class_elements' => [
|
||||
'order' => [
|
||||
'use_trait',
|
||||
'constant_public',
|
||||
'constant_protected',
|
||||
'constant_private',
|
||||
'property_public_static',
|
||||
'property_protected_static',
|
||||
'property_private_static',
|
||||
'property_public',
|
||||
'property_protected',
|
||||
'property_private',
|
||||
'method_public_static',
|
||||
'construct',
|
||||
'destruct',
|
||||
'magic',
|
||||
'phpunit',
|
||||
'method_public',
|
||||
'method_protected',
|
||||
'method_private',
|
||||
'method_protected_static',
|
||||
'method_private_static',
|
||||
],
|
||||
],
|
||||
'ordered_imports' => true,
|
||||
'phpdoc_add_missing_param_annotation' => true,
|
||||
'phpdoc_align' => true,
|
||||
'phpdoc_annotation_without_dot' => true,
|
||||
'phpdoc_indent' => true,
|
||||
'phpdoc_no_access' => true,
|
||||
'phpdoc_no_empty_return' => true,
|
||||
'phpdoc_no_package' => true,
|
||||
'phpdoc_order' => true,
|
||||
'phpdoc_return_self_reference' => true,
|
||||
'phpdoc_scalar' => true,
|
||||
'phpdoc_separation' => true,
|
||||
'phpdoc_single_line_var_spacing' => true,
|
||||
'phpdoc_to_comment' => true,
|
||||
'phpdoc_trim' => true,
|
||||
'phpdoc_trim_consecutive_blank_line_separation' => true,
|
||||
'phpdoc_types' => ['groups' => ['simple', 'meta']],
|
||||
'phpdoc_types_order' => true,
|
||||
'phpdoc_var_without_name' => true,
|
||||
'pow_to_exponentiation' => true,
|
||||
'protected_to_private' => true,
|
||||
'return_assignment' => true,
|
||||
'return_type_declaration' => ['space_before' => 'none'],
|
||||
'self_accessor' => true,
|
||||
'semicolon_after_instruction' => true,
|
||||
'set_type_to_cast' => true,
|
||||
'short_scalar_cast' => true,
|
||||
'simplified_null_return' => true,
|
||||
'single_blank_line_at_eof' => true,
|
||||
'single_import_per_statement' => true,
|
||||
'single_line_after_imports' => true,
|
||||
'single_quote' => true,
|
||||
'standardize_not_equals' => true,
|
||||
'ternary_to_null_coalescing' => true,
|
||||
'trailing_comma_in_multiline_array' => true,
|
||||
'trim_array_spaces' => true,
|
||||
'unary_operator_spaces' => true,
|
||||
'visibility_required' => [
|
||||
'elements' => [
|
||||
'const',
|
||||
'method',
|
||||
'property',
|
||||
],
|
||||
],
|
||||
'void_return' => true,
|
||||
'whitespace_after_comma_in_array' => true,
|
||||
]
|
||||
)
|
||||
->setFinder(
|
||||
PhpCsFixer\Finder::create()
|
||||
->files()
|
||||
->in(__DIR__ . '/src')
|
||||
->in(__DIR__ . '/tests')
|
||||
);
|
8
vendor/sebastian/global-state/.travis.yml
vendored
8
vendor/sebastian/global-state/.travis.yml
vendored
@@ -1,10 +1,8 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 7.0
|
||||
- 7.0snapshot
|
||||
- 7.1
|
||||
- 7.1snapshot
|
||||
- 7.2
|
||||
- 7.3
|
||||
- master
|
||||
|
||||
sudo: false
|
||||
@@ -14,7 +12,7 @@ before_install:
|
||||
- composer clear-cache
|
||||
|
||||
install:
|
||||
- travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable
|
||||
- travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest
|
||||
|
||||
script:
|
||||
- ./vendor/bin/phpunit --coverage-clover=coverage.xml
|
||||
|
30
vendor/sebastian/global-state/ChangeLog.md
vendored
Normal file
30
vendor/sebastian/global-state/ChangeLog.md
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
# Changes in sebastian/global-state
|
||||
|
||||
All notable changes in `sebastian/global-state` are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
||||
|
||||
## [3.0.2] - 2022-02-10
|
||||
|
||||
### Fixed
|
||||
|
||||
* The `$includeTraits` parameter of `SebastianBergmann\GlobalState\Snapshot::__construct()` is not respected
|
||||
|
||||
## [3.0.1] - 2020-11-30
|
||||
|
||||
### Changed
|
||||
|
||||
* Changed PHP version constraint in `composer.json` from `^7.2` to `>=7.2`
|
||||
|
||||
## [3.0.0] - 2019-02-01
|
||||
|
||||
### Changed
|
||||
|
||||
* `Snapshot::canBeSerialized()` now recursively checks arrays and object graphs for variables that cannot be serialized
|
||||
|
||||
### Removed
|
||||
|
||||
* This component is no longer supported on PHP 7.0 and PHP 7.1
|
||||
|
||||
[3.0.2]: https://github.com/sebastianbergmann/phpunit/compare/3.0.1...3.0.2
|
||||
[3.0.1]: https://github.com/sebastianbergmann/phpunit/compare/3.0.0...3.0.1
|
||||
[3.0.0]: https://github.com/sebastianbergmann/phpunit/compare/2.0.0...3.0.0
|
||||
|
2
vendor/sebastian/global-state/LICENSE
vendored
2
vendor/sebastian/global-state/LICENSE
vendored
@@ -1,6 +1,6 @@
|
||||
sebastian/global-state
|
||||
|
||||
Copyright (c) 2001-2017, Sebastian Bergmann <sebastian@phpunit.de>.
|
||||
Copyright (c) 2001-2022, Sebastian Bergmann <sebastian@phpunit.de>.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
2
vendor/sebastian/global-state/README.md
vendored
2
vendor/sebastian/global-state/README.md
vendored
@@ -1,4 +1,4 @@
|
||||
# GlobalState
|
||||
# global-state
|
||||
|
||||
Snapshotting of global state, factored out of PHPUnit into a stand-alone component.
|
||||
|
||||
|
3
vendor/sebastian/global-state/build.xml
vendored
3
vendor/sebastian/global-state/build.xml
vendored
@@ -9,14 +9,11 @@
|
||||
|
||||
<target name="composer" depends="clean" description="Install dependencies with Composer">
|
||||
<exec executable="composer" taskname="composer">
|
||||
<env key="COMPOSER_DISABLE_XDEBUG_WARN" value="1"/>
|
||||
<arg value="update"/>
|
||||
<arg value="--no-interaction"/>
|
||||
<arg value="--no-progress"/>
|
||||
<arg value="--no-ansi"/>
|
||||
<arg value="--no-suggest"/>
|
||||
<arg value="--optimize-autoloader"/>
|
||||
<arg value="--prefer-stable"/>
|
||||
</exec>
|
||||
</target>
|
||||
</project>
|
||||
|
14
vendor/sebastian/global-state/composer.json
vendored
14
vendor/sebastian/global-state/composer.json
vendored
@@ -10,11 +10,19 @@
|
||||
"email": "sebastian@phpunit.de"
|
||||
}
|
||||
],
|
||||
"prefer-stable": true,
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"sort-packages": true
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.0"
|
||||
"php": ">=7.2",
|
||||
"sebastian/object-reflector": "^1.1.1",
|
||||
"sebastian/recursion-context": "^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^6.0"
|
||||
"ext-dom": "*",
|
||||
"phpunit/phpunit": "^8.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-uopz": "*"
|
||||
@@ -34,7 +42,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0-dev"
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
11
vendor/sebastian/global-state/phpunit.xml
vendored
11
vendor/sebastian/global-state/phpunit.xml
vendored
@@ -1,15 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.1/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.0/phpunit.xsd"
|
||||
bootstrap="vendor/autoload.php"
|
||||
executionOrder="depends,defects"
|
||||
forceCoversAnnotation="true"
|
||||
beStrictAboutCoversAnnotation="true"
|
||||
beStrictAboutOutputDuringTests="true"
|
||||
beStrictAboutTodoAnnotatedTests="true"
|
||||
verbose="true">
|
||||
<testsuite>
|
||||
<directory suffix="Test.php">tests</directory>
|
||||
</testsuite>
|
||||
<testsuites>
|
||||
<testsuite name="default">
|
||||
<directory suffix="Test.php">tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<php>
|
||||
<const name="GLOBALSTATE_TESTSUITE" value="true"/>
|
||||
|
23
vendor/sebastian/global-state/src/Blacklist.php
vendored
23
vendor/sebastian/global-state/src/Blacklist.php
vendored
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,17 +7,12 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState;
|
||||
|
||||
use ReflectionClass;
|
||||
|
||||
/**
|
||||
* A blacklist for global state elements that should not be snapshotted.
|
||||
*/
|
||||
class Blacklist
|
||||
final class Blacklist
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
@@ -49,32 +44,32 @@ class Blacklist
|
||||
*/
|
||||
private $staticAttributes = [];
|
||||
|
||||
public function addGlobalVariable(string $variableName)
|
||||
public function addGlobalVariable(string $variableName): void
|
||||
{
|
||||
$this->globalVariables[$variableName] = true;
|
||||
}
|
||||
|
||||
public function addClass(string $className)
|
||||
public function addClass(string $className): void
|
||||
{
|
||||
$this->classes[] = $className;
|
||||
}
|
||||
|
||||
public function addSubclassesOf(string $className)
|
||||
public function addSubclassesOf(string $className): void
|
||||
{
|
||||
$this->parentClasses[] = $className;
|
||||
}
|
||||
|
||||
public function addImplementorsOf(string $interfaceName)
|
||||
public function addImplementorsOf(string $interfaceName): void
|
||||
{
|
||||
$this->interfaces[] = $interfaceName;
|
||||
}
|
||||
|
||||
public function addClassNamePrefix(string $classNamePrefix)
|
||||
public function addClassNamePrefix(string $classNamePrefix): void
|
||||
{
|
||||
$this->classNamePrefixes[] = $classNamePrefix;
|
||||
}
|
||||
|
||||
public function addStaticAttribute(string $className, string $attributeName)
|
||||
public function addStaticAttribute(string $className, string $attributeName): void
|
||||
{
|
||||
if (!isset($this->staticAttributes[$className])) {
|
||||
$this->staticAttributes[$className] = [];
|
||||
@@ -100,7 +95,7 @@ class Blacklist
|
||||
}
|
||||
}
|
||||
|
||||
$class = new ReflectionClass($className);
|
||||
$class = new \ReflectionClass($className);
|
||||
|
||||
foreach ($this->parentClasses as $type) {
|
||||
if ($class->isSubclassOf($type)) {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,15 +7,12 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState;
|
||||
|
||||
/**
|
||||
* Exports parts of a Snapshot as PHP code.
|
||||
*/
|
||||
class CodeExporter
|
||||
final class CodeExporter
|
||||
{
|
||||
public function constants(Snapshot $snapshot): string
|
||||
{
|
||||
@@ -35,11 +32,11 @@ class CodeExporter
|
||||
|
||||
public function globalVariables(Snapshot $snapshot): string
|
||||
{
|
||||
$result = '$GLOBALS = [];' . PHP_EOL;
|
||||
$result = '$GLOBALS = [];' . \PHP_EOL;
|
||||
|
||||
foreach ($snapshot->globalVariables() as $name => $value) {
|
||||
$result .= \sprintf(
|
||||
'$GLOBALS[%s] = %s;' . PHP_EOL,
|
||||
'$GLOBALS[%s] = %s;' . \PHP_EOL,
|
||||
$this->exportVariable($name),
|
||||
$this->exportVariable($value)
|
||||
);
|
||||
@@ -65,7 +62,7 @@ class CodeExporter
|
||||
|
||||
private function exportVariable($variable): string
|
||||
{
|
||||
if (\is_scalar($variable) || \is_null($variable) ||
|
||||
if (\is_scalar($variable) || null === $variable ||
|
||||
(\is_array($variable) && $this->arrayOnlyContainsScalars($variable))) {
|
||||
return \var_export($variable, true);
|
||||
}
|
||||
@@ -79,8 +76,8 @@ class CodeExporter
|
||||
|
||||
foreach ($array as $element) {
|
||||
if (\is_array($element)) {
|
||||
$result = self::arrayOnlyContainsScalars($element);
|
||||
} elseif (!\is_scalar($element) && !\is_null($element)) {
|
||||
$result = $this->arrayOnlyContainsScalars($element);
|
||||
} elseif (!\is_scalar($element) && null !== $element) {
|
||||
$result = false;
|
||||
}
|
||||
|
||||
|
21
vendor/sebastian/global-state/src/Restorer.php
vendored
21
vendor/sebastian/global-state/src/Restorer.php
vendored
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,13 +7,8 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState;
|
||||
|
||||
use ReflectionProperty;
|
||||
|
||||
/**
|
||||
* Restorer of snapshots of global state.
|
||||
*/
|
||||
@@ -24,9 +19,9 @@ class Restorer
|
||||
*
|
||||
* @throws RuntimeException when the uopz_delete() function is not available
|
||||
*
|
||||
* @see https://github.com/krakjoe/uopz
|
||||
* @see https://github.com/krakjoe/uopz
|
||||
*/
|
||||
public function restoreFunctions(Snapshot $snapshot)
|
||||
public function restoreFunctions(Snapshot $snapshot): void
|
||||
{
|
||||
if (!\function_exists('uopz_delete')) {
|
||||
throw new RuntimeException('The uopz_delete() function is required for this operation');
|
||||
@@ -42,7 +37,7 @@ class Restorer
|
||||
/**
|
||||
* Restores all global and super-global variables from a snapshot.
|
||||
*/
|
||||
public function restoreGlobalVariables(Snapshot $snapshot)
|
||||
public function restoreGlobalVariables(Snapshot $snapshot): void
|
||||
{
|
||||
$superGlobalArrays = $snapshot->superGlobalArrays();
|
||||
|
||||
@@ -53,7 +48,7 @@ class Restorer
|
||||
$globalVariables = $snapshot->globalVariables();
|
||||
|
||||
foreach (\array_keys($GLOBALS) as $key) {
|
||||
if ($key != 'GLOBALS' &&
|
||||
if ($key !== 'GLOBALS' &&
|
||||
!\in_array($key, $superGlobalArrays) &&
|
||||
!$snapshot->blacklist()->isGlobalVariableBlacklisted($key)) {
|
||||
if (\array_key_exists($key, $globalVariables)) {
|
||||
@@ -68,7 +63,7 @@ class Restorer
|
||||
/**
|
||||
* Restores all static attributes in user-defined classes from this snapshot.
|
||||
*/
|
||||
public function restoreStaticAttributes(Snapshot $snapshot)
|
||||
public function restoreStaticAttributes(Snapshot $snapshot): void
|
||||
{
|
||||
$current = new Snapshot($snapshot->blacklist(), false, false, false, false, true, false, false, false, false);
|
||||
$newClasses = \array_diff($current->classes(), $snapshot->classes());
|
||||
@@ -77,7 +72,7 @@ class Restorer
|
||||
|
||||
foreach ($snapshot->staticAttributes() as $className => $staticAttributes) {
|
||||
foreach ($staticAttributes as $name => $value) {
|
||||
$reflector = new ReflectionProperty($className, $name);
|
||||
$reflector = new \ReflectionProperty($className, $name);
|
||||
$reflector->setAccessible(true);
|
||||
$reflector->setValue($value);
|
||||
}
|
||||
@@ -111,7 +106,7 @@ class Restorer
|
||||
/**
|
||||
* Restores a super-global variable array from this snapshot.
|
||||
*/
|
||||
private function restoreSuperGlobalArray(Snapshot $snapshot, string $superGlobalArray)
|
||||
private function restoreSuperGlobalArray(Snapshot $snapshot, string $superGlobalArray): void
|
||||
{
|
||||
$superGlobalVariables = $snapshot->superGlobalVariables();
|
||||
|
||||
|
147
vendor/sebastian/global-state/src/Snapshot.php
vendored
147
vendor/sebastian/global-state/src/Snapshot.php
vendored
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,13 +7,10 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState;
|
||||
|
||||
use ReflectionClass;
|
||||
use Serializable;
|
||||
use SebastianBergmann\ObjectReflector\ObjectReflector;
|
||||
use SebastianBergmann\RecursionContext\Context;
|
||||
|
||||
/**
|
||||
* A snapshot of global state.
|
||||
@@ -124,7 +121,9 @@ class Snapshot
|
||||
$this->includedFiles = \get_included_files();
|
||||
}
|
||||
|
||||
$this->traits = \get_declared_traits();
|
||||
if ($includeTraits) {
|
||||
$this->traits = \get_declared_traits();
|
||||
}
|
||||
}
|
||||
|
||||
public function blacklist(): Blacklist
|
||||
@@ -190,7 +189,7 @@ class Snapshot
|
||||
/**
|
||||
* Creates a snapshot user-defined constants.
|
||||
*/
|
||||
private function snapshotConstants()
|
||||
private function snapshotConstants(): void
|
||||
{
|
||||
$constants = \get_defined_constants(true);
|
||||
|
||||
@@ -202,7 +201,7 @@ class Snapshot
|
||||
/**
|
||||
* Creates a snapshot user-defined functions.
|
||||
*/
|
||||
private function snapshotFunctions()
|
||||
private function snapshotFunctions(): void
|
||||
{
|
||||
$functions = \get_defined_functions();
|
||||
|
||||
@@ -212,10 +211,10 @@ class Snapshot
|
||||
/**
|
||||
* Creates a snapshot user-defined classes.
|
||||
*/
|
||||
private function snapshotClasses()
|
||||
private function snapshotClasses(): void
|
||||
{
|
||||
foreach (\array_reverse(\get_declared_classes()) as $className) {
|
||||
$class = new ReflectionClass($className);
|
||||
$class = new \ReflectionClass($className);
|
||||
|
||||
if (!$class->isUserDefined()) {
|
||||
break;
|
||||
@@ -230,10 +229,10 @@ class Snapshot
|
||||
/**
|
||||
* Creates a snapshot user-defined interfaces.
|
||||
*/
|
||||
private function snapshotInterfaces()
|
||||
private function snapshotInterfaces(): void
|
||||
{
|
||||
foreach (\array_reverse(\get_declared_interfaces()) as $interfaceName) {
|
||||
$class = new ReflectionClass($interfaceName);
|
||||
$class = new \ReflectionClass($interfaceName);
|
||||
|
||||
if (!$class->isUserDefined()) {
|
||||
break;
|
||||
@@ -248,7 +247,7 @@ class Snapshot
|
||||
/**
|
||||
* Creates a snapshot of all global and super-global variables.
|
||||
*/
|
||||
private function snapshotGlobals()
|
||||
private function snapshotGlobals(): void
|
||||
{
|
||||
$superGlobalArrays = $this->superGlobalArrays();
|
||||
|
||||
@@ -257,10 +256,11 @@ class Snapshot
|
||||
}
|
||||
|
||||
foreach (\array_keys($GLOBALS) as $key) {
|
||||
if ($key != 'GLOBALS' &&
|
||||
if ($key !== 'GLOBALS' &&
|
||||
!\in_array($key, $superGlobalArrays) &&
|
||||
$this->canBeSerialized($GLOBALS[$key]) &&
|
||||
!$this->blacklist->isGlobalVariableBlacklisted($key)) {
|
||||
/* @noinspection UnserializeExploitsInspection */
|
||||
$this->globalVariables[$key] = \unserialize(\serialize($GLOBALS[$key]));
|
||||
}
|
||||
}
|
||||
@@ -269,12 +269,13 @@ class Snapshot
|
||||
/**
|
||||
* Creates a snapshot a super-global variable array.
|
||||
*/
|
||||
private function snapshotSuperGlobalArray(string $superGlobalArray)
|
||||
private function snapshotSuperGlobalArray(string $superGlobalArray): void
|
||||
{
|
||||
$this->superGlobalVariables[$superGlobalArray] = [];
|
||||
|
||||
if (isset($GLOBALS[$superGlobalArray]) && \is_array($GLOBALS[$superGlobalArray])) {
|
||||
foreach ($GLOBALS[$superGlobalArray] as $key => $value) {
|
||||
/* @noinspection UnserializeExploitsInspection */
|
||||
$this->superGlobalVariables[$superGlobalArray][$key] = \unserialize(\serialize($value));
|
||||
}
|
||||
}
|
||||
@@ -283,10 +284,10 @@ class Snapshot
|
||||
/**
|
||||
* Creates a snapshot of all static attributes in user-defined classes.
|
||||
*/
|
||||
private function snapshotStaticAttributes()
|
||||
private function snapshotStaticAttributes(): void
|
||||
{
|
||||
foreach ($this->classes as $className) {
|
||||
$class = new ReflectionClass($className);
|
||||
$class = new \ReflectionClass($className);
|
||||
$snapshot = [];
|
||||
|
||||
foreach ($class->getProperties() as $attribute) {
|
||||
@@ -301,6 +302,7 @@ class Snapshot
|
||||
$value = $attribute->getValue();
|
||||
|
||||
if ($this->canBeSerialized($value)) {
|
||||
/* @noinspection UnserializeExploitsInspection */
|
||||
$snapshot[$name] = \unserialize(\serialize($value));
|
||||
}
|
||||
}
|
||||
@@ -315,7 +317,7 @@ class Snapshot
|
||||
/**
|
||||
* Returns a list of all super-global variable arrays.
|
||||
*/
|
||||
private function setupSuperGlobalArrays()
|
||||
private function setupSuperGlobalArrays(): void
|
||||
{
|
||||
$this->superGlobalArrays = [
|
||||
'_ENV',
|
||||
@@ -324,45 +326,96 @@ class Snapshot
|
||||
'_COOKIE',
|
||||
'_SERVER',
|
||||
'_FILES',
|
||||
'_REQUEST'
|
||||
'_REQUEST',
|
||||
];
|
||||
|
||||
if (\ini_get('register_long_arrays') == '1') {
|
||||
$this->superGlobalArrays = \array_merge(
|
||||
$this->superGlobalArrays,
|
||||
[
|
||||
'HTTP_ENV_VARS',
|
||||
'HTTP_POST_VARS',
|
||||
'HTTP_GET_VARS',
|
||||
'HTTP_COOKIE_VARS',
|
||||
'HTTP_SERVER_VARS',
|
||||
'HTTP_POST_FILES'
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo Implement this properly
|
||||
*/
|
||||
private function canBeSerialized($variable): bool
|
||||
{
|
||||
if (!\is_object($variable)) {
|
||||
return !\is_resource($variable);
|
||||
}
|
||||
|
||||
if ($variable instanceof \stdClass) {
|
||||
if (\is_scalar($variable) || $variable === null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$class = new ReflectionClass($variable);
|
||||
if (\is_resource($variable)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
do {
|
||||
if ($class->isInternal()) {
|
||||
return $variable instanceof Serializable;
|
||||
foreach ($this->enumerateObjectsAndResources($variable) as $value) {
|
||||
if (\is_resource($value)) {
|
||||
return false;
|
||||
}
|
||||
} while ($class = $class->getParentClass());
|
||||
|
||||
if (\is_object($value)) {
|
||||
$class = new \ReflectionClass($value);
|
||||
|
||||
if ($class->isAnonymous()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
@\serialize($value);
|
||||
} catch (\Throwable $t) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private function enumerateObjectsAndResources($variable): array
|
||||
{
|
||||
if (isset(\func_get_args()[1])) {
|
||||
$processed = \func_get_args()[1];
|
||||
} else {
|
||||
$processed = new Context;
|
||||
}
|
||||
|
||||
$result = [];
|
||||
|
||||
if ($processed->contains($variable)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
$array = $variable;
|
||||
$processed->add($variable);
|
||||
|
||||
if (\is_array($variable)) {
|
||||
foreach ($array as $element) {
|
||||
if (!\is_array($element) && !\is_object($element) && !\is_resource($element)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!\is_resource($element)) {
|
||||
/** @noinspection SlowArrayOperationsInLoopInspection */
|
||||
$result = \array_merge(
|
||||
$result,
|
||||
$this->enumerateObjectsAndResources($element, $processed)
|
||||
);
|
||||
} else {
|
||||
$result[] = $element;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$result[] = $variable;
|
||||
|
||||
foreach ((new ObjectReflector)->getAttributes($variable) as $value) {
|
||||
if (!\is_array($value) && !\is_object($value) && !\is_resource($value)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!\is_resource($value)) {
|
||||
/** @noinspection SlowArrayOperationsInLoopInspection */
|
||||
$result = \array_merge(
|
||||
$result,
|
||||
$this->enumerateObjectsAndResources($value, $processed)
|
||||
);
|
||||
} else {
|
||||
$result[] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,9 +7,6 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState;
|
||||
|
||||
interface Exception
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,11 +7,8 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState;
|
||||
|
||||
class RuntimeException extends \RuntimeException implements Exception
|
||||
final class RuntimeException extends \RuntimeException implements Exception
|
||||
{
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,9 +7,6 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@@ -21,31 +18,31 @@ use SebastianBergmann\GlobalState\TestFixture\BlacklistedInterface;
|
||||
/**
|
||||
* @covers \SebastianBergmann\GlobalState\Blacklist
|
||||
*/
|
||||
class BlacklistTest extends TestCase
|
||||
final class BlacklistTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \SebastianBergmann\GlobalState\Blacklist
|
||||
*/
|
||||
private $blacklist;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->blacklist = new Blacklist;
|
||||
}
|
||||
|
||||
public function testGlobalVariableThatIsNotBlacklistedIsNotTreatedAsBlacklisted()
|
||||
public function testGlobalVariableThatIsNotBlacklistedIsNotTreatedAsBlacklisted(): void
|
||||
{
|
||||
$this->assertFalse($this->blacklist->isGlobalVariableBlacklisted('variable'));
|
||||
}
|
||||
|
||||
public function testGlobalVariableCanBeBlacklisted()
|
||||
public function testGlobalVariableCanBeBlacklisted(): void
|
||||
{
|
||||
$this->blacklist->addGlobalVariable('variable');
|
||||
|
||||
$this->assertTrue($this->blacklist->isGlobalVariableBlacklisted('variable'));
|
||||
}
|
||||
|
||||
public function testStaticAttributeThatIsNotBlacklistedIsNotTreatedAsBlacklisted()
|
||||
public function testStaticAttributeThatIsNotBlacklistedIsNotTreatedAsBlacklisted(): void
|
||||
{
|
||||
$this->assertFalse(
|
||||
$this->blacklist->isStaticAttributeBlacklisted(
|
||||
@@ -55,7 +52,7 @@ class BlacklistTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testClassCanBeBlacklisted()
|
||||
public function testClassCanBeBlacklisted(): void
|
||||
{
|
||||
$this->blacklist->addClass(BlacklistedClass::class);
|
||||
|
||||
@@ -67,7 +64,7 @@ class BlacklistTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testSubclassesCanBeBlacklisted()
|
||||
public function testSubclassesCanBeBlacklisted(): void
|
||||
{
|
||||
$this->blacklist->addSubclassesOf(BlacklistedClass::class);
|
||||
|
||||
@@ -79,7 +76,7 @@ class BlacklistTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testImplementorsCanBeBlacklisted()
|
||||
public function testImplementorsCanBeBlacklisted(): void
|
||||
{
|
||||
$this->blacklist->addImplementorsOf(BlacklistedInterface::class);
|
||||
|
||||
@@ -91,7 +88,7 @@ class BlacklistTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testClassNamePrefixesCanBeBlacklisted()
|
||||
public function testClassNamePrefixesCanBeBlacklisted(): void
|
||||
{
|
||||
$this->blacklist->addClassNamePrefix('SebastianBergmann\GlobalState');
|
||||
|
||||
@@ -103,7 +100,7 @@ class BlacklistTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testStaticAttributeCanBeBlacklisted()
|
||||
public function testStaticAttributeCanBeBlacklisted(): void
|
||||
{
|
||||
$this->blacklist->addStaticAttribute(
|
||||
BlacklistedClass::class,
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,9 +7,6 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@@ -17,12 +14,12 @@ use PHPUnit\Framework\TestCase;
|
||||
/**
|
||||
* @covers \SebastianBergmann\GlobalState\CodeExporter
|
||||
*/
|
||||
class CodeExporterTest extends TestCase
|
||||
final class CodeExporterTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @runInSeparateProcess
|
||||
*/
|
||||
public function testCanExportGlobalVariablesToCode()
|
||||
public function testCanExportGlobalVariablesToCode(): void
|
||||
{
|
||||
$GLOBALS = ['foo' => 'bar'];
|
||||
|
||||
@@ -31,7 +28,7 @@ class CodeExporterTest extends TestCase
|
||||
$exporter = new CodeExporter;
|
||||
|
||||
$this->assertEquals(
|
||||
'$GLOBALS = [];' . PHP_EOL . '$GLOBALS[\'foo\'] = \'bar\';' . PHP_EOL,
|
||||
'$GLOBALS = [];' . \PHP_EOL . '$GLOBALS[\'foo\'] = \'bar\';' . \PHP_EOL,
|
||||
$exporter->globalVariables($snapshot)
|
||||
);
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,43 +7,26 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* Class Restorer.
|
||||
* @covers \SebastianBergmann\GlobalState\Restorer
|
||||
*
|
||||
* @uses \SebastianBergmann\GlobalState\Blacklist
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot
|
||||
*/
|
||||
class RestorerTest extends TestCase
|
||||
final class RestorerTest extends TestCase
|
||||
{
|
||||
public static function setUpBeforeClass()
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
$GLOBALS['varBool'] = false;
|
||||
$GLOBALS['varNull'] = null;
|
||||
$_GET['varGet'] = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check global variables are correctly backuped and restored (unit test).
|
||||
*
|
||||
* @covers \SebastianBergmann\GlobalState\Restorer::restoreGlobalVariables
|
||||
* @covers \SebastianBergmann\GlobalState\Restorer::restoreSuperGlobalArray
|
||||
*
|
||||
* @uses \SebastianBergmann\GlobalState\Blacklist::isGlobalVariableBlacklisted
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::__construct
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::blacklist
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::canBeSerialized
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::globalVariables
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::setupSuperGlobalArrays
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::snapshotGlobals
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::snapshotSuperGlobalArray
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::superGlobalArrays
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::superGlobalVariables
|
||||
*/
|
||||
public function testRestorerGlobalVariable()
|
||||
public function testRestorerGlobalVariable(): void
|
||||
{
|
||||
$snapshot = new Snapshot(null, true, false, false, false, false, false, false, false, false);
|
||||
$restorer = new Restorer;
|
||||
@@ -58,27 +41,9 @@ class RestorerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Check global variables are correctly backuped and restored.
|
||||
*
|
||||
* The real test is the second, but the first has to be executed to backup the globals.
|
||||
*
|
||||
* @backupGlobals enabled
|
||||
* @covers \SebastianBergmann\GlobalState\Restorer::restoreGlobalVariables
|
||||
* @covers \SebastianBergmann\GlobalState\Restorer::restoreSuperGlobalArray
|
||||
*
|
||||
* @uses \SebastianBergmann\GlobalState\Blacklist::addClassNamePrefix
|
||||
* @uses \SebastianBergmann\GlobalState\Blacklist::isGlobalVariableBlacklisted
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::__construct
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::blacklist
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::canBeSerialized
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::globalVariables
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::setupSuperGlobalArrays
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::snapshotGlobals
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::snapshotSuperGlobalArray
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::superGlobalArrays
|
||||
* @uses \SebastianBergmann\GlobalState\Snapshot::superGlobalVariables
|
||||
*/
|
||||
public function testIntegrationRestorerGlobalVariables()
|
||||
public function testIntegrationRestorerGlobalVariables(): void
|
||||
{
|
||||
$this->assertArrayHasKey('varBool', $GLOBALS);
|
||||
$this->assertEquals(false, $GLOBALS['varBool']);
|
||||
@@ -89,11 +54,9 @@ class RestorerTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Check global variables are correctly backuped and restored.
|
||||
*
|
||||
* @depends testIntegrationRestorerGlobalVariables
|
||||
*/
|
||||
public function testIntegrationRestorerGlobalVariables2()
|
||||
public function testIntegrationRestorerGlobalVariables2(): void
|
||||
{
|
||||
$this->assertArrayHasKey('varBool', $GLOBALS);
|
||||
$this->assertEquals(false, $GLOBALS['varBool']);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,12 +7,8 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState;
|
||||
|
||||
use ArrayObject;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use SebastianBergmann\GlobalState\TestFixture\BlacklistedInterface;
|
||||
use SebastianBergmann\GlobalState\TestFixture\SnapshotClass;
|
||||
@@ -20,50 +16,47 @@ use SebastianBergmann\GlobalState\TestFixture\SnapshotTrait;
|
||||
|
||||
/**
|
||||
* @covers \SebastianBergmann\GlobalState\Snapshot
|
||||
*
|
||||
* @uses \SebastianBergmann\GlobalState\Blacklist
|
||||
*/
|
||||
class SnapshotTest extends TestCase
|
||||
final class SnapshotTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var Blacklist
|
||||
*/
|
||||
private $blacklist;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->blacklist = $this->createMock(Blacklist::class);
|
||||
$this->blacklist = new Blacklist;
|
||||
}
|
||||
|
||||
public function testStaticAttributes()
|
||||
public function testStaticAttributes(): void
|
||||
{
|
||||
$this->blacklist->method('isStaticAttributeBlacklisted')->willReturnCallback(
|
||||
function ($class) {
|
||||
return $class !== SnapshotClass::class;
|
||||
}
|
||||
);
|
||||
|
||||
SnapshotClass::init();
|
||||
|
||||
$this->blacklistAllLoadedClassesExceptSnapshotClass();
|
||||
|
||||
$snapshot = new Snapshot($this->blacklist, false, true, false, false, false, false, false, false, false);
|
||||
|
||||
$expected = [
|
||||
SnapshotClass::class => [
|
||||
'string' => 'snapshot',
|
||||
'arrayObject' => new ArrayObject([1, 2, 3]),
|
||||
'stdClass' => new \stdClass(),
|
||||
]
|
||||
'string' => 'string',
|
||||
'objects' => [new \stdClass],
|
||||
],
|
||||
];
|
||||
|
||||
$this->assertEquals($expected, $snapshot->staticAttributes());
|
||||
}
|
||||
|
||||
public function testConstants()
|
||||
public function testConstants(): void
|
||||
{
|
||||
$snapshot = new Snapshot($this->blacklist, false, false, true, false, false, false, false, false, false);
|
||||
|
||||
$this->assertArrayHasKey('GLOBALSTATE_TESTSUITE', $snapshot->constants());
|
||||
}
|
||||
|
||||
public function testFunctions()
|
||||
public function testFunctions(): void
|
||||
{
|
||||
$snapshot = new Snapshot($this->blacklist, false, false, false, true, false, false, false, false, false);
|
||||
$functions = $snapshot->functions();
|
||||
@@ -72,7 +65,7 @@ class SnapshotTest extends TestCase
|
||||
$this->assertNotContains('assert', $functions);
|
||||
}
|
||||
|
||||
public function testClasses()
|
||||
public function testClasses(): void
|
||||
{
|
||||
$snapshot = new Snapshot($this->blacklist, false, false, false, false, true, false, false, false, false);
|
||||
$classes = $snapshot->classes();
|
||||
@@ -81,7 +74,7 @@ class SnapshotTest extends TestCase
|
||||
$this->assertNotContains(Exception::class, $classes);
|
||||
}
|
||||
|
||||
public function testInterfaces()
|
||||
public function testInterfaces(): void
|
||||
{
|
||||
$snapshot = new Snapshot($this->blacklist, false, false, false, false, false, true, false, false, false);
|
||||
$interfaces = $snapshot->interfaces();
|
||||
@@ -90,7 +83,7 @@ class SnapshotTest extends TestCase
|
||||
$this->assertNotContains(\Countable::class, $interfaces);
|
||||
}
|
||||
|
||||
public function testTraits()
|
||||
public function testTraits(): void
|
||||
{
|
||||
\spl_autoload_call('SebastianBergmann\GlobalState\TestFixture\SnapshotTrait');
|
||||
|
||||
@@ -99,7 +92,7 @@ class SnapshotTest extends TestCase
|
||||
$this->assertContains(SnapshotTrait::class, $snapshot->traits());
|
||||
}
|
||||
|
||||
public function testIniSettings()
|
||||
public function testIniSettings(): void
|
||||
{
|
||||
$snapshot = new Snapshot($this->blacklist, false, false, false, false, false, false, false, true, false);
|
||||
$iniSettings = $snapshot->iniSettings();
|
||||
@@ -108,9 +101,20 @@ class SnapshotTest extends TestCase
|
||||
$this->assertEquals('Etc/UTC', $iniSettings['date.timezone']);
|
||||
}
|
||||
|
||||
public function testIncludedFiles()
|
||||
public function testIncludedFiles(): void
|
||||
{
|
||||
$snapshot = new Snapshot($this->blacklist, false, false, false, false, false, false, false, false, true);
|
||||
$this->assertContains(__FILE__, $snapshot->includedFiles());
|
||||
}
|
||||
|
||||
private function blacklistAllLoadedClassesExceptSnapshotClass(): void
|
||||
{
|
||||
foreach (\get_declared_classes() as $class) {
|
||||
if ($class === SnapshotClass::class) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->blacklist->addClass($class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,9 +7,6 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
class BlacklistedChildClass extends BlacklistedClass
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,9 +7,6 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
class BlacklistedClass
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,9 +7,6 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
class BlacklistedImplementor implements BlacklistedInterface
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,9 +7,6 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
interface BlacklistedInterface
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,31 +7,29 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
use DomDocument;
|
||||
use ArrayObject;
|
||||
|
||||
class SnapshotClass
|
||||
{
|
||||
private static $string = 'snapshot';
|
||||
private static $dom;
|
||||
private static $closure;
|
||||
private static $arrayObject;
|
||||
private static $snapshotDomDocument;
|
||||
private static $resource;
|
||||
private static $stdClass;
|
||||
private static $string = 'string';
|
||||
|
||||
public static function init()
|
||||
private static $closures = [];
|
||||
|
||||
private static $files = [];
|
||||
|
||||
private static $resources = [];
|
||||
|
||||
private static $objects = [];
|
||||
|
||||
public static function init(): void
|
||||
{
|
||||
self::$dom = new DomDocument();
|
||||
self::$closure = function () {};
|
||||
self::$arrayObject = new ArrayObject([1, 2, 3]);
|
||||
self::$snapshotDomDocument = new SnapshotDomDocument();
|
||||
self::$resource = \fopen('php://memory', 'r');
|
||||
self::$stdClass = new \stdClass();
|
||||
self::$closures[] = function (): void {
|
||||
};
|
||||
|
||||
self::$files[] = new \SplFileInfo(__FILE__);
|
||||
|
||||
self::$resources[] = \fopen('php://memory', 'r');
|
||||
|
||||
self::$objects[] = new \stdClass;
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,9 +7,6 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
use DomDocument;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,11 +7,8 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
function snapshotFunction()
|
||||
function snapshotFunction(): void
|
||||
{
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/global-state.
|
||||
*
|
||||
@@ -7,9 +7,6 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SebastianBergmann\GlobalState\TestFixture;
|
||||
|
||||
trait SnapshotTrait
|
||||
|
2
vendor/sebastian/type/.gitattributes
vendored
Normal file
2
vendor/sebastian/type/.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/tools export-ignore
|
||||
|
1
vendor/sebastian/type/.github/FUNDING.yml
vendored
Normal file
1
vendor/sebastian/type/.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
patreon: s_bergmann
|
72
vendor/sebastian/type/.gitignore
vendored
Normal file
72
vendor/sebastian/type/.gitignore
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
/.php_cs
|
||||
/.php_cs.cache
|
||||
/.phpunit.result.cache
|
||||
/composer.lock
|
||||
/vendor
|
||||
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
499
vendor/sebastian/type/.idea/inspectionProfiles/Project_Default.xml
generated
vendored
Normal file
499
vendor/sebastian/type/.idea/inspectionProfiles/Project_Default.xml
generated
vendored
Normal file
@@ -0,0 +1,499 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="AmdModulesDependencies" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularAmbiguousComponentTag" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularCliAddDependency" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularIncorrectTemplateDefinition" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularInsecureBindingToEvent" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularInvalidAnimationTriggerAssignment" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularInvalidEntryComponent" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularInvalidExpressionResultType" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularInvalidImportedOrDeclaredSymbol" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularInvalidSelector" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularInvalidTemplateReferenceVariable" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularMissingEventHandler" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularMissingOrInvalidDeclarationInModule" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularMultipleStructuralDirectives" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularNonEmptyNgContent" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularRecursiveModuleImportExport" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularUndefinedBinding" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularUndefinedModuleExport" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AngularUndefinedTag" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AutoloadingIssuesInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="BadExceptionsProcessingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="BadExpressionStatementJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="BladeControlDirectives" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CallerJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CheckDtdRefs" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CheckEmptyScriptTag" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CheckImageSize" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CheckNodeTest" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CheckTagEmptyBody" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CheckValidXmlInScriptTagBody" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CheckXmlFileWithXercesValidator" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="ClassOverridesFieldOfSuperClassInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="CoffeeScriptArgumentsOutsideFunction" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CoffeeScriptFunctionSignatures" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CoffeeScriptInfiniteLoop" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CoffeeScriptLiteralNotFunction" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CoffeeScriptModulesDependencies" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CoffeeScriptSillyAssignment" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CoffeeScriptSwitchStatementWithNoDefaultBranch" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CoffeeScriptUnusedLocalSymbols" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CommaExpressionJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ComposeUnknownKeys" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="ComposeUnknownValues" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="ConstantConditionalExpressionJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ConstantIfStatementJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ContinueOrBreakFromFinallyBlockJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CssFloatPxLength" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CssInvalidAtRule" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CssInvalidCharsetRule" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CssInvalidElement" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CssInvalidFunction" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CssInvalidHtmlTagReference" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CssInvalidImport" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CssInvalidMediaFeature" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CssInvalidPropertyValue" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CssInvalidPseudoSelector" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CssMissingComma" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CssNegativeValue" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CssNoGenericFontName" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CssOverwrittenProperties" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CssRedundantUnit" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CssReplaceWithShorthandSafely" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CssReplaceWithShorthandUnsafely" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="CssUnitlessNumber" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CssUnknownProperty" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="myCustomPropertiesEnabled" value="false" />
|
||||
<option name="myIgnoreVendorSpecificProperties" value="false" />
|
||||
<option name="myCustomPropertiesList">
|
||||
<value>
|
||||
<list size="0" />
|
||||
</value>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="CssUnknownTarget" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CssUnresolvedClass" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CssUnresolvedCustomProperty" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CssUnusedSymbol" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CucumberExamplesColon" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CucumberMissedExamples" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CucumberTableInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CucumberUndefinedStep" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="DisallowWritingIntoStaticPropertiesInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="DockerFileAddOrCopySemantic" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="DockerFileArgumentCount" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="DockerFileAssignments" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="DuplicateCaseLabelJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="DuplicateKeyInSection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="DuplicateSectionInFile" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ES6BindWithArrowFunction" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ES6CheckImport" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ES6ClassMemberInitializationOrder" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ES6ConvertModuleExportToExport" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="ES6ConvertRequireIntoImport" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="ES6ConvertToForOf" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="ES6ConvertVarToLetConst" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ES6MissingAwait" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="ES6ModulesDependencies" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ES6PossiblyAsyncFunction" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ES6ShorthandObjectProperty" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="ES6UnusedImports" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="EmptyStatementBodyJS" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="m_reportEmptyBlocks" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ExceptionCaughtLocallyJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="FallThroughInSwitchStatementJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="FileHeaderInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="FlowJSConfig" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="FlowJSFlagCommentPlacement" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ForgottenDebugOutputInspection" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="configuration">
|
||||
<list>
|
||||
<option value="\Codeception\Util\Debug::debug" />
|
||||
<option value="\Codeception\Util\Debug::pause" />
|
||||
<option value="\Doctrine::dump" />
|
||||
<option value="\Doctrine\Common\Util\Debug::dump" />
|
||||
<option value="\Doctrine\Common\Util\Debug::export" />
|
||||
<option value="\Illuminate\Support\Debug\Dumper::dump" />
|
||||
<option value="\Symfony\Component\Debug\Debug::enable" />
|
||||
<option value="\Symfony\Component\Debug\DebugClassLoader::enable" />
|
||||
<option value="\Symfony\Component\Debug\ErrorHandler::register" />
|
||||
<option value="\Symfony\Component\Debug\ExceptionHandler::register" />
|
||||
<option value="\TYPO3\CMS\Core\Utility\DebugUtility::debug" />
|
||||
<option value="\Zend\Debug\Debug::dump" />
|
||||
<option value="\Zend\Di\Display\Console::export" />
|
||||
<option value="\Zend_Debug::dump" />
|
||||
<option value="dd" />
|
||||
<option value="debug_print_backtrace" />
|
||||
<option value="debug_zval_dump" />
|
||||
<option value="dpm" />
|
||||
<option value="dpq" />
|
||||
<option value="dsm" />
|
||||
<option value="dump" />
|
||||
<option value="dvm" />
|
||||
<option value="error_log" />
|
||||
<option value="kpr" />
|
||||
<option value="phpinfo" />
|
||||
<option value="print_r" />
|
||||
<option value="var_dump" />
|
||||
<option value="var_export" />
|
||||
<option value="xdebug_break" />
|
||||
<option value="xdebug_call_class" />
|
||||
<option value="xdebug_call_file" />
|
||||
<option value="xdebug_call_function" />
|
||||
<option value="xdebug_call_line" />
|
||||
<option value="xdebug_code_coverage_started" />
|
||||
<option value="xdebug_debug_zval" />
|
||||
<option value="xdebug_debug_zval_stdout" />
|
||||
<option value="xdebug_dump_superglobals" />
|
||||
<option value="xdebug_enable" />
|
||||
<option value="xdebug_get_code_coverage" />
|
||||
<option value="xdebug_get_collected_errors" />
|
||||
<option value="xdebug_get_declared_vars" />
|
||||
<option value="xdebug_get_function_stack" />
|
||||
<option value="xdebug_get_headers" />
|
||||
<option value="xdebug_get_monitored_functions" />
|
||||
<option value="xdebug_get_profiler_filename" />
|
||||
<option value="xdebug_get_stack_depth" />
|
||||
<option value="xdebug_get_tracefile_name" />
|
||||
<option value="xdebug_is_enabled" />
|
||||
<option value="xdebug_memory_usage" />
|
||||
<option value="xdebug_peak_memory_usage" />
|
||||
<option value="xdebug_print_function_stack" />
|
||||
<option value="xdebug_start_code_coverage" />
|
||||
<option value="xdebug_start_error_collection" />
|
||||
<option value="xdebug_start_function_monitor" />
|
||||
<option value="xdebug_start_trace" />
|
||||
<option value="xdebug_stop_code_coverage" />
|
||||
<option value="xdebug_stop_error_collection" />
|
||||
<option value="xdebug_stop_function_monitor" />
|
||||
<option value="xdebug_stop_trace" />
|
||||
<option value="xdebug_time_index" />
|
||||
<option value="xdebug_var_dump" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="migratedIntoUserSpace" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="GherkinBrokenTableInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="GherkinMisplacedBackground" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="GherkinScenarioToScenarioOutline" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="HamlNestedTagContent" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HardwiredNamespacePrefix" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlDeprecatedAttribute" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlDeprecatedTag" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlExtraClosingTag" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlFormInputWithoutLabel" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlMissingClosingTag" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlRequiredAltAttribute" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlRequiredLangAttribute" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlRequiredTitleElement" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlUnknownAnchorTarget" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlUnknownAttribute" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="myValues">
|
||||
<value>
|
||||
<list size="0" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="myCustomValuesEnabled" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="HtmlUnknownBooleanAttribute" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlUnknownTag" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="myValues">
|
||||
<value>
|
||||
<list size="6">
|
||||
<item index="0" class="java.lang.String" itemvalue="nobr" />
|
||||
<item index="1" class="java.lang.String" itemvalue="noembed" />
|
||||
<item index="2" class="java.lang.String" itemvalue="comment" />
|
||||
<item index="3" class="java.lang.String" itemvalue="noscript" />
|
||||
<item index="4" class="java.lang.String" itemvalue="embed" />
|
||||
<item index="5" class="java.lang.String" itemvalue="script" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myCustomValuesEnabled" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="HtmlUnknownTarget" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ImplicitTypeConversion" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="BITS" value="1720" />
|
||||
<option name="FLAG_EXPLICIT_CONVERSION" value="true" />
|
||||
<option name="IGNORE_NODESET_TO_BOOLEAN_VIA_STRING" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="IncompatibleMaskJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="InconsistentLineSeparators" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="IndexZeroUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="InfiniteLoopJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="InfiniteRecursionJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSAccessibilityCheck" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSAnnotator" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="JSArrowFunctionBracesCanBeRemoved" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="JSAssignmentUsedAsCondition" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSBitwiseOperatorUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSCheckFunctionSignatures" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSClosureCompilerSyntax" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSCommentMatchesSignature" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSComparisonWithNaN" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSConsecutiveCommasInArrayLiteral" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSConstructorReturnsPrimitive" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSDeprecatedSymbols" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSDuplicatedDeclaration" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSEqualityComparisonWithCoercion" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSFileReferences" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSFunctionExpressionToArrowFunction" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="JSIgnoredPromiseFromCall" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSIncompatibleTypesComparison" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSJQueryEfficiency" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSJoinVariableDeclarationAndAssignment" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="JSLastCommaInArrayLiteral" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSLastCommaInObjectLiteral" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSMethodCanBeStatic" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSMismatchedCollectionQueryUpdate" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="queries" value="trace,write,forEach,length" />
|
||||
<option name="updates" value="pop,push,shift,splice,unshift,add,insert,remove" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="JSMissingSwitchBranches" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="JSMissingSwitchDefault" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="JSNonASCIINames" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSObjectNullOrUndefined" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSPotentiallyInvalidConstructorUsage" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="myConsiderUppercaseFunctionsToBeConstructors" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="JSPotentiallyInvalidTargetOfIndexedPropertyAccess" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSPotentiallyInvalidUsageOfClassThis" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSPotentiallyInvalidUsageOfThis" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSPrimitiveTypeWrapperUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSRedeclarationOfBlockScope" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="JSRedundantSwitchStatement" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSReferencingArgumentsOutsideOfFunction" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="JSReferencingMutableVariableFromClosure" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSRemoveUnnecessaryParentheses" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="JSStringConcatenationToES6Template" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="JSSuspiciousNameCombination" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<group names="x,width,left,right" />
|
||||
<group names="y,height,top,bottom" />
|
||||
<exclude classes="Math" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="JSSwitchVariableDeclarationIssue" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSTestFailedLine" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSTypeOfValues" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSUndeclaredVariable" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSUndefinedPropertyAssignment" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSUnfilteredForInLoop" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSUnnecessarySemicolon" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSUnreachableSwitchBranches" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSUnresolvedExtXType" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSUnresolvedFunction" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSUnresolvedLibraryURL" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSUnresolvedVariable" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSUnusedAssignment" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSUnusedGlobalSymbols" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSUnusedLocalSymbols" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSValidateJSDoc" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSValidateTypes" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JSXNamespaceValidation" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="Json5StandardCompliance" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="JsonDuplicatePropertyKeys" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JsonSchemaCompliance" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JsonSchemaDeprecation" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JsonSchemaRefReference" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JsonStandardCompliance" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="LessResolvedByNameOnly" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LessUnresolvedMixin" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LessUnresolvedVariable" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LoopStatementThatDoesntLoopJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MarkdownUnresolvedFileReference" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MissingSinceTagDocInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MssqlBuiltinInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MssqlTriggerInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MysqlParsingInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="NodeJsCodingAssistanceForCoreModules" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="NodeModulesDependencies" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="NpmUsedModulesInstalled" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="OctalIntegerJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PackageJsonMismatchedDependency" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PgSelectFromProcedureInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PhingDomInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="PhpAssignmentInConditionInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpDivisionByZeroInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpDocMissingReturnTagInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PhpDocSignatureInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PhpFullyQualifiedNameUsageInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PhpIncludeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PhpMethodOrClassCallIsNotCaseSensitiveInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpMissingStrictTypesDeclarationInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpMultipleClassesDeclarationsInOneFile" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpShortOpenTagInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpTraditionalSyntaxArrayLiteralInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpUnnecessaryFullyQualifiedNameInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PhpUsageOfSilenceOperatorInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PhpVariableVariableInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PointlessArithmeticExpressionJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PointlessBooleanExpressionJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ProblematicWhitespace" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="RedundantTypeConversion" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="CHECK_ANY" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="RegExpAnonymousGroup" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="RequiredAttributes" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="myAdditionalRequiredHtmlAttributes" value="" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ReservedWordUsedAsNameJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ReturnFromFinallyBlockJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SassScssResolvedByNameOnly" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SassScssUnresolvedMixin" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SassScssUnresolvedPlaceholderSelector" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SassScssUnresolvedVariable" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SecurityAdvisoriesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="REPORT_MISSING_ROAVE_ADVISORIES" value="false" />
|
||||
<option name="optionConfiguration">
|
||||
<list>
|
||||
<option value="barryvdh/laravel-debugbar" />
|
||||
<option value="behat/behat" />
|
||||
<option value="brianium/paratest" />
|
||||
<option value="codeception/codeception" />
|
||||
<option value="codeception/mockery-module" />
|
||||
<option value="codeception/specify" />
|
||||
<option value="codeception/verify" />
|
||||
<option value="codedungeon/phpunit-result-printer" />
|
||||
<option value="composer/composer" />
|
||||
<option value="doctrine/coding-standard" />
|
||||
<option value="filp/whoops" />
|
||||
<option value="friendsofphp/php-cs-fixer" />
|
||||
<option value="humbug/humbug" />
|
||||
<option value="infection/infection" />
|
||||
<option value="jakub-onderka/php-parallel-lint" />
|
||||
<option value="johnkary/phpunit-speedtrap" />
|
||||
<option value="mikey179/vfsStream" />
|
||||
<option value="mockery/mockery" />
|
||||
<option value="mybuilder/phpunit-accelerator" />
|
||||
<option value="orchestra/testbench" />
|
||||
<option value="pdepend/pdepend" />
|
||||
<option value="phan/phan" />
|
||||
<option value="phing/phing" />
|
||||
<option value="phpcompatibility/php-compatibility" />
|
||||
<option value="phpmd/phpmd" />
|
||||
<option value="phpro/grumphp" />
|
||||
<option value="phpspec/phpspec" />
|
||||
<option value="phpspec/prophecy" />
|
||||
<option value="phpstan/phpstan" />
|
||||
<option value="phpunit/dbunit" />
|
||||
<option value="phpunit/phpcov" />
|
||||
<option value="phpunit/phpunit" />
|
||||
<option value="phpunit/phpunit-selenium" />
|
||||
<option value="povils/phpmnd" />
|
||||
<option value="roave/security-advisories" />
|
||||
<option value="satooshi/php-coveralls" />
|
||||
<option value="sebastian/phpcpd" />
|
||||
<option value="slevomat/coding-standard" />
|
||||
<option value="spatie/phpunit-watcher" />
|
||||
<option value="squizlabs/php_codesniffer" />
|
||||
<option value="sstalle/php7cc" />
|
||||
<option value="symfony/debug" />
|
||||
<option value="symfony/maker-bundle" />
|
||||
<option value="symfony/phpunit-bridge" />
|
||||
<option value="symfony/var-dumper" />
|
||||
<option value="vimeo/psalm" />
|
||||
<option value="wimg/php-compatibility" />
|
||||
<option value="yiisoft/yii2-debug" />
|
||||
<option value="yiisoft/yii2-gii" />
|
||||
<option value="zendframework/zend-debug" />
|
||||
<option value="zendframework/zend-test" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ShiftOutOfRangeJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SillyAssignmentJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||
<option name="processCode" value="true" />
|
||||
<option name="processLiterals" value="true" />
|
||||
<option name="processComments" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="SqlAddNotNullColumnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlAmbiguousColumnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlAutoIncrementDuplicateInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlCheckUsingColumnsInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlConstantConditionInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlDeprecateTypeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlDerivedTableAliasInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlDialectInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlDropIndexedColumnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlErrorHandlingInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlIdentifierInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlIllegalCursorStateInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlInsertValuesInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlJoinWithoutOnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlNoDataSourceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlNullComparisonInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlResolveInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlShouldBeInGroupByInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlSideEffectsInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlSignatureInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlStorageInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlTypeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlUnreachableCodeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlUnusedSubqueryItemInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlUnusedVariableInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SqlWithoutWhereInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SuspiciousTypeOfGuard" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ThisExpressionReferencesGlobalObjectJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ThrowFromFinallyBlockJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TrivialConditionalJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TrivialIfJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptAbstractClassConstructorCanBeMadeProtected" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptAccessibilityCheck" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptCheckImport" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptConfig" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptFieldCanBeMadeReadonly" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptLibrary" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptMissingAugmentationImport" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptPreferShortImport" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptSuspiciousConstructorParameterAssignment" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptUMDGlobal" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptUnresolvedFunction" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptUnresolvedVariable" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptValidateJSTypes" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TypeScriptValidateTypes" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="TypescriptExplicitMemberType" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||
<inspection_tool class="UnnecessaryBooleanCheckInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="UnnecessaryContinueJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnnecessaryLabelJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnnecessaryLabelOnBreakStatementJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnnecessaryLabelOnContinueStatementJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnnecessaryLocalVariableJS" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="m_ignoreImmediatelyReturnedVariables" value="false" />
|
||||
<option name="m_ignoreAnnotatedVariables" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="UnnecessaryReturnJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnqualifiedReferenceInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="UnreachableCodeJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnresolvedReference" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="UnterminatedStatementJS" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="ignoreSemicolonAtEndOfBlock" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="VueDataFunction" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="VueDuplicateTag" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="WebpackConfigHighlighting" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="WithStatementJS" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlDefaultAttributeValue" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlDeprecatedElement" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlDuplicatedId" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlHighlighting" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlInvalidId" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlPathReference" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlUnboundNsPrefix" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlUnusedNamespaceDeclaration" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlWrongRootElement" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XsltDeclarations" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XsltTemplateInvocation" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XsltUnusedDeclaration" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="XsltVariableShadowing" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="YAMLDuplicatedKeys" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="YAMLRecursiveAlias" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="YAMLSchemaDeprecation" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="YAMLSchemaValidation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="YAMLUnresolvedAlias" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="YAMLUnusedAnchor" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
</profile>
|
||||
</component>
|
6
vendor/sebastian/type/.idea/misc.xml
generated
vendored
Normal file
6
vendor/sebastian/type/.idea/misc.xml
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
</project>
|
8
vendor/sebastian/type/.idea/modules.xml
generated
vendored
Normal file
8
vendor/sebastian/type/.idea/modules.xml
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/type.iml" filepath="$PROJECT_DIR$/.idea/type.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
20
vendor/sebastian/type/.idea/php-inspections-ea-ultimate.xml
generated
vendored
Normal file
20
vendor/sebastian/type/.idea/php-inspections-ea-ultimate.xml
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EAUltimateProjectSettings">
|
||||
<categories>
|
||||
<STRICTNESS_CATEGORY_SECURITY enabled="yes" />
|
||||
<STRICTNESS_CATEGORY_PROBABLE_BUGS enabled="yes" />
|
||||
<STRICTNESS_CATEGORY_PERFORMANCE enabled="yes" />
|
||||
<STRICTNESS_CATEGORY_ARCHITECTURE enabled="yes" />
|
||||
<STRICTNESS_CATEGORY_CONTROL_FLOW enabled="yes" />
|
||||
<STRICTNESS_CATEGORY_LANGUAGE_LEVEL_MIGRATION enabled="yes" />
|
||||
<STRICTNESS_CATEGORY_CODE_STYLE enabled="yes" />
|
||||
<STRICTNESS_CATEGORY_UNUSED enabled="yes" />
|
||||
<STRICTNESS_CATEGORY_PHPUNIT enabled="yes" />
|
||||
</categories>
|
||||
<settings>
|
||||
<ANALYZE_ONLY_MODIFIED_FILES value="no" />
|
||||
<PREFER_YODA_COMPARISON_STYLE value="no" />
|
||||
</settings>
|
||||
</component>
|
||||
</project>
|
42
vendor/sebastian/type/.idea/php.xml
generated
vendored
Normal file
42
vendor/sebastian/type/.idea/php.xml
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PhpIncludePathManager">
|
||||
<include_path>
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpspec/prophecy" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/version" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/diff" />
|
||||
<path value="$PROJECT_DIR$/vendor/phar-io/version" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
|
||||
<path value="$PROJECT_DIR$/vendor/phar-io/manifest" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/resource-operations" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/object-enumerator" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/object-reflector" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/recursion-context" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-code-coverage" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/environment" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-token-stream" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/exporter" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-text-template" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/comparator" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-file-iterator" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/global-state" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-timer" />
|
||||
<path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-common" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpdocumentor/type-resolver" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-docblock" />
|
||||
<path value="$PROJECT_DIR$/vendor/composer" />
|
||||
<path value="$PROJECT_DIR$/vendor/webmozart/assert" />
|
||||
<path value="$PROJECT_DIR$/vendor/theseer/tokenizer" />
|
||||
</include_path>
|
||||
</component>
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="7.2" />
|
||||
<component name="PhpUnit">
|
||||
<phpunit_settings>
|
||||
<PhpUnitSettings load_method="CUSTOM_LOADER" custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" />
|
||||
</phpunit_settings>
|
||||
</component>
|
||||
</project>
|
40
vendor/sebastian/type/.idea/type.iml
generated
vendored
Normal file
40
vendor/sebastian/type/.idea/type.iml
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/instantiator" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phar-io/manifest" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phar-io/version" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-common" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-docblock" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/type-resolver" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpspec/prophecy" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-text-template" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-timer" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-token-stream" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/phpunit" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/comparator" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/diff" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/environment" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/exporter" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/global-state" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/object-enumerator" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/object-reflector" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/resource-operations" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/version" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-ctype" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/theseer/tokenizer" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/webmozart/assert" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
6
vendor/sebastian/type/.idea/vcs.xml
generated
vendored
Normal file
6
vendor/sebastian/type/.idea/vcs.xml
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
200
vendor/sebastian/type/.php_cs.dist
vendored
Normal file
200
vendor/sebastian/type/.php_cs.dist
vendored
Normal file
@@ -0,0 +1,200 @@
|
||||
<?php declare(strict_types=1);
|
||||
$header = <<<'EOF'
|
||||
This file is part of sebastian/type.
|
||||
|
||||
(c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
|
||||
For the full copyright and license information, please view the LICENSE
|
||||
file that was distributed with this source code.
|
||||
EOF;
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
->setRiskyAllowed(true)
|
||||
->setRules(
|
||||
[
|
||||
'align_multiline_comment' => true,
|
||||
'array_indentation' => true,
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'binary_operator_spaces' => [
|
||||
'operators' => [
|
||||
'=' => 'align',
|
||||
'=>' => 'align',
|
||||
],
|
||||
],
|
||||
'blank_line_after_namespace' => true,
|
||||
'blank_line_before_statement' => [
|
||||
'statements' => [
|
||||
'break',
|
||||
'continue',
|
||||
'declare',
|
||||
'do',
|
||||
'for',
|
||||
'foreach',
|
||||
'if',
|
||||
'include',
|
||||
'include_once',
|
||||
'require',
|
||||
'require_once',
|
||||
'return',
|
||||
'switch',
|
||||
'throw',
|
||||
'try',
|
||||
'while',
|
||||
'yield',
|
||||
],
|
||||
],
|
||||
'braces' => true,
|
||||
'cast_spaces' => true,
|
||||
'class_attributes_separation' => ['elements' => ['const', 'method', 'property']],
|
||||
'combine_consecutive_issets' => true,
|
||||
'combine_consecutive_unsets' => true,
|
||||
'compact_nullable_typehint' => true,
|
||||
'concat_space' => ['spacing' => 'one'],
|
||||
'declare_equal_normalize' => ['space' => 'none'],
|
||||
'declare_strict_types' => true,
|
||||
'dir_constant' => true,
|
||||
'elseif' => true,
|
||||
'encoding' => true,
|
||||
'full_opening_tag' => true,
|
||||
'function_declaration' => true,
|
||||
'header_comment' => ['header' => $header, 'separate' => 'none'],
|
||||
'indentation_type' => true,
|
||||
'is_null' => true,
|
||||
'line_ending' => true,
|
||||
'list_syntax' => ['syntax' => 'short'],
|
||||
'logical_operators' => true,
|
||||
'lowercase_cast' => true,
|
||||
'lowercase_constants' => true,
|
||||
'lowercase_keywords' => true,
|
||||
'lowercase_static_reference' => true,
|
||||
'magic_constant_casing' => true,
|
||||
'method_argument_space' => ['ensure_fully_multiline' => true],
|
||||
'modernize_types_casting' => true,
|
||||
'multiline_comment_opening_closing' => true,
|
||||
'multiline_whitespace_before_semicolons' => true,
|
||||
'native_constant_invocation' => true,
|
||||
'native_function_casing' => true,
|
||||
'native_function_invocation' => true,
|
||||
'new_with_braces' => false,
|
||||
'no_alias_functions' => true,
|
||||
'no_alternative_syntax' => true,
|
||||
'no_blank_lines_after_class_opening' => true,
|
||||
'no_blank_lines_after_phpdoc' => true,
|
||||
'no_blank_lines_before_namespace' => true,
|
||||
'no_closing_tag' => true,
|
||||
'no_empty_comment' => true,
|
||||
'no_empty_phpdoc' => true,
|
||||
'no_empty_statement' => true,
|
||||
'no_extra_blank_lines' => true,
|
||||
'no_homoglyph_names' => true,
|
||||
'no_leading_import_slash' => true,
|
||||
'no_leading_namespace_whitespace' => true,
|
||||
'no_mixed_echo_print' => ['use' => 'print'],
|
||||
'no_multiline_whitespace_around_double_arrow' => true,
|
||||
'no_null_property_initialization' => true,
|
||||
'no_php4_constructor' => true,
|
||||
'no_short_bool_cast' => true,
|
||||
'no_short_echo_tag' => true,
|
||||
'no_singleline_whitespace_before_semicolons' => true,
|
||||
'no_spaces_after_function_name' => true,
|
||||
'no_spaces_inside_parenthesis' => true,
|
||||
'no_superfluous_elseif' => true,
|
||||
'no_superfluous_phpdoc_tags' => true,
|
||||
'no_trailing_comma_in_list_call' => true,
|
||||
'no_trailing_comma_in_singleline_array' => true,
|
||||
'no_trailing_whitespace' => true,
|
||||
'no_trailing_whitespace_in_comment' => true,
|
||||
'no_unneeded_control_parentheses' => true,
|
||||
'no_unneeded_curly_braces' => true,
|
||||
'no_unneeded_final_method' => true,
|
||||
'no_unreachable_default_argument_value' => true,
|
||||
'no_unset_on_property' => true,
|
||||
'no_unused_imports' => true,
|
||||
'no_useless_else' => true,
|
||||
'no_useless_return' => true,
|
||||
'no_whitespace_before_comma_in_array' => true,
|
||||
'no_whitespace_in_blank_line' => true,
|
||||
'non_printable_character' => true,
|
||||
'normalize_index_brace' => true,
|
||||
'object_operator_without_whitespace' => true,
|
||||
'ordered_class_elements' => [
|
||||
'order' => [
|
||||
'use_trait',
|
||||
'constant_public',
|
||||
'constant_protected',
|
||||
'constant_private',
|
||||
'property_public_static',
|
||||
'property_protected_static',
|
||||
'property_private_static',
|
||||
'property_public',
|
||||
'property_protected',
|
||||
'property_private',
|
||||
'method_public_static',
|
||||
'construct',
|
||||
'destruct',
|
||||
'magic',
|
||||
'phpunit',
|
||||
'method_public',
|
||||
'method_protected',
|
||||
'method_private',
|
||||
'method_protected_static',
|
||||
'method_private_static',
|
||||
],
|
||||
],
|
||||
'ordered_imports' => true,
|
||||
'ordered_interfaces' => [
|
||||
'direction' => 'ascend',
|
||||
'order' => 'alpha',
|
||||
],
|
||||
'phpdoc_add_missing_param_annotation' => true,
|
||||
'phpdoc_align' => true,
|
||||
'phpdoc_annotation_without_dot' => true,
|
||||
'phpdoc_indent' => true,
|
||||
'phpdoc_no_access' => true,
|
||||
'phpdoc_no_empty_return' => true,
|
||||
'phpdoc_no_package' => true,
|
||||
'phpdoc_order' => true,
|
||||
'phpdoc_return_self_reference' => true,
|
||||
'phpdoc_scalar' => true,
|
||||
'phpdoc_separation' => true,
|
||||
'phpdoc_single_line_var_spacing' => true,
|
||||
'phpdoc_to_comment' => true,
|
||||
'phpdoc_trim' => true,
|
||||
'phpdoc_trim_consecutive_blank_line_separation' => true,
|
||||
'phpdoc_types' => ['groups' => ['simple', 'meta']],
|
||||
'phpdoc_types_order' => true,
|
||||
'phpdoc_var_without_name' => true,
|
||||
'pow_to_exponentiation' => true,
|
||||
'protected_to_private' => true,
|
||||
'return_assignment' => true,
|
||||
'return_type_declaration' => ['space_before' => 'none'],
|
||||
'semicolon_after_instruction' => true,
|
||||
'set_type_to_cast' => true,
|
||||
'short_scalar_cast' => true,
|
||||
'simplified_null_return' => true,
|
||||
'single_blank_line_at_eof' => true,
|
||||
'single_import_per_statement' => true,
|
||||
'single_line_after_imports' => true,
|
||||
'single_quote' => true,
|
||||
'standardize_not_equals' => true,
|
||||
'ternary_to_null_coalescing' => true,
|
||||
'trailing_comma_in_multiline_array' => true,
|
||||
'trim_array_spaces' => true,
|
||||
'unary_operator_spaces' => true,
|
||||
'visibility_required' => [
|
||||
'elements' => [
|
||||
'const',
|
||||
'method',
|
||||
'property',
|
||||
],
|
||||
],
|
||||
'void_return' => true,
|
||||
'whitespace_after_comma_in_array' => true,
|
||||
]
|
||||
)
|
||||
->setFinder(
|
||||
PhpCsFixer\Finder::create()
|
||||
->files()
|
||||
->in(__DIR__ . '/src')
|
||||
->in(__DIR__ . '/tests')
|
||||
);
|
53
vendor/sebastian/type/.travis.yml
vendored
Normal file
53
vendor/sebastian/type/.travis.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 7.2
|
||||
- 7.3
|
||||
- 7.4snapshot
|
||||
- nightly
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: master
|
||||
fast_finish: true
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- DEPENDENCIES="high"
|
||||
- DEPENDENCIES="low"
|
||||
global:
|
||||
- DEFAULT_COMPOSER_FLAGS="--no-interaction --no-ansi --no-progress --no-suggest"
|
||||
|
||||
before_install:
|
||||
- ./tools/composer clear-cache
|
||||
|
||||
install:
|
||||
- if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry ./tools/composer update $DEFAULT_COMPOSER_FLAGS; fi
|
||||
- if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry ./tools/composer update $DEFAULT_COMPOSER_FLAGS --prefer-lowest; fi
|
||||
|
||||
script:
|
||||
- ./vendor/bin/phpunit --coverage-clover=coverage.xml
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: "Static Code Analysis"
|
||||
php: 7.3
|
||||
env: php-cs-fixer
|
||||
install:
|
||||
- phpenv config-rm xdebug.ini
|
||||
script:
|
||||
- ./tools/php-cs-fixer fix --dry-run -v --show-progress=dots --diff-format=udiff
|
||||
- stage: "Static Code Analysis"
|
||||
php: 7.3
|
||||
env: psalm
|
||||
install:
|
||||
- phpenv config-rm xdebug.ini
|
||||
script:
|
||||
- travis_retry ./tools/composer update $DEFAULT_COMPOSER_FLAGS
|
||||
- ./tools/psalm --shepherd --stats
|
45
vendor/sebastian/type/ChangeLog.md
vendored
Normal file
45
vendor/sebastian/type/ChangeLog.md
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
# ChangeLog
|
||||
|
||||
All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [1.1.4] - 2020-11-30
|
||||
|
||||
### Changed
|
||||
|
||||
* Changed PHP version constraint in `composer.json` from `^7.2` to `>=7.2`
|
||||
|
||||
## [1.1.3] - 2019-07-02
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed class name comparison in `ObjectType` to be case insensitive
|
||||
|
||||
## [1.1.2] - 2019-06-19
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed handling of `object` type
|
||||
|
||||
## [1.1.1] - 2019-06-08
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed autoloading of `callback_function.php` fixture file
|
||||
|
||||
## [1.1.0] - 2019-06-07
|
||||
|
||||
### Added
|
||||
|
||||
* Added support for `callable` type
|
||||
* Added support for `iterable` type
|
||||
|
||||
## [1.0.0] - 2019-06-06
|
||||
|
||||
* Initial release based on [code contributed by Michel Hartmann to PHPUnit](https://github.com/sebastianbergmann/phpunit/pull/3673)
|
||||
|
||||
[1.1.4]: https://github.com/sebastianbergmann/type/compare/1.1.3...1.1.4
|
||||
[1.1.3]: https://github.com/sebastianbergmann/type/compare/1.1.2...1.1.3
|
||||
[1.1.2]: https://github.com/sebastianbergmann/type/compare/1.1.1...1.1.2
|
||||
[1.1.1]: https://github.com/sebastianbergmann/type/compare/1.1.0...1.1.1
|
||||
[1.1.0]: https://github.com/sebastianbergmann/type/compare/1.0.0...1.1.0
|
||||
[1.0.0]: https://github.com/sebastianbergmann/type/compare/ff74aa41746bd8d10e931843ebf37d42da513ede...1.0.0
|
33
vendor/sebastian/type/LICENSE
vendored
Normal file
33
vendor/sebastian/type/LICENSE
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
sebastian/type
|
||||
|
||||
Copyright (c) 2019, Sebastian Bergmann <sebastian@phpunit.de>.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
* Neither the name of Sebastian Bergmann nor the names of his
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
17
vendor/sebastian/type/README.md
vendored
Normal file
17
vendor/sebastian/type/README.md
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# sebastian/type
|
||||
|
||||
Collection of value objects that represent the types of the PHP type system.
|
||||
|
||||
## Installation
|
||||
|
||||
You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
|
||||
|
||||
```
|
||||
composer require sebastian/type
|
||||
```
|
||||
|
||||
If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
|
||||
|
||||
```
|
||||
composer require --dev sebastian/type
|
||||
```
|
31
vendor/sebastian/type/build.xml
vendored
Normal file
31
vendor/sebastian/type/build.xml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="type" default="setup">
|
||||
<target name="setup" depends="clean,composer"/>
|
||||
|
||||
<target name="clean" description="Cleanup build artifacts">
|
||||
<delete dir="${basedir}/vendor"/>
|
||||
<delete file="${basedir}/composer.lock"/>
|
||||
</target>
|
||||
|
||||
<target name="composer" depends="clean" description="Install dependencies with Composer">
|
||||
<exec executable="${basedir}/tools/composer" taskname="composer">
|
||||
<arg value="update"/>
|
||||
<arg value="--no-interaction"/>
|
||||
<arg value="--no-progress"/>
|
||||
<arg value="--no-ansi"/>
|
||||
<arg value="--no-suggest"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="update-tools">
|
||||
<exec executable="phive" taskname="phive">
|
||||
<arg value="--no-progress"/>
|
||||
<arg value="update"/>
|
||||
</exec>
|
||||
|
||||
<exec executable="${basedir}/tools/composer" taskname="composer">
|
||||
<arg value="self-update"/>
|
||||
</exec>
|
||||
</target>
|
||||
</project>
|
||||
|
49
vendor/sebastian/type/composer.json
vendored
Normal file
49
vendor/sebastian/type/composer.json
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"name": "sebastian/type",
|
||||
"description": "Collection of value objects that represent the types of the PHP type system",
|
||||
"type": "library",
|
||||
"homepage": "https://github.com/sebastianbergmann/type",
|
||||
"license": "BSD-3-Clause",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/type/issues"
|
||||
},
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.2"
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "7.2.0"
|
||||
},
|
||||
"optimize-autoloader": true,
|
||||
"sort-packages": true
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"classmap": [
|
||||
"tests/_fixture"
|
||||
],
|
||||
"files": [
|
||||
"tests/_fixture/callback_function.php"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.1-dev"
|
||||
}
|
||||
}
|
||||
}
|
5
vendor/sebastian/type/phive.xml
vendored
Normal file
5
vendor/sebastian/type/phive.xml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phive xmlns="https://phar.io/phive">
|
||||
<phar name="php-cs-fixer" version="^2.15" installed="2.15.1" location="./tools/php-cs-fixer" copy="true"/>
|
||||
<phar name="psalm" version="^3.2" installed="3.4.5" location="./tools/psalm" copy="true"/>
|
||||
</phive>
|
23
vendor/sebastian/type/phpunit.xml
vendored
Normal file
23
vendor/sebastian/type/phpunit.xml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.2/phpunit.xsd"
|
||||
bootstrap="vendor/autoload.php"
|
||||
executionOrder="depends,defects"
|
||||
forceCoversAnnotation="true"
|
||||
beStrictAboutCoversAnnotation="true"
|
||||
beStrictAboutOutputDuringTests="true"
|
||||
beStrictAboutTodoAnnotatedTests="true"
|
||||
colors="true"
|
||||
verbose="true">
|
||||
<testsuites>
|
||||
<testsuite name="unit">
|
||||
<directory suffix="Test.php">tests/unit</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">src</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
53
vendor/sebastian/type/psalm.xml
vendored
Normal file
53
vendor/sebastian/type/psalm.xml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
totallyTyped="false"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||
>
|
||||
<projectFiles>
|
||||
<directory name="src" />
|
||||
<ignoreFiles>
|
||||
<directory name="vendor" />
|
||||
</ignoreFiles>
|
||||
</projectFiles>
|
||||
|
||||
<issueHandlers>
|
||||
<LessSpecificReturnType errorLevel="info" />
|
||||
|
||||
<!-- level 3 issues - slightly lazy code writing, but provably low false-negatives -->
|
||||
|
||||
<DeprecatedMethod errorLevel="info" />
|
||||
<DeprecatedProperty errorLevel="info" />
|
||||
<DeprecatedClass errorLevel="info" />
|
||||
<DeprecatedConstant errorLevel="info" />
|
||||
<DeprecatedInterface errorLevel="info" />
|
||||
<DeprecatedTrait errorLevel="info" />
|
||||
|
||||
<InternalMethod errorLevel="info" />
|
||||
<InternalProperty errorLevel="info" />
|
||||
<InternalClass errorLevel="info" />
|
||||
|
||||
<MissingClosureReturnType errorLevel="info" />
|
||||
<MissingReturnType errorLevel="info" />
|
||||
<MissingPropertyType errorLevel="info" />
|
||||
<InvalidDocblock errorLevel="info" />
|
||||
<MisplacedRequiredParam errorLevel="info" />
|
||||
|
||||
<PropertyNotSetInConstructor errorLevel="info" />
|
||||
<MissingConstructor errorLevel="info" />
|
||||
<MissingClosureParamType errorLevel="info" />
|
||||
<MissingParamType errorLevel="info" />
|
||||
|
||||
<RedundantCondition errorLevel="info" />
|
||||
|
||||
<DocblockTypeContradiction errorLevel="info" />
|
||||
<RedundantConditionGivenDocblockType errorLevel="info" />
|
||||
|
||||
<UnresolvableInclude errorLevel="info" />
|
||||
|
||||
<RawObjectIteration errorLevel="info" />
|
||||
|
||||
<InvalidStringClass errorLevel="info" />
|
||||
</issueHandlers>
|
||||
</psalm>
|
182
vendor/sebastian/type/src/CallableType.php
vendored
Normal file
182
vendor/sebastian/type/src/CallableType.php
vendored
Normal file
@@ -0,0 +1,182 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
final class CallableType extends Type
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $allowsNull;
|
||||
|
||||
public function __construct(bool $nullable)
|
||||
{
|
||||
$this->allowsNull = $nullable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public function isAssignable(Type $other): bool
|
||||
{
|
||||
if ($this->allowsNull && $other instanceof NullType) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($other instanceof self) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($other instanceof ObjectType) {
|
||||
if ($this->isClosure($other)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($this->hasInvokeMethod($other)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($other instanceof SimpleType) {
|
||||
if ($this->isFunction($other)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($this->isClassCallback($other)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($this->isObjectCallback($other)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getReturnTypeDeclaration(): string
|
||||
{
|
||||
return ': ' . ($this->allowsNull ? '?' : '') . 'callable';
|
||||
}
|
||||
|
||||
public function allowsNull(): bool
|
||||
{
|
||||
return $this->allowsNull;
|
||||
}
|
||||
|
||||
private function isClosure(ObjectType $type): bool
|
||||
{
|
||||
return !$type->className()->isNamespaced() && $type->className()->getSimpleName() === \Closure::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
private function hasInvokeMethod(ObjectType $type): bool
|
||||
{
|
||||
try {
|
||||
$class = new \ReflectionClass($type->className()->getQualifiedName());
|
||||
// @codeCoverageIgnoreStart
|
||||
} catch (\ReflectionException $e) {
|
||||
throw new RuntimeException(
|
||||
$e->getMessage(),
|
||||
(int) $e->getCode(),
|
||||
$e
|
||||
);
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
if ($class->hasMethod('__invoke')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function isFunction(SimpleType $type): bool
|
||||
{
|
||||
if (!\is_string($type->value())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return \function_exists($type->value());
|
||||
}
|
||||
|
||||
private function isObjectCallback(SimpleType $type): bool
|
||||
{
|
||||
if (!\is_array($type->value())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (\count($type->value()) !== 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!\is_object($type->value()[0]) || !\is_string($type->value()[1])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
[$object, $methodName] = $type->value();
|
||||
|
||||
$reflector = new \ReflectionObject($object);
|
||||
|
||||
return $reflector->hasMethod($methodName);
|
||||
}
|
||||
|
||||
private function isClassCallback(SimpleType $type): bool
|
||||
{
|
||||
if (!\is_string($type->value()) && !\is_array($type->value())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (\is_string($type->value())) {
|
||||
if (\strpos($type->value(), '::') === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
[$className, $methodName] = \explode('::', $type->value());
|
||||
}
|
||||
|
||||
if (\is_array($type->value())) {
|
||||
if (\count($type->value()) !== 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!\is_string($type->value()[0]) || !\is_string($type->value()[1])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
[$className, $methodName] = $type->value();
|
||||
}
|
||||
|
||||
\assert(isset($className) && \is_string($className));
|
||||
\assert(isset($methodName) && \is_string($methodName));
|
||||
|
||||
try {
|
||||
$class = new \ReflectionClass($className);
|
||||
|
||||
if ($class->hasMethod($methodName)) {
|
||||
$method = $class->getMethod($methodName);
|
||||
|
||||
return $method->isPublic() && $method->isStatic();
|
||||
}
|
||||
// @codeCoverageIgnoreStart
|
||||
} catch (\ReflectionException $e) {
|
||||
throw new RuntimeException(
|
||||
$e->getMessage(),
|
||||
(int) $e->getCode(),
|
||||
$e
|
||||
);
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
46
vendor/sebastian/type/src/GenericObjectType.php
vendored
Normal file
46
vendor/sebastian/type/src/GenericObjectType.php
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
final class GenericObjectType extends Type
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $allowsNull;
|
||||
|
||||
public function __construct(bool $nullable)
|
||||
{
|
||||
$this->allowsNull = $nullable;
|
||||
}
|
||||
|
||||
public function isAssignable(Type $other): bool
|
||||
{
|
||||
if ($this->allowsNull && $other instanceof NullType) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!$other instanceof ObjectType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getReturnTypeDeclaration(): string
|
||||
{
|
||||
return ': ' . ($this->allowsNull ? '?' : '') . 'object';
|
||||
}
|
||||
|
||||
public function allowsNull(): bool
|
||||
{
|
||||
return $this->allowsNull;
|
||||
}
|
||||
}
|
67
vendor/sebastian/type/src/IterableType.php
vendored
Normal file
67
vendor/sebastian/type/src/IterableType.php
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
final class IterableType extends Type
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $allowsNull;
|
||||
|
||||
public function __construct(bool $nullable)
|
||||
{
|
||||
$this->allowsNull = $nullable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public function isAssignable(Type $other): bool
|
||||
{
|
||||
if ($this->allowsNull && $other instanceof NullType) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($other instanceof self) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($other instanceof SimpleType) {
|
||||
return \is_iterable($other->value());
|
||||
}
|
||||
|
||||
if ($other instanceof ObjectType) {
|
||||
try {
|
||||
return (new \ReflectionClass($other->className()->getQualifiedName()))->isIterable();
|
||||
// @codeCoverageIgnoreStart
|
||||
} catch (\ReflectionException $e) {
|
||||
throw new RuntimeException(
|
||||
$e->getMessage(),
|
||||
(int) $e->getCode(),
|
||||
$e
|
||||
);
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getReturnTypeDeclaration(): string
|
||||
{
|
||||
return ': ' . ($this->allowsNull ? '?' : '') . 'iterable';
|
||||
}
|
||||
|
||||
public function allowsNull(): bool
|
||||
{
|
||||
return $this->allowsNull;
|
||||
}
|
||||
}
|
28
vendor/sebastian/type/src/NullType.php
vendored
Normal file
28
vendor/sebastian/type/src/NullType.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
final class NullType extends Type
|
||||
{
|
||||
public function isAssignable(Type $other): bool
|
||||
{
|
||||
return !($other instanceof VoidType);
|
||||
}
|
||||
|
||||
public function getReturnTypeDeclaration(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function allowsNull(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
63
vendor/sebastian/type/src/ObjectType.php
vendored
Normal file
63
vendor/sebastian/type/src/ObjectType.php
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
final class ObjectType extends Type
|
||||
{
|
||||
/**
|
||||
* @var TypeName
|
||||
*/
|
||||
private $className;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $allowsNull;
|
||||
|
||||
public function __construct(TypeName $className, bool $allowsNull)
|
||||
{
|
||||
$this->className = $className;
|
||||
$this->allowsNull = $allowsNull;
|
||||
}
|
||||
|
||||
public function isAssignable(Type $other): bool
|
||||
{
|
||||
if ($this->allowsNull && $other instanceof NullType) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($other instanceof self) {
|
||||
if (0 === \strcasecmp($this->className->getQualifiedName(), $other->className->getQualifiedName())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (\is_subclass_of($other->className->getQualifiedName(), $this->className->getQualifiedName(), true)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getReturnTypeDeclaration(): string
|
||||
{
|
||||
return ': ' . ($this->allowsNull ? '?' : '') . $this->className->getQualifiedName();
|
||||
}
|
||||
|
||||
public function allowsNull(): bool
|
||||
{
|
||||
return $this->allowsNull;
|
||||
}
|
||||
|
||||
public function className(): TypeName
|
||||
{
|
||||
return $this->className;
|
||||
}
|
||||
}
|
86
vendor/sebastian/type/src/SimpleType.php
vendored
Normal file
86
vendor/sebastian/type/src/SimpleType.php
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
final class SimpleType extends Type
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $allowsNull;
|
||||
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
private $value;
|
||||
|
||||
public function __construct(string $name, bool $nullable, $value = null)
|
||||
{
|
||||
$this->name = $this->normalize($name);
|
||||
$this->allowsNull = $nullable;
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
public function isAssignable(Type $other): bool
|
||||
{
|
||||
if ($this->allowsNull && $other instanceof NullType) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($other instanceof self) {
|
||||
return $this->name === $other->name;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getReturnTypeDeclaration(): string
|
||||
{
|
||||
return ': ' . ($this->allowsNull ? '?' : '') . $this->name;
|
||||
}
|
||||
|
||||
public function allowsNull(): bool
|
||||
{
|
||||
return $this->allowsNull;
|
||||
}
|
||||
|
||||
public function value()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
private function normalize(string $name): string
|
||||
{
|
||||
$name = \strtolower($name);
|
||||
|
||||
switch ($name) {
|
||||
case 'boolean':
|
||||
return 'bool';
|
||||
|
||||
case 'real':
|
||||
case 'double':
|
||||
return 'float';
|
||||
|
||||
case 'integer':
|
||||
return 'int';
|
||||
|
||||
case '[]':
|
||||
return 'array';
|
||||
|
||||
default:
|
||||
return $name;
|
||||
}
|
||||
}
|
||||
}
|
75
vendor/sebastian/type/src/Type.php
vendored
Normal file
75
vendor/sebastian/type/src/Type.php
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
abstract class Type
|
||||
{
|
||||
public static function fromValue($value, bool $allowsNull): self
|
||||
{
|
||||
$typeName = \gettype($value);
|
||||
|
||||
if ($typeName === 'object') {
|
||||
return new ObjectType(TypeName::fromQualifiedName(\get_class($value)), $allowsNull);
|
||||
}
|
||||
|
||||
$type = self::fromName($typeName, $allowsNull);
|
||||
|
||||
if ($type instanceof SimpleType) {
|
||||
$type = new SimpleType($typeName, $allowsNull, $value);
|
||||
}
|
||||
|
||||
return $type;
|
||||
}
|
||||
|
||||
public static function fromName(string $typeName, bool $allowsNull): self
|
||||
{
|
||||
switch (\strtolower($typeName)) {
|
||||
case 'callable':
|
||||
return new CallableType($allowsNull);
|
||||
|
||||
case 'iterable':
|
||||
return new IterableType($allowsNull);
|
||||
|
||||
case 'null':
|
||||
return new NullType;
|
||||
|
||||
case 'object':
|
||||
return new GenericObjectType($allowsNull);
|
||||
|
||||
case 'unknown type':
|
||||
return new UnknownType;
|
||||
|
||||
case 'void':
|
||||
return new VoidType;
|
||||
|
||||
case 'array':
|
||||
case 'bool':
|
||||
case 'boolean':
|
||||
case 'double':
|
||||
case 'float':
|
||||
case 'int':
|
||||
case 'integer':
|
||||
case 'real':
|
||||
case 'resource':
|
||||
case 'resource (closed)':
|
||||
case 'string':
|
||||
return new SimpleType($typeName, $allowsNull);
|
||||
|
||||
default:
|
||||
return new ObjectType(TypeName::fromQualifiedName($typeName), $allowsNull);
|
||||
}
|
||||
}
|
||||
|
||||
abstract public function isAssignable(Type $other): bool;
|
||||
|
||||
abstract public function getReturnTypeDeclaration(): string;
|
||||
|
||||
abstract public function allowsNull(): bool;
|
||||
}
|
77
vendor/sebastian/type/src/TypeName.php
vendored
Normal file
77
vendor/sebastian/type/src/TypeName.php
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
final class TypeName
|
||||
{
|
||||
/**
|
||||
* @var ?string
|
||||
*/
|
||||
private $namespaceName;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $simpleName;
|
||||
|
||||
public static function fromQualifiedName(string $fullClassName): self
|
||||
{
|
||||
if ($fullClassName[0] === '\\') {
|
||||
$fullClassName = \substr($fullClassName, 1);
|
||||
}
|
||||
|
||||
$classNameParts = \explode('\\', $fullClassName);
|
||||
|
||||
$simpleName = \array_pop($classNameParts);
|
||||
$namespaceName = \implode('\\', $classNameParts);
|
||||
|
||||
return new self($namespaceName, $simpleName);
|
||||
}
|
||||
|
||||
public static function fromReflection(\ReflectionClass $type): self
|
||||
{
|
||||
return new self(
|
||||
$type->getNamespaceName(),
|
||||
$type->getShortName()
|
||||
);
|
||||
}
|
||||
|
||||
public function __construct(?string $namespaceName, string $simpleName)
|
||||
{
|
||||
if ($namespaceName === '') {
|
||||
$namespaceName = null;
|
||||
}
|
||||
|
||||
$this->namespaceName = $namespaceName;
|
||||
$this->simpleName = $simpleName;
|
||||
}
|
||||
|
||||
public function getNamespaceName(): ?string
|
||||
{
|
||||
return $this->namespaceName;
|
||||
}
|
||||
|
||||
public function getSimpleName(): string
|
||||
{
|
||||
return $this->simpleName;
|
||||
}
|
||||
|
||||
public function getQualifiedName(): string
|
||||
{
|
||||
return $this->namespaceName === null
|
||||
? $this->simpleName
|
||||
: $this->namespaceName . '\\' . $this->simpleName;
|
||||
}
|
||||
|
||||
public function isNamespaced(): bool
|
||||
{
|
||||
return $this->namespaceName !== null;
|
||||
}
|
||||
}
|
28
vendor/sebastian/type/src/UnknownType.php
vendored
Normal file
28
vendor/sebastian/type/src/UnknownType.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
final class UnknownType extends Type
|
||||
{
|
||||
public function isAssignable(Type $other): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getReturnTypeDeclaration(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function allowsNull(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
28
vendor/sebastian/type/src/VoidType.php
vendored
Normal file
28
vendor/sebastian/type/src/VoidType.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
final class VoidType extends Type
|
||||
{
|
||||
public function isAssignable(Type $other): bool
|
||||
{
|
||||
return $other instanceof self;
|
||||
}
|
||||
|
||||
public function getReturnTypeDeclaration(): string
|
||||
{
|
||||
return ': void';
|
||||
}
|
||||
|
||||
public function allowsNull(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
14
vendor/sebastian/type/src/exception/Exception.php
vendored
Normal file
14
vendor/sebastian/type/src/exception/Exception.php
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
interface Exception
|
||||
{
|
||||
}
|
14
vendor/sebastian/type/src/exception/RuntimeException.php
vendored
Normal file
14
vendor/sebastian/type/src/exception/RuntimeException.php
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
final class RuntimeException extends \RuntimeException implements Exception
|
||||
{
|
||||
}
|
14
vendor/sebastian/type/tests/_fixture/ChildClass.php
vendored
Normal file
14
vendor/sebastian/type/tests/_fixture/ChildClass.php
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type\TestFixture;
|
||||
|
||||
class ChildClass extends ParentClass
|
||||
{
|
||||
}
|
21
vendor/sebastian/type/tests/_fixture/ClassWithCallbackMethods.php
vendored
Normal file
21
vendor/sebastian/type/tests/_fixture/ClassWithCallbackMethods.php
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type\TestFixture;
|
||||
|
||||
final class ClassWithCallbackMethods
|
||||
{
|
||||
public static function staticCallback(): void
|
||||
{
|
||||
}
|
||||
|
||||
public function nonStaticCallback(): void
|
||||
{
|
||||
}
|
||||
}
|
17
vendor/sebastian/type/tests/_fixture/ClassWithInvokeMethod.php
vendored
Normal file
17
vendor/sebastian/type/tests/_fixture/ClassWithInvokeMethod.php
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type\TestFixture;
|
||||
|
||||
final class ClassWithInvokeMethod
|
||||
{
|
||||
public function __invoke(): void
|
||||
{
|
||||
}
|
||||
}
|
33
vendor/sebastian/type/tests/_fixture/Iterator.php
vendored
Normal file
33
vendor/sebastian/type/tests/_fixture/Iterator.php
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type\TestFixture;
|
||||
|
||||
final class Iterator implements \Iterator
|
||||
{
|
||||
public function current(): void
|
||||
{
|
||||
}
|
||||
|
||||
public function next(): void
|
||||
{
|
||||
}
|
||||
|
||||
public function key(): void
|
||||
{
|
||||
}
|
||||
|
||||
public function valid(): void
|
||||
{
|
||||
}
|
||||
|
||||
public function rewind(): void
|
||||
{
|
||||
}
|
||||
}
|
17
vendor/sebastian/type/tests/_fixture/ParentClass.php
vendored
Normal file
17
vendor/sebastian/type/tests/_fixture/ParentClass.php
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type\TestFixture;
|
||||
|
||||
class ParentClass
|
||||
{
|
||||
public function foo(): void
|
||||
{
|
||||
}
|
||||
}
|
14
vendor/sebastian/type/tests/_fixture/callback_function.php
vendored
Normal file
14
vendor/sebastian/type/tests/_fixture/callback_function.php
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type\TestFixture;
|
||||
|
||||
function callback_function(): void
|
||||
{
|
||||
}
|
150
vendor/sebastian/type/tests/unit/CallableTypeTest.php
vendored
Normal file
150
vendor/sebastian/type/tests/unit/CallableTypeTest.php
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use SebastianBergmann\Type\TestFixture\ClassWithCallbackMethods;
|
||||
use SebastianBergmann\Type\TestFixture\ClassWithInvokeMethod;
|
||||
|
||||
/**
|
||||
* @covers \SebastianBergmann\Type\CallableType
|
||||
*
|
||||
* @uses \SebastianBergmann\Type\Type
|
||||
* @uses \SebastianBergmann\Type\ObjectType
|
||||
* @uses \SebastianBergmann\Type\SimpleType
|
||||
* @uses \SebastianBergmann\Type\TypeName
|
||||
*/
|
||||
final class CallableTypeTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CallableType
|
||||
*/
|
||||
private $type;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->type = new CallableType(false);
|
||||
}
|
||||
|
||||
public function testMayDisallowNull(): void
|
||||
{
|
||||
$this->assertFalse($this->type->allowsNull());
|
||||
}
|
||||
|
||||
public function testCanGenerateReturnTypeDeclaration(): void
|
||||
{
|
||||
$this->assertEquals(': callable', $this->type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testMayAllowNull(): void
|
||||
{
|
||||
$type = new CallableType(true);
|
||||
|
||||
$this->assertTrue($type->allowsNull());
|
||||
}
|
||||
|
||||
public function testCanGenerateNullableReturnTypeDeclaration(): void
|
||||
{
|
||||
$type = new CallableType(true);
|
||||
|
||||
$this->assertEquals(': ?callable', $type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testNullCanBeAssignedToNullableCallable(): void
|
||||
{
|
||||
$type = new CallableType(true);
|
||||
|
||||
$this->assertTrue($type->isAssignable(new NullType));
|
||||
}
|
||||
|
||||
public function testCallableCanBeAssignedToCallable(): void
|
||||
{
|
||||
$this->assertTrue($this->type->isAssignable(new CallableType(false)));
|
||||
}
|
||||
|
||||
public function testClosureCanBeAssignedToCallable(): void
|
||||
{
|
||||
$this->assertTrue(
|
||||
$this->type->isAssignable(
|
||||
new ObjectType(
|
||||
TypeName::fromQualifiedName(\Closure::class),
|
||||
false
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function testInvokableCanBeAssignedToCallable(): void
|
||||
{
|
||||
$this->assertTrue(
|
||||
$this->type->isAssignable(
|
||||
new ObjectType(
|
||||
TypeName::fromQualifiedName(ClassWithInvokeMethod::class),
|
||||
false
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function testStringWithFunctionNameCanBeAssignedToCallable(): void
|
||||
{
|
||||
$this->assertTrue(
|
||||
$this->type->isAssignable(
|
||||
Type::fromValue('SebastianBergmann\Type\TestFixture\callback_function', false)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function testStringWithClassNameAndStaticMethodNameCanBeAssignedToCallable(): void
|
||||
{
|
||||
$this->assertTrue(
|
||||
$this->type->isAssignable(
|
||||
Type::fromValue(ClassWithCallbackMethods::class . '::staticCallback', false)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function testArrayWithClassNameAndStaticMethodNameCanBeAssignedToCallable(): void
|
||||
{
|
||||
$this->assertTrue(
|
||||
$this->type->isAssignable(
|
||||
Type::fromValue([ClassWithCallbackMethods::class, 'staticCallback'], false)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function testArrayWithClassNameAndInstanceMethodNameCanBeAssignedToCallable(): void
|
||||
{
|
||||
$this->assertTrue(
|
||||
$this->type->isAssignable(
|
||||
Type::fromValue([new ClassWithCallbackMethods, 'nonStaticCallback'], false)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function testSomethingThatIsNotCallableCannotBeAssignedToCallable(): void
|
||||
{
|
||||
$this->assertFalse(
|
||||
$this->type->isAssignable(
|
||||
Type::fromValue(null, false)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function testObjectWithoutInvokeMethodCannotBeAssignedToCallable(): void
|
||||
{
|
||||
$this->assertFalse(
|
||||
$this->type->isAssignable(
|
||||
Type::fromValue(new class {
|
||||
}, false)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
86
vendor/sebastian/type/tests/unit/GenericObjectTypeTest.php
vendored
Normal file
86
vendor/sebastian/type/tests/unit/GenericObjectTypeTest.php
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \SebastianBergmann\Type\GenericObjectType
|
||||
*
|
||||
* @uses \SebastianBergmann\Type\Type
|
||||
* @uses \SebastianBergmann\Type\ObjectType
|
||||
* @uses \SebastianBergmann\Type\SimpleType
|
||||
* @uses \SebastianBergmann\Type\TypeName
|
||||
*/
|
||||
final class GenericObjectTypeTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var GenericObjectType
|
||||
*/
|
||||
private $type;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->type = new GenericObjectType(false);
|
||||
}
|
||||
|
||||
public function testMayDisallowNull(): void
|
||||
{
|
||||
$this->assertFalse($this->type->allowsNull());
|
||||
}
|
||||
|
||||
public function testCanGenerateReturnTypeDeclaration(): void
|
||||
{
|
||||
$this->assertEquals(': object', $this->type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testMayAllowNull(): void
|
||||
{
|
||||
$type = new GenericObjectType(true);
|
||||
|
||||
$this->assertTrue($type->allowsNull());
|
||||
}
|
||||
|
||||
public function testCanGenerateNullableReturnTypeDeclaration(): void
|
||||
{
|
||||
$type = new GenericObjectType(true);
|
||||
|
||||
$this->assertEquals(': ?object', $type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testObjectCanBeAssignedToGenericObject(): void
|
||||
{
|
||||
$this->assertTrue(
|
||||
$this->type->isAssignable(
|
||||
new ObjectType(TypeName::fromQualifiedName(\stdClass::class), false)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function testNullCanBeAssignedToNullableGenericObject(): void
|
||||
{
|
||||
$type = new GenericObjectType(true);
|
||||
|
||||
$this->assertTrue(
|
||||
$type->isAssignable(
|
||||
new NullType
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function testNonObjectCannotBeAssignedToGenericObject(): void
|
||||
{
|
||||
$this->assertFalse(
|
||||
$this->type->isAssignable(
|
||||
new SimpleType('bool', false)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
97
vendor/sebastian/type/tests/unit/IterableTypeTest.php
vendored
Normal file
97
vendor/sebastian/type/tests/unit/IterableTypeTest.php
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use SebastianBergmann\Type\TestFixture\Iterator;
|
||||
|
||||
/**
|
||||
* @covers \SebastianBergmann\Type\IterableType
|
||||
*
|
||||
* @uses \SebastianBergmann\Type\Type
|
||||
* @uses \SebastianBergmann\Type\TypeName
|
||||
* @uses \SebastianBergmann\Type\ObjectType
|
||||
* @uses \SebastianBergmann\Type\SimpleType
|
||||
*/
|
||||
final class IterableTypeTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var IterableType
|
||||
*/
|
||||
private $type;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->type = new IterableType(false);
|
||||
}
|
||||
|
||||
public function testMayDisallowNull(): void
|
||||
{
|
||||
$this->assertFalse($this->type->allowsNull());
|
||||
}
|
||||
|
||||
public function testCanGenerateReturnTypeDeclaration(): void
|
||||
{
|
||||
$this->assertEquals(': iterable', $this->type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testMayAllowNull(): void
|
||||
{
|
||||
$type = new IterableType(true);
|
||||
|
||||
$this->assertTrue($type->allowsNull());
|
||||
}
|
||||
|
||||
public function testCanGenerateNullableReturnTypeDeclaration(): void
|
||||
{
|
||||
$type = new IterableType(true);
|
||||
|
||||
$this->assertEquals(': ?iterable', $type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testNullCanBeAssignedToNullableIterable(): void
|
||||
{
|
||||
$type = new IterableType(true);
|
||||
|
||||
$this->assertTrue($type->isAssignable(new NullType));
|
||||
}
|
||||
|
||||
public function testIterableCanBeAssignedToIterable(): void
|
||||
{
|
||||
$this->assertTrue($this->type->isAssignable(new IterableType(false)));
|
||||
}
|
||||
|
||||
public function testArrayCanBeAssignedToIterable(): void
|
||||
{
|
||||
$this->assertTrue(
|
||||
$this->type->isAssignable(
|
||||
Type::fromValue([], false)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function testIteratorCanBeAssignedToIterable(): void
|
||||
{
|
||||
$this->assertTrue(
|
||||
$this->type->isAssignable(
|
||||
Type::fromValue(new Iterator, false)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function testSomethingThatIsNotIterableCannotBeAssignedToIterable(): void
|
||||
{
|
||||
$this->assertFalse(
|
||||
$this->type->isAssignable(
|
||||
Type::fromValue(null, false)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
72
vendor/sebastian/type/tests/unit/NullTypeTest.php
vendored
Normal file
72
vendor/sebastian/type/tests/unit/NullTypeTest.php
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \SebastianBergmann\Type\NullType
|
||||
*/
|
||||
final class NullTypeTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var NullType
|
||||
*/
|
||||
private $type;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->type = new NullType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider assignableTypes
|
||||
*/
|
||||
public function testIsAssignable(Type $assignableType): void
|
||||
{
|
||||
$this->assertTrue($this->type->isAssignable($assignableType));
|
||||
}
|
||||
|
||||
public function assignableTypes(): array
|
||||
{
|
||||
return [
|
||||
[new SimpleType('int', false)],
|
||||
[new SimpleType('int', true)],
|
||||
[new ObjectType(TypeName::fromQualifiedName(self::class), false)],
|
||||
[new ObjectType(TypeName::fromQualifiedName(self::class), true)],
|
||||
[new UnknownType],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider notAssignable
|
||||
*/
|
||||
public function testIsNotAssignable(Type $assignedType): void
|
||||
{
|
||||
$this->assertFalse($this->type->isAssignable($assignedType));
|
||||
}
|
||||
|
||||
public function notAssignable(): array
|
||||
{
|
||||
return [
|
||||
'void' => [new VoidType],
|
||||
];
|
||||
}
|
||||
|
||||
public function testAllowsNull(): void
|
||||
{
|
||||
$this->assertTrue($this->type->allowsNull());
|
||||
}
|
||||
|
||||
public function testCanGenerateReturnTypeDeclaration(): void
|
||||
{
|
||||
$this->assertEquals('', $this->type->getReturnTypeDeclaration());
|
||||
}
|
||||
}
|
140
vendor/sebastian/type/tests/unit/ObjectTypeTest.php
vendored
Normal file
140
vendor/sebastian/type/tests/unit/ObjectTypeTest.php
vendored
Normal file
@@ -0,0 +1,140 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use SebastianBergmann\Type\TestFixture\ChildClass;
|
||||
use SebastianBergmann\Type\TestFixture\ParentClass;
|
||||
|
||||
/**
|
||||
* @covers \SebastianBergmann\Type\ObjectType
|
||||
*
|
||||
* @uses \SebastianBergmann\Type\TypeName
|
||||
* @uses \SebastianBergmann\Type\Type
|
||||
* @uses \SebastianBergmann\Type\SimpleType
|
||||
*/
|
||||
final class ObjectTypeTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var ObjectType
|
||||
*/
|
||||
private $childClass;
|
||||
|
||||
/**
|
||||
* @var ObjectType
|
||||
*/
|
||||
private $parentClass;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->childClass = new ObjectType(
|
||||
TypeName::fromQualifiedName(ChildClass::class),
|
||||
false
|
||||
);
|
||||
|
||||
$this->parentClass = new ObjectType(
|
||||
TypeName::fromQualifiedName(ParentClass::class),
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
public function testParentIsNotAssignableToChild(): void
|
||||
{
|
||||
$this->assertFalse($this->childClass->isAssignable($this->parentClass));
|
||||
}
|
||||
|
||||
public function testChildIsAssignableToParent(): void
|
||||
{
|
||||
$this->assertTrue($this->parentClass->isAssignable($this->childClass));
|
||||
}
|
||||
|
||||
public function testClassIsAssignableToSelf(): void
|
||||
{
|
||||
$this->assertTrue($this->parentClass->isAssignable($this->parentClass));
|
||||
}
|
||||
|
||||
public function testSimpleTypeIsNotAssignableToClass(): void
|
||||
{
|
||||
$this->assertFalse($this->parentClass->isAssignable(new SimpleType('int', false)));
|
||||
}
|
||||
|
||||
public function testClassFromOneNamespaceIsNotAssignableToClassInOtherNamespace(): void
|
||||
{
|
||||
$classFromNamespaceA = new ObjectType(
|
||||
TypeName::fromQualifiedName(\someNamespaceA\NamespacedClass::class),
|
||||
false
|
||||
);
|
||||
|
||||
$classFromNamespaceB = new ObjectType(
|
||||
TypeName::fromQualifiedName(\someNamespaceB\NamespacedClass::class),
|
||||
false
|
||||
);
|
||||
$this->assertFalse($classFromNamespaceA->isAssignable($classFromNamespaceB));
|
||||
}
|
||||
|
||||
public function testClassIsAssignableToSelfCaseInsensitively(): void
|
||||
{
|
||||
$classLowercased = new ObjectType(
|
||||
TypeName::fromQualifiedName(\strtolower(ParentClass::class)),
|
||||
false
|
||||
);
|
||||
|
||||
$this->assertTrue($this->parentClass->isAssignable($classLowercased));
|
||||
}
|
||||
|
||||
public function testNullIsAssignableToNullableType(): void
|
||||
{
|
||||
$someClass = new ObjectType(
|
||||
TypeName::fromQualifiedName(ParentClass::class),
|
||||
true
|
||||
);
|
||||
$this->assertTrue($someClass->isAssignable(Type::fromValue(null, true)));
|
||||
}
|
||||
|
||||
public function testNullIsNotAssignableToNotNullableType(): void
|
||||
{
|
||||
$someClass = new ObjectType(
|
||||
TypeName::fromQualifiedName(ParentClass::class),
|
||||
false
|
||||
);
|
||||
|
||||
$this->assertFalse($someClass->isAssignable(Type::fromValue(null, true)));
|
||||
}
|
||||
|
||||
public function testPreservesNullNotAllowed(): void
|
||||
{
|
||||
$someClass = new ObjectType(
|
||||
TypeName::fromQualifiedName(ParentClass::class),
|
||||
false
|
||||
);
|
||||
|
||||
$this->assertFalse($someClass->allowsNull());
|
||||
}
|
||||
|
||||
public function testPreservesNullAllowed(): void
|
||||
{
|
||||
$someClass = new ObjectType(
|
||||
TypeName::fromQualifiedName(ParentClass::class),
|
||||
true
|
||||
);
|
||||
|
||||
$this->assertTrue($someClass->allowsNull());
|
||||
}
|
||||
|
||||
public function testCanGenerateReturnTypeDeclaration(): void
|
||||
{
|
||||
$this->assertEquals(': SebastianBergmann\Type\TestFixture\ParentClass', $this->parentClass->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testHasClassName(): void
|
||||
{
|
||||
$this->assertEquals('SebastianBergmann\Type\TestFixture\ParentClass', $this->parentClass->className()->getQualifiedName());
|
||||
}
|
||||
}
|
162
vendor/sebastian/type/tests/unit/SimpleTypeTest.php
vendored
Normal file
162
vendor/sebastian/type/tests/unit/SimpleTypeTest.php
vendored
Normal file
@@ -0,0 +1,162 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \SebastianBergmann\Type\SimpleType
|
||||
*
|
||||
* @uses \SebastianBergmann\Type\Type
|
||||
*/
|
||||
final class SimpleTypeTest extends TestCase
|
||||
{
|
||||
public function testCanBeBool(): void
|
||||
{
|
||||
$type = new SimpleType('bool', false);
|
||||
|
||||
$this->assertSame(': bool', $type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testCanBeBoolean(): void
|
||||
{
|
||||
$type = new SimpleType('boolean', false);
|
||||
|
||||
$this->assertSame(': bool', $type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testCanBeDouble(): void
|
||||
{
|
||||
$type = new SimpleType('double', false);
|
||||
|
||||
$this->assertSame(': float', $type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testCanBeFloat(): void
|
||||
{
|
||||
$type = new SimpleType('float', false);
|
||||
|
||||
$this->assertSame(': float', $type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testCanBeReal(): void
|
||||
{
|
||||
$type = new SimpleType('real', false);
|
||||
|
||||
$this->assertSame(': float', $type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testCanBeInt(): void
|
||||
{
|
||||
$type = new SimpleType('int', false);
|
||||
|
||||
$this->assertSame(': int', $type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testCanBeInteger(): void
|
||||
{
|
||||
$type = new SimpleType('integer', false);
|
||||
|
||||
$this->assertSame(': int', $type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testCanBeArray(): void
|
||||
{
|
||||
$type = new SimpleType('array', false);
|
||||
|
||||
$this->assertSame(': array', $type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testCanBeArray2(): void
|
||||
{
|
||||
$type = new SimpleType('[]', false);
|
||||
|
||||
$this->assertSame(': array', $type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testMayAllowNull(): void
|
||||
{
|
||||
$type = new SimpleType('bool', true);
|
||||
|
||||
$this->assertTrue($type->allowsNull());
|
||||
$this->assertSame(': ?bool', $type->getReturnTypeDeclaration());
|
||||
}
|
||||
|
||||
public function testMayNotAllowNull(): void
|
||||
{
|
||||
$type = new SimpleType('bool', false);
|
||||
|
||||
$this->assertFalse($type->allowsNull());
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider assignablePairs
|
||||
*/
|
||||
public function testIsAssignable(Type $assignTo, Type $assignedType): void
|
||||
{
|
||||
$this->assertTrue($assignTo->isAssignable($assignedType));
|
||||
}
|
||||
|
||||
public function assignablePairs(): array
|
||||
{
|
||||
return [
|
||||
'nullable to not nullable' => [new SimpleType('int', false), new SimpleType('int', true)],
|
||||
'not nullable to nullable' => [new SimpleType('int', true), new SimpleType('int', false)],
|
||||
'nullable to nullable' => [new SimpleType('int', true), new SimpleType('int', true)],
|
||||
'not nullable to not nullable' => [new SimpleType('int', false), new SimpleType('int', false)],
|
||||
'null to not nullable' => [new SimpleType('int', true), new NullType],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider notAssignablePairs
|
||||
*/
|
||||
public function testIsNotAssignable(Type $assignTo, Type $assignedType): void
|
||||
{
|
||||
$this->assertFalse($assignTo->isAssignable($assignedType));
|
||||
}
|
||||
|
||||
public function notAssignablePairs(): array
|
||||
{
|
||||
return [
|
||||
'null to not nullable' => [new SimpleType('int', false), new NullType],
|
||||
'int to boolean' => [new SimpleType('boolean', false), new SimpleType('int', false)],
|
||||
'object' => [new SimpleType('boolean', false), new ObjectType(TypeName::fromQualifiedName(\stdClass::class), true)],
|
||||
'unknown type' => [new SimpleType('boolean', false), new UnknownType],
|
||||
'void' => [new SimpleType('boolean', false), new VoidType],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider returnTypes
|
||||
*/
|
||||
public function testReturnTypeDeclaration(Type $type, string $returnType): void
|
||||
{
|
||||
$this->assertEquals($type->getReturnTypeDeclaration(), $returnType);
|
||||
}
|
||||
|
||||
public function returnTypes(): array
|
||||
{
|
||||
return [
|
||||
'[]' => [new SimpleType('[]', false), ': array'],
|
||||
'array' => [new SimpleType('array', false), ': array'],
|
||||
'?array' => [new SimpleType('array', true), ': ?array'],
|
||||
'boolean' => [new SimpleType('boolean', false), ': bool'],
|
||||
'real' => [new SimpleType('real', false), ': float'],
|
||||
'double' => [new SimpleType('double', false), ': float'],
|
||||
'integer' => [new SimpleType('integer', false), ': int'],
|
||||
];
|
||||
}
|
||||
|
||||
public function testCanHaveValue(): void
|
||||
{
|
||||
$this->assertSame('string', Type::fromValue('string', false)->value());
|
||||
}
|
||||
}
|
59
vendor/sebastian/type/tests/unit/TypeNameTest.php
vendored
Normal file
59
vendor/sebastian/type/tests/unit/TypeNameTest.php
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \SebastianBergmann\Type\TypeName
|
||||
*/
|
||||
final class TypeNameTest extends TestCase
|
||||
{
|
||||
public function testFromReflection(): void
|
||||
{
|
||||
$class = new \ReflectionClass(TypeName::class);
|
||||
$typeName = TypeName::fromReflection($class);
|
||||
|
||||
$this->assertTrue($typeName->isNamespaced());
|
||||
$this->assertEquals('SebastianBergmann\\Type', $typeName->getNamespaceName());
|
||||
$this->assertEquals(TypeName::class, $typeName->getQualifiedName());
|
||||
$this->assertEquals('TypeName', $typeName->getSimpleName());
|
||||
}
|
||||
|
||||
public function testFromQualifiedName(): void
|
||||
{
|
||||
$typeName = TypeName::fromQualifiedName('PHPUnit\\Framework\\MockObject\\TypeName');
|
||||
|
||||
$this->assertTrue($typeName->isNamespaced());
|
||||
$this->assertEquals('PHPUnit\\Framework\\MockObject', $typeName->getNamespaceName());
|
||||
$this->assertEquals('PHPUnit\\Framework\\MockObject\\TypeName', $typeName->getQualifiedName());
|
||||
$this->assertEquals('TypeName', $typeName->getSimpleName());
|
||||
}
|
||||
|
||||
public function testFromQualifiedNameWithLeadingSeparator(): void
|
||||
{
|
||||
$typeName = TypeName::fromQualifiedName('\\Foo\\Bar');
|
||||
|
||||
$this->assertTrue($typeName->isNamespaced());
|
||||
$this->assertEquals('Foo', $typeName->getNamespaceName());
|
||||
$this->assertEquals('Foo\\Bar', $typeName->getQualifiedName());
|
||||
$this->assertEquals('Bar', $typeName->getSimpleName());
|
||||
}
|
||||
|
||||
public function testFromQualifiedNameWithoutNamespace(): void
|
||||
{
|
||||
$typeName = TypeName::fromQualifiedName('Bar');
|
||||
|
||||
$this->assertFalse($typeName->isNamespaced());
|
||||
$this->assertNull($typeName->getNamespaceName());
|
||||
$this->assertEquals('Bar', $typeName->getQualifiedName());
|
||||
$this->assertEquals('Bar', $typeName->getSimpleName());
|
||||
}
|
||||
}
|
85
vendor/sebastian/type/tests/unit/TypeTest.php
vendored
Normal file
85
vendor/sebastian/type/tests/unit/TypeTest.php
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \SebastianBergmann\Type\Type
|
||||
*
|
||||
* @uses \SebastianBergmann\Type\SimpleType
|
||||
* @uses \SebastianBergmann\Type\GenericObjectType
|
||||
* @uses \SebastianBergmann\Type\ObjectType
|
||||
* @uses \SebastianBergmann\Type\TypeName
|
||||
* @uses \SebastianBergmann\Type\CallableType
|
||||
* @uses \SebastianBergmann\Type\IterableType
|
||||
*/
|
||||
final class TypeTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider valuesToNullableType
|
||||
*/
|
||||
public function testTypeMappingFromValue($value, bool $allowsNull, Type $expectedType): void
|
||||
{
|
||||
$this->assertEquals($expectedType, Type::fromValue($value, $allowsNull));
|
||||
}
|
||||
|
||||
public function valuesToNullableType(): array
|
||||
{
|
||||
return [
|
||||
'?null' => [null, true, new NullType],
|
||||
'null' => [null, false, new NullType],
|
||||
'?integer' => [1, true, new SimpleType('int', true, 1)],
|
||||
'integer' => [1, false, new SimpleType('int', false, 1)],
|
||||
'?boolean' => [true, true, new SimpleType('bool', true, true)],
|
||||
'boolean' => [true, false, new SimpleType('bool', false, true)],
|
||||
'?object' => [new \stdClass, true, new ObjectType(TypeName::fromQualifiedName(\stdClass::class), true)],
|
||||
'object' => [new \stdClass, false, new ObjectType(TypeName::fromQualifiedName(\stdClass::class), false)],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider namesToTypes
|
||||
*/
|
||||
public function testTypeMappingFromName(string $typeName, bool $allowsNull, $expectedType): void
|
||||
{
|
||||
$this->assertEquals($expectedType, Type::fromName($typeName, $allowsNull));
|
||||
}
|
||||
|
||||
public function namesToTypes(): array
|
||||
{
|
||||
return [
|
||||
'?void' => ['void', true, new VoidType],
|
||||
'void' => ['void', false, new VoidType],
|
||||
'?null' => ['null', true, new NullType],
|
||||
'null' => ['null', true, new NullType],
|
||||
'?int' => ['int', true, new SimpleType('int', true)],
|
||||
'?integer' => ['integer', true, new SimpleType('int', true)],
|
||||
'int' => ['int', false, new SimpleType('int', false)],
|
||||
'bool' => ['bool', false, new SimpleType('bool', false)],
|
||||
'boolean' => ['boolean', false, new SimpleType('bool', false)],
|
||||
'object' => ['object', false, new GenericObjectType(false)],
|
||||
'real' => ['real', false, new SimpleType('float', false)],
|
||||
'double' => ['double', false, new SimpleType('float', false)],
|
||||
'float' => ['float', false, new SimpleType('float', false)],
|
||||
'string' => ['string', false, new SimpleType('string', false)],
|
||||
'array' => ['array', false, new SimpleType('array', false)],
|
||||
'resource' => ['resource', false, new SimpleType('resource', false)],
|
||||
'resource (closed)' => ['resource (closed)', false, new SimpleType('resource (closed)', false)],
|
||||
'unknown type' => ['unknown type', false, new UnknownType],
|
||||
'?classname' => [\stdClass::class, true, new ObjectType(TypeName::fromQualifiedName(\stdClass::class), true)],
|
||||
'classname' => [\stdClass::class, false, new ObjectType(TypeName::fromQualifiedName(\stdClass::class), false)],
|
||||
'callable' => ['callable', false, new CallableType(false)],
|
||||
'?callable' => ['callable', true, new CallableType(true)],
|
||||
'iterable' => ['iterable', false, new IterableType(false)],
|
||||
'?iterable' => ['iterable', true, new IterableType(true)],
|
||||
];
|
||||
}
|
||||
}
|
58
vendor/sebastian/type/tests/unit/UnknownTypeTest.php
vendored
Normal file
58
vendor/sebastian/type/tests/unit/UnknownTypeTest.php
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \SebastianBergmann\Type\UnknownType
|
||||
*/
|
||||
final class UnknownTypeTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var UnknownType
|
||||
*/
|
||||
private $type;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->type = new UnknownType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider assignableTypes
|
||||
*/
|
||||
public function testIsAssignable(Type $assignableType): void
|
||||
{
|
||||
$this->assertTrue($this->type->isAssignable($assignableType));
|
||||
}
|
||||
|
||||
public function assignableTypes(): array
|
||||
{
|
||||
return [
|
||||
[new SimpleType('int', false)],
|
||||
[new SimpleType('int', true)],
|
||||
[new VoidType],
|
||||
[new ObjectType(TypeName::fromQualifiedName(self::class), false)],
|
||||
[new ObjectType(TypeName::fromQualifiedName(self::class), true)],
|
||||
[new UnknownType],
|
||||
];
|
||||
}
|
||||
|
||||
public function testAllowsNull(): void
|
||||
{
|
||||
$this->assertTrue($this->type->allowsNull());
|
||||
}
|
||||
|
||||
public function testReturnTypeDeclaration(): void
|
||||
{
|
||||
$this->assertEquals('', $this->type->getReturnTypeDeclaration());
|
||||
}
|
||||
}
|
70
vendor/sebastian/type/tests/unit/VoidTypeTest.php
vendored
Normal file
70
vendor/sebastian/type/tests/unit/VoidTypeTest.php
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of sebastian/type.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\Type;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \SebastianBergmann\Type\VoidType
|
||||
*/
|
||||
final class VoidTypeTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider assignableTypes
|
||||
*/
|
||||
public function testIsAssignable(Type $assignableType): void
|
||||
{
|
||||
$type = new VoidType;
|
||||
|
||||
$this->assertTrue($type->isAssignable($assignableType));
|
||||
}
|
||||
|
||||
public function assignableTypes(): array
|
||||
{
|
||||
return [
|
||||
[new VoidType],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider notAssignableTypes
|
||||
*/
|
||||
public function testIsNotAssignable(Type $assignableType): void
|
||||
{
|
||||
$type = new VoidType;
|
||||
|
||||
$this->assertFalse($type->isAssignable($assignableType));
|
||||
}
|
||||
|
||||
public function notAssignableTypes(): array
|
||||
{
|
||||
return [
|
||||
[new SimpleType('int', false)],
|
||||
[new SimpleType('int', true)],
|
||||
[new ObjectType(TypeName::fromQualifiedName(self::class), false)],
|
||||
[new ObjectType(TypeName::fromQualifiedName(self::class), true)],
|
||||
[new UnknownType],
|
||||
];
|
||||
}
|
||||
|
||||
public function testNotAllowNull(): void
|
||||
{
|
||||
$type = new VoidType;
|
||||
|
||||
$this->assertFalse($type->allowsNull());
|
||||
}
|
||||
|
||||
public function testCanGenerateReturnTypeDeclaration(): void
|
||||
{
|
||||
$type = new VoidType;
|
||||
|
||||
$this->assertEquals(': void', $type->getReturnTypeDeclaration());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user