Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Commit

Permalink
style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kunicmarko20 committed Oct 28, 2017
1 parent c1ec6c3 commit df9245e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Repository/ConfigurationRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function findAll() : array

public function findOneByName(string $name)
{
$queryBuilder = $this->entityManager->createQueryBuilder()
$queryBuilder = $this->entityManager->createQueryBuilder()
->select('c.value')
->from(AbstractConfigurationType::class, 'c')
->where('c.name = :name')
Expand Down
2 changes: 1 addition & 1 deletion SimpleConfigurationBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace KunicMarko\SimpleConfigurationBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;
use KunicMarko\SimpleConfigurationBundle\DependencyInjection\Compiler\TwigCompilerPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

class SimpleConfigurationBundle extends Bundle
{
Expand Down
14 changes: 7 additions & 7 deletions Tests/Repository/MockConfigurationRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\QueryBuilder;
use KunicMarko\SimpleConfigurationBundle\Repository\ConfigurationRepository;
use \Mockery;
use Mockery;

class MockConfigurationRepository
{
Expand Down Expand Up @@ -34,8 +34,8 @@ private static function mockGetAllEntityManager($returnValue)
->andReturn($returnValue);

$queryBuilder->shouldReceive([
'select' => $queryBuilder,
'from' => $queryBuilder,
'select' => $queryBuilder,
'from' => $queryBuilder,
'getQuery' => $query
]);

Expand All @@ -55,11 +55,11 @@ private static function mockGetValueForEntityManager($returnValue)
->andReturn($returnValue);

$queryBuilder->shouldReceive([
'select' => $queryBuilder,
'from' => $queryBuilder,
'where' => $queryBuilder,
'select' => $queryBuilder,
'from' => $queryBuilder,
'where' => $queryBuilder,
'setParameter' => $queryBuilder,
'getQuery' => $query
'getQuery' => $query
]);

$entityManager->shouldReceive('createQueryBuilder')
Expand Down
2 changes: 1 addition & 1 deletion Tests/SimpleConfigurationBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace KunicMarko\SimpleConfigurationBundle\Tests;

use KunicMarko\SimpleConfigurationBundle\SimpleConfigurationBundle;
use KunicMarko\SimpleConfigurationBundle\DependencyInjection\Compiler\TwigCompilerPass;
use KunicMarko\SimpleConfigurationBundle\SimpleConfigurationBundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

Expand Down
14 changes: 7 additions & 7 deletions Tests/Twig/ElapsedTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@ public function getDates()
return [
[
new \DateTime('now -5 minutes'),
'5 minutes ago'
'5 minutes ago',
],
[
new \DateTime('now - 1 hour'),
'1 hour ago'
'1 hour ago',
],
[
strtotime('-2 hours'),
'2 hours ago'
'2 hours ago',
],
[
strtotime('-24 hours'),
'1 day ago'
'1 day ago',
],
[
strtotime('-5 months'),
'5 months ago'
'5 months ago',
],
[
new \DateTime('now - 1 week'),
'1 week ago'
'1 week ago',
],
[
new \DateTime('now - 10 years'),
'10 years ago'
'10 years ago',
]
];
}
Expand Down
4 changes: 2 additions & 2 deletions Validator/Constraints/UniqueNameValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

use KunicMarko\SimpleConfigurationBundle\Entity\AbstractConfigurationType;
use KunicMarko\SimpleConfigurationBundle\Repository\ConfigurationRepository;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;

class UniqueNameValidator extends ConstraintValidator
{
Expand All @@ -18,7 +18,7 @@ public function __construct(ConfigurationRepository $configurationRepository)

/**
* @param AbstractConfigurationType $configuration
* @param Constraint $constraint
* @param Constraint $constraint
*/
public function validate($configuration, Constraint $constraint)
{
Expand Down

0 comments on commit df9245e

Please sign in to comment.