We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -39,34 +39,34 @@ |
||
39 | 39 | */ |
40 | 40 | private function sendUsageStats() |
41 | 41 | { |
42 | - // only send usage stats in production |
|
43 | - if (!$this->runningInProduction()) { |
|
44 | - return ; |
|
45 | - } |
|
42 | + // only send usage stats in production |
|
43 | + if (!$this->runningInProduction()) { |
|
44 | + return ; |
|
45 | + } |
|
46 | 46 | |
47 | - // only send stats every ~100 pageloads |
|
48 | - if (rand(1, 100) != 1) { |
|
49 | - return ; |
|
50 | - } |
|
47 | + // only send stats every ~100 pageloads |
|
48 | + if (rand(1, 100) != 1) { |
|
49 | + return ; |
|
50 | + } |
|
51 | 51 | |
52 | 52 | $url = "https://backpackforlaravel.com/api/stats"; |
53 | 53 | $method = "PUT"; |
54 | 54 | $stats = [ |
55 | - 'HTTP_HOST' => $_SERVER['HTTP_HOST'] ?? false, |
|
56 | - 'APP_URL' => $_SERVER['APP_URL'] ?? false, |
|
57 | - 'APP_ENV' => $this->app->environment() ?? false, |
|
58 | - 'APP_DEBUG' => $_SERVER['APP_DEBUG'] ?? false, |
|
59 | - 'SERVER_ADDR' => $_SERVER['SERVER_ADDR'] ?? false, |
|
60 | - 'SERVER_ADMIN' => $_SERVER['SERVER_ADMIN'] ?? false, |
|
61 | - 'SERVER_NAME' => $_SERVER['SERVER_NAME'] ?? false, |
|
62 | - 'SERVER_PORT' => $_SERVER['SERVER_PORT'] ?? false, |
|
63 | - 'SERVER_PROTOCOL' => $_SERVER['SERVER_PROTOCOL'] ?? false, |
|
64 | - 'SERVER_SOFTWARE' => $_SERVER['SERVER_SOFTWARE'] ?? false, |
|
65 | - 'DB_CONNECTION' => $_SERVER['DB_CONNECTION'] ?? false, |
|
66 | - 'LARAVEL_VERSION' => $this->app->version() ?? false, |
|
67 | - 'BACKPACK_BASE_VERSION' => $_SERVER['BACKPACK_BASE_VERSION'] ?? false, |
|
68 | - 'BACKPACK_CRUD_VERSION' => $_SERVER['BACKPACK_CRUD_VERSION'] ?? false, |
|
69 | - 'BACKPACK_LICENSE' => config('backpack.base.license_code') ?? false, |
|
55 | + 'HTTP_HOST' => $_SERVER['HTTP_HOST'] ?? false, |
|
56 | + 'APP_URL' => $_SERVER['APP_URL'] ?? false, |
|
57 | + 'APP_ENV' => $this->app->environment() ?? false, |
|
58 | + 'APP_DEBUG' => $_SERVER['APP_DEBUG'] ?? false, |
|
59 | + 'SERVER_ADDR' => $_SERVER['SERVER_ADDR'] ?? false, |
|
60 | + 'SERVER_ADMIN' => $_SERVER['SERVER_ADMIN'] ?? false, |
|
61 | + 'SERVER_NAME' => $_SERVER['SERVER_NAME'] ?? false, |
|
62 | + 'SERVER_PORT' => $_SERVER['SERVER_PORT'] ?? false, |
|
63 | + 'SERVER_PROTOCOL' => $_SERVER['SERVER_PROTOCOL'] ?? false, |
|
64 | + 'SERVER_SOFTWARE' => $_SERVER['SERVER_SOFTWARE'] ?? false, |
|
65 | + 'DB_CONNECTION' => $_SERVER['DB_CONNECTION'] ?? false, |
|
66 | + 'LARAVEL_VERSION' => $this->app->version() ?? false, |
|
67 | + 'BACKPACK_BASE_VERSION' => $_SERVER['BACKPACK_BASE_VERSION'] ?? false, |
|
68 | + 'BACKPACK_CRUD_VERSION' => $_SERVER['BACKPACK_CRUD_VERSION'] ?? false, |
|
69 | + 'BACKPACK_LICENSE' => config('backpack.base.license_code') ?? false, |
|
70 | 70 | ]; |
71 | 71 | |
72 | 72 | // send this info to the main website to store it in the db |