diff --git a/src/I18n/RelativeTimeFormatter.php b/src/I18n/RelativeTimeFormatter.php index dbdd8494dc9..c427616d8c4 100644 --- a/src/I18n/RelativeTimeFormatter.php +++ b/src/I18n/RelativeTimeFormatter.php @@ -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) { diff --git a/src/Network/Socket.php b/src/Network/Socket.php index 58be93f610e..a4c3aa2edbd 100644 --- a/src/Network/Socket.php +++ b/src/Network/Socket.php @@ -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; diff --git a/src/ORM/Query.php b/src/ORM/Query.php index f8b6fe66313..0754111d216 100644 --- a/src/ORM/Query.php +++ b/src/ORM/Query.php @@ -977,7 +977,6 @@ protected function _addDefaultFields() protected function _addDefaultSelectTypes() { $typeMap = $this->typeMap()->defaults(); - $selectTypeMap = $this->selectTypeMap(); $select = $this->clause('select'); $types = []; diff --git a/src/TestSuite/TestCase.php b/src/TestSuite/TestCase.php index bdad87717ce..97fd646cea5 100644 --- a/src/TestSuite/TestCase.php +++ b/src/TestSuite/TestCase.php @@ -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) { diff --git a/tests/TestCase/View/Helper/HtmlHelperTest.php b/tests/TestCase/View/Helper/HtmlHelperTest.php index d2329dda33a..a13bcf58718 100644 --- a/tests/TestCase/View/Helper/HtmlHelperTest.php +++ b/tests/TestCase/View/Helper/HtmlHelperTest.php @@ -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();