Skip to content

Commit

Permalink
New dependency versions and code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
maikgreubel committed Aug 30, 2015
1 parent 8e7b57f commit fafb698
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .travis.yml 100755 → 100644
Expand Up @@ -15,4 +15,4 @@ script:
- phpunit --coverage-clover build/logs/clover.xml

after_script:
- php vendor/bin/coveralls -v
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php vendor/bin/coveralls -v; fi;'
25 changes: 12 additions & 13 deletions composer.json
Expand Up @@ -4,14 +4,13 @@
"psr/log" : "1.0.0"
},
"require-dev" : {
"phpunit/phpunit" : "4.6.6",
"phpunit/dbunit" : "1.3.2",
"squizlabs/php_codesniffer" : "2.3.2",
"phploc/phploc" : "2.1.1",
"pdepend/pdepend" : "2.0.6",
"phpmd/phpmd" : "2.2.2",
"phpunit/phpunit" : "4.8.6",
"squizlabs/php_codesniffer" : "2.3.3",
"phploc/phploc" : "2.1.4",
"pdepend/pdepend" : "2.1.0",
"phpmd/phpmd" : "2.2.3",
"sebastian/phpcpd" : "2.0.2",
"theseer/phpdox" : "0.8.0",
"theseer/phpdox" : "0.8.1.1",
"satooshi/php-coveralls" : "dev-master"
},
"name" : "nkey/phpgenerics",
Expand Down Expand Up @@ -39,12 +38,12 @@
"autoload-dev" : {
"psr-4" : {
"Generics\\Tests\\" : [
"tests/exception-tests",
"tests/http-tests",
"tests/logger-tests",
"tests/socket-tests",
"tests/stream-tests",
"tests/util-tests"
"tests/exception-tests",
"tests/http-tests",
"tests/logger-tests",
"tests/socket-tests",
"tests/stream-tests",
"tests/util-tests"
]
}
},
Expand Down
1 change: 0 additions & 1 deletion src/Generics/Client/HttpClient.php
Expand Up @@ -10,7 +10,6 @@
use Generics\Streams\HttpStream;
use Generics\Streams\InputStream;
use Generics\Streams\MemoryStream;
use Generics\Streams\InputOutputStream;
use Generics\Socket\ClientSocket;
use Generics\Socket\Endpoint;
use Generics\Socket\Url;
Expand Down
4 changes: 2 additions & 2 deletions src/Generics/GenericsException.php
Expand Up @@ -28,10 +28,10 @@ class GenericsException extends \Exception
* The context elements to replace in message
* @param number $code
* Optional code
* @param string $previous
* @param \Exception $previous
* Optional previous exception
*/
public function __construct($message, array $context = array(), $code = 0, $previous = null)
public function __construct($message, array $context = array(), $code = 0, \Exception $previous = null)
{
parent::__construct($this->interpolate($message, $context), $code, $previous);
}
Expand Down
1 change: 0 additions & 1 deletion src/Generics/Util/UrlParser.php
Expand Up @@ -7,7 +7,6 @@
*/
namespace Generics\Util;

use Generics\Socket\Endpoint;
use Generics\Socket\InvalidUrlException;
use Generics\Socket\Url;

Expand Down
1 change: 0 additions & 1 deletion tests/logger-tests/SimpleLoggerTest.php
Expand Up @@ -3,7 +3,6 @@

use Generics\Logger\SimpleLogger;
use Generics\Streams\FileInputStream;
use Generics\GenericsException;

class SimpleLoggerTest extends \PHPUnit_Framework_TestCase
{
Expand Down
4 changes: 1 addition & 3 deletions tests/socket-tests/ServerSocketTest.php
Expand Up @@ -2,10 +2,8 @@

namespace Generics\Tests;

use Generics\Socket\Socket;
use Generics\Socket\Endpoint;
use Generics\Socket\ServerSocket;
use Generics\Socket\ServiceCallback;

class ServerSocketTest extends \PHPUnit_Framework_TestCase
{
Expand All @@ -14,7 +12,7 @@ public function testServerSocket()
{
$serverEndpoint = new Endpoint('127.0.0.1', 5555);
new ServerSocket($serverEndpoint);

// currently we are not able to test a server socket using phpunit... :-(
// $server->serve( new TestServiceCallback( $serverEndpoint ) );
}
Expand Down
4 changes: 2 additions & 2 deletions tests/stream-tests/FileInputStreamTest.php
Expand Up @@ -52,7 +52,7 @@ public function testSimple()
*/
public function testNonExisting()
{
$fis = new FileInputStream("non-existing-file.ext");
new FileInputStream("non-existing-file.ext");
}

/**
Expand All @@ -67,7 +67,7 @@ public function testNoAccess()
$fis = new FileOutputStream($this->fileName);
$fis->lock();

$fis2 = new FileInputStream($this->fileName);
new FileInputStream($this->fileName);
}

public function testLockUnlock()
Expand Down

0 comments on commit fafb698

Please sign in to comment.