Commit 20fed19a by lmf

优化网站底部

加入bootstatv4
parent 2a1b4612
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="page.top">
<container name="content.top.home" label="content top home" htmlTag="div" htmlClass="content_top_home">
<block class="Magento\Framework\View\Element\Template" name="top_home" template="Magento_Cms::top-home.phtml"/>
<referenceContainer name="section_top_banner" remove="true" />
</container>
</referenceContainer>
<move element="content.top.home" destination="page.top" after="-"/>
</body>
</page>
<?php
if(! $id = $block->getProductIds()){
return ;
}
$templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;
$ids = explode(',',$id);
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$pr = $objectManager->create('Magento\Catalog\Model\ProductRepository');
$blocklist = $objectManager->get('\Magento\Catalog\Block\Product\ListProduct');
$imageHelper = $objectManager->get( 'Magento\Catalog\Helper\Image' );
foreach($ids as $pid):
$product = $pr->getById($pid);
if(!$product) continue;
$productImage = $imageHelper->init( $product, 'category_page_list' ) ->getUrl();
?>
<div class="flash-sale-item col-md-2 col-xs-6">
<a href="<?php echo $product->getProductUrl()?>" >
<img src="<?php echo $productImage;?>" /></a>
<div class="flash-sale-info">
<a class="product-name" href="<?php echo $product->getProductUrl()?>"><?php echo $product->getName();?></a>
<?= $blocklist->getReviewsSummaryHtml($product, $templateType) ?>
<?= /* @noEscape */ $blocklist->getProductPrice($product) ?>
</div>
</div>
<?php
endforeach;
?>
<?php
$layout = $block->getLayout();
?><div class="actions-header-pc hidden-xs">
<?php //echo $layout->getBlock('minicart')?>
</div>
\ No newline at end of file
<div class="top-content-home">
<div class="container-custom clearfix">
<?php //echo $this->getLayout()->createBlock('Rokanthemes\SlideBanner\Block\Slider')->setSliderId('homepageslider2')->toHtml(); ?>
<?php //echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('homepageslider')->toHtml();?>
<?php /*echo $block->getLayout()->createBlock('Rokanthemes\PriceCountdown\Block\Pricecountdown')->setTemplate('Rokanthemes_PriceCountdown::pricecountdown.phtml')->toHtml(); */?>
<div class="section-element shop_by_categories">
<div class="container">
<?php //echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('shop_by_categories')->toHtml();?>
</div>
</div>
<div class="select-element new_product">
<div class="container">
<?php //echo $block->getLayout()->createBlock('Rokanthemes\Newproduct\Block\Newproduct')->setTemplate('Rokanthemes_Newproduct::newproduct2.phtml')->toHtml();?>
</div>
</div>
<div class="section-element flash_sale">
<?php //echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('flash_sale')->toHtml();?>
</div>
<div class="section-element banner-top-home">
<?php //echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('home_category_thumnail')->toHtml();?>
</div>
<!--
<div class="section-element categories_tab">
<?php //echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('categories_tab')->toHtml();?>
</div>
-->
<div class="select-element box-blog">
<?php //echo $block->getLayout()->createBlock('Rokanthemes\Blog\Block\Sidebar\Recent')->setTemplate('Rokanthemes_Blog::sidebar/slider.phtml')->toHtml();?>
</div>
<div class="select-element testimonial_instagram">
<div class="row">
<div class="col-md-6">
<div class="section_testimonial">
<?php //echo $block->getLayout()->createBlock('Rokanthemes\Testimonial\Block\Testimonial')->setTemplate('Rokanthemes_Testimonial::testimonial.phtml')->toHtml();?>
</div>
</div>
<div class="col-md-6">
<div class="select-element Instagram_static">
<?php //echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('Instagram_static')->toHtml();?>
</div>
</div>
</div>
</div>
</div>
<div class="select-element section-before-footer clearfix">
<div class="container-before-footer clearfix">
<?php //echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('before-footer')->toHtml(); ?>
</div>
</div>
<div class="select-element section-brands clearfix">
<div class="container-custom clearfix">
<?php //echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('brand-logo-2')->toHtml(); ?>
</div>
</div>
</div>
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="footer-container">
<block class="Magento\Theme\Block\Html\Footer" name="footer" template="html/footer.phtml"/>
</referenceContainer>
</body>
</page>
\ No newline at end of file
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<meta name="format-detection" content="telephone=no"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
</head>
<body>
<referenceBlock name="breeze.css">
<arguments>
<argument name="bundles" xsi:type="array">
<item name="default" xsi:type="array">
<item name="deferred" xsi:type="boolean">true</item>
</item>
</argument>
</arguments>
</referenceBlock>
<referenceBlock name="breeze.js">
<arguments>
<argument name="bundles" xsi:type="array">
<item name="default" xsi:type="array">
<item name="items" xsi:type="array">
<item name="theme-breeze-blank" xsi:type="string">js/breeze/theme-blank</item>
<item name="theme-breeze-extend" xsi:type="string">js/breeze/extend</item>
<item name="theme-breeze-custom" xsi:type="string">js/breeze/custom</item>
</item>
</item>
</argument>
</arguments>
</referenceBlock>
</body>
</page>
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="Magento\Framework\View\Element\Html\Calendar" name="html_calendar" as="html_calendar" template="Magento_Theme::js/calendar.phtml"/>
</referenceContainer>
</body>
</page>
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<attribute name="class" value="page-print"/>
<referenceContainer name="header.container" remove="true"/>
<referenceBlock name="catalog.topnav" remove="true"/>
<referenceContainer name="footer-container" remove="true"/>
<move element="logo" destination="main.content" before="-" />
<move element="copyright" destination="main.content" after="-" />
<referenceContainer name="before.body.end">
<block class="Magento\Framework\View\Element\Template" name="sales.order.print.js" template="Magento_Theme::html/print.phtml" />
</referenceContainer>
</body>
</page>
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<update handle="empty"/>
<referenceContainer name="page.wrapper">
<container name="header.container" as="header_container" label="Page Header Container" htmlTag="header" htmlClass="page-header" before="main.content"/>
<container name="page.top" as="page_top" label="After Page Header" after="header.container"/>
<container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer"/>
</referenceContainer>
</layout>
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<update handle="1column"/>
<referenceContainer name="columns">
<container name="div.sidebar.main" htmlTag="div" htmlClass="sidebar sidebar-main" after="main">
<container name="sidebar.main" as="sidebar_main" label="Sidebar Main"/>
</container>
<container name="div.sidebar.additional" htmlTag="div" htmlClass="sidebar sidebar-additional" after="div.sidebar.main">
<container name="sidebar.additional" as="sidebar_additional" label="Sidebar Additional"/>
</container>
</referenceContainer>
</layout>
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<update handle="2columns-left"/>
</layout>
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<update handle="2columns-left"/>
</layout>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<?= /* @noEscape */ $block->getMiscellaneousHtml();
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<div class="block <?= $block->escapeHtmlAttr($block->getBlockCss()) ?>">
<div class="block-title <?= $block->escapeHtmlAttr($block->getBlockCss()) ?>-title">
<strong><?= $block->escapeHtml($block->getBlockTitle()) ?></strong>
</div>
<div class="block-content <?= $block->escapeHtmlAttr($block->getBlockCss()) ?>-content">
<?= $block->getChildHtml() ?>
</div>
</div>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<?php if ($crumbs && is_array($crumbs)) : ?>
<div class="breadcrumbs">
<ul class="items">
<?php foreach ($crumbs as $crumbName => $crumbInfo) : ?>
<li class="item <?= $block->escapeHtmlAttr($crumbName) ?>">
<?php if ($crumbInfo['link']) : ?>
<a href="<?= $block->escapeUrl($crumbInfo['link']) ?>"
title="<?= $block->escapeHtml($crumbInfo['title']) ?>">
<?= $block->escapeHtml($crumbInfo['label']) ?>
</a>
<?php elseif ($crumbInfo['last']) : ?>
<strong><?= $block->escapeHtml($crumbInfo['label']) ?></strong>
<?php else : ?>
<?= $block->escapeHtml($crumbInfo['label']) ?>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<small class="bugs">
<span><?= $block->escapeHtml(__('Help Us Keep Magento Healthy')) ?></span>
<a href="http://www.magentocommerce.com/bug-tracking"
target="_blank" title="<?= $block->escapeHtmlAttr(__('Report All Bugs')) ?>">
<?= $block->escapeHtml(__('Report All Bugs')) ?>
</a>
</small>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<div class="block <?= $block->escapeHtmlAttr($block->getBlockCss()) ?>">
<div class="title <?= $block->escapeHtmlAttr($block->getBlockCss()) ?>-title"
data-mage-init='{"toggleAdvanced": {"toggleContainers": "#<?= $block->escapeHtmlAttr($block->getBlockCss()) ?>", "selectorsToggleClass": "active"}}'>
<strong>
<?= $block->escapeHtml(__($block->getBlockTitle())) ?>
</strong>
</div>
<div class="content <?= $block->escapeHtmlAttr($block->getBlockCss()) ?>-content"
id="<?= $block->escapeHtmlAttr($block->getBlockCss()) ?>">
<?= $block->getChildHtml() ?>
</div>
</div>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<?= $block->getChildHtml();
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<small class="copyright">
<span><?= $block->escapeHtml($block->getCopyright()) ?>111111111</span>
</small>
<script>
require(['jquery', 'jason'], function($) {
});
</script>
<div class="header-container cusheader">
<div class="header-text text-center">
<div class="container">
<div data-content-type="html" data-appearance="default" data-element="main" data-decoded="true"><div class="header_bar">
</div>
<style>
.header_bar {
width: 100%;
height: 60px;
background: url(https://media.joshine.com/wysiwyg/tonglan_2_.jpg) no-repeat center;
background-size: 100%;
}
@media(max-width:789px){
.header_bar {
width: 100%;
height: 40px;
background: url(https://media.joshine.com/wysiwyg/tongtiao_M.jpg) no-repeat center;
background-size: 100%;
}
}
</style>
</div>
</div>
</div>
<div class="header">
<div class="container-custom clearfix">
<div class="for-full-withmenu">
<div class="col-logo"><?php echo $this->getChildHtml("logo"); ?></div>
<div class="actions-header">
<div class="hidden-xs">
<?php echo $this->getChildHtml("language2"); ?>
<?php echo $this->getChildHtml("currency2"); ?>
</div>
<div class="register-login hidden-xs">
<?php if(!$this->helper('Rokanthemes\Themeoption\Helper\Data')->isLoggedIn()){?>
<a href="<?php echo $this->getUrl('customer/account/login');?>"><i class="icon-users"></i><?php echo __('Login');?></a>
<a href="<?php echo $this->getUrl('customer/account/create');?>"> / <?php echo __('Sign up');?></a>
<?php
}
else{
?>
<a href="<?php echo $this->getUrl('customer/account/index');?>"><i class="icon-users"></i><?php echo __('My account');?></a>
<a href="<?php echo $this->getUrl('customer/account/logout');?>"> / <?php echo __('Logout');?></a>
<?php } ?>
</div>
<div class="wishlist">
<a href="<?php echo $this->getUrl('wishlist');?>"><i class="icon-heart"></i></a>
</div>
<?php echo $this->getChildHtml("minicart");?>
<div class="header-top-setting visible-xs">
<a href="#" class="actions-top"><i class="icon-align-right"> </i></a>
<div class="setting-container">
<div class="container-setting-language-currency">
<button type="button" id="btn-h-t-s-close" title="<?php echo __('Close') ?>">
<span><?php echo __('Close') ?></span>
</button>
<!-- <h3><?php echo __('Language') ?></h3>
<?php echo $this->getChildHtml("store_language"); ?> -->
<h3><?php echo __('Currency') ?></h3>
<?php echo $this->getChildHtml("currency"); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="header-menu">
<div class="container-custom clearfix">
<div class="for-full-withmenu wrapper-navigation">
<?php echo $this->getChildHtml("top.navigation.sections"); ?>
</div>
</div>
</div>
</div>
<?php if($this->helper('Rokanthemes\Themeoption\Helper\Themeconfig')->isEnableStickyHeader()){ ?>
<script type="text/javascript">
require(['jquery'],function($){
$(document).ready(function($){
var lastScrollTop = 0, delta = 20;
$(window).scroll(function(){
var num = $('.header-container').outerHeight();
var screenWidth = $(window).width();
var nowScrollTop = $(this).scrollTop();
if(Math.abs(lastScrollTop - nowScrollTop) >= delta){
if (nowScrollTop > lastScrollTop){
// ACTION ON
// SCROLLING DOWN
$(".header").removeClass("sticky");
$(".header-menu").removeClass("sticky");
} else {
if ($(this).scrollTop() > num && screenWidth >= 768 ){
$(".header").addClass("sticky");
$(".header-menu").addClass("sticky");
}else{
$(".header").removeClass("sticky");
$(".header-menu").removeClass("sticky");
}
}
lastScrollTop = nowScrollTop;
}
});
});
});
</script>
<?php } ?>
\ No newline at end of file
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* @var \Magento\Theme\Block\Html\Header\CriticalCss $criticalCssViewModel
*/
?>
<?php $criticalCssViewModel = $block->getData('criticalCssViewModel'); ?>
<style type="text/css" data-type="criticalCss">
<?= /* @noEscape */ $criticalCssViewModel->getCriticalCssData() ?>
</style>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* @var \Magento\Theme\Block\Html\Header\Logo $block
*/
$storeName = $block->getThemeName() ? $block->getThemeName() : $block->getLogoAlt();
/**
* @var \Magento\Theme\ViewModel\Block\Html\Header\LogoSizeResolverInterface|null $logoSizeResolver
*/
$logoSizeResolver = $block->getLogoSizeResolver();
$logoWidth = $logoSizeResolver !== null && $logoSizeResolver->getWidth()
? $logoSizeResolver->getWidth()
: $block->getLogoWidth();
$logoHeight = $logoSizeResolver !== null && $logoSizeResolver->getHeight()
? $logoSizeResolver->getHeight()
: $block->getLogoHeight();
?>
<span data-action="toggle-nav" class="action nav-toggle"><span><?= $block->escapeHtml(__('Toggle Nav')) ?></span></span>
<a
class="logo"
href="<?= $block->escapeUrl($block->getUrl('')) ?>"
title="<?= $block->escapeHtmlAttr($storeName) ?>"
aria-label="store logo">
<img src="<?= $block->escapeUrl($block->getLogoSrc()) ?>"
title="<?= $block->escapeHtmlAttr($block->getLogoAlt()) ?>"
alt="<?= $block->escapeHtmlAttr($block->getLogoAlt()) ?>"
<?= $logoWidth ? 'width="' . $block->escapeHtmlAttr($logoWidth) . '"' : '' ?>
<?= $logoHeight ? 'height="' . $block->escapeHtmlAttr($logoHeight) . '"' : '' ?>
/>
</a>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* @var \Magento\Framework\View\Element\Template $block
* @var \Magento\Framework\Escaper $escaper
* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
*/
?>
<div data-role="main-css-loader" class="loading-mask">
<div class="loader">
<img src="<?= $escaper->escapeUrl($block->getViewFileUrl('images/loader-1.gif')); ?>"
alt="<?= $escaper->escapeHtml(__('Loading...')); ?>">
</div>
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
"position: absolute;",
"div.loader img"
) ?>
</div>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<div data-placeholder="messages"></div>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* @var $block \Magento\Theme\Block\Html\Notices
* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
*/
?>
<?php if ($block->displayNoscriptNotice()): ?>
<noscript>
<div class="message global noscript">
<div class="content">
<p>
<strong><?= $block->escapeHtml(__('JavaScript seems to be disabled in your browser.')) ?></strong>
<span>
<?= $block->escapeHtml(
__('For the best experience on our site, be sure to turn on Javascript in your browser.')
) ?>
</span>
</p>
</div>
</div>
</noscript>
<?php endif; ?>
<?php if ($block->displayNoLocalStorageNotice()): ?>
<div class="notice global site local_storage">
<div class="content">
<p>
<strong><?= $block->escapeHtml(__('Local Storage seems to be disabled in your browser.')) ?></strong>
<br />
<?= $block->escapeHtml(
__('For the best experience on our site, be sure to turn on Local Storage in your browser.')
) ?>
</p>
</div>
</div>
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display: none;', 'div.notice.global.site.local_storage') ?>
<?php $scriptString = <<<script
require(['jquery'], function(jQuery){
// <![CDATA[
(function($) {
var test = 'test';
try {
localStorage.setItem(test, test);
localStorage.removeItem(test);
} catch(e) {
$(".notice.global.site.local_storage").show();
}
})(jQuery);
// ]]>
});
script;
?>
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
<?php endif; ?>
<?php if ($block->displayDemoNotice()): ?>
<div class="message global demo">
<div class="content">
<p><?= $block->escapeHtml(__('This is a demo store. No orders will be fulfilled.')) ?></p>
</div>
</div>
<?php endif; ?>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* Pager template
*
* @see \Magento\Theme\Block\Html\Pager
*/
?>
<?php if ($block->getCollection()->getSize()): ?>
<?php if ($block->getUseContainer()): ?>
<div class="pager">
<?php endif ?>
<?php if ($block->getShowAmounts()): ?>
<p class="toolbar-amount">
<span class="toolbar-number">
<?php if ($block->getLastPageNum()>1): ?>
<?= $block->escapeHtml(
__('Items %1 to %2 of %3 total', $block->getFirstNum(), $block->getLastNum(), $block->getTotalNum())
) ?>
<?php elseif ($block->getTotalNum() == 1): ?>
<?= $block->escapeHtml(__('%1 Item', $block->getTotalNum())) ?>
<?php else: ?>
<?= $block->escapeHtml(__('%1 Item(s)', $block->getTotalNum())) ?>
<?php endif; ?>
</span>
</p>
<?php endif ?>
<?php if ($block->getLastPageNum()>1): ?>
<div class="pages">
<strong class="label pages-label" id="paging-label"><?= $block->escapeHtml(__('Page')) ?></strong>
<ul class="items pages-items" aria-labelledby="paging-label">
<?php if (!$block->isFirstPage()): ?>
<li class="item pages-item-previous">
<?php $text = $block->getAnchorTextForPrevious() ? $block->getAnchorTextForPrevious() : '';?>
<a class="<?= $block->escapeHtmlAttr($text ? 'link ' : 'action ') ?> previous"
href="<?= $block->escapeUrl($block->getPreviousPageUrl()) ?>"
title="<?= $block->escapeHtmlAttr($text ? $text : __('Previous')) ?>">
<span class="label"><?= $block->escapeHtml(__('Page')) ?></span>
<span><?= $block->escapeHtml($text ? $text : __('Previous')) ?></span>
</a>
</li>
<?php endif;?>
<?php if ($block->canShowFirst()): ?>
<li class="item">
<a class="page first" href="<?= $block->escapeUrl($block->getFirstPageUrl()) ?>">
<span class="label"><?= $block->escapeHtml(__('Page')) ?></span>
<span>1</span>
</a>
</li>
<?php endif;?>
<?php if ($block->canShowPreviousJump()): ?>
<li class="item">
<a class="page previous jump"
title=""
href="<?= $block->escapeUrl($block->getPreviousJumpUrl()) ?>">
<span>...</span>
</a>
</li>
<?php endif;?>
<?php foreach ($block->getFramePages() as $_page): ?>
<?php if ($block->isPageCurrent($_page)): ?>
<li class="item current">
<strong class="page">
<span class="label"><?= $block->escapeHtml(__('You\'re currently reading page')) ?></span>
<span><?= $block->escapeHtml($_page) ?></span>
</strong>
</li>
<?php else: ?>
<li class="item">
<a href="<?= $block->escapeUrl($block->getPageUrl($_page)) ?>" class="page">
<span class="label"><?= $block->escapeHtml(__('Page')) ?></span>
<span><?= $block->escapeHtml($_page) ?></span>
</a>
</li>
<?php endif;?>
<?php endforeach;?>
<?php if ($block->canShowNextJump()): ?>
<li class="item">
<a class="page next jump" title="" href="<?= $block->escapeUrl($block->getNextJumpUrl()) ?>">
<span>...</span>
</a>
</li>
<?php endif;?>
<?php if ($block->canShowLast()): ?>
<li class="item">
<a class="page last" href="<?= $block->escapeUrl($block->getLastPageUrl()) ?>">
<span class="label"><?= $block->escapeHtml(__('Page')) ?></span>
<span><?= $block->escapeHtml($block->getLastPageNum()) ?></span>
</a>
</li>
<?php endif;?>
<?php if (!$block->isLastPage()): ?>
<li class="item pages-item-next">
<?php $text = $block->getAnchorTextForNext() ? $block->getAnchorTextForNext() : '';?>
<a class="<?= /* @noEscape */ $text ? 'link ' : 'action ' ?> next"
href="<?= $block->escapeUrl($block->getNextPageUrl()) ?>"
title="<?= $block->escapeHtmlAttr($text ? $text : __('Next')) ?>">
<span class="label"><?= $block->escapeHtml(__('Page')) ?></span>
<span><?= $block->escapeHtml($text ? $text : __('Next')) ?></span>
</a>
</li>
<?php endif;?>
</ul>
</div>
<?php endif; ?>
<?php if ($block->isShowPerPage()): ?>
<div class="limiter">
<strong class="limiter-label"><?= $block->escapeHtml(__('Show')) ?></strong>
<select id="limiter" data-mage-init='{"redirectUrl": {"event":"change"}}' class="limiter-options">
<?php foreach ($block->getAvailableLimit() as $_key => $_limit): ?>
<option value="<?= $block->escapeUrl($block->getLimitUrl($_key)) ?>"
<?php if ($block->isLimitCurrent($_key)): ?>
selected="selected"<?php endif ?>>
<?= $block->escapeHtml($_limit) ?>
</option>
<?php endforeach; ?>
</select>
<span class="limiter-text"><?= $block->escapeHtml(__('per page')) ?></span>
</div>
<?php endif ?>
<?php if ($block->getUseContainer()): ?>
</div>
<?php endif ?>
<?php endif ?>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
?>
<?php $scriptString = <<<script
require(
[
'jquery'
],
function($) {
$(function() {
window.print();
});
}
);
script;
?>
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* General template for displaying group of blocks divided into sections
*/
$group = $block->getGroupName();
$groupCss = $block->getGroupCss();
?>
<?php if ($detailedInfoGroup = $block->getGroupChildNames($group)):?>
<div class="sections <?= $block->escapeHtmlAttr($groupCss) ?>">
<?php $layout = $block->getLayout(); ?>
<div class="section-items <?= $block->escapeHtmlAttr($groupCss) ?>-items"
data-mage-init='{"tabs":{"openedState":"active"}}'>
<?php foreach ($detailedInfoGroup as $name):?>
<?php
$html = $layout->renderElement($name);
if (!trim($html) && ($block->getUseForce() != true)) {
continue;
}
$alias = $layout->getElementAlias($name);
$label = $block->getChildData($alias, 'title');
?>
<div class="section-item-title <?= $block->escapeHtmlAttr($groupCss) ?>-item-title"
data-role="collapsible">
<a class="<?= $block->escapeHtmlAttr($groupCss) ?>-item-switch"
data-toggle="switch" href="#<?= $block->escapeHtmlAttr($alias) ?>">
<?= /* @noEscape */ $label ?>
</a>
</div>
<div class="section-item-content <?= $block->escapeHtmlAttr($groupCss) ?>-item-content"
id="<?= $block->escapeHtmlAttr($alias) ?>"
data-role="content">
<?= /* @noEscape */ $html ?>
</div>
<?php endforeach;?>
</div>
</div>
<?php endif; ?>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
$target = $block->getTarget();
$label = $block->getLabel();
?>
<a class="action skip <?= $block->escapeHtmlAttr($target) ?>"
href="#<?= $block->escapeHtmlAttr($target) ?>">
<span>
<?= $block->escapeHtml($label) ?>
</span>
</a>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
$target_id = $block->getTargetId();
?>
<a id="<?= $block->escapeHtmlAttr($target_id) ?>" tabindex="-1"></a>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* @var $block \Magento\Theme\Block\Html\Title
*/
$cssClass = $block->getCssClass() ? ' ' . $block->getCssClass() : '';
$titleHtml = '';
if (trim($block->getPageHeading())) {
$titleHtml = '<span class="base" data-ui-id="page-title-wrapper" '
. $block->getAddBaseAttribute()
. '>'
. $block->escapeHtml($block->getPageHeading())
. '</span>';
}
?>
<?php if ($titleHtml) : ?>
<div class="page-title-wrapper<?= $block->escapeHtmlAttr($cssClass) ?>">
<h1 class="page-title"
<?php if ($block->getId()) : ?> id="<?= $block->escapeHtmlAttr($block->getId()) ?>" <?php endif; ?>
<?php if ($block->getAddBaseAttributeAria()) : ?>
aria-labelledby="<?= $block->escapeHtmlAttr($block->getAddBaseAttributeAria()) ?>"
<?php endif; ?>>
<?= /* @noEscape */ $titleHtml ?>
</h1>
<?= $block->getChildHtml() ?>
</div>
<?php endif; ?>
<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
?>
<?php
/**
* Top menu for store
*
* @see \Magento\Theme\Block\Html\Topmenu
*/
?>
<?php $columnsLimit = $block->getColumnsLimit() ?: 0; ?>
<?php $_menu = $block->getHtml('level-top', 'submenu', $columnsLimit) ?>
<nav class="navigation container" role="navigation">
<ul data-mage-init='{"menu":{"responsive":true, "expanded":true, "position":{"my":"left top","at":"left bottom"}}}'>
<li class="menu-home level0 nav-0 first level-top ui-menu-item"><a class="level-top ui-corner-all" href="<?php echo $block->getBaseUrl(); ?>"><?php echo __('Home')?></a></li>
<?php /* @escapeNotVerified */ echo $_menu; ?>
</ul>
</nav>
\ No newline at end of file
{
"name": "magento/theme-frontend-joshine",
"description": "N/A",
"config": {
"sort-packages": true
},
"require": {
"php": "~7.2.0||~7.3.0",
"magento/framework": "*",
"magento/theme-frontend-blank": "*"
},
"type": "magento2-theme",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"autoload": {
"files": [
"registration.php"
]
}
}
...@@ -35,4 +35,4 @@ ...@@ -35,4 +35,4 @@
<var name="category_page_grid-1column">...</var> <var name="category_page_grid-1column">...</var>
</var> </var>
</vars> </vars>
</view> </view>
\ No newline at end of file
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* See COPYING.txt for license details. * See COPYING.txt for license details.
*/ */
use Magento\Framework\Component\ComponentRegistrar;
use \Magento\Framework\Component\ComponentRegistrar;
ComponentRegistrar::register(ComponentRegistrar::THEME, 'frontend/Magento/joshine', __DIR__); ComponentRegistrar::register(ComponentRegistrar::THEME, 'frontend/Magento/joshine', __DIR__);
...@@ -11,3 +11,4 @@ ...@@ -11,3 +11,4 @@
<preview_image>media/preview.jpg</preview_image> <preview_image>media/preview.jpg</preview_image>
</media> </media>
</theme> </theme>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
"phpseclib/mcrypt_compat": "1.0.8", "phpseclib/mcrypt_compat": "1.0.8",
"phpseclib/phpseclib": "2.0.*", "phpseclib/phpseclib": "2.0.*",
"ramsey/uuid": "~4.1.0", "ramsey/uuid": "~4.1.0",
"swissup/breeze-blank": "1.2.0", "swissup/breeze-blank": "1.1.7",
"symfony/console": "~4.4.0", "symfony/console": "~4.4.0",
"symfony/event-dispatcher": "~4.4.0", "symfony/event-dispatcher": "~4.4.0",
"symfony/process": "~4.4.0", "symfony/process": "~4.4.0",
...@@ -388,11 +388,5 @@ ...@@ -388,11 +388,5 @@
"Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/" "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/"
} }
}, },
"prefer-stable": true, "prefer-stable": true
"repositories": { }
"packagist": { \ No newline at end of file
"type": "composer",
"url": "https://repo.magento.com/"
}
}
}
...@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) { ...@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit8c29683d703e0ac6b351ddf0617cf78c::getLoader(); return ComposerAutoloaderInitb71ce7c407b65980cf51508f463c8dcf::getLoader();
...@@ -633,7 +633,7 @@ namespace Aws; ...@@ -633,7 +633,7 @@ namespace Aws;
*/ */
class Sdk class Sdk
{ {
const VERSION = '3.234.3'; const VERSION = '3.234.2';
/** @var array Arguments for creating clients */ /** @var array Arguments for creating clients */
private $args; private $args;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
# Changelog
## [0.3.7](https://github.com/brick/varexporter/releases/tag/0.3.7) - 2022-06-30
**New feature**
- New option: `VarExporter::INLINE_ARRAY`
🗑️ **Deprecated**
- The `VarExporter::INLINE_NUMERIC_SCALAR_ARRAY` is deprecated, please use `INLINE_SCALAR_LIST` instead
## [0.3.6](https://github.com/brick/varexporter/releases/tag/0.3.6) - 2022-06-15
**New feature**
Support for PHP 8.1 enums (#23).
Thanks @Jacobs63!
## [0.3.5](https://github.com/brick/varexporter/releases/tag/0.3.5) - 2021-02-10
**New feature**
Support for controlling the base indentation level (#17).
Thanks @ADmad!
## [0.3.4](https://github.com/brick/varexporter/releases/tag/0.3.4) - 2021-02-07
**New feature**
Support for trailing comma in non-inline arrays, with the `TRAILING_COMMA_IN_ARRAY` flag (#16).
Thanks @ADmad!
## [0.3.3](https://github.com/brick/varexporter/releases/tag/0.3.3) - 2020-12-24
🐛 **Bug fix**
- Exporting an object with numeric dynamic properties would lead to a `TypeError`
## [0.3.2](https://github.com/brick/varexporter/releases/tag/0.3.2) - 2020-03-13
**New feature**
Support for exporting internal classes implementing `__set_state()`:
- `DateTime`
- `DateTimeImmutable`
- `DateTimeZone`
- `DateInterval`
- `DatePeriod`
Thanks @GameplayJDK!
## [0.3.1](https://github.com/brick/varexporter/releases/tag/0.3.1) - 2020-01-23
**New features**
- Support for closures with `use()` using the `CLOSURE_SNAPSHOT_USE` option (#7)
- Support for arrow functions in PHP 7.4 (#8)
Thanks to @jasny for his awesome work!
## [0.3.0](https://github.com/brick/varexporter/releases/tag/0.3.0) - 2019-12-24
Minimum PHP version is now `7.2`. No breaking changes.
## [0.2.1](https://github.com/brick/varexporter/releases/tag/0.2.1) - 2019-04-16
**New option**: `VarExporter::INLINE_NUMERIC_SCALAR_ARRAY` (#3)
Formats numeric arrays containing only scalar values on a single line.
## [0.2.0](https://github.com/brick/varexporter/releases/tag/0.2.0) - 2019-04-09
**New feature**
- Experimental support for closures 🎉
💥 **Minor BC break**
- `export()` does not throw an exception anymore when encountering a `Closure`.
To get the old behaviour back, use the `NO_CLOSURES` option.
## [0.1.2](https://github.com/brick/varexporter/releases/tag/0.1.2) - 2019-04-08
🐛 **Bug fixes**
- Static properties in custom classes were wrongly included—`unset()`—in the output
**Improvements**
- Circular references are now detected, and throw an `ExportException` instead of erroring.
## [0.1.1](https://github.com/brick/varexporter/releases/tag/0.1.1) - 2019-04-08
🐛 **Bug fixes**
- Single-letter properties were wrongly exported using `->{'x'}` notation.
**Improvements**
- Exception messages now contain the path (array keys / object properties) to the failure:
> `[foo][bar][0]` Type "resource" is not supported.
## [0.1.0](https://github.com/brick/varexporter/releases/tag/0.1.0) - 2019-04-07
First release.
...@@ -51,7 +51,14 @@ final class GenericExporter ...@@ -51,7 +51,14 @@ final class GenericExporter
* *
* @var bool * @var bool
*/ */
public $inlineNumericScalarArray; public $inlineArray;
/**
* @psalm-readonly
*
* @var bool
*/
public $inlineScalarList;
/** /**
* @psalm-readonly * @psalm-readonly
...@@ -74,10 +81,6 @@ final class GenericExporter ...@@ -74,10 +81,6 @@ final class GenericExporter
*/ */
public $indentLevel; public $indentLevel;
/**
* @param int $options
* @param int Indentation level
*/
public function __construct(int $options, int $indentLevel = 0) public function __construct(int $options, int $indentLevel = 0)
{ {
$this->objectExporters[] = new ObjectExporter\StdClassExporter($this); $this->objectExporters[] = new ObjectExporter\StdClassExporter($this);
...@@ -106,7 +109,8 @@ final class GenericExporter ...@@ -106,7 +109,8 @@ final class GenericExporter
$this->addTypeHints = (bool) ($options & VarExporter::ADD_TYPE_HINTS); $this->addTypeHints = (bool) ($options & VarExporter::ADD_TYPE_HINTS);
$this->skipDynamicProperties = (bool) ($options & VarExporter::SKIP_DYNAMIC_PROPERTIES); $this->skipDynamicProperties = (bool) ($options & VarExporter::SKIP_DYNAMIC_PROPERTIES);
$this->inlineNumericScalarArray = (bool) ($options & VarExporter::INLINE_NUMERIC_SCALAR_ARRAY); $this->inlineArray = (bool) ($options & VarExporter::INLINE_ARRAY);
$this->inlineScalarList = (bool) ($options & VarExporter::INLINE_SCALAR_LIST);
$this->closureSnapshotUses = (bool) ($options & VarExporter::CLOSURE_SNAPSHOT_USES); $this->closureSnapshotUses = (bool) ($options & VarExporter::CLOSURE_SNAPSHOT_USES);
$this->trailingCommaInArray = (bool) ($options & VarExporter::TRAILING_COMMA_IN_ARRAY); $this->trailingCommaInArray = (bool) ($options & VarExporter::TRAILING_COMMA_IN_ARRAY);
...@@ -169,11 +173,11 @@ final class GenericExporter ...@@ -169,11 +173,11 @@ final class GenericExporter
$result = []; $result = [];
$count = count($array); $count = count($array);
$isNumeric = array_keys($array) === range(0, $count - 1); $isList = array_keys($array) === range(0, $count - 1);
$current = 0; $current = 0;
$inline = ($this->inlineNumericScalarArray && $isNumeric && $this->isScalarArray($array)); $inline = $this->inlineArray || ($this->inlineScalarList && $isList && $this->isScalarList($array));
foreach ($array as $key => $value) { foreach ($array as $key => $value) {
$isLast = (++$current === $count); $isLast = (++$current === $count);
...@@ -184,12 +188,16 @@ final class GenericExporter ...@@ -184,12 +188,16 @@ final class GenericExporter
$exported = $this->export($value, $newPath, $parentIds); $exported = $this->export($value, $newPath, $parentIds);
if ($inline) { if ($inline) {
$result[] = $exported[0]; if ($isList) {
$result[] = $exported[0];
} else {
$result[] = var_export($key, true) . ' => ' . $exported[0];
}
} else { } else {
$prepend = ''; $prepend = '';
$append = ''; $append = '';
if (! $isNumeric) { if (! $isList) {
$prepend = var_export($key, true) . ' => '; $prepend = var_export($key, true) . ' => ';
} }
...@@ -224,7 +232,7 @@ final class GenericExporter ...@@ -224,7 +232,7 @@ final class GenericExporter
* *
* @return bool * @return bool
*/ */
private function isScalarArray(array $array) : bool private function isScalarList(array $array) : bool
{ {
foreach ($array as $value) { foreach ($array as $value) {
if ($value !== null && ! is_scalar($value)) { if ($value !== null && ! is_scalar($value)) {
......
...@@ -48,10 +48,16 @@ final class VarExporter ...@@ -48,10 +48,16 @@ final class VarExporter
public const NO_CLOSURES = 1 << 6; public const NO_CLOSURES = 1 << 6;
/** /**
* Formats numeric arrays containing only scalar values on a single line. * Formats lists (0-based numeric arrays) containing only scalar values on a single line.
* Types considered scalar here are int, bool, float, string and null. * Types considered scalar here are int, bool, float, string and null.
* This option is a subset of INLINE_ARRAY, and has no effect when INLINE_ARRAY is used.
*/ */
public const INLINE_NUMERIC_SCALAR_ARRAY = 1 << 7; public const INLINE_SCALAR_LIST = 1 << 7;
/**
* @deprecated Please use INLINE_SCALAR_LIST instead.
*/
public const INLINE_NUMERIC_SCALAR_ARRAY = self::INLINE_SCALAR_LIST;
/** /**
* Export static vars defined via `use` as variables. * Export static vars defined via `use` as variables.
...@@ -69,6 +75,11 @@ final class VarExporter ...@@ -69,6 +75,11 @@ final class VarExporter
public const NO_ENUMS = 1 << 10; public const NO_ENUMS = 1 << 10;
/** /**
* Formats all arrays on a single line.
*/
public const INLINE_ARRAY = 1 << 11;
/**
* @param mixed $var The variable to export. * @param mixed $var The variable to export.
* @param int $options A bitmask of options. Possible values are `VarExporter::*` constants. * @param int $options A bitmask of options. Possible values are `VarExporter::*` constants.
* Combine multiple options with a bitwise OR `|` operator. * Combine multiple options with a bitwise OR `|` operator.
......
...@@ -297,7 +297,7 @@ class Handler implements \SessionHandlerInterface ...@@ -297,7 +297,7 @@ class Handler implements \SessionHandlerInterface
// Connect and authenticate // Connect and authenticate
if ($sentinelServers && $sentinelMaster) { if ($sentinelServers && $sentinelMaster) {
$servers = preg_split('/\s*,\s*/', trim($sentinelServers), NULL, PREG_SPLIT_NO_EMPTY); $servers = preg_split('/\s*,\s*/', trim($sentinelServers), -1, PREG_SPLIT_NO_EMPTY);
$sentinel = NULL; $sentinel = NULL;
$exception = NULL; $exception = NULL;
for ($i = 0; $i <= $sentinelConnectRetries; $i++) // Try to connect to sentinels in round-robin fashion for ($i = 0; $i <= $sentinelConnectRetries; $i++) // Try to connect to sentinels in round-robin fashion
...@@ -310,8 +310,11 @@ class Handler implements \SessionHandlerInterface ...@@ -310,8 +310,11 @@ class Handler implements \SessionHandlerInterface
try { try {
$sentinelClient->auth($pass); $sentinelClient->auth($pass);
} catch (\CredisException $e) { } catch (\CredisException $e) {
// Prevent throwing exception if Sentinel has no password set // Prevent throwing exception if Sentinel has no password set (error messages are different between redis 5 and redis 6)
if($e->getCode() !== 0 || strpos($e->getMessage(),'ERR Client sent AUTH, but no password is set') === false) { if ($e->getCode() !== 0 || (
strpos($e->getMessage(), 'ERR Client sent AUTH, but no password is set') === false &&
strpos($e->getMessage(), 'ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?') === false)
) {
throw $e; throw $e;
} }
} }
...@@ -333,7 +336,7 @@ class Handler implements \SessionHandlerInterface ...@@ -333,7 +336,7 @@ class Handler implements \SessionHandlerInterface
if ($pass) $redisMaster->auth($pass); if ($pass) $redisMaster->auth($pass);
$roleData = $redisMaster->role(); $roleData = $redisMaster->role();
if ( ! $roleData || $roleData[0] != 'master') { if ( ! $roleData || $roleData[0] != 'master') {
throw new Exception('Unable to determine master redis server.'); throw new \Exception('Unable to determine master redis server.');
} }
} }
} }
...@@ -341,7 +344,7 @@ class Handler implements \SessionHandlerInterface ...@@ -341,7 +344,7 @@ class Handler implements \SessionHandlerInterface
$this->_redis = $redisMaster; $this->_redis = $redisMaster;
break 2; break 2;
} catch (Exception $e) { } catch (\Exception $e) {
unset($sentinelClient); unset($sentinelClient);
$exception = $e; $exception = $e;
} }
...@@ -349,7 +352,7 @@ class Handler implements \SessionHandlerInterface ...@@ -349,7 +352,7 @@ class Handler implements \SessionHandlerInterface
unset($sentinel); unset($sentinel);
if ( ! $this->_redis) { if ( ! $this->_redis) {
throw new ConnectionFailedException('Unable to connect to a Redis: '.$exception->getMessage(), $exception); throw new ConnectionFailedException('Unable to connect to a Redis: '.$exception->getMessage(), 0, $exception);
} }
} }
else { else {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInit8c29683d703e0ac6b351ddf0617cf78c class ComposerAutoloaderInitb71ce7c407b65980cf51508f463c8dcf
{ {
private static $loader; private static $loader;
...@@ -24,22 +24,22 @@ class ComposerAutoloaderInit8c29683d703e0ac6b351ddf0617cf78c ...@@ -24,22 +24,22 @@ class ComposerAutoloaderInit8c29683d703e0ac6b351ddf0617cf78c
require __DIR__ . '/platform_check.php'; require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit8c29683d703e0ac6b351ddf0617cf78c', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInitb71ce7c407b65980cf51508f463c8dcf', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit8c29683d703e0ac6b351ddf0617cf78c', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInitb71ce7c407b65980cf51508f463c8dcf', 'loadClassLoader'));
$includePaths = require __DIR__ . '/include_paths.php'; $includePaths = require __DIR__ . '/include_paths.php';
$includePaths[] = get_include_path(); $includePaths[] = get_include_path();
set_include_path(implode(PATH_SEPARATOR, $includePaths)); set_include_path(implode(PATH_SEPARATOR, $includePaths));
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit8c29683d703e0ac6b351ddf0617cf78c::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInitb71ce7c407b65980cf51508f463c8dcf::getInitializer($loader));
$loader->register(true); $loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticInit8c29683d703e0ac6b351ddf0617cf78c::$files; $includeFiles = \Composer\Autoload\ComposerStaticInitb71ce7c407b65980cf51508f463c8dcf::$files;
foreach ($includeFiles as $fileIdentifier => $file) { foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire8c29683d703e0ac6b351ddf0617cf78c($fileIdentifier, $file); composerRequireb71ce7c407b65980cf51508f463c8dcf($fileIdentifier, $file);
} }
return $loader; return $loader;
...@@ -51,7 +51,7 @@ class ComposerAutoloaderInit8c29683d703e0ac6b351ddf0617cf78c ...@@ -51,7 +51,7 @@ class ComposerAutoloaderInit8c29683d703e0ac6b351ddf0617cf78c
* @param string $file * @param string $file
* @return void * @return void
*/ */
function composerRequire8c29683d703e0ac6b351ddf0617cf78c($fileIdentifier, $file) function composerRequireb71ce7c407b65980cf51508f463c8dcf($fileIdentifier, $file)
{ {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInit8c29683d703e0ac6b351ddf0617cf78c class ComposerStaticInitb71ce7c407b65980cf51508f463c8dcf
{ {
public static $files = array ( public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
...@@ -1879,11 +1879,11 @@ class ComposerStaticInit8c29683d703e0ac6b351ddf0617cf78c ...@@ -1879,11 +1879,11 @@ class ComposerStaticInit8c29683d703e0ac6b351ddf0617cf78c
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit8c29683d703e0ac6b351ddf0617cf78c::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInitb71ce7c407b65980cf51508f463c8dcf::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit8c29683d703e0ac6b351ddf0617cf78c::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInitb71ce7c407b65980cf51508f463c8dcf::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInit8c29683d703e0ac6b351ddf0617cf78c::$prefixesPsr0; $loader->prefixesPsr0 = ComposerStaticInitb71ce7c407b65980cf51508f463c8dcf::$prefixesPsr0;
$loader->fallbackDirsPsr0 = ComposerStaticInit8c29683d703e0ac6b351ddf0617cf78c::$fallbackDirsPsr0; $loader->fallbackDirsPsr0 = ComposerStaticInitb71ce7c407b65980cf51508f463c8dcf::$fallbackDirsPsr0;
$loader->classMap = ComposerStaticInit8c29683d703e0ac6b351ddf0617cf78c::$classMap; $loader->classMap = ComposerStaticInitb71ce7c407b65980cf51508f463c8dcf::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<?php return array( <?php return array(
'root' => array( 'root' => array(
'name' => 'magento/magento2ce', 'name' => 'magento/magento2ce',
'pretty_version' => 'dev-master', 'pretty_version' => '1.0.0+no-version-set',
'version' => 'dev-master', 'version' => '1.0.0.0',
'reference' => 'a826eb707dc3b9850e116cf5583c1794f1540bb7', 'reference' => NULL,
'type' => 'project', 'type' => 'project',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
...@@ -47,9 +47,9 @@ ...@@ -47,9 +47,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'aws/aws-sdk-php' => array( 'aws/aws-sdk-php' => array(
'pretty_version' => '3.234.3', 'pretty_version' => '3.234.2',
'version' => '3.234.3.0', 'version' => '3.234.2.0',
'reference' => '21ee9e4181c1e676b43018bd3743dd4c9f8bafc2', 'reference' => '4e0edc577543d4c009c1a1b5d70d34f58b9f2e25',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../aws/aws-sdk-php', 'install_path' => __DIR__ . '/../aws/aws-sdk-php',
'aliases' => array(), 'aliases' => array(),
...@@ -89,9 +89,9 @@ ...@@ -89,9 +89,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'brick/varexporter' => array( 'brick/varexporter' => array(
'pretty_version' => '0.3.6', 'pretty_version' => '0.3.7',
'version' => '0.3.6.0', 'version' => '0.3.7.0',
'reference' => '3361a8a30e807c0841a7ca98e5c72b6bffc73463', 'reference' => '3e263cd718d242594c52963760fee2059fd5833c',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../brick/varexporter', 'install_path' => __DIR__ . '/../brick/varexporter',
'aliases' => array(), 'aliases' => array(),
...@@ -188,9 +188,9 @@ ...@@ -188,9 +188,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'colinmollenhour/php-redis-session-abstract' => array( 'colinmollenhour/php-redis-session-abstract' => array(
'pretty_version' => 'v1.4.5', 'pretty_version' => 'v1.4.6',
'version' => '1.4.5.0', 'version' => '1.4.6.0',
'reference' => '77ad0c1637ae6ea059f1f8e9fbdac6469242a16d', 'reference' => 'f80354dc7c20caef29c881972a7966732c8c9bbd',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../colinmollenhour/php-redis-session-abstract', 'install_path' => __DIR__ . '/../colinmollenhour/php-redis-session-abstract',
'aliases' => array(), 'aliases' => array(),
...@@ -767,9 +767,9 @@ ...@@ -767,9 +767,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'laminas/laminas-validator' => array( 'laminas/laminas-validator' => array(
'pretty_version' => '2.22.0', 'pretty_version' => '2.23.0',
'version' => '2.22.0.0', 'version' => '2.23.0.0',
'reference' => '7baf6c147f776a05cff280f4e5a676118f0f5198', 'reference' => '6d61b6cc3b222f13807a18d9247cdfb084958b03',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../laminas/laminas-validator', 'install_path' => __DIR__ . '/../laminas/laminas-validator',
'aliases' => array(), 'aliases' => array(),
...@@ -938,9 +938,9 @@ ...@@ -938,9 +938,9 @@
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'magento/magento2ce' => array( 'magento/magento2ce' => array(
'pretty_version' => 'dev-master', 'pretty_version' => '1.0.0+no-version-set',
'version' => 'dev-master', 'version' => '1.0.0.0',
'reference' => 'a826eb707dc3b9850e116cf5583c1794f1540bb7', 'reference' => NULL,
'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.7.0',
'version' => '1.6.4.0', 'version' => '1.7.0.0',
'reference' => '135607f9ccc297d6923d49c2bcf309f509413215', 'reference' => '367a8d9d5f7da2a0136422d27ce8840583926955',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser',
'aliases' => array(), 'aliases' => array(),
...@@ -2824,9 +2824,9 @@ ...@@ -2824,9 +2824,9 @@
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'swissup/breeze-blank' => array( 'swissup/breeze-blank' => array(
'pretty_version' => '1.2.0', 'pretty_version' => '1.1.7',
'version' => '1.2.0.0', 'version' => '1.1.7.0',
'reference' => '887a9a149b1c3215f43b7c7aaaf0ee41d87e52f8', 'reference' => 'd9dc31485979eaf13e61abddc30b0f53f6afe364',
'type' => 'metapackage', 'type' => 'metapackage',
'install_path' => NULL, 'install_path' => NULL,
'aliases' => array(), 'aliases' => array(),
...@@ -2896,9 +2896,9 @@ ...@@ -2896,9 +2896,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/debug' => array( 'symfony/debug' => array(
'pretty_version' => 'v4.4.41', 'pretty_version' => 'v4.4.44',
'version' => '4.4.41.0', 'version' => '4.4.44.0',
'reference' => '6637e62480b60817b9a6984154a533e8e64c6bd5', 'reference' => '1a692492190773c5310bc7877cb590c04c2f05be',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/debug', 'install_path' => __DIR__ . '/../symfony/debug',
'aliases' => array(), 'aliases' => array(),
...@@ -2932,9 +2932,9 @@ ...@@ -2932,9 +2932,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/event-dispatcher' => array( 'symfony/event-dispatcher' => array(
'pretty_version' => 'v4.4.42', 'pretty_version' => 'v4.4.44',
'version' => '4.4.42.0', 'version' => '4.4.44.0',
'reference' => '708e761740c16b02c86e3f0c932018a06b895d40', 'reference' => '1e866e9e5c1b22168e0ce5f0b467f19bba61266a',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/event-dispatcher', 'install_path' => __DIR__ . '/../symfony/event-dispatcher',
'aliases' => array(), 'aliases' => array(),
...@@ -3010,9 +3010,9 @@ ...@@ -3010,9 +3010,9 @@
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'symfony/options-resolver' => array( 'symfony/options-resolver' => array(
'pretty_version' => 'v5.4.3', 'pretty_version' => 'v5.4.11',
'version' => '5.4.3.0', 'version' => '5.4.11.0',
'reference' => 'cc1147cb11af1b43f503ac18f31aa3bec213aba8', 'reference' => '54f14e36aa73cb8f7261d7686691fd4d75ea2690',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/options-resolver', 'install_path' => __DIR__ . '/../symfony/options-resolver',
'aliases' => array(), 'aliases' => array(),
......
...@@ -23,10 +23,8 @@ class Between extends AbstractValidator ...@@ -23,10 +23,8 @@ class Between extends AbstractValidator
/** /**
* Retain if min and max are numeric values. Allow to not compare string and numeric types * Retain if min and max are numeric values. Allow to not compare string and numeric types
*
* @var boolean
*/ */
private $numeric; private ?bool $numeric = null;
/** /**
* Validation failure message template definitions * Validation failure message template definitions
......
...@@ -381,7 +381,7 @@ class CreditCard extends AbstractValidator ...@@ -381,7 +381,7 @@ class CreditCard extends AbstractValidator
$foundl = false; $foundl = false;
foreach ($types as $type) { foreach ($types as $type) {
foreach ($this->cardType[$type] as $prefix) { foreach ($this->cardType[$type] as $prefix) {
if (0 === strpos($value, $prefix)) { if (0 === strpos($value, (string) $prefix)) {
$foundp = true; $foundp = true;
if (in_array($length, $this->cardLength[$type])) { if (in_array($length, $this->cardLength[$type])) {
$foundl = true; $foundl = true;
......
...@@ -25,7 +25,6 @@ use function in_array; ...@@ -25,7 +25,6 @@ use function in_array;
use function is_array; use function is_array;
use function max; use function max;
use function min; use function min;
use function pow;
use function preg_match; use function preg_match;
use function sprintf; use function sprintf;
use function strpos; use function strpos;
...@@ -463,7 +462,7 @@ class DateStep extends Date ...@@ -463,7 +462,7 @@ class DateStep extends Date
// If we use PHP_INT_MAX DateInterval::__construct falls over with a bad format error // If we use PHP_INT_MAX DateInterval::__construct falls over with a bad format error
// before we reach the max on 64 bit machines // before we reach the max on 64 bit machines
$maxInteger = min(pow(2, 31), PHP_INT_MAX); $maxInteger = min(2 ** 31, PHP_INT_MAX);
// check for integer overflow and split $minimum interval if needed // check for integer overflow and split $minimum interval if needed
$maximumInterval = max($intervalParts); $maximumInterval = max($intervalParts);
$requiredStepIterations = 1; $requiredStepIterations = 1;
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
namespace Laminas\Validator\File; namespace Laminas\Validator\File;
use Countable;
use Laminas\Validator\AbstractValidator; use Laminas\Validator\AbstractValidator;
use Laminas\Validator\Exception; use Laminas\Validator\Exception;
use Psr\Http\Message\UploadedFileInterface; use Psr\Http\Message\UploadedFileInterface;
...@@ -12,6 +11,7 @@ use function array_key_exists; ...@@ -12,6 +11,7 @@ use function array_key_exists;
use function array_merge; use function array_merge;
use function count; use function count;
use function is_array; use function is_array;
use function is_countable;
use function is_string; use function is_string;
use function is_uploaded_file; use function is_uploaded_file;
...@@ -117,7 +117,7 @@ class Upload extends AbstractValidator ...@@ -117,7 +117,7 @@ class Upload extends AbstractValidator
{ {
if ( if (
null === $files null === $files
|| ((is_array($files) || $files instanceof Countable) || ((is_countable($files))
&& count($files) === 0) && count($files) === 0)
) { ) {
$this->options['files'] = $_FILES; $this->options['files'] = $_FILES;
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
namespace Laminas\Validator; namespace Laminas\Validator;
use Countable;
use Traversable; use Traversable;
use function count; use function count;
use function is_array; use function is_array;
use function is_countable;
use function is_numeric; use function is_numeric;
use function sprintf; use function sprintf;
use function ucfirst; use function ucfirst;
...@@ -94,7 +94,7 @@ class IsCountable extends AbstractValidator ...@@ -94,7 +94,7 @@ class IsCountable extends AbstractValidator
*/ */
public function isValid($value) public function isValid($value)
{ {
if (! (is_array($value) || $value instanceof Countable)) { if (! is_countable($value)) {
$this->error(self::NOT_COUNTABLE); $this->error(self::NOT_COUNTABLE);
return false; return false;
} }
......
...@@ -39,13 +39,9 @@ final class UndisclosedPassword extends AbstractValidator ...@@ -39,13 +39,9 @@ final class UndisclosedPassword extends AbstractValidator
self::NOT_A_STRING => 'The provided password is not a string, please provide a correct password', self::NOT_A_STRING => 'The provided password is not a string, please provide a correct password',
]; ];
// phpcs:enable private ClientInterface $httpClient;
/** @var ClientInterface */
private $httpClient;
/** @var RequestFactoryInterface */ private RequestFactoryInterface $makeHttpRequest;
private $makeHttpRequest;
public function __construct(ClientInterface $httpClient, RequestFactoryInterface $makeHttpRequest) public function __construct(ClientInterface $httpClient, RequestFactoryInterface $makeHttpRequest)
{ {
......
<?php declare(strict_types = 1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class AssertTagMethodValueNode implements PhpDocTagValueNode
{
use NodeAttributes;
/** @var TypeNode */
public $type;
/** @var string */
public $parameter;
/** @var string */
public $method;
/** @var bool */
public $isNegated;
/** @var string (may be empty) */
public $description;
public function __construct(TypeNode $type, string $parameter, string $method, bool $isNegated, string $description)
{
$this->type = $type;
$this->parameter = $parameter;
$this->method = $method;
$this->isNegated = $isNegated;
$this->description = $description;
}
public function __toString(): string
{
$isNegated = $this->isNegated ? '!' : '';
return trim("{$this->type} {$isNegated}{$this->parameter}->{$this->method}() {$this->description}");
}
}
<?php declare(strict_types = 1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class AssertTagPropertyValueNode implements PhpDocTagValueNode
{
use NodeAttributes;
/** @var TypeNode */
public $type;
/** @var string */
public $parameter;
/** @var string */
public $property;
/** @var bool */
public $isNegated;
/** @var string (may be empty) */
public $description;
public function __construct(TypeNode $type, string $parameter, string $property, bool $isNegated, string $description)
{
$this->type = $type;
$this->parameter = $parameter;
$this->property = $property;
$this->isNegated = $isNegated;
$this->description = $description;
}
public function __toString(): string
{
$isNegated = $this->isNegated ? '!' : '';
return trim("{$this->type} {$isNegated}{$this->parameter}->{$this->property} {$this->description}");
}
}
...@@ -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,6 +140,7 @@ class Lexer ...@@ -138,6 +140,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_COLON => ':', self::TOKEN_COLON => ':',
......
...@@ -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
......
...@@ -9,5 +9,6 @@ ...@@ -9,5 +9,6 @@
<move element="page.main.title" destination="product.info.wrapper"/> <move element="page.main.title" destination="product.info.wrapper"/>
<move element="product.info.main" destination="product.info.wrapper"/> <move element="product.info.main" destination="product.info.wrapper"/>
<move element="product.info.media" destination="product.info.wrapper"/> <move element="product.info.media" destination="product.info.wrapper"/>
</body> </body>
</page> </page>
...@@ -86,11 +86,21 @@ ...@@ -86,11 +86,21 @@
</referenceContainer> </referenceContainer>
<!-- Footer --> <!-- Footer -->
<referenceContainer name="footer-container"> <referenceContainer name="footer-container">
<container name="footer-top" htmlTag="div" htmlClass="footer-top"/> <container name="footer-top" htmlTag="div" htmlClass="footer-top"/>
<container name="footer-middle" htmlTag="div" htmlClass="footer-middle"/> <container name="footer-middle" htmlTag="div" htmlClass="footer-middle"/>
<container name="footer-bottom" htmlTag="div" htmlClass="footer-bottom"/> <container name="footer-bottom" htmlTag="div" htmlClass="footer-bottom"/>
<container name="footer" as="footer" label="Page Footer" htmlTag="div" htmlClass="footer content">
<block class="Magento\Theme\Block\Html\Footer" name="copyright" template="Magento_Theme::html/footer.phtml"/>
</container>
</referenceContainer>
<referenceContainer name="before.body.end">
<block class="Magento\Theme\Block\Html\Footer" name="absolute_footer" template="Magento_Theme::html/absolute_footer.phtml" />
</referenceContainer> </referenceContainer>
<move element="footer" destination="footer-middle"/> <move element="footer" destination="footer-middle"/>
</body> </body>
</page> </page>
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<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/bootstrap.css" rel="stylesheet" type="text/css" />
</head> </head>
<body> <body>
<referenceBlock name="breeze.css"> <referenceBlock name="breeze.css">
......
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<div class="footer-container">
<div class="footer">
<div class="container">
<footer class="pt-4 my-md-5 pt-md-5 border-top">
<div class="row">
<div class="col-12 col-md">
<a class="logo" href="http://joshine.me/" title="" aria-label="store logo">
<img src="http://joshine.me/media/logo/stores/1/joshine_logo_500.png" title="" alt="" width="200" height="50">
</a>
<small class="d-block mb-3 text-muted" style="margin-top: 10px;" >
<address><?= $block->escapeHtml($block->getCopyright()) ?></address>
</small>
</div>
<div class="col-6 col-md">
<h5>Features</h5>
<ul class="list-unstyled text-small">
<li><a class="text-muted" href="#">Cool stuff</a></li>
<li><a class="text-muted" href="#">Random feature</a></li>
<li><a class="text-muted" href="#">Team feature</a></li>
<li><a class="text-muted" href="#">Stuff for developers</a></li>
</ul>
</div>
<div class="col-6 col-md">
<h5>Resources</h5>
<ul class="list-unstyled text-small">
<li><a class="text-muted" href="#">Resource</a></li>
<li><a class="text-muted" href="#">Resource name</a></li>
<li><a class="text-muted" href="#">Another resource</a></li>
<li><a class="text-muted" href="#">Final resource</a></li>
</ul>
</div>
<div class="col-6 col-md">
<h5>About</h5>
<ul class="list-unstyled text-small">
<li><a class="text-muted" href="#">Team</a></li>
<li><a class="text-muted" href="#">Locations</a></li>
<li><a class="text-muted" href="#">Privacy</a></li>
<li><a class="text-muted" href="#">Terms</a></li>
</ul>
</div>
</div>
</footer>
</div>
</div>
</div>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 612 612" focusable="false" role="img">
<title>Bootstrap</title>
<path fill="#563d7c" d="M612 510c0 56.1-45.9 102-102 102H102C45.9 612 0 566.1 0 510V102C0 45.9 45.9 0 102 0h408c56.1 0 102 45.9 102 102v408z"/>
<path fill="#fff" d="M166.3 133h173.5c32 0 57.7 7.3 77 22s29 36.8 29 66.5c0 18-4.4 33.4-13.2 46.2-8.8 12.8-21.4 22.8-37.8 29.8v1c22 4.7 38.7 15.1 50 31.2 11.3 16.2 17 36.4 17 60.8 0 14-2.5 27.1-7.5 39.2-5 12.2-12.8 22.7-23.5 31.5s-24.3 15.8-41 21-36.5 7.8-59.5 7.8h-164V133zm62.5 149.5h102c15 0 27.5-4.2 37.5-12.8s15-20.8 15-36.8c0-18-4.5-30.7-13.5-38s-22-11-39-11h-102v98.6zm0 156.5h110.5c19 0 33.8-4.9 44.2-14.8 10.5-9.8 15.8-23.8 15.8-41.8 0-17.7-5.2-31.2-15.8-40.8s-25.2-14.2-44.2-14.2H228.8V439z"/>
</svg>
...@@ -49,7 +49,7 @@ class Debug ...@@ -49,7 +49,7 @@ class Debug
if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) {
ini_set('display_errors', 0); ini_set('display_errors', 0);
ExceptionHandler::register(); ExceptionHandler::register();
} elseif ($displayErrors && (!filter_var(ini_get('log_errors'), \FILTER_VALIDATE_BOOLEAN) || ini_get('error_log'))) { } elseif ($displayErrors && (!filter_var(\ini_get('log_errors'), \FILTER_VALIDATE_BOOLEAN) || \ini_get('error_log'))) {
// CLI - display errors only if they're not already logged to STDERR // CLI - display errors only if they're not already logged to STDERR
ini_set('display_errors', 1); ini_set('display_errors', 1);
} }
......
...@@ -354,8 +354,8 @@ class ErrorHandler ...@@ -354,8 +354,8 @@ class ErrorHandler
*/ */
private function reRegister(int $prev) private function reRegister(int $prev)
{ {
if ($prev !== $this->thrownErrors | $this->loggedErrors) { if ($prev !== ($this->thrownErrors | $this->loggedErrors)) {
$handler = set_error_handler('var_dump'); $handler = set_error_handler('is_int');
$handler = \is_array($handler) ? $handler[0] : null; $handler = \is_array($handler) ? $handler[0] : null;
restore_error_handler(); restore_error_handler();
if ($handler === $this) { if ($handler === $this) {
...@@ -490,7 +490,7 @@ class ErrorHandler ...@@ -490,7 +490,7 @@ class ErrorHandler
$log = 0; $log = 0;
} else { } else {
if (\PHP_VERSION_ID < (\PHP_VERSION_ID < 70400 ? 70316 : 70404)) { if (\PHP_VERSION_ID < (\PHP_VERSION_ID < 70400 ? 70316 : 70404)) {
$currentErrorHandler = set_error_handler('var_dump'); $currentErrorHandler = set_error_handler('is_int');
restore_error_handler(); restore_error_handler();
} }
...@@ -601,7 +601,7 @@ class ErrorHandler ...@@ -601,7 +601,7 @@ class ErrorHandler
$sameHandlerLimit = 10; $sameHandlerLimit = 10;
while (!\is_array($handler) || !$handler[0] instanceof self) { while (!\is_array($handler) || !$handler[0] instanceof self) {
$handler = set_exception_handler('var_dump'); $handler = set_exception_handler('is_int');
restore_exception_handler(); restore_exception_handler();
if (!$handler) { if (!$handler) {
......
...@@ -55,7 +55,7 @@ class ExceptionHandler ...@@ -55,7 +55,7 @@ class ExceptionHandler
public function __construct(bool $debug = true, string $charset = null, $fileLinkFormat = null) public function __construct(bool $debug = true, string $charset = null, $fileLinkFormat = null)
{ {
$this->debug = $debug; $this->debug = $debug;
$this->charset = $charset ?: ini_get('default_charset') ?: 'UTF-8'; $this->charset = $charset ?: \ini_get('default_charset') ?: 'UTF-8';
$this->fileLinkFormat = $fileLinkFormat; $this->fileLinkFormat = $fileLinkFormat;
} }
...@@ -390,7 +390,7 @@ EOF; ...@@ -390,7 +390,7 @@ EOF;
private function formatPath(string $path, int $line): string private function formatPath(string $path, int $line): string
{ {
$file = $this->escapeHtml(preg_match('#[^/\\\\]*+$#', $path, $file) ? $file[0] : $path); $file = $this->escapeHtml(preg_match('#[^/\\\\]*+$#', $path, $file) ? $file[0] : $path);
$fmt = $this->fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); $fmt = $this->fileLinkFormat ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
if (!$fmt) { if (!$fmt) {
return sprintf('<span class="block trace-file-path">in <span title="%s%3$s"><strong>%s</strong>%s</span></span>', $this->escapeHtml($path), $file, 0 < $line ? ' line '.$line : ''); return sprintf('<span class="block trace-file-path">in <span title="%s%3$s"><strong>%s</strong>%s</span></span>', $this->escapeHtml($path), $file, 0 < $line ? ' line '.$line : '');
......
...@@ -133,7 +133,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface ...@@ -133,7 +133,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface
* *
* @param string|null $eventName * @param string|null $eventName
*/ */
public function dispatch($event/*, string $eventName = null*/) public function dispatch($event/* , string $eventName = null */)
{ {
if (null === $this->callStack) { if (null === $this->callStack) {
$this->callStack = new \SplObjectStorage(); $this->callStack = new \SplObjectStorage();
......
...@@ -48,7 +48,7 @@ class EventDispatcher implements EventDispatcherInterface ...@@ -48,7 +48,7 @@ class EventDispatcher implements EventDispatcherInterface
* *
* @param string|null $eventName * @param string|null $eventName
*/ */
public function dispatch($event/*, string $eventName = null*/) public function dispatch($event/* , string $eventName = null */)
{ {
$eventName = 1 < \func_num_args() ? func_get_arg(1) : null; $eventName = 1 < \func_num_args() ? func_get_arg(1) : null;
......
...@@ -30,11 +30,11 @@ class ImmutableEventDispatcher implements EventDispatcherInterface ...@@ -30,11 +30,11 @@ class ImmutableEventDispatcher implements EventDispatcherInterface
* *
* @param string|null $eventName * @param string|null $eventName
*/ */
public function dispatch($event/*, string $eventName = null*/) public function dispatch($event/* , string $eventName = null */)
{ {
$eventName = 1 < \func_num_args() ? func_get_arg(1) : null; $eventName = 1 < \func_num_args() ? func_get_arg(1) : null;
if (is_scalar($event)) { if (\is_scalar($event)) {
// deprecated // deprecated
$swap = $event; $swap = $event;
$event = $eventName ?? new Event(); $event = $eventName ?? new Event();
......
...@@ -53,7 +53,7 @@ final class LegacyEventDispatcherProxy implements EventDispatcherInterface ...@@ -53,7 +53,7 @@ final class LegacyEventDispatcherProxy implements EventDispatcherInterface
* *
* @return object * @return object
*/ */
public function dispatch($event/*, string $eventName = null*/) public function dispatch($event/* , string $eventName = null */)
{ {
$eventName = 1 < \func_num_args() ? func_get_arg(1) : null; $eventName = 1 < \func_num_args() ? func_get_arg(1) : null;
......
...@@ -437,7 +437,7 @@ class OptionsResolver implements Options ...@@ -437,7 +437,7 @@ class OptionsResolver implements Options
* *
* @return $this * @return $this
*/ */
public function setDeprecated(string $option/*, string $package, string $version, $message = 'The option "%name%" is deprecated.' */): self public function setDeprecated(string $option/* , string $package, string $version, $message = 'The option "%name%" is deprecated.' */): self
{ {
if ($this->locked) { if ($this->locked) {
throw new AccessException('Options cannot be deprecated from a lazy option or normalizer.'); throw new AccessException('Options cannot be deprecated from a lazy option or normalizer.');
......
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