Fixed magic strings in Dao layer
This commit is contained in:
parent
2d9865f1d3
commit
d450f5794e
5 changed files with 5 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"require": {
|
"require": {
|
||||||
"mnapoli/php-di": "~4.0",
|
"mnapoli/php-di": "~4.0",
|
||||||
"phpcheckstyle/phpcheckstyle": "~0.14"
|
"jbrooksuk/phpcheckstyle": "dev-master"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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: {
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue