Skip to content
Merged
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
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
language: php
php:
- 7.1
- 8.0
env:
global:
- XDEBUG_MODE=coverage
install:
- /home/travis/.phpenv/versions/7.1/bin/composer install
- /home/travis/.phpenv/versions/8.0/bin/composer install
- phpenv rehash
before_script:
- mkdir -p build/logs
script:
- vendor/bin/phpcs
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- php vendor/bin/php-coveralls -v
33 changes: 27 additions & 6 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
<description>The coding standard for PHP_CodeSniffer itself.</description>
<description>The coding standard for PHP_CodeSniffer itself.</description>

<file>src</file>
<file>src</file>

<arg name="report" value="full"/>
<arg value="np"/>
<arg name="report" value="full"/>
<arg value="np"/>
<arg name="tab-width" value="2"/>

<rule ref="PSR2"/>
</ruleset>
<rule ref="PSR2"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="2"/>
</properties>
</rule>
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration">
<properties>
<property name="indent" value="2" />
</properties>
</rule>
<rule ref="PSR2.Methods.FunctionCallSignature">
<properties>
<property name="indent" value="2" />
</properties>
</rule>
<rule ref="PSR2.ControlStructures.SwitchDeclaration">
<properties>
<property name="indent" value="2" />
</properties>
</rule>
</ruleset>
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
</testsuite>
</testsuites>

<coverage>
<coverage processUncoveredFiles="false" pathCoverage="true">
<include>
<directory suffix=".php">./src</directory>
</include>
Expand Down
8 changes: 6 additions & 2 deletions src/OAuth/AbstractOAuth1.php
Original file line number Diff line number Diff line change
Expand Up @@ -574,12 +574,16 @@ protected function getSignature(array $query = []): string
{
switch ($this->signature) {
case self::HMAC_SHA1:
return $this->getHmacSha1Signature($query);
$signature = $this->getHmacSha1Signature($query);
break;
case self::RSA_SHA1:
case self::PLAIN_TEXT:
default:
return $this->getHmacPlainTextSignature();
$signature = $this->getHmacPlainTextSignature();
break;
}

return $signature;
}

/**
Expand Down
3 changes: 1 addition & 2 deletions src/Package/PackageTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ public function register(
string $vendor,
?string $root = null,
?string $bootstrap = null
)
{
) {
//if no bootstrap file name defined and theres a getBootstrapFileName method
if (is_null($bootstrap) && method_exists($this, 'getBootstrapFileName')) {
//use that
Expand Down
1 change: 0 additions & 1 deletion test/Data/CloneTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ protected function tearDown(): void

/**
* @covers UGComponents\Data\CloneTrait::clone
* @covers UGComponents\Data\CloneTrait::__clone
*/
public function testClone()
{
Expand Down
2 changes: 1 addition & 1 deletion test/Data/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ public function testSetEventEmitter()
}

/**
* @covers UGComponents\Data\Collection::trigger
* @covers UGComponents\Data\Collection::emit
*/
public function testTrigger()
{
Expand Down
2 changes: 1 addition & 1 deletion test/Data/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ public function testSetEventEmitter()
}

/**
* @covers UGComponents\Data\Model::trigger
* @covers UGComponents\Data\Model::emit
*/
public function testTrigger()
{
Expand Down
2 changes: 1 addition & 1 deletion test/Data/Registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ public function testSetEventEmitter()
}

/**
* @covers UGComponents\Data\Registry::trigger
* @covers UGComponents\Data\Registry::emit
*/
public function testTrigger()
{
Expand Down
2 changes: 1 addition & 1 deletion test/Event/EventEmitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function testOn()
}

/**
* @covers UGComponents\Event\EventEmitter::trigger
* @covers UGComponents\Event\EventEmitter::emit
*/
public function testTrigger()
{
Expand Down
2 changes: 1 addition & 1 deletion test/Event/EventTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function testSetEventEmitter()
}

/**
* @covers UGComponents\Event\EventTrait::trigger
* @covers UGComponents\Event\EventTrait::emit
*/
public function testEmit()
{
Expand Down
2 changes: 1 addition & 1 deletion test/Http/Router/RouterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function testSetRouter()
}

/**
* covers UGComponents\Http\RouterTrait::triggerRoute
* covers UGComponents\Http\RouterTrait::routeTo
*/
public function testRouteTo()
{
Expand Down
2 changes: 1 addition & 1 deletion test/I18n/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public function testSetEventEmitter()
}

/**
* @covers UGComponents\I18n\Language::trigger
* @covers UGComponents\I18n\Language::emit
*/
public function testTrigger()
{
Expand Down