Skip to content

Commit

Permalink
Fix null in dtos
Browse files Browse the repository at this point in the history
  • Loading branch information
marekskopal committed Nov 24, 2024
1 parent f0ef6fa commit 3f3845f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/Dto/Fundamentals/CashFlow.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static function fromJson(string $json): self
* },
* end_cash_position: int,
* income_tax_paid: int,
* interest_paid: int,
* interest_paid: int|null,
* free_cash_flow: int,
* }>
* } $responseContents
Expand Down Expand Up @@ -113,7 +113,7 @@ public static function fromJson(string $json): self
* },
* end_cash_position: int,
* income_tax_paid: int,
* interest_paid: int,
* interest_paid: int|null,
* free_cash_flow: int,
* }>
* } $data
Expand Down
4 changes: 2 additions & 2 deletions src/Dto/Fundamentals/CashFlowCashFlow.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function __construct(
public CashFlowFinancingActivities $financingActivities,
public int $endCashPosition,
public int $incomeTaxPaid,
public int $interestPaid,
public ?int $interestPaid,
public int $freeCashFlow,
) {
}
Expand Down Expand Up @@ -55,7 +55,7 @@ public function __construct(
* },
* end_cash_position: int,
* income_tax_paid: int,
* interest_paid: int,
* interest_paid: int|null,
* free_cash_flow: int,
* } $data
*/
Expand Down
16 changes: 8 additions & 8 deletions src/Dto/Fundamentals/IncomeStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public static function fromJson(string $json): self
* pretax_income: int,
* income_tax: int,
* net_income: int,
* eps_basic: float,
* eps_diluted: float,
* basic_shares_outstanding: int,
* diluted_shares_outstanding: int,
* eps_basic: float|null,
* eps_diluted: float|null,
* basic_shares_outstanding: int|null,
* diluted_shares_outstanding: int|null,
* ebitda: int,
* net_income_continuous_operations: int|null,
* minority_interests: int|null,
Expand Down Expand Up @@ -89,10 +89,10 @@ public static function fromJson(string $json): self
* pretax_income: int,
* income_tax: int,
* net_income: int,
* eps_basic: float,
* eps_diluted: float,
* basic_shares_outstanding: int,
* diluted_shares_outstanding: int,
* eps_basic: float|null,
* eps_diluted: float|null,
* basic_shares_outstanding: int|null,
* diluted_shares_outstanding: int|null,
* ebitda: int,
* net_income_continuous_operations: int|null,
* minority_interests: int|null,
Expand Down
16 changes: 8 additions & 8 deletions src/Dto/Fundamentals/IncomeStatementIncomeStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public function __construct(
public int $pretaxIncome,
public int $incomeTax,
public int $netIncome,
public float $epsBasic,
public float $epsDiluted,
public int $basicSharesOutstanding,
public int $dilutedSharesOutstanding,
public ?float $epsBasic,
public ?float $epsDiluted,
public ?int $basicSharesOutstanding,
public ?int $dilutedSharesOutstanding,
public int $ebitda,
public ?int $netIncomeContinuousOperations,
public ?int $minorityInterests,
Expand Down Expand Up @@ -53,10 +53,10 @@ public function __construct(
* pretax_income: int,
* income_tax: int,
* net_income: int,
* eps_basic: float,
* eps_diluted: float,
* basic_shares_outstanding: int,
* diluted_shares_outstanding: int,
* eps_basic: float|null,
* eps_diluted: float|null,
* basic_shares_outstanding: int|null,
* diluted_shares_outstanding: int|null,
* ebitda: int,
* net_income_continuous_operations: int|null,
* minority_interests: int|null,
Expand Down
6 changes: 3 additions & 3 deletions src/Dto/Fundamentals/IncomeStatementNonOperatingInterest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

readonly class IncomeStatementNonOperatingInterest
{
public function __construct(public int $income, public int $expense,)
public function __construct(public ?int $income, public ?int $expense,)
{
}

/**
* @param array{
* income: int,
* expense: int,
* income: int|null,
* expense: int|null,
* } $data
*/
public static function fromArray(array $data): self
Expand Down

0 comments on commit 3f3845f

Please sign in to comment.