Skip to content

Commit

Permalink
remove unused variables/lines
Browse files Browse the repository at this point in the history
detected by scrutinizer
  • Loading branch information
antograssiot committed Feb 27, 2016
1 parent b19dd06 commit df6b848
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/I18n/RelativeTimeFormatter.php
Expand Up @@ -303,7 +303,7 @@ public function dateAgoInWords(DatetimeInterface $date, array $options = [])
}

$diffData = $this->_diffData($futureTime, $pastTime, $backwards, $options);
list($fNum, $fWord, $years, $months, $weeks, $days, $hours, $minutes, $seconds) = array_values($diffData);
list($fNum, $fWord, $years, $months, $weeks, $days) = array_values($diffData);

$relativeDate = [];
if ($fNum >= 1 && $years > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/Network/Socket.php
Expand Up @@ -324,7 +324,7 @@ public function write($data)
}
}
$totalBytes = strlen($data);
for ($written = 0, $rv = 0; $written < $totalBytes; $written += $rv) {
for ($written = 0; $written < $totalBytes; $written += $rv) {
$rv = fwrite($this->connection, substr($data, $written));
if ($rv === false || $rv === 0) {
return $written;
Expand Down
1 change: 0 additions & 1 deletion src/ORM/Query.php
Expand Up @@ -977,7 +977,6 @@ protected function _addDefaultFields()
protected function _addDefaultSelectTypes()
{
$typeMap = $this->typeMap()->defaults();
$selectTypeMap = $this->selectTypeMap();
$select = $this->clause('select');
$types = [];

Expand Down
1 change: 0 additions & 1 deletion src/TestSuite/TestCase.php
Expand Up @@ -481,7 +481,6 @@ protected function _assertAttributes($assertions, $string, $fullDebug = false, $
{
$asserts = $assertions['attrs'];
$explains = $assertions['explains'];
$len = count($asserts);
do {
$matches = false;
foreach ($asserts as $j => $assert) {
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/View/Helper/HtmlHelperTest.php
Expand Up @@ -58,7 +58,6 @@ class HtmlHelperTest extends TestCase
public function setUp()
{
parent::setUp();
$controller = $this->getMock('Cake\Controller\Controller', ['redirect']);
$this->View = $this->getMock('Cake\View\View', ['append']);
$this->Html = new HtmlHelper($this->View);
$this->Html->request = new Request();
Expand Down

0 comments on commit df6b848

Please sign in to comment.