-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new data structure, update API to version 5, add more tests
- Loading branch information
Showing
20 changed files
with
687 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
language: php | ||
php: | ||
- 5.6 | ||
- 7.0 | ||
- 7.1 | ||
- 7.2 | ||
- 7.3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
require_once(__DIR__ . "/../vendor/autoload.php"); | ||
|
||
// Get data about more CIF | ||
$anaf = new \Itrack\Anaf\Client(); | ||
$anaf->addCif("14080700"); | ||
$anaf->addCif("RO16826034"); | ||
$companies = $anaf->get(); | ||
|
||
foreach ($companies as $company) { | ||
echo $company->getName(); | ||
echo $company->getCIF(); | ||
echo $company->getRegCom(); | ||
echo $company->getPhone(); | ||
echo $company->getAddress()->getCounty(); | ||
echo $company->getAddress()->getCounty(); | ||
echo $company->getAddress()->getStreet(); | ||
echo $company->getAddress()->getStreetNumber(); | ||
|
||
// ... etc | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
require_once(__DIR__ . "/../vendor/autoload.php"); | ||
|
||
// Get data about more CIF | ||
$anaf = new \Itrack\Anaf\Client(); | ||
$anaf->addCif("14080700"); | ||
$company = $anaf->first(); | ||
|
||
echo $company->getName(); | ||
echo $company->getCIF(); | ||
echo $company->getRegCom(); | ||
echo $company->getPhone(); | ||
echo $company->getAddress()->getCounty(); | ||
echo $company->getAddress()->getCounty(); | ||
echo $company->getAddress()->getStreet(); | ||
echo $company->getAddress()->getStreetNumber(); | ||
|
||
// ... etc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit bootstrap="tests/bootstrap.php" colors="true"> | ||
<testsuites> | ||
<testsuite name="Anaf Tests Suite"> | ||
<directory>tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist addUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">src/</directory> | ||
<exclude> | ||
<directory>./tests</directory> | ||
<directory>./vendor</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
</phpunit> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="tests/bootstrap.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage includeUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
<exclude> | ||
<directory>./tests</directory> | ||
<directory>./vendor</directory> | ||
</exclude> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="API Anaf Tests Suite"> | ||
<directory>./tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
Binary file not shown.
Oops, something went wrong.