Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 17 additions & 22 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
],

"require": {
"php": ">=5.6.0",
"yiisoft/yii2": "^2.0.0",
"piwik/device-detector": "~3.12",
"mockery/mockery": "^1.2"
"mockery/mockery": "^1.2",
"php": ">=7.4.0",
"yiisoft/yii2": "^2.0.45",
"matomo/device-detector": "^6.0"
},
"require-dev": {
"phpunit/phpunit": "~5.0"
"phpunit/phpunit": "~9.5.0"
},
"autoload": {
"psr-4": {
Expand All @@ -37,23 +37,18 @@
},

"config": {
"allow-plugins": {
"yiisoft/yii2-composer" : true
},
"process-timeout": 1800,
"fxp-asset": {
"installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
},
"process-timeout": 1800
"enabled": false
}
},
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
},
"asset-vcs-driver-options": {
"github-no-api": true
},
"asset-pattern-skip-version": "(-patch)"
}

"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
]
}
2 changes: 1 addition & 1 deletion src/entities/HitCounter.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class HitCounter extends \yii\db\ActiveRecord
*/
public static function tableName()
{
return 'hit_counter';
return '{{%hit_counter}}';
}


Expand Down
2 changes: 1 addition & 1 deletion src/widgets/hitCounter/views/invisible-counter.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
?>if(Cd.cookie)Cp+="&c=1";<?php
?>if(self!=top)Cp+="&f=1";<?php
?>if(Cn)Cp+="&lg="+Cn.language;<?php
?>if(Cn)Cp+="&cnt="+Cn_c.effectiveType;<?php
?>if(Cn&&Cn_c)Cp+="&cnt="+Cn_c.effectiveType;<?php
?>if(Cn)Cp+="&ram="+Cn.deviceMemory;<?php
?>if('ontouchstart' in window || Cn.msMaxTouchPoints)Cp+="&td=1";<?php
?>if(Intl)Cp+="&tz="+Intl.DateTimeFormat().resolvedOptions().timeZone;<?php
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
abstract class TestCase extends \PHPUnit\Framework\TestCase
{
protected function setUp()
protected function setUp(): void
{
parent::setUp();
$this->mockWebApplication();
Expand All @@ -22,7 +22,7 @@ protected function setUp()
* Clean up after test.
* By default the application created with [[mockApplication]] will be destroyed.
*/
protected function tearDown()
protected function tearDown(): void
{
parent::tearDown();
$this->destroyApplication();
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/HitCounterWidgetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class HitCounterWidgetTest extends \tests\TestCase
{

public function setUp()
public function setUp(): void
{
parent::setUp();
$this->mockWebApplication();
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/HitCounterControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class HitCounterControllerTest extends \tests\TestCase
{
private $serviceMock;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/HitCounterEntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class HitCounterEntityTest extends \tests\TestCase{
private $hit;
private $arrayData;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/HitCounterModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class HitCounterModelTest extends \tests\TestCase{

private $model;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
3 changes: 1 addition & 2 deletions tests/unit/HitCounterRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@

class HitCounterRepositoryTest extends \tests\TestCase
{

private $hit;
private $repo;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
3 changes: 1 addition & 2 deletions tests/unit/HitCounterServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@

class HitCounterServiceTest extends \tests\TestCase
{

private $service;
// private $request;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down