File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -215,6 +215,13 @@ public function create(array $data = []): ?AbstractModel
215215 foreach (['flatrate ' , 'rent ' , 'buy ' ] as $ providerType ) {
216216 $ typeProviders = new GenericCollection ();
217217 foreach ($ country_watch_data [$ providerType ] ?? [] as $ providerData ) {
218+ if (isset ($ providerData ['provider_id ' ])) {
219+ $ providerData ['id ' ] = $ providerData ['provider_id ' ];
220+ }
221+ if (isset ($ providerData ['provider_name ' ])) {
222+ $ providerData ['name ' ] = $ providerData ['provider_name ' ];
223+ }
224+
218225 $ providerData ['iso_3166_1 ' ] = $ iso_31661 ;
219226 $ providerData ['type ' ] = $ providerType ;
220227 $ typeProviders ->add (null , $ this ->hydrate (new Watch \Provider (), $ providerData ));
Original file line number Diff line number Diff line change @@ -253,6 +253,13 @@ public function create(array $data = []): ?AbstractModel
253253 foreach (['flatrate ' , 'rent ' , 'buy ' ] as $ providerType ) {
254254 $ typeProviders = new GenericCollection ();
255255 foreach ($ country_watch_data [$ providerType ] ?? [] as $ providerData ) {
256+ if (isset ($ providerData ['provider_id ' ])) {
257+ $ providerData ['id ' ] = $ providerData ['provider_id ' ];
258+ }
259+ if (isset ($ providerData ['provider_name ' ])) {
260+ $ providerData ['name ' ] = $ providerData ['provider_name ' ];
261+ }
262+
256263 $ providerData ['iso_3166_1 ' ] = $ iso_31661 ;
257264 $ providerData ['type ' ] = $ providerType ;
258265 $ typeProviders ->add (null , $ this ->hydrate (new Watch \Provider (), $ providerData ));
Original file line number Diff line number Diff line change @@ -25,15 +25,15 @@ class Provider extends AbstractModel implements CountryFilter
2525{
2626 public static $ properties = [
2727 'iso_3166_1 ' ,
28- 'provider_id ' ,
29- 'provider_name ' ,
28+ 'id ' ,
29+ 'name ' ,
3030 'logo_path ' ,
3131 'display_priority ' ,
3232 'type '
3333 ];
3434 private $ iso31661 ;
35- private $ providerID ;
36- private $ providerName ;
35+ private $ id ;
36+ private $ name ;
3737 private $ logoPath ;
3838 private $ displayPriority ;
3939 private $ type ;
@@ -60,37 +60,37 @@ public function setIso31661($iso31661)
6060 /**
6161 * @return int|null
6262 */
63- public function getProviderID ()
63+ public function getID ()
6464 {
65- return $ this ->providerID ;
65+ return $ this ->id ;
6666 }
6767
6868 /**
69- * @param int|null $providerID
69+ * @param int|null $ID
7070 * @return $this
7171 */
72- public function setProviderID ( $ providerID )
72+ public function setID ( $ id )
7373 {
74- $ this ->providerID = $ providerID ;
74+ $ this ->id = $ id ;
7575
7676 return $ this ;
7777 }
7878
7979 /**
8080 * @return string|null
8181 */
82- public function getProviderName ()
82+ public function getName ()
8383 {
84- return $ this ->providerName ;
84+ return $ this ->Name ;
8585 }
8686
8787 /**
88- * @param string|null $providerName
88+ * @param string|null $Name
8989 * @return $this
9090 */
91- public function setProviderName ( $ providerName )
91+ public function setName ( $ name )
9292 {
93- $ this ->providerName = $ providerName ;
93+ $ this ->name = $ name ;
9494
9595 return $ this ;
9696 }
You can’t perform that action at this time.
0 commit comments