Skip to content

Commit a299b83

Browse files
author
Safwan Khan
committed
MAGETWO-33637: [GITHUB] Bug generating Sitemap Cron expression #1020
- Code style fixes.
1 parent 752bacc commit a299b83

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

app/code/Magento/Cron/Model/Observer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function dispatch($observer)
148148
'system/cron/' . $groupId . '/use_separate_process',
149149
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
150150
) == 1
151-
)) {
151+
)) {
152152
$this->_shell->execute(
153153
'php -f %s -- --group=%s --standaloneProcessStarted=%s',
154154
[

app/code/Magento/Cron/Model/Schedule.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ public function trySchedule()
104104
$time = strtotime($time);
105105
}
106106
$match = $this->matchCronExpression($e[0], strftime('%M', $time))
107-
&& $this->matchCronExpression($e[1], strftime('%H', $time))
108-
&& $this->matchCronExpression($e[2], strftime('%d', $time))
109-
&& $this->matchCronExpression($e[3], strftime('%m', $time))
110-
&& $this->matchCronExpression($e[4], strftime('%w', $time));
107+
&& $this->matchCronExpression($e[1], strftime('%H', $time))
108+
&& $this->matchCronExpression($e[2], strftime('%d', $time))
109+
&& $this->matchCronExpression($e[3], strftime('%m', $time))
110+
&& $this->matchCronExpression($e[4], strftime('%w', $time));
111111

112112
return $match;
113113
}

app/code/Magento/Cron/Test/Unit/Model/ObserverTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
6060
protected $_cronGroupConfig;
6161

6262
/**
63-
* @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface
64-
*/
63+
* @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface
64+
*/
6565
protected $timezone;
6666

6767
/**
@@ -120,7 +120,7 @@ public function testDispatchNoPendingJobs()
120120
$lastRun = time() + 10000000;
121121
$this->_cache->expects($this->any())->method('load')->will($this->returnValue($lastRun));
122122
$this->_scopeConfig->expects($this->any())->method('getValue')->will($this->returnValue(0));
123-
$this->_request->expects($this->any())->method('getParam')->will($this->returnValue('test_job1'));
123+
124124
$this->_config->expects($this->once())->method('getJobs')->will($this->returnValue([]));
125125

126126
$scheduleMock = $this->getMockBuilder('Magento\Cron\Model\Schedule')->disableOriginalConstructor()->getMock();

0 commit comments

Comments
 (0)