From: Matthias Schmidt Date: Fri, 27 May 2016 07:08:04 +0000 (+0200) Subject: Fix warnings about unused local variables X-Git-Tag: 3.0.0_Beta_1~1609 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=13b7bb1f7af8fce247b47044bb1bd3e0aea4f3bb;p=GitHub%2FWoltLab%2FWCF.git Fix warnings about unused local variables --- diff --git a/wcfsetup/install/files/lib/acp/form/PaidSubscriptionUserAddForm.class.php b/wcfsetup/install/files/lib/acp/form/PaidSubscriptionUserAddForm.class.php index b3da84c313..a7973735f8 100644 --- a/wcfsetup/install/files/lib/acp/form/PaidSubscriptionUserAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PaidSubscriptionUserAddForm.class.php @@ -136,8 +136,7 @@ class PaidSubscriptionUserAddForm extends AbstractForm { 'subscription' => $this->subscription, 'data' => $data ]); - $returnValues = $action->executeAction(); - $userSubscription = $returnValues['returnValues']; + $action->executeAction(); } else { // extend existing subscription diff --git a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php index e94aea00c9..9b20d9313d 100644 --- a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php @@ -151,7 +151,6 @@ Error Code: (?P\d+)\s* File: (?P.*?) \((?P\d+)\)\s* Extra Information: (?P(?:-|[a-zA-Z0-9+/]+={0,2}))\s* Stack Trace: (?P[a-zA-Z0-9+/]+={0,2})', Regex::DOT_ALL); - $stackTraceFormatter = new Regex('^\s+(#\d+)', Regex::MULTILINE); foreach ($this->exceptions as $key => $val) { $i++; if ($i < $this->startIndex || $i > $this->endIndex) { diff --git a/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php b/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php index 478662a35a..6f4357f11d 100644 --- a/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php +++ b/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php @@ -27,6 +27,7 @@ class PaypalCallbackAction extends AbstractAction { $processor = null; try { // post back to paypal to validate + /** @noinspection PhpUnusedLocalVariableInspection */ $content = ''; try { $url = 'https://www.paypal.com/cgi-bin/webscr'; diff --git a/wcfsetup/install/files/lib/core.functions.php b/wcfsetup/install/files/lib/core.functions.php index d314cbdf48..7a6620146c 100644 --- a/wcfsetup/install/files/lib/core.functions.php +++ b/wcfsetup/install/files/lib/core.functions.php @@ -442,9 +442,6 @@ EXPLANATION;
  • diff --git a/wcfsetup/install/files/lib/data/ad/AdEditor.class.php b/wcfsetup/install/files/lib/data/ad/AdEditor.class.php index 74e0da70fe..91c32cb2d9 100644 --- a/wcfsetup/install/files/lib/data/ad/AdEditor.class.php +++ b/wcfsetup/install/files/lib/data/ad/AdEditor.class.php @@ -32,8 +32,6 @@ class AdEditor extends DatabaseObjectEditor implements IEditableCachedObject { * @param integer $showOrder */ public function setShowOrder($showOrder = 0) { - $newShowOrder = 1; - $sql = "SELECT MAX(showOrder) FROM wcf".WCF_N."_ad"; $statement = WCF::getDB()->prepareStatement($sql); diff --git a/wcfsetup/install/files/lib/data/comment/CommentAction.class.php b/wcfsetup/install/files/lib/data/comment/CommentAction.class.php index 2185311d20..1ae8206607 100644 --- a/wcfsetup/install/files/lib/data/comment/CommentAction.class.php +++ b/wcfsetup/install/files/lib/data/comment/CommentAction.class.php @@ -477,7 +477,6 @@ class CommentAction extends AbstractDatabaseObjectAction { * @return array */ public function prepareEdit() { - $message = ''; if ($this->comment !== null) { $message = $this->comment->message; } diff --git a/wcfsetup/install/files/lib/data/comment/LikeableComment.class.php b/wcfsetup/install/files/lib/data/comment/LikeableComment.class.php index 6f8f54daa1..cea7adee01 100644 --- a/wcfsetup/install/files/lib/data/comment/LikeableComment.class.php +++ b/wcfsetup/install/files/lib/data/comment/LikeableComment.class.php @@ -65,7 +65,6 @@ class LikeableComment extends AbstractLikeObject { public function sendNotification(Like $like) { $objectType = CommentHandler::getInstance()->getObjectType($this->object->objectTypeID); if (UserNotificationHandler::getInstance()->getObjectTypeID($objectType->objectType.'.like.notification')) { - $notificationObjectType = UserNotificationHandler::getInstance()->getObjectTypeProcessor($objectType->objectType.'.like.notification'); if ($this->userID != WCF::getUser()->userID) { $notificationObject = new LikeUserNotificationObject($like); UserNotificationHandler::getInstance()->fireEvent('like', $objectType->objectType.'.like.notification', $notificationObject, [$this->userID], [ diff --git a/wcfsetup/install/files/lib/data/comment/response/LikeableCommentResponse.class.php b/wcfsetup/install/files/lib/data/comment/response/LikeableCommentResponse.class.php index a1fd084bc3..d14e8884a9 100644 --- a/wcfsetup/install/files/lib/data/comment/response/LikeableCommentResponse.class.php +++ b/wcfsetup/install/files/lib/data/comment/response/LikeableCommentResponse.class.php @@ -67,7 +67,6 @@ class LikeableCommentResponse extends AbstractLikeObject { $comment = new Comment($this->object->commentID); $objectType = CommentHandler::getInstance()->getObjectType($comment->objectTypeID); if (UserNotificationHandler::getInstance()->getObjectTypeID($objectType->objectType.'.response.like.notification')) { - $notificationObjectType = UserNotificationHandler::getInstance()->getObjectTypeProcessor($objectType->objectType.'.response.like.notification'); if ($this->userID != WCF::getUser()->userID) { $notificationObject = new LikeUserNotificationObject($like); UserNotificationHandler::getInstance()->fireEvent('like', $objectType->objectType.'.response.like.notification', $notificationObject, [$this->userID], [ diff --git a/wcfsetup/install/files/lib/data/notice/NoticeEditor.class.php b/wcfsetup/install/files/lib/data/notice/NoticeEditor.class.php index ecdca8344e..cff05197bb 100644 --- a/wcfsetup/install/files/lib/data/notice/NoticeEditor.class.php +++ b/wcfsetup/install/files/lib/data/notice/NoticeEditor.class.php @@ -32,8 +32,6 @@ class NoticeEditor extends DatabaseObjectEditor implements IEditableCachedObject * @param integer $showOrder */ public function setShowOrder($showOrder = 0) { - $newShowOrder = 1; - $sql = "SELECT MAX(showOrder) FROM wcf".WCF_N."_notice"; $statement = WCF::getDB()->prepareStatement($sql); diff --git a/wcfsetup/install/files/lib/data/paid/subscription/PaidSubscriptionEditor.class.php b/wcfsetup/install/files/lib/data/paid/subscription/PaidSubscriptionEditor.class.php index 53ce8b20fc..35f6552eb8 100644 --- a/wcfsetup/install/files/lib/data/paid/subscription/PaidSubscriptionEditor.class.php +++ b/wcfsetup/install/files/lib/data/paid/subscription/PaidSubscriptionEditor.class.php @@ -30,8 +30,6 @@ class PaidSubscriptionEditor extends DatabaseObjectEditor implements IEditableCa * @param integer $showOrder */ public function setShowOrder($showOrder = 0) { - $newShowOrder = 1; - $sql = "SELECT MAX(showOrder) FROM wcf".WCF_N."_paid_subscription"; $statement = WCF::getDB()->prepareStatement($sql); diff --git a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php index 0f1c17c00d..71a678fb79 100644 --- a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php @@ -250,7 +250,6 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject // open variables.xml $xml = new XML(); $xml->loadXML($filename, $content); - $xpath = $xml->xpath(); $variables = $xml->xpath()->query('/ns:variables/ns:variable'); $data = []; diff --git a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php index 2427d1cae6..cc3733bb20 100644 --- a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php @@ -73,7 +73,6 @@ class AttachmentBBCode extends AbstractBBCode { } } - $result = ''; if ($width > 0) { $class = ''; if ($alignment == 'left' || $alignment == 'right') { diff --git a/wcfsetup/install/files/lib/system/cache/builder/UserBirthdayCacheBuilder.class.php b/wcfsetup/install/files/lib/system/cache/builder/UserBirthdayCacheBuilder.class.php index 5ad5f6d72e..0f724966d1 100644 --- a/wcfsetup/install/files/lib/system/cache/builder/UserBirthdayCacheBuilder.class.php +++ b/wcfsetup/install/files/lib/system/cache/builder/UserBirthdayCacheBuilder.class.php @@ -37,7 +37,7 @@ class UserBirthdayCacheBuilder extends AbstractCacheBuilder { $statement = WCF::getDB()->prepareStatement($sql); $statement->execute(['%-' . ($parameters['month'] < 10 ? '0' : '') . $parameters['month'] . '-%']); while ($row = $statement->fetchArray()) { - list($year, $month, $day) = explode('-', $row[$birthday]); + list(, $month, $day) = explode('-', $row[$birthday]); if (!isset($data[$month . '-' . $day])) $data[$month . '-' . $day] = []; $data[$month . '-' . $day][] = $row['userID']; } diff --git a/wcfsetup/install/files/lib/system/cli/command/CLICommandHandler.class.php b/wcfsetup/install/files/lib/system/cli/command/CLICommandHandler.class.php index f3df5cb6dc..65259eab24 100644 --- a/wcfsetup/install/files/lib/system/cli/command/CLICommandHandler.class.php +++ b/wcfsetup/install/files/lib/system/cli/command/CLICommandHandler.class.php @@ -61,7 +61,7 @@ class CLICommandHandler { * @throws IllegalLinkException */ public static function getCommand($line) { - list($command, $parameters) = explode(' ', $line.' ', 2); + list($command, ) = explode(' ', $line.' ', 2); if (!isset(self::$commands[strtolower($command)])) throw new IllegalLinkException(); @@ -76,7 +76,7 @@ class CLICommandHandler { * @throws IllegalLinkException */ public static function getCommandName($line) { - list($command, $parameters) = explode(' ', $line.' ', 2); + list($command, ) = explode(' ', $line.' ', 2); if (!isset(self::$commands[strtolower($command)])) throw new IllegalLinkException(); @@ -90,7 +90,7 @@ class CLICommandHandler { * @return string[] */ public static function getParameters($line) { - list ($command, $parameters) = explode(' ', $line.' ', 2); + list (, $parameters) = explode(' ', $line.' ', 2); $chars = str_split(StringUtil::trim($parameters)); $tmp = ''; diff --git a/wcfsetup/install/files/lib/system/cli/command/PackageCLICommand.class.php b/wcfsetup/install/files/lib/system/cli/command/PackageCLICommand.class.php index 4cf52278a5..5697256b46 100644 --- a/wcfsetup/install/files/lib/system/cli/command/PackageCLICommand.class.php +++ b/wcfsetup/install/files/lib/system/cli/command/PackageCLICommand.class.php @@ -159,7 +159,7 @@ class PackageCLICommand implements IArgumentedCLICommand { $processNo = PackageInstallationQueue::getNewProcessNo(); // insert queue - $queue = PackageInstallationQueueEditor::create([ + PackageInstallationQueueEditor::create([ 'processNo' => $processNo, 'userID' => CLIWCF::getUser()->userID, 'package' => $archive->getPackageInfo('name'), @@ -309,9 +309,8 @@ class PackageCLICommand implements IArgumentedCLICommand { // InstallPackageAction::stepInstall() $step_ = $installation->install($node); $queueID = $installation->nodeBuilder->getQueueByNode($installation->queue->processNo, $step_->getNode()); - + if ($step_->hasDocument()) { - $innerTemplate = $step_->getTemplate(); $progress = $installation->nodeBuilder->calculateProgress($node); $node = $step_->getNode(); $currentAction = $installation->nodeBuilder->getPackageNameByQueue($queueID); diff --git a/wcfsetup/install/files/lib/system/condition/AbstractIntegerCondition.class.php b/wcfsetup/install/files/lib/system/condition/AbstractIntegerCondition.class.php index 3d8c5ed97a..b4859a1203 100644 --- a/wcfsetup/install/files/lib/system/condition/AbstractIntegerCondition.class.php +++ b/wcfsetup/install/files/lib/system/condition/AbstractIntegerCondition.class.php @@ -76,7 +76,6 @@ abstract class AbstractIntegerCondition extends AbstractSingleFieldCondition { */ protected function getErrorMessageElement() { if ($this->errorMessage) { - $errorMessage = ''; switch ($this->errorMessage) { case 'wcf.condition.greaterThan.error.maxValue': $errorMessage = WCF::getLanguage()->getDynamicVariable($this->errorMessage, [ diff --git a/wcfsetup/install/files/lib/system/cronjob/BackgroundQueueCleanUpCronjob.class.php b/wcfsetup/install/files/lib/system/cronjob/BackgroundQueueCleanUpCronjob.class.php index a59004323d..a8ba91069f 100644 --- a/wcfsetup/install/files/lib/system/cronjob/BackgroundQueueCleanUpCronjob.class.php +++ b/wcfsetup/install/files/lib/system/cronjob/BackgroundQueueCleanUpCronjob.class.php @@ -24,6 +24,7 @@ class BackgroundQueueCleanUpCronjob extends AbstractCronjob { parent::execute($cronjob); WCF::getDB()->beginTransaction(); + /** @noinspection PhpUnusedLocalVariableInspection */ $commited = false; try { $sql = "SELECT jobID, job diff --git a/wcfsetup/install/files/lib/system/image/adapter/GDImageAdapter.class.php b/wcfsetup/install/files/lib/system/image/adapter/GDImageAdapter.class.php index e311aedeee..89397bc690 100644 --- a/wcfsetup/install/files/lib/system/image/adapter/GDImageAdapter.class.php +++ b/wcfsetup/install/files/lib/system/image/adapter/GDImageAdapter.class.php @@ -108,7 +108,7 @@ class GDImageAdapter implements IImageAdapter { * @inheritDoc */ public function createThumbnail($maxWidth, $maxHeight, $obtainDimensions = true) { - $width = $height = $x = $y = 0; + $x = $y = 0; $sourceWidth = $this->width; $sourceHeight = $this->height; diff --git a/wcfsetup/install/files/lib/system/importer/UserImporter.class.php b/wcfsetup/install/files/lib/system/importer/UserImporter.class.php index 576152af1f..ec3ddcdb35 100644 --- a/wcfsetup/install/files/lib/system/importer/UserImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/UserImporter.class.php @@ -229,7 +229,6 @@ class UserImporter extends AbstractImporter { */ private static function resolveDuplicate($username) { $i = 0; - $newUsername = ''; do { $i++; $newUsername = 'Duplicate'.($i > 1 ? $i : '').' '.$username; diff --git a/wcfsetup/install/files/lib/system/like/LikeHandler.class.php b/wcfsetup/install/files/lib/system/like/LikeHandler.class.php index 6a09218e7a..8b800bbf52 100644 --- a/wcfsetup/install/files/lib/system/like/LikeHandler.class.php +++ b/wcfsetup/install/files/lib/system/like/LikeHandler.class.php @@ -174,7 +174,9 @@ class LikeHandler extends SingletonFactory { WCF::getDB()->beginTransaction(); // like data + /** @noinspection PhpUnusedLocalVariableInspection */ $cumulativeLikes = 0; + /** @noinspection PhpUnusedLocalVariableInspection */ $newValue = $oldValue = null; $users = []; diff --git a/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php b/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php index 03f404b4fb..21e45c3081 100644 --- a/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php +++ b/wcfsetup/install/files/lib/system/message/quote/MessageQuoteManager.class.php @@ -244,7 +244,6 @@ class MessageQuoteManager extends SingletonFactory { } // find the quote and simulate a regular call to render quotes - $quoteData = []; foreach ($this->quotes as $objectType => $objectIDs) { foreach ($objectIDs as $objectID => $quoteIDs) { if (isset($quoteIDs[$quoteID])) { diff --git a/wcfsetup/install/files/lib/system/option/MessageOptionType.class.php b/wcfsetup/install/files/lib/system/option/MessageOptionType.class.php index 48dc633345..b088993fb4 100644 --- a/wcfsetup/install/files/lib/system/option/MessageOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/MessageOptionType.class.php @@ -34,7 +34,6 @@ class MessageOptionType extends TextareaOptionType { * @inheritDoc */ public function getFormElement(Option $option, $value) { - $allowedBBCodes = []; if ($option->allowedbbcodepermission) { $allowedBBCodes = explode(',', WCF::getSession()->getPermission($option->allowedbbcodepermission)); } diff --git a/wcfsetup/install/files/lib/system/option/user/group/BBCodeSelectUserGroupOptionType.class.php b/wcfsetup/install/files/lib/system/option/user/group/BBCodeSelectUserGroupOptionType.class.php index 79696fb785..9d424106bd 100644 --- a/wcfsetup/install/files/lib/system/option/user/group/BBCodeSelectUserGroupOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/user/group/BBCodeSelectUserGroupOptionType.class.php @@ -43,7 +43,6 @@ class BBCodeSelectUserGroupOptionType extends AbstractOptionType implements IUse $this->loadBBCodeSelection(); } - $selectedBBCodes = []; if ($value == 'all') { $selectedBBCodes = $this->bbCodes; } diff --git a/wcfsetup/install/files/lib/system/request/FlexibleRoute.class.php b/wcfsetup/install/files/lib/system/request/FlexibleRoute.class.php index 127f66a9b6..89270b34a5 100644 --- a/wcfsetup/install/files/lib/system/request/FlexibleRoute.class.php +++ b/wcfsetup/install/files/lib/system/request/FlexibleRoute.class.php @@ -81,7 +81,6 @@ class FlexibleRoute implements IRoute { $buildSchema = ltrim($buildSchema, '/'); $components = preg_split('~({(?:[a-z]+)})~', $buildSchema, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); - $delimiters = ['/', '-', '.', '_']; foreach ($components as $component) { $type = 'component'; diff --git a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php index 44049d2484..161fca72c6 100644 --- a/wcfsetup/install/files/lib/system/request/LinkHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/LinkHandler.class.php @@ -74,6 +74,7 @@ class LinkHandler extends SingletonFactory { /** * @deprecated 2.2 - no longer required */ + /** @noinspection PhpUnusedLocalVariableInspection */ $appendSession = false; // enforce a certain level of sanitation and protection for links embedded in emails diff --git a/wcfsetup/install/files/lib/system/search/SearchResultTextParser.class.php b/wcfsetup/install/files/lib/system/search/SearchResultTextParser.class.php index 52aaba16bf..925499894c 100644 --- a/wcfsetup/install/files/lib/system/search/SearchResultTextParser.class.php +++ b/wcfsetup/install/files/lib/system/search/SearchResultTextParser.class.php @@ -84,7 +84,7 @@ class SearchResultTextParser extends SingletonFactory { $shiftEndBy += $shiftStartBy; $shiftStartBy = 0; } - + // shift abstract start if ($start - $shiftStartBy < 0) { $shiftEndBy += $shiftStartBy - $start; @@ -97,7 +97,6 @@ class SearchResultTextParser extends SingletonFactory { // shift abstract end if ($end + $shiftEndBy > mb_strlen($text) - 1) { $shiftStartBy = $end + $shiftEndBy - mb_strlen($text) - 1; - $shiftEndBy = 0; if ($shiftStartBy > $start) { $start = 0; } diff --git a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php index 92f620e153..bd466b84cc 100755 --- a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php @@ -483,6 +483,7 @@ class TemplateEngine extends SingletonFactory { * @throws SystemException */ public function getSourceContent($sourceFilename) { + /** @noinspection PhpUnusedLocalVariableInspection */ $sourceContent = ''; if (!file_exists($sourceFilename) || (($sourceContent = @file_get_contents($sourceFilename)) === false)) { throw new SystemException("Could not open template '$sourceFilename' for reading"); diff --git a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php index 1da4908cf9..a59ff5b1ac 100644 --- a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php @@ -784,7 +784,6 @@ class TemplateScriptingCompiler { } // pass remaining tag args as variables - $variables = []; if (!empty($args)) { foreach ($args as $variable => $value) { if (substr($value, 0, 1) == "'") { @@ -806,7 +805,6 @@ class TemplateScriptingCompiler { if (!empty($phpCode)) $phpCode = ""; $sourceFilename = $this->template->getSourceFilename($templateName, $application); - $metaDataFilename = $this->template->getMetaDataFilename($templateName); $data = $this->compileString($templateName, file_get_contents($sourceFilename), [ 'application' => $application, @@ -1012,7 +1010,7 @@ class TemplateScriptingCompiler { * @return string $tag */ public function popTag($tag) { - list($openTag, $lineNo) = array_pop($this->tagStack); + list($openTag, ) = array_pop($this->tagStack); if ($tag == $openTag) { return $openTag; } diff --git a/wcfsetup/install/files/lib/util/CronjobUtil.class.php b/wcfsetup/install/files/lib/util/CronjobUtil.class.php index 3af6774dfc..2c4c7b6ba2 100644 --- a/wcfsetup/install/files/lib/util/CronjobUtil.class.php +++ b/wcfsetup/install/files/lib/util/CronjobUtil.class.php @@ -143,8 +143,7 @@ final class CronjobUtil { // calculation starts with month, thus start with // month of $time (if within values) $currentMonth = gmdate('n', self::$timeBase); - $currentYear = gmdate('Y', self::$timeBase); - $index = self::findKey($currentMonth, $values['month']); + self::findKey($currentMonth, $values['month']); self::calculateDay($values); } diff --git a/wcfsetup/install/files/lib/util/Diff.class.php b/wcfsetup/install/files/lib/util/Diff.class.php index dbfa8963bd..17fd38db2f 100644 --- a/wcfsetup/install/files/lib/util/Diff.class.php +++ b/wcfsetup/install/files/lib/util/Diff.class.php @@ -245,11 +245,10 @@ class Diff { $result[] = "--- a"; $result[] = "+++ b"; - $inContext = 0; $leftStart = 1; $rightStart = 1; for ($i = 0, $max = count($d); $i < $max; $i++) { - list($type, $line) = $d[$i]; + list($type, ) = $d[$i]; if ($type == self::REMOVED || $type == self::ADDED) { // calculate start of context @@ -266,7 +265,7 @@ class Diff { // search the end of the current window $plus = $minus = 0; for ($j = $start; $j < $max; $j++) { - list($type, $line) = $d[$j]; + list($type, ) = $d[$j]; switch ($type) { case self::REMOVED: