Skip to content

Commit c24be6b

Browse files
committed
Minor fixes
Composer and autoload files adjusted
1 parent 44e7c64 commit c24be6b

5 files changed

Lines changed: 13 additions & 8 deletions

File tree

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,10 @@
2323
"league/oauth2-github" : "^2.0",
2424
"league/oauth2-google" : "^3.0",
2525
"wp-statistics/pchart" : "~1.2"
26+
},
27+
"autoload" : {
28+
"psr-4" : {
29+
"pChart\\" : "vendor/wp-statistics/pchart/src"
30+
}
2631
}
2732
}

lib/results/charts.inc.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
require_once '../../config.inc.php';
1313
require_once __DIR__ . '/../../vendor/autoload.php';
1414

15+
use pChart\pChart;
16+
use pChart\pData;
17+
1518
/**
1619
*
1720
* @param stdClass $info

lib/results/overallPieChart.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
require_once '../../config.inc.php';
1818
require_once 'common.php';
1919

20-
require_once __DIR__ . '/../../vendor/autoload.php'; // Autoload files using Composer autoload
20+
require_once __DIR__ . '/../../vendor/autoload.php';
21+
2122
use pChart\pData;
2223
use pChart\pChart;
2324

lib/results/platformPieChart.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
require_once '../../config.inc.php';
1717
require_once 'common.php';
1818

19-
require_once __DIR__ . '/../../vendor/autoload.php'; // Autoload files using Composer autoload
19+
require_once __DIR__ . '/../../vendor/autoload.php';
20+
2021
use pChart\pData;
2122
use pChart\pChart;
2223

@@ -100,7 +101,7 @@
100101
*
101102
* @param database $db
102103
* @param tlUser $user
103-
* @return unknown
104+
* @return string
104105
*/
105106
function checkRights(&$db, &$user)
106107
{

lib/results/topLevelSuitesBarChart.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
*/
1515
require_once '../../config.inc.php';
1616

17-
require_once __DIR__ . '/../../vendor/autoload.php'; // Autoload files using Composer autoload
18-
use pChart\pData;
19-
use pChart\pChart;
20-
use pChart\pCache;
21-
2217
require_once 'common.php';
2318
require_once 'charts.inc.php';
2419

0 commit comments

Comments
 (0)