Skip to content

Commit

Permalink
private
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaloalonsod committed Oct 27, 2018
1 parent e4f3a88 commit 6f96bfc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Controller/AfipController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@
*/
class AfipController
{
private $project_dir;
private $afip_parameters;
private $afip;

public function __construct($afip_parameters, $project_dir)
{
$this->parseParameters($afip_parameters, $project_dir);
$this->project_dir = $project_dir;
$this->parseParameters($afip_parameters);

if ($this->afip_parameters) {
$this->afip = new Afip($this->afip_parameters);
}
}

private function parseParameters($afip_parameters, $project_dir)
private function parseParameters($afip_parameters)
{
if ($afip_parameters['CUIT'] > 0) {
$afip_parameters['res_folder'] = $project_dir."/".$afip_parameters['res_folder'];
$afip_parameters['ta_folder'] = $project_dir."/".$afip_parameters['ta_folder'];
$afip_parameters['res_folder'] = $this->project_dir."/".$afip_parameters['res_folder'];
$afip_parameters['ta_folder'] = $this->project_dir."/".$afip_parameters['ta_folder'];
} else {
$afip_parameters = null;
}
Expand Down

0 comments on commit 6f96bfc

Please sign in to comment.