deployphp /
deployer
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | /* (c) Anton Medvedev <[email protected]> |
||
| 6 | * |
||
| 7 | * For the full copyright and license information, please view the LICENSE |
||
| 8 | * file that was distributed with this source code. |
||
| 9 | */ |
||
| 10 | |||
| 11 | namespace Deployer\Command; |
||
| 12 | |||
| 13 | use Deployer\Deployer; |
||
| 14 | use Deployer\Support\Reporter; |
||
| 15 | |||
| 16 | trait CommandCommon |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * Collecting anonymous stat helps Deployer team improve developer experience. |
||
| 20 | * If you are not comfortable with this, you will always be able to disable this |
||
| 21 | * by setting DO_NOT_TRACK environment variable to `1`. |
||
| 22 | * @codeCoverageIgnore |
||
| 23 | */ |
||
| 24 | protected function telemetry(array $data = []): void |
||
| 25 | { |
||
| 26 | if (getenv('DO_NOT_TRACK') === 'true') { |
||
| 27 | return; |
||
| 28 | } |
||
| 29 | try { |
||
| 30 | Reporter::report(array_merge([ |
||
| 31 | 'command_name' => $this->getName(), |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 32 | 'deployer_version' => DEPLOYER_VERSION, |
||
|
0 ignored issues
–
show
|
|||
| 33 | 'deployer_phar' => Deployer::isPharArchive(), |
||
| 34 | 'php_version' => phpversion(), |
||
| 35 | 'os' => defined('PHP_OS_FAMILY') ? PHP_OS_FAMILY : (stristr(PHP_OS, 'DAR') ? 'OSX' : (stristr(PHP_OS, 'WIN') ? 'WIN' : (stristr(PHP_OS, 'LINUX') ? 'LINUX' : PHP_OS))), |
||
| 36 | ], $data)); |
||
| 37 | } catch (\Throwable $e) { |
||
| 38 | return; |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 42 | } |
||
| 43 |