Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applied PHP-CS-Fixer for code cleanup. #21347

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/code/Magento/Marketplace/Block/Partners.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
namespace Magento\Marketplace\Block;

/**
* Partners section block.
*
* @api
* @since 100.0.2
*/
Expand Down Expand Up @@ -39,7 +41,7 @@ public function __construct(
/**
* Gets partners
*
* @return bool|string
* @return array
*/
public function getPartners()
{
Expand Down
6 changes: 4 additions & 2 deletions app/code/Magento/PageCache/Model/Cache/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
use Zend\Uri\Uri;
use Zend\Uri\UriFactory;

/**
* Cache server model.
*/
class Server
{
/**
Expand Down Expand Up @@ -62,8 +65,7 @@ public function getUris()
foreach ($configuredHosts as $host) {
$servers[] = UriFactory::factory('')
->setHost($host['host'])
->setPort(isset($host['port']) ? $host['port'] : self::DEFAULT_PORT)
;
->setPort(isset($host['port']) ? $host['port'] : self::DEFAULT_PORT);
}
} elseif ($this->request->getHttpHost()) {
$servers[] = UriFactory::factory('')->setHost($this->request->getHttpHost())->setPort(self::DEFAULT_PORT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function beforeSave()
throw new LocalizedException(
new Phrase(
'Access List value "%1" is not valid. '
.'Please use only IP addresses and host names.',
. 'Please use only IP addresses and host names.',
[$value]
)
);
Expand Down
12 changes: 9 additions & 3 deletions app/code/Magento/PageCache/Model/Varnish/VclGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Magento\PageCache\Model\VclGeneratorInterface;
use Magento\PageCache\Model\VclTemplateLocatorInterface;

/**
* Varnish vcl generator model.
*/
class VclGenerator implements VclGeneratorInterface
{
/**
Expand Down Expand Up @@ -119,7 +122,7 @@ private function getReplacements()
private function getRegexForDesignExceptions()
{
$result = '';
$tpl = "%s (req.http.user-agent ~ \"%s\") {\n"." hash_data(\"%s\");\n"." }";
$tpl = "%s (req.http.user-agent ~ \"%s\") {\n" . " hash_data(\"%s\");\n" . " }";

$expressions = $this->getDesignExceptions();

Expand All @@ -143,7 +146,8 @@ private function getRegexForDesignExceptions()

/**
* Get IPs access list that can purge Varnish configuration for config file generation
* and transform it to appropriate view
*
* Tansform it to appropriate view
*
* acl purge{
* "127.0.0.1";
Expand All @@ -157,7 +161,7 @@ private function getTransformedAccessList()
$result = array_reduce(
$this->getAccessList(),
function ($ips, $ip) use ($tpl) {
return $ips.sprintf($tpl, trim($ip)) . "\n";
return $ips . sprintf($tpl, trim($ip)) . "\n";
},
''
);
Expand Down Expand Up @@ -216,6 +220,8 @@ private function getSslOffloadedHeader()
}

/**
* Get design exceptions array.
*
* @return array
*/
private function getDesignExceptions()
Expand Down