Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 40 additions & 39 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions examples/TSVtoSIE.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public function parseTransactions(string $value, Company $company, int $skipHead
if ($object === null) {
$object = (new DimensionObject($data['result_unit']))
->setDimension($dim)
->setName('Resultatenhet ' . $data['result_unit']); //We don't have this data, so just set it
->setName('Resultatenhet ' . $data['result_unit']); // We don't have this data, so just set it
$dim->addObject($object);
}

Expand All @@ -219,7 +219,7 @@ public function parseTransactions(string $value, Company $company, int $skipHead
if ($object === null) {
$object = (new DimensionObject($data['project']))
->setDimension($dim)
->setName('Projekt ' . $data['project']); //We don't have this data, so just set it
->setName('Projekt ' . $data['project']); // We don't have this data, so just set it
$dim->addObject($object);
}

Expand All @@ -246,7 +246,7 @@ public function parseTransactions(string $value, Company $company, int $skipHead
* Transaction data for current year
*/

//create company
// create company
$company = (new Company())->setCompanyName('Imported company name åäöÅÄÖ');
// load transaction data from TSV
$loader = new TSVLoader();
Expand Down
3 changes: 2 additions & 1 deletion examples/simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
)
;
// add the verification to the company
$company->getVerificationSeriesAll()[0]->addVerification($verification);
$company->getVerificationSeriesAll()[0]
->addVerification($verification);
// validate data, will throw Exception if invalid data
$company->validate();

Expand Down
11 changes: 0 additions & 11 deletions src/SIE/Data/Company.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ public function getTypeOfChartOfAccounts(): ?string
}

/**
* Add an account
*
* @throws DomainException
*/
public function addAccount(Account $account): self
Expand Down Expand Up @@ -139,8 +137,6 @@ public function getAccounts(): array
}

/**
* Add dimension
*
* @throws DomainException
*/
public function addDimension(Dimension $dimension): self
Expand Down Expand Up @@ -174,8 +170,6 @@ public function getDimensions(): array
}

/**
* Add verification series
*
* @throws DomainException
*/
public function addVerificationSeries(VerificationSeries $verificationSeries): self
Expand Down Expand Up @@ -217,9 +211,6 @@ public function getVerificationSeriesAll(): array
return $this->verificationSeries;
}

/**
* Add fiscal year
*/
public function addFiscalYear(FiscalYear $fiscalYear): self
{
$this->fiscalYears[] = $fiscalYear;
Expand All @@ -228,8 +219,6 @@ public function addFiscalYear(FiscalYear $fiscalYear): self
}

/**
* Get fiscal years
*
* @return FiscalYear[]
*/
public function getFiscalYears(): array
Expand Down
5 changes: 1 addition & 4 deletions src/SIE/Data/Dimension.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
final class Dimension
{
//FIXME Add support for custom dimensions (#DIM), id 20+ This means generating #DIM-fields for the SIE-export.
// FIXME Add support for custom dimensions (#DIM), id 20+ This means generating #DIM-fields for the SIE-export.

/**
* See 8.17 in "SIE_filformat_ver_4B_ENGLISH.pdf" "Reserved dimension numbers"
Expand Down Expand Up @@ -75,9 +75,6 @@ public function getId(): int
return $this->id;
}

/**
* Add object
*/
public function addObject(DimensionObject $object): self
{
$object->setDimension($this);
Expand Down
3 changes: 2 additions & 1 deletion src/SIE/Data/FiscalYear.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ public function setDateEnd(\DateTime $dateEnd): self
*/
public function addAccountBalance(AccountBalance $accountBalance): self
{
$id = $accountBalance->getAccount()->getId();
$id = $accountBalance->getAccount()
->getId();
if (isset($this->accountBalances[$id])) {
throw new DomainException('The balances for account id "' . $id . '" is already defined.');
}
Expand Down
3 changes: 0 additions & 3 deletions src/SIE/Exception/DomainException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@

namespace SIE\Exception;

/**
* @package SIE\Exception
*/
class DomainException extends \DomainException
{
}
Loading