Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Raue <christian.raue@gmail.com>2014-07-15 17:29:46 +0400
committerChristian Raue <christian.raue@gmail.com>2014-07-19 12:26:47 +0400
commit33a43a50d4d66de3409cb4ac4ed62a656179e58c (patch)
treecfbd8fad602af8adf8a1c1eeacd29f0cceb73fe9
parent5d7c6f4a813c6193e0be20ccba99037926846b14 (diff)
removed unused variables and dead code
-rw-r--r--core/Nonce.php6
-rw-r--r--core/Updater.php1
-rw-r--r--js/tracker.php1
-rwxr-xr-xmisc/others/geoipUpdateRows.php2
-rw-r--r--misc/others/test_generateLotsVisitsWebsites.php8
-rw-r--r--plugins/API/ProcessedReport.php4
-rw-r--r--plugins/API/RowEvolution.php2
-rw-r--r--plugins/Actions/API.php7
-rw-r--r--plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php2
-rw-r--r--plugins/CoreVisualizations/Visualizations/Cloud.php2
-rw-r--r--plugins/Goals/Visualizations/Goals.php2
-rw-r--r--plugins/ImageGraph/StaticGraph.php2
-rw-r--r--plugins/LanguagesManager/Commands/CompareKeys.php2
-rw-r--r--plugins/Live/Visitor.php2
-rwxr-xr-xplugins/MultiSites/API.php5
-rw-r--r--plugins/Referrers/API.php2
-rw-r--r--plugins/SegmentEditor/SegmentSelectorControl.php2
-rw-r--r--plugins/Transitions/API.php1
-rw-r--r--plugins/UsersManager/LastSeenTimeLogger.php1
-rwxr-xr-xtests/PHPUnit/Benchmarks/Fixtures/ThousandSitesTwelveVisitsEachOneDay.php14
-rw-r--r--tests/PHPUnit/Core/CookieTest.php2
-rw-r--r--tests/PHPUnit/Core/DataTable/Filter/LimitTest.php16
-rw-r--r--tests/PHPUnit/Core/DataTableTest.php1
-rw-r--r--tests/PHPUnit/Core/Period/DayTest.php2
-rw-r--r--tests/PHPUnit/Core/PeriodTest.php2
-rw-r--r--tests/PHPUnit/Core/ServeStaticFileTest.php12
-rw-r--r--tests/PHPUnit/Core/Translate/WriterTest.php2
-rw-r--r--tests/PHPUnit/Core/UnzipTest.php3
-rw-r--r--tests/PHPUnit/Fixture.php2
-rwxr-xr-xtests/PHPUnit/Integration/AnnotationsTest.php3
-rw-r--r--tests/PHPUnit/Integration/Core/ArchiveProcessingTest.php2
-rw-r--r--tests/PHPUnit/Integration/Core/WidgetsListTest.php1
-rw-r--r--tests/PHPUnit/Integration/Plugins/SitesManagerTest.php48
-rw-r--r--tests/PHPUnit/Integration/PrivacyManagerTest.php3
-rwxr-xr-xtests/PHPUnit/IntegrationTestCase.php8
-rwxr-xr-xtests/PHPUnit/Plugins/LanguagesManagerTest.php2
36 files changed, 63 insertions, 114 deletions
diff --git a/core/Nonce.php b/core/Nonce.php
index fecaaa7764..825b9aea56 100644
--- a/core/Nonce.php
+++ b/core/Nonce.php
@@ -140,8 +140,10 @@ class Nonce
}
// standard ports
- $origins[] = 'http://' . $host;
- $origins[] = 'https://' . $host;
+ $origins = array(
+ 'http://' . $host,
+ 'https://' . $host,
+ );
// non-standard ports
if (!empty($port) && $port != 80 && $port != 443) {
diff --git a/core/Updater.php b/core/Updater.php
index 6cd6bf757f..1527da723a 100644
--- a/core/Updater.php
+++ b/core/Updater.php
@@ -231,7 +231,6 @@ class Updater
private function loadComponentsWithUpdateFile()
{
$componentsWithUpdateFile = array();
- $hasDimensionUpdate = null;
foreach ($this->componentsWithNewVersion as $name => $versions) {
$currentVersion = $versions[self::INDEX_CURRENT_VERSION];
diff --git a/js/tracker.php b/js/tracker.php
index 4a86e53977..0a842b8c0f 100644
--- a/js/tracker.php
+++ b/js/tracker.php
@@ -33,7 +33,6 @@ $file = '../piwik.js';
$daysExpireFarFuture = 10;
-$compressFileSuffix = false;
$byteStart = $byteEnd = false;
if (!defined("PIWIK_KEEP_JS_TRACKER_COMMENT")
|| !PIWIK_KEEP_JS_TRACKER_COMMENT
diff --git a/misc/others/geoipUpdateRows.php b/misc/others/geoipUpdateRows.php
index fa43c5d6c4..df480d395d 100755
--- a/misc/others/geoipUpdateRows.php
+++ b/misc/others/geoipUpdateRows.php
@@ -172,7 +172,7 @@ for (; $start < $end; $start += $limit) {
continue;
}
- foreach ($rows as $i => $row) {
+ foreach ($rows as $row) {
$fieldsToSet = array();
foreach ($logVisitFieldsToUpdate as $field => $ignore) {
if (empty($fieldsToSet[$field])) {
diff --git a/misc/others/test_generateLotsVisitsWebsites.php b/misc/others/test_generateLotsVisitsWebsites.php
index 4dd23c5f51..33f050fc77 100644
--- a/misc/others/test_generateLotsVisitsWebsites.php
+++ b/misc/others/test_generateLotsVisitsWebsites.php
@@ -58,7 +58,7 @@ class Piwik_StressTests_CopyLogs
SELECT `idsite`, `idvisitor`, `visitor_localtime`, `visitor_returning`, `visitor_count_visits`, CONCAT(CURRENT_DATE() , \" \", FLOOR(RAND()*24) , \":\",FLOOR(RAND()*60),\":\",FLOOR(RAND()*60)), CONCAT(CURRENT_DATE() , \" \", FLOOR(RAND()*24) , \":\",FLOOR(RAND()*60),\":\",FLOOR(RAND()*60)), `visit_exit_idaction_url`, `visit_exit_idaction_name`, `visit_entry_idaction_url`, `visit_entry_idaction_name`, `visit_total_actions`, `visit_total_time`, `visit_goal_converted`, `visit_goal_buyer`, `referer_type`, `referer_name`, `referer_url`, `referer_keyword`, `config_id`, `config_os`, `config_browser_name`, `config_browser_version`, `config_resolution`, `config_pdf`, `config_flash`, `config_java`, `config_director`, `config_quicktime`, `config_realplayer`, `config_windowsmedia`, `config_gears`, `config_silverlight`, `config_cookie`, `location_ip`, `location_browser_lang`, `location_country`, `location_provider`, `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`, `visitor_days_since_last`, `visitor_days_since_order`, `visitor_days_since_first`
FROM `" . Common::prefixTable('log_visit') . "`
WHERE idsite >= 1 AND date(visit_last_action_time) between '$startDate' and '$endDate' ;";
- $result = $db->query($sql);
+ $db->query($sql);
$this->log(" Copying actions...");
$sql = "INSERT INTO " . Common::prefixTable('log_link_visit_action') . " (`idsite`, `idvisitor`, `server_time`, `idvisit`, `idaction_url`, `idaction_url_ref`, `idaction_name`, `idaction_name_ref`, `time_spent_ref_action`, `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`)
@@ -67,21 +67,21 @@ class Piwik_StressTests_CopyLogs
WHERE idsite >= 1 AND date(server_time) between '$startDate' and '$endDate'
;"; // LIMIT 1000000
- $result = $db->query($sql);
+ $db->query($sql);
$this->log(" Copying conversions...");
$sql = "INSERT IGNORE INTO `" . Common::prefixTable('log_conversion') . "` (`idvisit`, `idsite`, `visitor_days_since_first`, `visitor_days_since_order`, `visitor_count_visits`, `idvisitor`, `server_time`, `idaction_url`, `idlink_va`, `referer_visit_server_date`, `referer_type`, `referer_name`, `referer_keyword`, `visitor_returning`, `location_country`, `url`, `idgoal`, `revenue`, `buster`, `idorder`, `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`, `items`, `revenue_subtotal`, `revenue_tax`, `revenue_shipping`, `revenue_discount`)
SELECT `idvisit`, `idsite`, `visitor_days_since_first`, `visitor_days_since_order`, `visitor_count_visits`, `idvisitor`, CONCAT(CURRENT_DATE() , \" \", FLOOR(RAND()*24) , \":\",FLOOR(RAND()*60),\":\",FLOOR(RAND()*60)), `idaction_url`, `idlink_va`, `referer_visit_server_date`, `referer_type`, `referer_name`, `referer_keyword`, `visitor_returning`, `location_country`, `url`, `idgoal`, `revenue`, FLOOR(`buster` * RAND()), CONCAT(`idorder`,SUBSTRING(MD5(RAND()) FROM 1 FOR 9)) , `custom_var_k1`, `custom_var_v1`, `custom_var_k2`, `custom_var_v2`, `custom_var_k3`, `custom_var_v3`, `custom_var_k4`, `custom_var_v4`, `custom_var_k5`, `custom_var_v5`, `items`, `revenue_subtotal`, `revenue_tax`, `revenue_shipping`, `revenue_discount`
FROM `" . Common::prefixTable('log_conversion') . "`
WHERE idsite >= 1 AND date(server_time) between '$startDate' and '$endDate' ;";
- $result = $db->query($sql);
+ $db->query($sql);
$this->log(" Copying purchased items...");
$sql = "INSERT INTO `" . Common::prefixTable('log_conversion_item') . "` (`idsite`, `idvisitor`, `server_time`, `idvisit`, `idorder`, `idaction_sku`, `idaction_name`, `idaction_category`, `price`, `quantity`, `deleted`)
SELECT `idsite`, `idvisitor`, CONCAT(CURRENT_DATE() , \" \", TIME(`server_time`)), `idvisit`, CONCAT(`idorder`,SUBSTRING(MD5(RAND()) FROM 1 FOR 9)) , `idaction_sku`, `idaction_name`, `idaction_category`, `price`, `quantity`, `deleted`
FROM `" . Common::prefixTable('log_conversion_item') . "`
WHERE idsite >= 1 AND date(server_time) between '$startDate' and '$endDate' ;";
- $result = $db->query($sql);
+ $db->query($sql);
$now = $this->getVisitsToday();
$actions = $this->getActionsToday();
diff --git a/plugins/API/ProcessedReport.php b/plugins/API/ProcessedReport.php
index 86a7fd1698..ef1fcf6182 100644
--- a/plugins/API/ProcessedReport.php
+++ b/plugins/API/ProcessedReport.php
@@ -449,7 +449,7 @@ class ProcessedReport
list($newReport, $columns, $rowsMetadata, $totals) = $this->handleTableReport($idSite, $dataTable, $reportMetadata, $showRawMetrics);
- foreach ($columns as $columnId => &$name) {
+ foreach ($columns as &$name) {
$name = ucfirst($name);
}
$website = new Site($idSite);
@@ -534,7 +534,7 @@ class ProcessedReport
$rowsMetadata->setKeyName("prettyDate");
// Process each Simple entry
- foreach ($dataTable->getDataTables() as $label => $simpleDataTable) {
+ foreach ($dataTable->getDataTables() as $simpleDataTable) {
$this->removeEmptyColumns($columns, $reportMetadata, $simpleDataTable);
list($enhancedSimpleDataTable, $rowMetadata) = $this->handleSimpleDataTable($idSite, $simpleDataTable, $columns, $hasDimension, $showRawMetrics);
diff --git a/plugins/API/RowEvolution.php b/plugins/API/RowEvolution.php
index 69bb5e2f56..84bc431c47 100644
--- a/plugins/API/RowEvolution.php
+++ b/plugins/API/RowEvolution.php
@@ -144,7 +144,7 @@ class RowEvolution
$logo = $actualLabel = false;
$urlFound = false;
- foreach ($dataTable->getDataTables() as $date => $subTable) {
+ foreach ($dataTable->getDataTables() as $subTable) {
/** @var $subTable DataTable */
$subTable->applyQueuedFilters();
if ($subTable->getRowsCount() > 0) {
diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php
index c915060885..ed161bdfec 100644
--- a/plugins/Actions/API.php
+++ b/plugins/Actions/API.php
@@ -81,8 +81,10 @@ class API extends \Piwik\Plugin\API
}
if ($avgGenerationTimeRequested) {
- $tempColumns[] = Archiver::METRIC_SUM_TIME_RECORD_NAME;
- $tempColumns[] = Archiver::METRIC_HITS_TIMED_RECORD_NAME;
+ $tempColumns = array(
+ Archiver::METRIC_SUM_TIME_RECORD_NAME,
+ Archiver::METRIC_HITS_TIMED_RECORD_NAME,
+ );
$columns = array_merge($columns, $tempColumns);
$columns = array_unique($columns);
@@ -342,7 +344,6 @@ class API extends \Piwik\Plugin\API
$dataTable = $customVariables->getEmptyClone();
$customVariableDatatables = $customVariables->getDataTables();
- $dataTables = $dataTable->getDataTables();
foreach ($customVariableDatatables as $key => $customVariableTableForDate) {
// we do not enter the IF, in the case idSite=1,3 AND period=day&date=datefrom,dateto,
if ($customVariableTableForDate instanceof DataTable
diff --git a/plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php b/plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php
index 3de82dbc17..0fdaa2c1eb 100644
--- a/plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php
+++ b/plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php
@@ -78,7 +78,7 @@ class Evolution extends JqplotDataGenerator
$axisXOnClick = array();
$queryStringAsHash = $this->getQueryStringAsHash();
- foreach ($dataTable->getDataTables() as $idDataTable => $metadataDataTable) {
+ foreach ($dataTable->getDataTables() as $metadataDataTable) {
$dateInUrl = $metadataDataTable->getMetadata(DataTableFactory::TABLE_METADATA_PERIOD_INDEX)->getDateStart();
$parameters = array(
'idSite' => $idSite,
diff --git a/plugins/CoreVisualizations/Visualizations/Cloud.php b/plugins/CoreVisualizations/Visualizations/Cloud.php
index 6598f97b89..0a78e219e6 100644
--- a/plugins/CoreVisualizations/Visualizations/Cloud.php
+++ b/plugins/CoreVisualizations/Visualizations/Cloud.php
@@ -143,7 +143,7 @@ class Cloud extends Visualization
$tmpArray = $this->wordsArray;
$this->wordsArray = array();
- foreach ($keys as $key => $value) {
+ foreach ($keys as $value) {
$this->wordsArray[$value] = $tmpArray[$value];
}
diff --git a/plugins/Goals/Visualizations/Goals.php b/plugins/Goals/Visualizations/Goals.php
index 512ca91633..0b8c2c5365 100644
--- a/plugins/Goals/Visualizations/Goals.php
+++ b/plugins/Goals/Visualizations/Goals.php
@@ -191,7 +191,7 @@ class Goals extends HtmlTable
// set columns to display (columns of same type but different goals will be next to each other,
// ie, goal_0_nb_conversions, goal_1_nb_conversions, etc.)
- foreach ($goalColumnTemplates as $idx => $columnTemplate) {
+ foreach ($goalColumnTemplates as $columnTemplate) {
foreach ($idGoals as $idGoal) {
$this->config->columns_to_display[] = sprintf($columnTemplate, $idGoal);
}
diff --git a/plugins/ImageGraph/StaticGraph.php b/plugins/ImageGraph/StaticGraph.php
index 6c6fbb2705..b21d5e35ac 100644
--- a/plugins/ImageGraph/StaticGraph.php
+++ b/plugins/ImageGraph/StaticGraph.php
@@ -311,7 +311,7 @@ abstract class StaticGraph
$maxWidth = 0;
$maxHeight = 0;
- foreach ($values as $column => $data) {
+ foreach ($values as $data) {
foreach ($data as $value) {
list($valueWidth, $valueHeight) = $this->getTextWidthHeight($value);
diff --git a/plugins/LanguagesManager/Commands/CompareKeys.php b/plugins/LanguagesManager/Commands/CompareKeys.php
index 9fb1478392..a5998f79ca 100644
--- a/plugins/LanguagesManager/Commands/CompareKeys.php
+++ b/plugins/LanguagesManager/Commands/CompareKeys.php
@@ -30,8 +30,6 @@ class CompareKeys extends ConsoleCommand
protected function execute(InputInterface $input, OutputInterface $output)
{
- $dialog = $this->getHelperSet()->get('dialog');
-
$command = $this->getApplication()->find('translations:fetch');
$arguments = array(
'command' => 'translations:fetch',
diff --git a/plugins/Live/Visitor.php b/plugins/Live/Visitor.php
index b09d3344d6..b4c1c3eb06 100644
--- a/plugins/Live/Visitor.php
+++ b/plugins/Live/Visitor.php
@@ -892,7 +892,7 @@ class Visitor implements VisitorInterface
// Enrich ecommerce carts/orders with the list of products
usort($ecommerceDetails, array('static', 'sortByServerTime'));
- foreach ($ecommerceDetails as $key => &$ecommerceConversion) {
+ foreach ($ecommerceDetails as &$ecommerceConversion) {
$sql = "SELECT
log_action_sku.name as itemSKU,
log_action_name.name as itemName,
diff --git a/plugins/MultiSites/API.php b/plugins/MultiSites/API.php
index 37f3b73b0b..5a6ef950c5 100755
--- a/plugins/MultiSites/API.php
+++ b/plugins/MultiSites/API.php
@@ -398,11 +398,6 @@ class API extends \Piwik\Plugin\API
$this->setMetricsTotalsMetadata($table, $apiMetrics);
}
} else {
- $revenueMetric = '';
- if (Common::isGoalPluginEnabled()) {
- $revenueMetric = Archiver::getRecordName(self::GOAL_REVENUE_METRIC);
- }
-
$totals = array();
foreach ($apiMetrics as $label => $metricInfo) {
$totalMetadataName = self::getTotalMetadataName($label);
diff --git a/plugins/Referrers/API.php b/plugins/Referrers/API.php
index 9f97da3fe7..a2c747141b 100644
--- a/plugins/Referrers/API.php
+++ b/plugins/Referrers/API.php
@@ -452,7 +452,7 @@ class API extends \Piwik\Plugin\API
$socialName = $row->getColumn('label');
$i = 1; // start at one because idSubtable=0 is equivalent to idSubtable=false
- foreach (Common::getSocialUrls() as $domain => $name) {
+ foreach (Common::getSocialUrls() as $name) {
if ($name == $socialName) {
$row->c[Row::DATATABLE_ASSOCIATED] = $i;
break;
diff --git a/plugins/SegmentEditor/SegmentSelectorControl.php b/plugins/SegmentEditor/SegmentSelectorControl.php
index 9188a707db..bb58caa297 100644
--- a/plugins/SegmentEditor/SegmentSelectorControl.php
+++ b/plugins/SegmentEditor/SegmentSelectorControl.php
@@ -39,7 +39,7 @@ class SegmentSelectorControl extends UIControl
$segments = APIMetadata::getInstance()->getSegmentsMetadata($this->idSite);
- $segmentsByCategory = $customVariablesSegments = array();
+ $segmentsByCategory = array();
foreach ($segments as $segment) {
if ($segment['category'] == Piwik::translate('General_Visit')
&& ($segment['type'] == 'metric' && $segment['segment'] != 'visitIp')
diff --git a/plugins/Transitions/API.php b/plugins/Transitions/API.php
index 0e65eff824..faeddf9f0b 100644
--- a/plugins/Transitions/API.php
+++ b/plugins/Transitions/API.php
@@ -128,7 +128,6 @@ class API extends \Piwik\Plugin\API
*/
private function deriveIdAction($actionName, $actionType)
{
- $actionsPlugin = new Actions;
switch ($actionType) {
case 'url':
$originalActionName = $actionName;
diff --git a/plugins/UsersManager/LastSeenTimeLogger.php b/plugins/UsersManager/LastSeenTimeLogger.php
index 61e6c8b130..a89ebd0018 100644
--- a/plugins/UsersManager/LastSeenTimeLogger.php
+++ b/plugins/UsersManager/LastSeenTimeLogger.php
@@ -35,7 +35,6 @@ class LastSeenTimeLogger
public function logCurrentUserLastSeenTime()
{
$module = Common::getRequestVar('module', false);
- $action = Common::getRequestVar('action', false);
$currentUserLogin = Piwik::getCurrentUserLogin();
// only log time for non-anonymous visits to the reporting UI
diff --git a/tests/PHPUnit/Benchmarks/Fixtures/ThousandSitesTwelveVisitsEachOneDay.php b/tests/PHPUnit/Benchmarks/Fixtures/ThousandSitesTwelveVisitsEachOneDay.php
index c1888c6c85..564d80ed53 100755
--- a/tests/PHPUnit/Benchmarks/Fixtures/ThousandSitesTwelveVisitsEachOneDay.php
+++ b/tests/PHPUnit/Benchmarks/Fixtures/ThousandSitesTwelveVisitsEachOneDay.php
@@ -19,26 +19,12 @@ class Piwik_Test_Fixture_ThousandSitesTwelveVisitsEachOneDay
public function setUp()
{
- $goals = APIGoals::getInstance();
-
// add one thousand sites
$allIdSites = array();
for ($i = 0; $i < 1000; ++$i) {
$allIdSites[] = Fixture::createWebsite($this->date, $ecommerce = 1, $siteName = "Site #$i");
}
- // add goals to 500 sites
- $idGoals = array();
- foreach ($allIdSites as $idSite) {
- if ($idSite % 2 == 0) {
- $idGoal1 = $goals->addGoal($idSite, 'all', 'url', 'http', 'contains', false, 5);
- $idGoal2 = $goals->addGoal($idSite, 'all', 'url', 'http', 'contains');
- $idGoals[$idSite] = array($idGoal1, $idGoal2);
- } else {
- $idGoals[$idSite] = array();
- }
- }
-
$urls = array();
for ($i = 0; $i != 3; ++$i) {
$url = "http://whatever.com/" . ($i - 1) . "/" . ($i + 1);
diff --git a/tests/PHPUnit/Core/CookieTest.php b/tests/PHPUnit/Core/CookieTest.php
index d222184fc9..d173e60f4c 100644
--- a/tests/PHPUnit/Core/CookieTest.php
+++ b/tests/PHPUnit/Core/CookieTest.php
@@ -98,7 +98,7 @@ class CookieTest extends PHPUnit_Framework_TestCase
* serialize() uses its internal maachine representation when floats expressed in E-notation,
* which may vary between php versions, OS, and hardware platforms
*/
- $testData = $tests['exp float'] = -5.0E+142;
+ $testData = -5.0E+142;
// intentionally disabled; this doesn't work
// $this->assertEquals( safe_serialize($testData), serialize($testData) );
$this->assertEquals($testData, unserialize(safe_serialize($testData)));
diff --git a/tests/PHPUnit/Core/DataTable/Filter/LimitTest.php b/tests/PHPUnit/Core/DataTable/Filter/LimitTest.php
index e5a4a3a7b7..14705926a5 100644
--- a/tests/PHPUnit/Core/DataTable/Filter/LimitTest.php
+++ b/tests/PHPUnit/Core/DataTable/Filter/LimitTest.php
@@ -222,10 +222,6 @@ class DataTable_Filter_LimitTest extends PHPUnit_Framework_TestCase
$filter = new Limit($table, 2, 4);
$filter->filter($table);
- $colAfter = $colExpected = array();
- foreach ($table->getRows() as $row) $colAfter[] = $row->getColumn('label');
- foreach ($expectedtable->getRows() as $row) $colExpected[] = $row->getColumn('label');
-
$this->assertEquals(array_values($expectedtable->getRows()), array_values($table->getRows()));
}
@@ -258,10 +254,6 @@ class DataTable_Filter_LimitTest extends PHPUnit_Framework_TestCase
$filter = new Limit($table, 2, 1);
$filter->filter($table);
- $colAfter = $colExpected = array();
- foreach ($table->getRows() as $row) $colAfter[] = $row->getColumn('label');
- foreach ($expectedtable->getRows() as $row) $colExpected[] = $row->getColumn('label');
-
$this->assertEquals(array_values($expectedtable->getRows()), array_values($table->getRows()));
}
@@ -293,10 +285,6 @@ class DataTable_Filter_LimitTest extends PHPUnit_Framework_TestCase
$filter = new Limit($table, 0, 15);
$filter->filter($table);
- $colAfter = $colExpected = array();
- foreach ($table->getRows() as $row) $colAfter[] = $row->getColumn('label');
- foreach ($expectedtable->getRows() as $row) $colExpected[] = $row->getColumn('label');
-
$this->assertEquals(array_values($expectedtable->getRows()), array_values($table->getRows()));
}
@@ -328,10 +316,6 @@ class DataTable_Filter_LimitTest extends PHPUnit_Framework_TestCase
$filter = new Limit($table, 8, 15);
$filter->filter($table);
- $colAfter = $colExpected = array();
- foreach ($table->getRows() as $row) $colAfter[] = $row->getColumn('label');
- foreach ($expectedtable->getRows() as $row) $colExpected[] = $row->getColumn('label');
-
$this->assertEquals(array_values($expectedtable->getRows()), array_values($table->getRows()));
}
diff --git a/tests/PHPUnit/Core/DataTableTest.php b/tests/PHPUnit/Core/DataTableTest.php
index 5388a8117c..97d53e860e 100644
--- a/tests/PHPUnit/Core/DataTableTest.php
+++ b/tests/PHPUnit/Core/DataTableTest.php
@@ -436,7 +436,6 @@ class DataTableTest extends PHPUnit_Framework_TestCase
* does not take in consideration those tables
* -> we check that the DataTable_Manager is not impacting DataTable
*/
- $useless2 = new DataTable;
$useless1->addRowFromArray(array(Row::COLUMNS => array(8487,),));
$useless3 = new DataTable;
$useless3->addRowFromArray(array(Row::COLUMNS => array(8487,),));
diff --git a/tests/PHPUnit/Core/Period/DayTest.php b/tests/PHPUnit/Core/Period/DayTest.php
index 694ecad0d5..8321a3bddc 100644
--- a/tests/PHPUnit/Core/Period/DayTest.php
+++ b/tests/PHPUnit/Core/Period/DayTest.php
@@ -20,7 +20,7 @@ class Period_DayTest extends PHPUnit_Framework_TestCase
public function testInvalidDate()
{
try {
- $period = new Day('Invalid Date');
+ new Day('Invalid Date');
} catch (Exception $e) {
return;
}
diff --git a/tests/PHPUnit/Core/PeriodTest.php b/tests/PHPUnit/Core/PeriodTest.php
index f3be995179..8888c4c763 100644
--- a/tests/PHPUnit/Core/PeriodTest.php
+++ b/tests/PHPUnit/Core/PeriodTest.php
@@ -94,7 +94,7 @@ class PeriodTest extends PHPUnit_Framework_TestCase
public function testFactoryInvalid()
{
try {
- $period = Period\Factory::build('inValid', Date::today());
+ Period\Factory::build('inValid', Date::today());
} catch (Exception $e) {
return;
}
diff --git a/tests/PHPUnit/Core/ServeStaticFileTest.php b/tests/PHPUnit/Core/ServeStaticFileTest.php
index ef65358d6b..143b83944a 100644
--- a/tests/PHPUnit/Core/ServeStaticFileTest.php
+++ b/tests/PHPUnit/Core/ServeStaticFileTest.php
@@ -329,7 +329,7 @@ class Test_Piwik_ServeStaticFile extends PHPUnit_Framework_TestCase
curl_setopt($curlHandle, CURLOPT_URL, $this->getTestFileSrvModeUrl());
curl_setopt($curlHandle, CURLOPT_ENCODING, "deflate");
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
- $fullResponse = curl_exec($curlHandle);
+ curl_exec($curlHandle);
curl_close($curlHandle);
$firstAccessModificationTime = filemtime($deflateFileLocation);
@@ -341,7 +341,7 @@ class Test_Piwik_ServeStaticFile extends PHPUnit_Framework_TestCase
curl_setopt($curlHandle, CURLOPT_URL, $this->getTestFileSrvModeUrl());
curl_setopt($curlHandle, CURLOPT_ENCODING, "deflate");
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
- $fullResponse = curl_exec($curlHandle);
+ curl_exec($curlHandle);
curl_close($curlHandle);
// Tests the .deflate file has not been generated twice
@@ -370,7 +370,7 @@ class Test_Piwik_ServeStaticFile extends PHPUnit_Framework_TestCase
curl_setopt($curlHandle, CURLOPT_URL, $this->getTestFileSrvModeUrl());
curl_setopt($curlHandle, CURLOPT_ENCODING, "deflate");
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
- $fullResponse = curl_exec($curlHandle);
+ curl_exec($curlHandle);
curl_close($curlHandle);
$firstAccessModificationTime = filemtime($deflateFileLocation);
@@ -385,7 +385,7 @@ class Test_Piwik_ServeStaticFile extends PHPUnit_Framework_TestCase
curl_setopt($curlHandle, CURLOPT_URL, $this->getTestFileSrvModeUrl());
curl_setopt($curlHandle, CURLOPT_ENCODING, "deflate");
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
- $fullResponse = curl_exec($curlHandle);
+ curl_exec($curlHandle);
curl_close($curlHandle);
clearstatcache();
@@ -435,7 +435,7 @@ class Test_Piwik_ServeStaticFile extends PHPUnit_Framework_TestCase
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curlHandle, CURLOPT_ENCODING, "deflate");
$partialResponse = curl_exec($curlHandle);
- $responseInfo = curl_getinfo($curlHandle);
+ curl_getinfo($curlHandle);
curl_close($curlHandle);
clearstatcache();
@@ -464,7 +464,7 @@ class Test_Piwik_ServeStaticFile extends PHPUnit_Framework_TestCase
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curlHandle, CURLOPT_ENCODING, "deflate");
$fullResponse = curl_exec($curlHandle);
- $responseInfo = curl_getinfo($curlHandle);
+ curl_getinfo($curlHandle);
curl_close($curlHandle);
clearstatcache();
diff --git a/tests/PHPUnit/Core/Translate/WriterTest.php b/tests/PHPUnit/Core/Translate/WriterTest.php
index cdf1422170..c62ca6cb35 100644
--- a/tests/PHPUnit/Core/Translate/WriterTest.php
+++ b/tests/PHPUnit/Core/Translate/WriterTest.php
@@ -50,7 +50,7 @@ class WriterTest extends PHPUnit_Framework_TestCase
*/
public function testConstructorInvalid()
{
- $translationWriter = new Writer('en', 'InValIdPlUGin');
+ new Writer('en', 'InValIdPlUGin');
}
/**
diff --git a/tests/PHPUnit/Core/UnzipTest.php b/tests/PHPUnit/Core/UnzipTest.php
index b7115ec2f1..12f754c8b7 100644
--- a/tests/PHPUnit/Core/UnzipTest.php
+++ b/tests/PHPUnit/Core/UnzipTest.php
@@ -121,7 +121,6 @@ class UnzipTest extends PHPUnit_Framework_TestCase
{
clearstatcache();
$filename = dirname(__FILE__) . '/Unzip/zaabs.zip';
- $extractDir = PIWIK_USER_PATH . '/tmp/latest/';
$unzip = new ZipArchive($filename);
$this->assertContains('No error', $unzip->errorInfo());
@@ -150,7 +149,7 @@ class UnzipTest extends PHPUnit_Framework_TestCase
$filename = dirname(__FILE__) . '/Unzip/NotExisting.zip';
try {
- $unzip = new ZipArchive($filename);
+ new ZipArchive($filename);
} catch (Exception $e) {
return;
}
diff --git a/tests/PHPUnit/Fixture.php b/tests/PHPUnit/Fixture.php
index 05bf19ad0f..d09ee974f3 100644
--- a/tests/PHPUnit/Fixture.php
+++ b/tests/PHPUnit/Fixture.php
@@ -689,10 +689,8 @@ class Fixture extends PHPUnit_Framework_Assert
$dump = fopen($url, 'rb');
$outfile = fopen($outfileName, 'wb');
- $bytesRead = 0;
while (!feof($dump)) {
fwrite($outfile, fread($dump, $bufferSize), $bufferSize);
- $bytesRead += $bufferSize;
}
fclose($dump);
fclose($outfile);
diff --git a/tests/PHPUnit/Integration/AnnotationsTest.php b/tests/PHPUnit/Integration/AnnotationsTest.php
index 2dfd150e18..9945b63902 100755
--- a/tests/PHPUnit/Integration/AnnotationsTest.php
+++ b/tests/PHPUnit/Integration/AnnotationsTest.php
@@ -31,7 +31,6 @@ class AnnotationsTest extends IntegrationTestCase
public function getApiForTesting()
{
$idSite1 = self::$fixture->idSite1;
- $idSite2 = self::$fixture->idSite2;
return array(
@@ -279,7 +278,7 @@ class AnnotationsTest extends IntegrationTestCase
}
} else {
$request = new Request($request);
- $response = $request->process();
+ $request->process();
}
}
diff --git a/tests/PHPUnit/Integration/Core/ArchiveProcessingTest.php b/tests/PHPUnit/Integration/Core/ArchiveProcessingTest.php
index a87ee6dd8f..3a522ee0cc 100644
--- a/tests/PHPUnit/Integration/Core/ArchiveProcessingTest.php
+++ b/tests/PHPUnit/Integration/Core/ArchiveProcessingTest.php
@@ -370,7 +370,6 @@ class Core_ArchiveProcessingTest extends DatabaseTestCase
*/
public function testTableInsertBatchBlob()
{
- $siteTimezone = 'America/Toronto';
$dateLabel = '2011-03-31';
$table = ArchiveTableCreator::getBlobTable(Date::factory($dateLabel));
@@ -402,7 +401,6 @@ class Core_ArchiveProcessingTest extends DatabaseTestCase
*/
public function testTableInsertBatchIterateBlob()
{
- $siteTimezone = 'America/Toronto';
$dateLabel = '2011-03-31';
$table = ArchiveTableCreator::getBlobTable(Date::factory($dateLabel));
diff --git a/tests/PHPUnit/Integration/Core/WidgetsListTest.php b/tests/PHPUnit/Integration/Core/WidgetsListTest.php
index ab3dcb9f88..7afd9dc0a5 100644
--- a/tests/PHPUnit/Integration/Core/WidgetsListTest.php
+++ b/tests/PHPUnit/Integration/Core/WidgetsListTest.php
@@ -90,7 +90,6 @@ class Core_WidgetsListTest extends DatabaseTestCase
);
foreach ($numberOfWidgets AS $category => $widgetCount) {
- $expected = count($widgets[$category]);
$this->assertEquals($widgetCount, count($widgets[$category]));
}
}
diff --git a/tests/PHPUnit/Integration/Plugins/SitesManagerTest.php b/tests/PHPUnit/Integration/Plugins/SitesManagerTest.php
index 87c5023eca..3c9b6042bc 100644
--- a/tests/PHPUnit/Integration/Plugins/SitesManagerTest.php
+++ b/tests/PHPUnit/Integration/Plugins/SitesManagerTest.php
@@ -345,7 +345,7 @@ class Plugins_SitesManagerTest extends DatabaseTestCase
try {
$idsite = $this->_addSite();
$toAdd = array("http:mpigeq");
- $insertedUrls = API::getInstance()->addSiteAliasUrls($idsite, $toAdd);
+ API::getInstance()->addSiteAliasUrls($idsite, $toAdd);
} catch (Exception $e) {
return;
}
@@ -361,7 +361,7 @@ class Plugins_SitesManagerTest extends DatabaseTestCase
{
try {
$toAdd = array("http://pigeq.com/test");
- $insertedUrls = API::getInstance()->addSiteAliasUrls(-1, $toAdd);
+ API::getInstance()->addSiteAliasUrls(-1, $toAdd);
} catch (Exception $e) {
return;
}
@@ -377,7 +377,7 @@ class Plugins_SitesManagerTest extends DatabaseTestCase
{
try {
$toAdd = array("http://pigeq.com/test");
- $insertedUrls = API::getInstance()->addSiteAliasUrls(155, $toAdd);
+ API::getInstance()->addSiteAliasUrls(155, $toAdd);
} catch (Exception $e) {
return;
}
@@ -423,7 +423,7 @@ class Plugins_SitesManagerTest extends DatabaseTestCase
public function testGetSiteFromIdWrongId1()
{
try {
- $siteInfo = API::getInstance()->getSiteFromId(0);
+ API::getInstance()->getSiteFromId(0);
} catch (Exception $e) {
return;
}
@@ -438,7 +438,7 @@ class Plugins_SitesManagerTest extends DatabaseTestCase
public function testGetSiteFromIdWrongId2()
{
try {
- $siteInfo = API::getInstance()->getSiteFromId("x1");
+ API::getInstance()->getSiteFromId("x1");
} catch (Exception $e) {
return;
}
@@ -460,7 +460,7 @@ class Plugins_SitesManagerTest extends DatabaseTestCase
FakeAccess::setIdSitesAdmin(array());
try {
- $siteInfo = API::getInstance()->getSiteFromId(1);
+ API::getInstance()->getSiteFromId(1);
} catch (Exception $e) {
return;
}
@@ -504,9 +504,9 @@ class Plugins_SitesManagerTest extends DatabaseTestCase
*/
public function testGetSitesWithAdminAccess()
{
- $idsite = API::getInstance()->addSite("site1", array("http://piwik.net", "http://piwik.com/test/"));
- $idsite = API::getInstance()->addSite("site2", array("http://piwik.com/test/"));
- $idsite = API::getInstance()->addSite("site3", array("http://piwik.org"));
+ API::getInstance()->addSite("site1", array("http://piwik.net", "http://piwik.com/test/"));
+ API::getInstance()->addSite("site2", array("http://piwik.com/test/"));
+ API::getInstance()->addSite("site3", array("http://piwik.org"));
$resultWanted = array(
0 => array("idsite" => 1, "name" => "site1", "main_url" => "http://piwik.net", "ecommerce" => 0, "excluded_ips" => "", 'sitesearch' => 1, 'sitesearch_keyword_parameters' => '', 'sitesearch_category_parameters' => '', 'excluded_parameters' => '', 'excluded_user_agents' => '', 'timezone' => 'UTC', 'currency' => 'USD', 'group' => '', 'keep_url_fragment' => 0, 'type' => 'website'),
@@ -544,9 +544,9 @@ class Plugins_SitesManagerTest extends DatabaseTestCase
*/
public function testGetSitesWithViewAccess()
{
- $idsite = API::getInstance()->addSite("site1", array("http://piwik.net", "http://piwik.com/test/"));
- $idsite = API::getInstance()->addSite("site2", array("http://piwik.com/test/"));
- $idsite = API::getInstance()->addSite("site3", array("http://piwik.org"));
+ API::getInstance()->addSite("site1", array("http://piwik.net", "http://piwik.com/test/"));
+ API::getInstance()->addSite("site2", array("http://piwik.com/test/"));
+ API::getInstance()->addSite("site3", array("http://piwik.org"));
$resultWanted = array(
0 => array("idsite" => 1, "name" => "site1", "main_url" => "http://piwik.net", "ecommerce" => 0, 'sitesearch' => 1, 'sitesearch_keyword_parameters' => '', 'sitesearch_category_parameters' => '', "excluded_ips" => "", 'excluded_parameters' => '', 'excluded_user_agents' => '', 'timezone' => 'UTC', 'currency' => 'USD', 'group' => '', 'keep_url_fragment' => 0, 'type' => 'website'),
@@ -584,9 +584,9 @@ class Plugins_SitesManagerTest extends DatabaseTestCase
*/
public function testGetSitesWithAtLeastViewAccess()
{
- $idsite = API::getInstance()->addSite("site1", array("http://piwik.net", "http://piwik.com/test/"), $ecommerce = 1);
- $idsite = API::getInstance()->addSite("site2", array("http://piwik.com/test/"));
- $idsite = API::getInstance()->addSite("site3", array("http://piwik.org"));
+ API::getInstance()->addSite("site1", array("http://piwik.net", "http://piwik.com/test/"), $ecommerce = 1);
+ API::getInstance()->addSite("site2", array("http://piwik.com/test/"));
+ API::getInstance()->addSite("site3", array("http://piwik.org"));
$resultWanted = array(
0 => array("idsite" => 1, "name" => "site1", "main_url" => "http://piwik.net", "ecommerce" => 1, "excluded_ips" => "", 'sitesearch' => 1, 'sitesearch_keyword_parameters' => '', 'sitesearch_category_parameters' => '', 'excluded_parameters' => '', 'excluded_user_agents' => '', 'timezone' => 'UTC', 'currency' => 'USD', 'group' => '', 'keep_url_fragment' => 0, 'type' => 'website'),
@@ -810,7 +810,7 @@ class Plugins_SitesManagerTest extends DatabaseTestCase
public function testAddSitesInvalidTimezone($timezone)
{
try {
- $idsite = API::getInstance()->addSite("site1", array('http://example.org'), $ecommerce = 0,
+ API::getInstance()->addSite("site1", array('http://example.org'), $ecommerce = 0,
$siteSearch = 1, $searchKeywordParameters = null, $searchCategoryParameters = null, $ip = '', $params = '', $timezone);
} catch (Exception $e) {
return;
@@ -825,7 +825,7 @@ class Plugins_SitesManagerTest extends DatabaseTestCase
{
try {
$invalidCurrency = '€';
- $idsite = API::getInstance()->addSite("site1", array('http://example.org'), $ecommerce = 0,
+ API::getInstance()->addSite("site1", array('http://example.org'), $ecommerce = 0,
$siteSearch = 1, $searchKeywordParameters = null, $searchCategoryParameters = null, '', 'UTC', $invalidCurrency);
} catch (Exception $e) {
return;
@@ -907,9 +907,9 @@ class Plugins_SitesManagerTest extends DatabaseTestCase
*/
public function testGetSitesIdFromSiteUrlSuperUser()
{
- $idsite = API::getInstance()->addSite("site1", array("http://piwik.net", "http://piwik.com"));
- $idsite = API::getInstance()->addSite("site2", array("http://piwik.com", "http://piwik.net"));
- $idsite = API::getInstance()->addSite("site3", array("http://piwik.com", "http://piwik.org"));
+ API::getInstance()->addSite("site1", array("http://piwik.net", "http://piwik.com"));
+ API::getInstance()->addSite("site2", array("http://piwik.com", "http://piwik.net"));
+ API::getInstance()->addSite("site3", array("http://piwik.com", "http://piwik.org"));
$idsites = API::getInstance()->getSitesIdFromSiteUrl('http://piwik.org');
$this->assertTrue(count($idsites) == 1);
@@ -929,9 +929,9 @@ class Plugins_SitesManagerTest extends DatabaseTestCase
*/
public function testGetSitesIdFromSiteUrlUser()
{
- $idsite = API::getInstance()->addSite("site1", array("http://www.piwik.net", "http://piwik.com"));
- $idsite = API::getInstance()->addSite("site2", array("http://piwik.com", "http://piwik.net"));
- $idsite = API::getInstance()->addSite("site3", array("http://piwik.com", "http://piwik.org"));
+ API::getInstance()->addSite("site1", array("http://www.piwik.net", "http://piwik.com"));
+ API::getInstance()->addSite("site2", array("http://piwik.com", "http://piwik.net"));
+ API::getInstance()->addSite("site3", array("http://piwik.com", "http://piwik.org"));
$saveAccess = Access::getInstance();
@@ -987,7 +987,7 @@ class Plugins_SitesManagerTest extends DatabaseTestCase
*/
public function testGetSitesFromTimezones()
{
- $idsite1 = API::getInstance()->addSite("site3", array("http://piwik.org"), null, $siteSearch = 1, $searchKeywordParameters = null, $searchCategoryParameters = null, null, null, 'UTC');
+ API::getInstance()->addSite("site3", array("http://piwik.org"), null, $siteSearch = 1, $searchKeywordParameters = null, $searchCategoryParameters = null, null, null, 'UTC');
$idsite2 = API::getInstance()->addSite("site3", array("http://piwik.org"), null, $siteSearch = 1, $searchKeywordParameters = null, $searchCategoryParameters = null, null, null, 'Pacific/Auckland');
$idsite3 = API::getInstance()->addSite("site3", array("http://piwik.org"), null, $siteSearch = 1, $searchKeywordParameters = null, $searchCategoryParameters = null, null, null, 'Pacific/Auckland');
$idsite4 = API::getInstance()->addSite("site3", array("http://piwik.org"), null, $siteSearch = 1, $searchKeywordParameters = null, $searchCategoryParameters = null, null, null, 'UTC+10');
diff --git a/tests/PHPUnit/Integration/PrivacyManagerTest.php b/tests/PHPUnit/Integration/PrivacyManagerTest.php
index 591be30265..336361b31c 100644
--- a/tests/PHPUnit/Integration/PrivacyManagerTest.php
+++ b/tests/PHPUnit/Integration/PrivacyManagerTest.php
@@ -613,7 +613,7 @@ class PrivacyManagerTest extends IntegrationTestCase
$start = Date::factory(self::$dateTime);
self::$idSite = Fixture::createWebsite('2012-01-01', $ecommerce = 1);
- $idGoal = APIGoals::getInstance()->addGoal(self::$idSite, 'match all', 'url', 'http', 'contains');
+ APIGoals::getInstance()->addGoal(self::$idSite, 'match all', 'url', 'http', 'contains');
$t = Fixture::getTracker(self::$idSite, $start, $defaultInit = true);
$t->enableBulkTracking();
@@ -812,7 +812,6 @@ class PrivacyManagerTest extends IntegrationTestCase
return;
}
- $tempTableName = Common::prefixTable(LogDataPurger::TEMP_TABLE_NAME);
$logLinkVisitActionTable = Common::prefixTable("log_link_visit_action");
$sql = "INSERT INTO $logLinkVisitActionTable
diff --git a/tests/PHPUnit/IntegrationTestCase.php b/tests/PHPUnit/IntegrationTestCase.php
index abe5659c43..b255b4f189 100755
--- a/tests/PHPUnit/IntegrationTestCase.php
+++ b/tests/PHPUnit/IntegrationTestCase.php
@@ -328,7 +328,7 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
protected function generateUrlsApi($parametersToSet, $formats, $periods, $supertableApi = false, $setDateLastN = false, $language = false, $fileExtension = false)
{
// Get the URLs to query against the API for all functions starting with get*
- $skipped = $requestUrls = array();
+ $requestUrls = array();
$apiMetadata = new DocumentationGenerator;
foreach (Proxy::getInstance()->getMetadata() as $class => $info) {
$moduleName = Proxy::getInstance()->getModuleNameFromClassName($class);
@@ -340,7 +340,6 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
&& in_array($moduleName, $this->apiToCall) === false
&& in_array($apiId, $this->apiToCall) === false
) {
- $skipped[] = $apiId;
continue;
} elseif (
((strpos($methodName, 'get') !== 0 && $methodName != 'generateReport')
@@ -352,7 +351,6 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
|| $methodName == 'getHeaderLogoUrl'
)
) { // Excluded modules from test
- $skipped[] = $apiId;
continue;
}
@@ -418,7 +416,6 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
$exampleUrl = $apiMetadata->getExampleUrl($class, $methodName, $parametersToSet);
if ($exampleUrl === false) {
- $skipped[] = $apiId;
continue;
}
@@ -743,7 +740,6 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
{
$result = @file_get_contents($filePath);
if (empty($result)) {
- $expectedDir = dirname($filePath);
$this->missingExpectedFiles[] = $filePath;
return null;
}
@@ -994,7 +990,7 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
$bind = array();
foreach ($rows as $row) {
$values = array();
- foreach ($row as $name => $value) {
+ foreach ($row as $value) {
if (is_null($value)) {
$values[] = 'NULL';
} else if (is_numeric($value)) {
diff --git a/tests/PHPUnit/Plugins/LanguagesManagerTest.php b/tests/PHPUnit/Plugins/LanguagesManagerTest.php
index 04898443f7..617f7941ef 100755
--- a/tests/PHPUnit/Plugins/LanguagesManagerTest.php
+++ b/tests/PHPUnit/Plugins/LanguagesManagerTest.php
@@ -110,7 +110,7 @@ class Test_LanguagesManager extends PHPUnit_Framework_TestCase
*/
function testWriterInvalidPlugin()
{
- $writer = new Writer('de', 'iNvaLiDPluGin'); // invalid plugin throws exception
+ new Writer('de', 'iNvaLiDPluGin'); // invalid plugin throws exception
}
/**