Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierlacot committed Jan 18, 2021
1 parent 543a8c9 commit 6e9f921
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Command/GenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function execute(InputInterface $input, OutputInterface $output)
$dumper = new Dumper(__DIR__.'/../../generated/harvest-openapi.yaml');
$warnings = $dumper->dump($extractor->extract());

if (count($warnings) > 0) {
if (\count($warnings) > 0) {
$formatter = $this->getHelper('formatter');
$output->writeln($formatter->formatBlock($warnings, 'bg=yellow;fg=black', true));
}
Expand Down
6 changes: 3 additions & 3 deletions src/Dumper/Dumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ public function dump(array $data): array
'description' => 'The quantity of units to use in calculating the total_cost of the expense.',
'format' => 'int32',
],
]
]
],
],
];
$warnings = [];

Expand All @@ -121,7 +121,7 @@ public function dump(array $data): array
foreach ($override['properties'] as $propertyName => $propertyOverride) {
if (isset($data['definitions'][$definition])
&& isset($data['definitions'][$definition]['properties'][$propertyName])) {
$warnings[] = sprintf(
$warnings[] = sprintf(
'The property "%s" of the definition "%s" already exists and has been overriden.',
$propertyName,
$definition
Expand Down
6 changes: 4 additions & 2 deletions src/Extractor/Extractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ public function extract()
$this->buildPluralDefinitions();
$this->buildItemsTypes();

$this->paths = array_map(function($path) {
$this->paths = array_map(function ($path) {
ksort($path);
return $path; },

return $path;
},
$this->paths);
ksort($this->paths);

Expand Down

0 comments on commit 6e9f921

Please sign in to comment.