Skip to content

Commit

Permalink
correct cs
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoitLeveque committed Aug 24, 2024
1 parent 7236b29 commit 64dca55
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Campaign/Format/FormatFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function createFromCode($code)
{
$class = '\App\Campaign\Format\Formats\Format'.$code;
if (!class_exists($class)) {
throw new \InvalidArgumentException(sprintf('Code %s invalid', $code));
throw new \InvalidArgumentException(\sprintf('Code %s invalid', $code));
}

return new $class();
Expand Down
2 changes: 1 addition & 1 deletion src/Enums/EnumsCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(iterable $enums = [])
public function getEnums($alias): EnumsInterface
{
if (!isset($this->enums[$alias])) {
throw new \InvalidArgumentException(sprintf('Enums %s inconnu', $alias));
throw new \InvalidArgumentException(\sprintf('Enums %s inconnu', $alias));
}

return $this->enums[$alias];
Expand Down
2 changes: 1 addition & 1 deletion src/Filter/DepartmentFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function getChoices()
$choices[self::ALL_BUT_PARIS] = 'Tous sauf île-de-France';

foreach (new Departments() as $number => $label) {
$choices[$number] = sprintf('%s - %s', $number, $label);
$choices[$number] = \sprintf('%s - %s', $number, $label);
}

return $choices;
Expand Down
2 changes: 1 addition & 1 deletion src/Filter/DistrictFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected function getChoices()
$choices = [];

foreach (new Regions() as $number => $label) {
$choices[$number] = sprintf('%s - %s', $number, $label->getLabel());
$choices[$number] = \sprintf('%s - %s', $number, $label->getLabel());
}

return $choices;
Expand Down
4 changes: 2 additions & 2 deletions src/Query/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(Connection $connection)
*/
public function createTemporaryTable($tablename)
{
$sql = sprintf('CREATE TEMPORARY TABLE `%s` %s', $tablename, $this->getSQL());
$sql = \sprintf('CREATE TEMPORARY TABLE `%s` %s', $tablename, $this->getSQL());

$this->connection->executeStatement($sql, $this->getParameters(), $this->paramTypes);
}
Expand All @@ -40,7 +40,7 @@ public function createTemporaryTable($tablename)
*/
public function dropTemporaryTable($tablename)
{
$sql = sprintf('DROP TEMPORARY TABLE IF EXISTS `%s`', $tablename);
$sql = \sprintf('DROP TEMPORARY TABLE IF EXISTS `%s`', $tablename);

$this->connection->executeStatement($sql);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Report/SalaryReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class SalaryReport extends AbstractReport
public function execute()
{
$this->queryBuilder->select('count(distinct response.id) as nbResponse');
$this->queryBuilder->addSelect(sprintf('ROUND(response.grossAnnualSalary / %s) as salarySlice', self::SLICE));
$this->queryBuilder->addSelect(\sprintf('ROUND(response.grossAnnualSalary / %s) as salarySlice', self::SLICE));
$this->queryBuilder->having('nbResponse >= :minResult');
$this->queryBuilder->setParameter('minResult', $this->minResult);
$this->queryBuilder->addGroupBy('salarySlice');
Expand Down
2 changes: 1 addition & 1 deletion src/ReportManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function createBaseQueryBuilder()

$this->filterCollection->buildQuery($filterTableBuilder, $data);

$temporaryTablename = sprintf('tmp_%s', md5(serialize($data)));
$temporaryTablename = \sprintf('tmp_%s', md5(serialize($data)));
$filterTableBuilder->dropTemporaryTable($temporaryTablename);
$filterTableBuilder->createTemporaryTable($temporaryTablename);

Expand Down

0 comments on commit 64dca55

Please sign in to comment.