Fixed magic strings in Dao layer

This commit is contained in:
Marcin Kurczewski 2014-09-14 12:09:22 +02:00
parent 2d9865f1d3
commit d450f5794e
5 changed files with 5 additions and 10 deletions

View file

@ -1,6 +1,6 @@
{ {
"require": { "require": {
"mnapoli/php-di": "~4.0", "mnapoli/php-di": "~4.0",
"phpcheckstyle/phpcheckstyle": "~0.14" "jbrooksuk/phpcheckstyle": "dev-master"
} }
} }

View file

@ -71,12 +71,7 @@ module.exports = function(grunt) {
shell: { shell: {
phpcheckstyle: { phpcheckstyle: {
options: { command: 'php vendor/jbrooksuk/phpcheckstyle/run.php --config <%= phpCheckStyleConfigPath %> --src <%= phpSourcesDir %> --exclude di.php --format console',
execOptions: {
cwd: path.join(path.resolve(), 'vendor/phpcheckstyle/phpcheckstyle'),
},
},
command: 'php run.php --config <%= phpCheckStyleConfigPath %> --src <%= phpSourcesDir %> --exclude di.php --format console',
}, },
tests: { tests: {

View file

@ -5,6 +5,6 @@ final class PostDao extends AbstractDao implements ICrudDao
{ {
public function __construct(\Szurubooru\DatabaseConnection $databaseConnection) public function __construct(\Szurubooru\DatabaseConnection $databaseConnection)
{ {
parent::__construct($databaseConnection, 'posts', '\Szurubooru\Entities\Post'); parent::__construct($databaseConnection, 'posts', \Szurubooru\Entities\Post::class);
} }
} }

View file

@ -5,7 +5,7 @@ class TokenDao extends AbstractDao
{ {
public function __construct(\Szurubooru\DatabaseConnection $databaseConnection) public function __construct(\Szurubooru\DatabaseConnection $databaseConnection)
{ {
parent::__construct($databaseConnection, 'tokens', '\Szurubooru\Entities\Token'); parent::__construct($databaseConnection, 'tokens', \Szurubooru\Entities\Token::class);
} }
public function findByName($tokenName) public function findByName($tokenName)

View file

@ -6,7 +6,7 @@ class UserDao extends AbstractDao implements ICrudDao
public function __construct( public function __construct(
\Szurubooru\DatabaseConnection $databaseConnection) \Szurubooru\DatabaseConnection $databaseConnection)
{ {
parent::__construct($databaseConnection, 'users', '\Szurubooru\Entities\User'); parent::__construct($databaseConnection, 'users', \Szurubooru\Entities\User::class);
} }
public function findByName($userName) public function findByName($userName)