Passed
Push — master ( 5fe124...a442e8 )
by Nicholas
01:50
created
src/Services/Vehicle.php 1 patch
Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -3,121 +3,121 @@
 block discarded – undo
3 3
 namespace Nickcheek\Atdconnect\Services;
4 4
 
5 5
 class Vehicle {
6
-	use \Nickcheek\Atdconnect\Traits\ApiTrait;
6
+        use \Nickcheek\Atdconnect\Traits\ApiTrait;
7 7
 	
8
-	private $location;
9
-	private $wsdl;
8
+        private $location;
9
+        private $wsdl;
10 10
 		
11
-	public $vin;
11
+        public $vin;
12 12
 	
13 13
 
14
-	public function __construct()
15
-	{
16
-	    $config = include(realpath(dirname(__FILE__) . '/../config/config.php'));
17
-	    $this->location = $config->location;
18
-		$this->wsdl = 'http://testws.atdconnect.com/ws/3_4/fitments.wsdl';
14
+        public function __construct()
15
+        {
16
+                $config = include(realpath(dirname(__FILE__) . '/../config/config.php'));
17
+                $this->location = $config->location;
18
+                $this->wsdl = 'http://testws.atdconnect.com/ws/3_4/fitments.wsdl';
19 19
 		
20
-	}
20
+        }
21 21
 	
22
-	//************************************************
23
-    //               Vehicle Service
24
-    //************************************************
25
-    public static function countVIN(string $vin): self
26
-    {
27
-    	return new self();	
28
-    }
22
+        //************************************************
23
+        //               Vehicle Service
24
+        //************************************************
25
+        public static function countVIN(string $vin): self
26
+        {
27
+                return new self();	
28
+        }
29 29
     
30
-    public  function getVehicleYear()
31
-    {
30
+        public  function getVehicleYear()
31
+        {
32 32
         return $this->apiCall('getVehicleYear','',$this->wsdl);
33
-    }
33
+        }
34 34
     
35
-    public  function getVehicleMake($year)
36
-    {	
37
-    	try { if (empty($year)) { throw new \Exception("A Vehicle Year Has Not Been Set."); } 
38
-    		return $this->apiCall('getVehicleMake',['vehicle' => ['year'=>$year]],$this->wsdl);
35
+        public  function getVehicleMake($year)
36
+        {	
37
+                try { if (empty($year)) { throw new \Exception("A Vehicle Year Has Not Been Set."); } 
38
+                        return $this->apiCall('getVehicleMake',['vehicle' => ['year'=>$year]],$this->wsdl);
39 39
         } catch (Exception $e) { return $e; }
40
-    }
40
+        }
41 41
 
42
-    public  function getVehicleModel($year,$make)
43
-    {	
42
+        public  function getVehicleModel($year,$make)
43
+        {	
44 44
     	
45
-    	try {if (empty($year)||empty($make)) {throw new \Exception("A Vehicle Year OR Make Has Not Been Set.");}
45
+                try {if (empty($year)||empty($make)) {throw new \Exception("A Vehicle Year OR Make Has Not Been Set.");}
46 46
     	
47
-        	return $this->apiCall('getVehicleModel',['vehicle' => ['year'=>$year,'make'=>$make]],$this->wsdl);
47
+                return $this->apiCall('getVehicleModel',['vehicle' => ['year'=>$year,'make'=>$make]],$this->wsdl);
48 48
         
49 49
         } catch (Exception $e) {return $e;}
50
-    }
50
+        }
51 51
 
52 52
     
53
-    public  function getVehicleTrim($year,$make,$model)
54
-    {
55
-    	try {if (empty($year)||empty($make)||empty($model)) {throw new \Exception("A Vehicle Year, Make OR Model Has Not Been Set.");}
53
+        public  function getVehicleTrim($year,$make,$model)
54
+        {
55
+                try {if (empty($year)||empty($make)||empty($model)) {throw new \Exception("A Vehicle Year, Make OR Model Has Not Been Set.");}
56 56
     	
57
-        	return $this->apiCall('getVehicleTrim',['vehicle' => ['year'=>$year,'make'=>$make,'model'=>$model]],$this->wsdl);
57
+                return $this->apiCall('getVehicleTrim',['vehicle' => ['year'=>$year,'make'=>$make,'model'=>$model]],$this->wsdl);
58 58
         
59 59
         } catch (Exception $e) {return $e;}
60
-    }
60
+        }
61 61
     
62
-    public function getVehicleTrimOption($year,$make,$model,$trim)
63
-    {
64
-    	try {if (empty($year)||empty($make)||empty($model)||empty($trim)) {throw new \Exception("A Vehicle Year, Make OR Model Has Not Been Set.");}
62
+        public function getVehicleTrimOption($year,$make,$model,$trim)
63
+        {
64
+                try {if (empty($year)||empty($make)||empty($model)||empty($trim)) {throw new \Exception("A Vehicle Year, Make OR Model Has Not Been Set.");}
65 65
     	
66
-	    	return $this->apiCall('getVehicleTrimOption',['vehicle' => ['year'=>$year,'make'=>$make,'model'=>$model,'trim'=>$trim]],$this->wsdl);
66
+                        return $this->apiCall('getVehicleTrimOption',['vehicle' => ['year'=>$year,'make'=>$make,'model'=>$model,'trim'=>$trim]],$this->wsdl);
67 67
 	    	
68
-	    } catch (Exception $e) {return $e;}
68
+                } catch (Exception $e) {return $e;}
69 69
 	    
70
-    }
70
+        }
71 71
     
72
-    public function getVehiclePlusSizes($year,$make,$model,$trim)
73
-    {
74
-    	try {if (empty($year)||empty($make)||empty($model)||empty($trim)) {throw new \Exception("A Vehicle Year, Make, Model, or Trim Has Not Been Set.");}
72
+        public function getVehiclePlusSizes($year,$make,$model,$trim)
73
+        {
74
+                try {if (empty($year)||empty($make)||empty($model)||empty($trim)) {throw new \Exception("A Vehicle Year, Make, Model, or Trim Has Not Been Set.");}
75 75
     	
76
-	    	return $this->apiCall('getVehiclePlusSizes',['vehicle' => ['year'=>$year,'make'=>$make,'model'=>$model,'trim'=>$trim]],$this->wsdl);
76
+                        return $this->apiCall('getVehiclePlusSizes',['vehicle' => ['year'=>$year,'make'=>$make,'model'=>$model,'trim'=>$trim]],$this->wsdl);
77 77
 	    	
78
-	    } catch (Exception $e) {return $e;}
78
+                } catch (Exception $e) {return $e;}
79 79
 	    
80
-    }
80
+        }
81 81
     
82
-    public function getProductByFitment($year,$make,$model,$trim,$option)
83
-    {
84
-	    try {if (empty($year)||empty($make)||empty($model)||empty($trim)||empty($option)) {throw new \Exception("A Vehicle value required has not been set.");}
82
+        public function getProductByFitment($year,$make,$model,$trim,$option)
83
+        {
84
+                try {if (empty($year)||empty($make)||empty($model)||empty($trim)||empty($option)) {throw new \Exception("A Vehicle value required has not been set.");}
85 85
     	
86
-	    	return $this->apiCall('getProductByFitment',['locationNumber'=>$this->location,'vehicle' => ['year'=>$year,'make'=>$make,'model'=>$model,'trim'=>$trim,'trimOption'=>$option]],$this->wsdl);
86
+                        return $this->apiCall('getProductByFitment',['locationNumber'=>$this->location,'vehicle' => ['year'=>$year,'make'=>$make,'model'=>$model,'trim'=>$trim,'trimOption'=>$option]],$this->wsdl);
87 87
 	    	
88
-	    } catch (Exception $e) {return $e;}
88
+                } catch (Exception $e) {return $e;}
89 89
 
90
-    }
90
+        }
91 91
     
92
-    public function getVehicleByVehicleId($vID)
93
-    {
94
-	    try {if (empty($vID)) {throw new \Exception("A Vehicle value required has not been set.");}
92
+        public function getVehicleByVehicleId($vID)
93
+        {
94
+                try {if (empty($vID)) {throw new \Exception("A Vehicle value required has not been set.");}
95 95
     	
96
-	    	return $this->apiCall('getProductByFitment',['locationNumber'=>$this->location,'vehicle' => ['vehicleId'=>$vID]],$this->wsdl);
96
+                        return $this->apiCall('getProductByFitment',['locationNumber'=>$this->location,'vehicle' => ['vehicleId'=>$vID]],$this->wsdl);
97 97
 	    	
98
-	    } catch (Exception $e) {return $e;}
98
+                } catch (Exception $e) {return $e;}
99 99
 
100
-    }
100
+        }
101 101
     
102
-    public function getVehicleByLicensePlate($num,$state)
103
-    {
104
-	    try {if (empty($num)||empty($state)) {throw new \Exception("A Vehicle value required has not been set.");}
102
+        public function getVehicleByLicensePlate($num,$state)
103
+        {
104
+                try {if (empty($num)||empty($state)) {throw new \Exception("A Vehicle value required has not been set.");}
105 105
     	
106
-	    	return $this->apiCall('getVehicleByLicensePlate',['licensePlateNumber'=>$num,'licensePlateState' => $state],$this->wsdl);
106
+                        return $this->apiCall('getVehicleByLicensePlate',['licensePlateNumber'=>$num,'licensePlateState' => $state],$this->wsdl);
107 107
 	    	
108
-	    } catch (Exception $e) {return $e;}
108
+                } catch (Exception $e) {return $e;}
109 109
 
110
-    }
110
+        }
111 111
 	
112
-	public function getVehicleByVIN($vin)
113
-    {
114
-	    try {if (empty($vin)) {throw new \Exception("A Vehicle value required has not been set.");}
112
+        public function getVehicleByVIN($vin)
113
+        {
114
+                try {if (empty($vin)) {throw new \Exception("A Vehicle value required has not been set.");}
115 115
     	
116
-	    	return $this->apiCall('getVehicleByVIN',['VIN'=>$vin],$this->wsdl);
116
+                        return $this->apiCall('getVehicleByVIN',['VIN'=>$vin],$this->wsdl);
117 117
 	    	
118
-	    } catch (Exception $e) {return $e;}
118
+                } catch (Exception $e) {return $e;}
119 119
 
120
-    }
120
+        }
121 121
      
122 122
 
123 123
 }
124 124
\ No newline at end of file
Please login to merge, or discard this patch.