Commit 0815c5e3 by 王东红

Merge branch 'master' of http://47.99.244.21:9999/root/joshine

parents a32673c3 813bee9f
...@@ -93,8 +93,10 @@ ...@@ -93,8 +93,10 @@
<referenceBlock name="copyright" remove="true"/> <referenceBlock name="copyright" remove="true"/>
</referenceContainer> </referenceContainer>
<referenceContainer name="before.body.end"> <referenceContainer name="before.body.end">
<block class="Magento\Theme\Block\Html\Footer" name="footer" template="Magento_Theme::html/footer.phtml" /> <block class="Magento\Theme\Block\Html\Footer" name="absolute_footer" template="Magento_Theme::html/absolute_footer.phtml" />
</referenceContainer>
<referenceContainer name="content">
<block class="Magento\Framework\View\Element\FormKey" name="formkey"/>
</referenceContainer> </referenceContainer>
<move element="footer" destination="footer-middle"/>
</body> </body>
</page> </page>
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<head> <head>
<meta name="format-detection" content="telephone=no"/> <meta name="format-detection" content="telephone=no"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/> <meta name="viewport" content="width=device-width, initial-scale=1"/>
<css src="css/footer.css" rel="stylesheet" type="text/css" />
</head> </head>
<body> <body>
<referenceBlock name="breeze.css"> <referenceBlock name="breeze.css">
......
@charset utf-8;*{font-family:微软雅黑;margin:0;padding:0;}.clearfix:after{content:".";display:block;height:0;visibility:hidden;clear:both;}.w1100{width:1100px;margin:0 auto;}.fl{float:left;}a{text-decoration:none;}ul{list-style:none;}.site-footer{font-size:14px;line-height:1.8;color:#a8aaba;background:#0011;}.site-footer a{color:#a8aaba;}.site-footer a:hover{color:#fff!important;}.site-footer .footer-article{overflow:hidden;padding:30px 0 20px;}.site-footer .contact{float:left;width:280px;}.site-footer .contact dt{width:90px;}.site-footer .contact .iconfont{width:66px;height:66px;display:block;float:left;background:url(image/kefu.png) center center no-repeat;background-size:55px;}.site-footer .contact .text{font-size:14px;line-height:30px;color:#fff;}.site-footer .contact .tel{font-size:20px;color:#fff;padding:3px 0 15px;}.site-footer .contact a{display:block;width:180px;font-size:14px;line-height:30px;color:#9b9ea0;text-align:center;border-radius:4px;}.site-footer .contact a:hover{color:#fff!important;}.site-footer .col-article{float:left;width:23%;}.site-footer .col-article dd{margin-bottom:8px;overflow:hidden;}.site-footer .col-article dd a{font-size:12px;color:#9b9ea0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}.site-footer .wx{float:left;width:135px;margin-right:0;}.site-footer .wx dd{margin-bottom:15px;}.site-footer .wx dd img{display:block;width:110px;height:110px;border-radius:2px;margin:5px 0;}.site-footer .wx dd.other{margin-bottom:0;line-height:18px;}.site-footer .wx dd.other span{display:block;font-size:12px;}.site-footer .wx dd.other a{display:inline-block;margin-right:5px;font-size:12px;line-height:18px;vertical-align:top;}.footer-links{border-top:1px solid #41424c;text-align: center;padding:10px 0;}.footer-links p{font-size:14px;color:#a8aaba;}.footer-links a{margin-right:20px;font-size:12px;color:#a8aaba;}.footer-info .info-text{font-size:12px;text-align:center;padding:20px 0;}.footer-info .info-text .nav-bottom{font-size:14px;color:#ccc;text-align:center;padding:20px 0 5px;}.footer-info .info-text .nav-bottom a{color:#9b9ea0;padding:0 8px;}.footer-info .info-text .copyright{padding-top:5px;}.footer-info .info-text em{padding:0 8px;}.site-footer .col-article dt,.site-footer .wx dt{margin-bottom:15px;font-size:16px;font-weight:400;} @charset utf-8;*{font-family:微软雅黑;margin:0;padding:0;}.clearfix:after{content:".";display:block;height:0;visibility:hidden;clear:both;}.w1100{width:1100px;margin:0 auto;}.fl{float:left;}a{text-decoration:none;}ul{list-style:none;}.site-footer{font-size:14px;line-height:1.8;color:#a8aaba;background:#0011;}.site-footer a{color:#a8aaba;}.site-footer .footer-article{overflow:hidden;padding:30px 0 20px;}.site-footer .contact{float:left;width:280px;}.site-footer .contact dt{width:90px;}.site-footer .contact .iconfont{width:66px;height:66px;display:block;float:left;background:url(image/kefu.png) center center no-repeat;background-size:55px;}.site-footer .contact .text{font-size:14px;line-height:30px;color:#fff;}.site-footer .contact .tel{font-size:20px;color:#fff;padding:3px 0 15px;}.site-footer .contact a{display:block;width:180px;font-size:14px;line-height:30px;color:#9b9ea0;text-align:center;border-radius:4px;}.site-footer .contact a:hover{color:#fff!important;}.site-footer .col-article{float:left;width:23%;}.site-footer .col-article dd{margin-bottom:8px;overflow:hidden;}.site-footer .col-article dd a{font-size:12px;color:#9b9ea0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}.site-footer .wx{float:left;width:135px;margin-right:0;}.site-footer .wx dd{margin-bottom:15px;}.site-footer .wx dd img{display:block;width:110px;height:110px;border-radius:2px;margin:5px 0;}.site-footer .wx dd.other{margin-bottom:0;line-height:18px;}.site-footer .wx dd.other span{display:block;font-size:12px;}.site-footer .wx dd.other a{display:inline-block;margin-right:5px;font-size:12px;line-height:18px;vertical-align:top;}.footer-links{border-top:1px solid #41424c;text-align: center;padding:10px 0;}.footer-links p{font-size:14px;color:#a8aaba;}.footer-links a{margin-right:20px;font-size:12px;color:#a8aaba;}.footer-info .info-text{font-size:12px;text-align:center;padding:20px 0;}.footer-info .info-text .nav-bottom{font-size:14px;color:#ccc;text-align:center;padding:20px 0 5px;}.footer-info .info-text .nav-bottom a{color:#9b9ea0;padding:0 8px;}.footer-info .info-text .copyright{padding-top:5px;}.footer-info .info-text em{padding:0 8px;}.site-footer .col-article dt,.site-footer .wx dt{margin-bottom:15px;font-size:16px;font-weight:400;}
\ No newline at end of file \ No newline at end of file
...@@ -12451,16 +12451,16 @@ ...@@ -12451,16 +12451,16 @@
}, },
{ {
"name": "phpstan/phpdoc-parser", "name": "phpstan/phpdoc-parser",
"version": "1.6.4", "version": "1.8.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git", "url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "135607f9ccc297d6923d49c2bcf309f509413215" "reference": "8dd908dd6156e974b9a0f8bb4cd5ad0707830f04"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/135607f9ccc297d6923d49c2bcf309f509413215", "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/8dd908dd6156e974b9a0f8bb4cd5ad0707830f04",
"reference": "135607f9ccc297d6923d49c2bcf309f509413215", "reference": "8dd908dd6156e974b9a0f8bb4cd5ad0707830f04",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
...@@ -12496,9 +12496,9 @@ ...@@ -12496,9 +12496,9 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types", "description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": { "support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues", "issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.6.4" "source": "https://github.com/phpstan/phpdoc-parser/tree/1.8.0"
}, },
"time": "2022-06-26T13:09:08+00:00" "time": "2022-09-04T18:59:06+00:00"
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
......
...@@ -8162,17 +8162,17 @@ ...@@ -8162,17 +8162,17 @@
}, },
{ {
"name": "phpstan/phpdoc-parser", "name": "phpstan/phpdoc-parser",
"version": "1.6.4", "version": "1.8.0",
"version_normalized": "1.6.4.0", "version_normalized": "1.8.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git", "url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "135607f9ccc297d6923d49c2bcf309f509413215" "reference": "8dd908dd6156e974b9a0f8bb4cd5ad0707830f04"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/135607f9ccc297d6923d49c2bcf309f509413215", "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/8dd908dd6156e974b9a0f8bb4cd5ad0707830f04",
"reference": "135607f9ccc297d6923d49c2bcf309f509413215", "reference": "8dd908dd6156e974b9a0f8bb4cd5ad0707830f04",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
...@@ -8193,7 +8193,7 @@ ...@@ -8193,7 +8193,7 @@
"phpunit/phpunit": "^9.5", "phpunit/phpunit": "^9.5",
"symfony/process": "^5.2" "symfony/process": "^5.2"
}, },
"time": "2022-06-26T13:09:08+00:00", "time": "2022-09-04T18:59:06+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
...@@ -8210,7 +8210,7 @@ ...@@ -8210,7 +8210,7 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types", "description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": { "support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues", "issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.6.4" "source": "https://github.com/phpstan/phpdoc-parser/tree/1.8.0"
}, },
"install-path": "../phpstan/phpdoc-parser" "install-path": "../phpstan/phpdoc-parser"
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
'name' => 'magento/magento2ce', 'name' => 'magento/magento2ce',
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'reference' => '816e09038c616a2054a234820cb37f7f71c1105b', 'reference' => '2dc23cb5b09b85980d87380e1c6330fa6c52d27f',
'type' => 'project', 'type' => 'project',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
...@@ -940,7 +940,7 @@ ...@@ -940,7 +940,7 @@
'magento/magento2ce' => array( 'magento/magento2ce' => array(
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'reference' => '816e09038c616a2054a234820cb37f7f71c1105b', 'reference' => '2dc23cb5b09b85980d87380e1c6330fa6c52d27f',
'type' => 'project', 'type' => 'project',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
...@@ -2423,9 +2423,9 @@ ...@@ -2423,9 +2423,9 @@
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'phpstan/phpdoc-parser' => array( 'phpstan/phpdoc-parser' => array(
'pretty_version' => '1.6.4', 'pretty_version' => '1.8.0',
'version' => '1.6.4.0', 'version' => '1.8.0.0',
'reference' => '135607f9ccc297d6923d49c2bcf309f509413215', 'reference' => '8dd908dd6156e974b9a0f8bb4cd5ad0707830f04',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser',
'aliases' => array(), 'aliases' => array(),
......
...@@ -300,6 +300,34 @@ class PhpDocNode implements Node ...@@ -300,6 +300,34 @@ class PhpDocNode implements Node
} }
/**
* @return AssertTagPropertyValueNode[]
*/
public function getAssertPropertyTagValues(string $tagName = '@phpstan-assert'): array
{
return array_filter(
array_column($this->getTagsByName($tagName), 'value'),
static function (PhpDocTagValueNode $value): bool {
return $value instanceof AssertTagPropertyValueNode;
}
);
}
/**
* @return AssertTagMethodValueNode[]
*/
public function getAssertMethodTagValues(string $tagName = '@phpstan-assert'): array
{
return array_filter(
array_column($this->getTagsByName($tagName), 'value'),
static function (PhpDocTagValueNode $value): bool {
return $value instanceof AssertTagMethodValueNode;
}
);
}
public function __toString(): string public function __toString(): string
{ {
$children = array_map( $children = array_map(
......
...@@ -46,6 +46,7 @@ class Lexer ...@@ -46,6 +46,7 @@ class Lexer
public const TOKEN_OPEN_CURLY_BRACKET = 31; public const TOKEN_OPEN_CURLY_BRACKET = 31;
public const TOKEN_CLOSE_CURLY_BRACKET = 32; public const TOKEN_CLOSE_CURLY_BRACKET = 32;
public const TOKEN_NEGATED = 33; public const TOKEN_NEGATED = 33;
public const TOKEN_ARROW = 34;
public const TOKEN_LABELS = [ public const TOKEN_LABELS = [
self::TOKEN_REFERENCE => '\'&\'', self::TOKEN_REFERENCE => '\'&\'',
...@@ -66,6 +67,7 @@ class Lexer ...@@ -66,6 +67,7 @@ class Lexer
self::TOKEN_VARIADIC => '\'...\'', self::TOKEN_VARIADIC => '\'...\'',
self::TOKEN_DOUBLE_COLON => '\'::\'', self::TOKEN_DOUBLE_COLON => '\'::\'',
self::TOKEN_DOUBLE_ARROW => '\'=>\'', self::TOKEN_DOUBLE_ARROW => '\'=>\'',
self::TOKEN_ARROW => '\'->\'',
self::TOKEN_EQUAL => '\'=\'', self::TOKEN_EQUAL => '\'=\'',
self::TOKEN_OPEN_PHPDOC => '\'/**\'', self::TOKEN_OPEN_PHPDOC => '\'/**\'',
self::TOKEN_CLOSE_PHPDOC => '\'*/\'', self::TOKEN_CLOSE_PHPDOC => '\'*/\'',
...@@ -138,12 +140,13 @@ class Lexer ...@@ -138,12 +140,13 @@ class Lexer
self::TOKEN_VARIADIC => '\\.\\.\\.', self::TOKEN_VARIADIC => '\\.\\.\\.',
self::TOKEN_DOUBLE_COLON => '::', self::TOKEN_DOUBLE_COLON => '::',
self::TOKEN_DOUBLE_ARROW => '=>', self::TOKEN_DOUBLE_ARROW => '=>',
self::TOKEN_ARROW => '->',
self::TOKEN_EQUAL => '=', self::TOKEN_EQUAL => '=',
self::TOKEN_COLON => ':', self::TOKEN_COLON => ':',
self::TOKEN_OPEN_PHPDOC => '/\\*\\*(?=\\s)\\x20?+', self::TOKEN_OPEN_PHPDOC => '/\\*\\*(?=\\s)\\x20?+',
self::TOKEN_CLOSE_PHPDOC => '\\*/', self::TOKEN_CLOSE_PHPDOC => '\\*/',
self::TOKEN_PHPDOC_TAG => '@[a-z][a-z0-9-]*+', self::TOKEN_PHPDOC_TAG => '@[a-z][a-z0-9-\\\\]*+',
self::TOKEN_PHPDOC_EOL => '\\r?+\\n[\\x09\\x20]*+(?:\\*(?!/)\\x20?+)?', self::TOKEN_PHPDOC_EOL => '\\r?+\\n[\\x09\\x20]*+(?:\\*(?!/)\\x20?+)?',
self::TOKEN_FLOAT => '(?:-?[0-9]++\\.[0-9]*+(?:e-?[0-9]++)?)|(?:-?[0-9]*+\\.[0-9]++(?:e-?[0-9]++)?)|(?:-?[0-9]++e-?[0-9]++)', self::TOKEN_FLOAT => '(?:-?[0-9]++\\.[0-9]*+(?:e-?[0-9]++)?)|(?:-?[0-9]*+\\.[0-9]++(?:e-?[0-9]++)?)|(?:-?[0-9]++e-?[0-9]++)',
......
...@@ -6,6 +6,7 @@ use PHPStan\PhpDocParser\Ast; ...@@ -6,6 +6,7 @@ use PHPStan\PhpDocParser\Ast;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode; use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Lexer\Lexer; use PHPStan\PhpDocParser\Lexer\Lexer;
use PHPStan\ShouldNotHappenException; use PHPStan\ShouldNotHappenException;
use function array_key_exists;
use function array_values; use function array_values;
use function count; use function count;
use function trim; use function trim;
...@@ -446,13 +447,56 @@ class PhpDocParser ...@@ -446,13 +447,56 @@ class PhpDocParser
return new Ast\PhpDoc\TypeAliasImportTagValueNode($importedAlias, new IdentifierTypeNode($importedFrom), $importedAs); return new Ast\PhpDoc\TypeAliasImportTagValueNode($importedAlias, new IdentifierTypeNode($importedFrom), $importedAs);
} }
private function parseAssertTagValue(TokenIterator $tokens): Ast\PhpDoc\AssertTagValueNode /**
* @return Ast\PhpDoc\AssertTagValueNode|Ast\PhpDoc\AssertTagPropertyValueNode|Ast\PhpDoc\AssertTagMethodValueNode
*/
private function parseAssertTagValue(TokenIterator $tokens): Ast\PhpDoc\PhpDocTagValueNode
{ {
$isNegated = $tokens->tryConsumeTokenType(Lexer::TOKEN_NEGATED); $isNegated = $tokens->tryConsumeTokenType(Lexer::TOKEN_NEGATED);
$type = $this->typeParser->parse($tokens); $type = $this->typeParser->parse($tokens);
$parameter = $this->parseRequiredVariableName($tokens); $parameter = $this->parseAssertParameter($tokens);
$description = $this->parseOptionalDescription($tokens); $description = $this->parseOptionalDescription($tokens);
return new Ast\PhpDoc\AssertTagValueNode($type, $parameter, $isNegated, $description);
if (array_key_exists('method', $parameter)) {
return new Ast\PhpDoc\AssertTagMethodValueNode($type, $parameter['parameter'], $parameter['method'], $isNegated, $description);
} elseif (array_key_exists('property', $parameter)) {
return new Ast\PhpDoc\AssertTagPropertyValueNode($type, $parameter['parameter'], $parameter['property'], $isNegated, $description);
}
return new Ast\PhpDoc\AssertTagValueNode($type, $parameter['parameter'], $isNegated, $description);
}
/**
* @return array{parameter: string}|array{parameter: string, property: string}|array{parameter: string, method: string}
*/
private function parseAssertParameter(TokenIterator $tokens): array
{
if ($tokens->isCurrentTokenType(Lexer::TOKEN_THIS_VARIABLE)) {
$parameter = '$this';
$requirePropertyOrMethod = true;
$tokens->next();
} else {
$parameter = $tokens->currentTokenValue();
$requirePropertyOrMethod = false;
$tokens->consumeTokenType(Lexer::TOKEN_VARIABLE);
}
if ($requirePropertyOrMethod || $tokens->isCurrentTokenType(Lexer::TOKEN_ARROW)) {
$tokens->consumeTokenType(Lexer::TOKEN_ARROW);
$propertyOrMethod = $tokens->currentTokenValue();
$tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
if ($tokens->tryConsumeTokenType(Lexer::TOKEN_OPEN_PARENTHESES)) {
$tokens->consumeTokenType(Lexer::TOKEN_CLOSE_PARENTHESES);
return ['parameter' => $parameter, 'method' => $propertyOrMethod];
}
return ['parameter' => $parameter, 'property' => $propertyOrMethod];
}
return ['parameter' => $parameter];
} }
private function parseOptionalVariableName(TokenIterator $tokens): string private function parseOptionalVariableName(TokenIterator $tokens): string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment