Skip to content

Commit

Permalink
Merge pull request #5 from maxperei/fix/php-cs
Browse files Browse the repository at this point in the history
fix php-cs
  • Loading branch information
mi-lopez authored May 19, 2022
2 parents 8789b14 + 3cde2d2 commit bae291a
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/.idea
/vendor
.php_cs.cache
/composer.lock
.php-cs-fixer.cache
/composer.lock
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require-dev": {
"enlightn/security-checker": "^1.9",
"friendsofphp/php-cs-fixer": "^3.8",
"php-parallel-lint/php-parallel-lint": "^1.0",
"phpmd/phpmd": "^2.8",
"phpro/grumphp": "^1.1.0",
"phpspec/phpspec": "^7.2",
"phpstan/phpstan": "1.5.4",
"php-parallel-lint/php-parallel-lint": "^1.0",
"enlightn/security-checker": "^1.9",
"friendsofphp/php-cs-fixer": "^2.18"
"phpstan/phpstan": "1.5.4"
},
"config": {
"sort-packages": true,
"allow-plugins": {
"phpro/grumphp": true
}
Expand Down
2 changes: 1 addition & 1 deletion grumphp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ grumphp:
securitychecker_enlightn: ~
phpcsfixer2:
allow_risky: true
config: 'ruleset/.php_cs'
config: 'ruleset/.php-cs-fixer.php'
8 changes: 3 additions & 5 deletions ruleset/.php_cs → ruleset/.php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@
$config
->setRiskyAllowed(true)
->setRules([
'psr_autoloading' => true,
'@PSR1' => true,
'@PSR2' => true,
'psr0' => true,
'psr4' => true,
'ordered_imports' => true,
'no_extra_consecutive_blank_lines' => ['use'],
'no_extra_blank_lines' => true,
'php_unit_namespaced' => ['target' => '6.0'],
'php_unit_expectation' => true,

])
->setFinder($finder)
;

return $config;
return $config;
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ public function __construct(
Mailer $mailer,
TranslatorInterface $translator,
Environment $twig
)
{
) {
$this->configManager = $configManager;
$this->mailer = $mailer;
$this->translator = $translator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace Synolia\Bundle\StockAlertBundle\Entity\Repository;

use Oro\Bundle\ProductBundle\Entity\Product;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Oro\Bundle\ProductBundle\Entity\Product;

class StockAlertRepository extends ServiceEntityRepository
{
Expand Down
1 change: 0 additions & 1 deletion src/Synolia/Bundle/StockAlertBundle/Entity/StockAlert.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class StockAlert extends ExtendStockAlert implements
*/
protected $expirationDate;


public function getId(): int
{
return $this->id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ private function getExpirationDate(): DateTime
return (new DateTime())->add(new DateInterval('P3M'));
}


private function getStockAlert(Product $product, CustomerUser $user, Organization $organization)
{
$stockAlertRepository = $this->entityManager->getRepository(StockAlert::class);
Expand Down

0 comments on commit bae291a

Please sign in to comment.