Skip to content

Commit

Permalink
[EdfPrices Bridge] lint
Browse files Browse the repository at this point in the history
  • Loading branch information
floviolleau committed Dec 16, 2024
1 parent 54be2e8 commit 7caff93
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bridges/EdfPricesBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private function base(simple_html_dom $html, string $contractUri, int $power): v
->nextSibling()
->nextSibling()
->nextSibling();

$prices = $tablePrices->find('.table--stripped tbody tr');
// last element is useless because part of another table
array_pop($prices);
Expand Down Expand Up @@ -124,15 +124,15 @@ private function hchp(simple_html_dom $html, string $contractUri, int $power): v
->nextSibling()
->nextSibling()
->nextSibling();

$prices = $tablePrices->find('.table--stripped tbody tr');
// last element is useless because part of another table
array_pop($prices);

// price per kWh is same for all powers
if ($prices && count($prices) === 8) {
$values = ['HC', 'HP'];
foreach($values as $key => $value) {
foreach ($values as $key => $value) {
$i++;
$item = [];

Expand Down Expand Up @@ -162,15 +162,15 @@ private function ejp(simple_html_dom $html, string $contractUri, int $power): vo
->nextSibling()
->nextSibling()
->nextSibling();

$prices = $tablePrices->find('.table--stripped tbody tr');
// last element is useless because part of another table
array_pop($prices);

// price per kWh is same for all powers
if ($prices && count($prices) === 5) {
$values = ['Non EJP', 'EJP'];
foreach($values as $key => $value) {
foreach ($values as $key => $value) {
$i++;
$item = [];

Expand Down

0 comments on commit 7caff93

Please sign in to comment.