Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected AR HitCounter::tableName() #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
@@ -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": {
@@ -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
@@ -51,7 +51,7 @@ class HitCounter extends \yii\db\ActiveRecord
*/
public static function tableName()
{
return 'hit_counter';
return '{{%hit_counter}}';
}


2 changes: 1 addition & 1 deletion src/widgets/hitCounter/views/invisible-counter.php
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
*/
abstract class TestCase extends \PHPUnit\Framework\TestCase
{
protected function setUp()
protected function setUp(): void
{
parent::setUp();
$this->mockWebApplication();
@@ -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();
2 changes: 1 addition & 1 deletion tests/functional/HitCounterWidgetTest.php
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
class HitCounterWidgetTest extends \tests\TestCase
{

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

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

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

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

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

private $model;

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

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

class HitCounterRepositoryTest extends \tests\TestCase
{

private $hit;
private $repo;

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

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

class HitCounterServiceTest extends \tests\TestCase
{

private $service;
// private $request;

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