File tree Expand file tree Collapse file tree 4 files changed +158
-1
lines changed Expand file tree Collapse file tree 4 files changed +158
-1
lines changed Original file line number Diff line number Diff line change 1+ <?php 
2+ 
3+ declare (strict_types=1 );
4+ 
5+ namespace  Scn \EvalancheSoapStruct \Struct \CouponList ;
6+ 
7+ /** 
8+  * Represents an Evalanche CouponList profile coupon 
9+  */ 
10+ class  ProfileCoupon implements  ProfileCouponInterface
11+ {
12+ 	/** @var int internal id (readonly) */ 
13+ 	public  $ id0 ;
14+ 
15+ 	/** @var string The actual coupon code */ 
16+ 	public  $ code
17+ 
18+ 	/** @var int The associated profile id */ 
19+ 	public  $ profileId
20+ 
21+ 	/** @var int The creation date */ 
22+ 	public  $ creationDate
23+ 
24+ 	/** @var int The expiration date (readonly) */ 
25+ 	public  $ validTo0 ;
26+ 
27+ 	public  function  __construct (
28+         string  $ code'' ,
29+         int  $ profileId0 ,
30+         int  $ creationDate0 
31+     ) {
32+         $ this code  = $ code
33+         $ this profileId  = $ profileId
34+         $ this creationDate  = $ creationDate
35+     }
36+ 
37+     public  function  getId (): int 
38+     {
39+         return  $ this id ;
40+     }
41+ 
42+     public  function  getCode (): string 
43+     {
44+         return  $ this code ;
45+     }
46+ 
47+     public  function  setCode (string  $ codeProfileCouponInterface 
48+     {
49+         $ this code  = $ code
50+ 
51+         return  $ this 
52+     }
53+ 
54+     public  function  getProfileId (): int 
55+     {
56+         return  $ this profileId ;
57+     }
58+ 
59+     public  function  setProfileId (int  $ profileIdProfileCouponInterface 
60+     {
61+         $ this profileId  = $ profileId
62+ 
63+         return  $ this 
64+     }
65+ 
66+     public  function  getCreationDate (): int 
67+     {
68+         return  $ this creationDate ;
69+     }
70+ 
71+     public  function  setCreationDate (int  $ creationDateProfileCouponInterface 
72+     {
73+         $ this creationDate  = $ creationDate
74+ 
75+         return  $ this 
76+     }
77+ 
78+     public  function  getValidTo (): int 
79+     {
80+         return  $ this validTo ;
81+     }
82+ }
Original file line number Diff line number Diff line change 1+ <?php 
2+ 
3+ namespace  Scn \EvalancheSoapStruct \Struct \CouponList ;
4+ 
5+ use  Scn \EvalancheSoapStruct \Struct \StructInterface ;
6+ 
7+ /** 
8+  * Represents an Evalanche CouponList profile coupon 
9+  */ 
10+ interface  ProfileCouponInterface extends  StructInterface
11+ {
12+     public  function  getId (): int ;
13+ 
14+     public  function  getCode (): string ;
15+ 
16+     public  function  setCode (string  $ codeProfileCouponInterface 
17+ 
18+     public  function  getProfileId (): int ;
19+ 
20+     public  function  setProfileId (int  $ profileIdProfileCouponInterface 
21+ 
22+     public  function  getCreationDate (): int ;
23+ 
24+     public  function  setCreationDate (int  $ creationDateProfileCouponInterface 
25+ 
26+     public  function  getValidTo (): int ;
27+ }
Original file line number Diff line number Diff line change 1+ <?php 
2+ 
3+ declare (strict_types=1 );
4+ 
5+ namespace  Scn \EvalancheSoapStruct \Struct \CouponList ;
6+ 
7+ use  Scn \EvalancheSoapStruct \GenericSetterGetterTestCase ;
8+ 
9+ class  ProfileCouponTest extends  GenericSetterGetterTestCase
10+ {
11+     /** @var ProfileCoupon|null */ 
12+     private  $ subject
13+ 
14+     public  function  setUp (): void 
15+     {
16+         $ this subject  = new  ProfileCoupon ();
17+     }
18+ 
19+     public  function  methodDataProvider (): array 
20+     {
21+         return  [
22+             ['Code ' , 'string ' ],
23+             ['ProfileId ' , 'int ' ],
24+             ['CreationDAte ' , 'int ' ],
25+         ];
26+     }
27+ 
28+     protected  function  getSubject ()
29+     {
30+         return  $ this subject ;
31+     }
32+ 
33+     public  function  testGetValidToReturnsValue (): void 
34+     {
35+         $ this assertSame (
36+             0 ,
37+             $ this subject ->getValidTo ()
38+         );
39+     }
40+     
41+     public  function  testGetIdReturnsValue (): void 
42+     {
43+         $ this assertSame (
44+             0 ,
45+             $ this subject ->getId ()
46+         );
47+     }
48+ }
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public function methodDataProvider(): array
2727            ['TemplateLandingpage ' , 'string ' ]
2828        ];
2929    }
30-      
30+ 
3131    protected  function  getSubject ()
3232    {
3333        return  $ this subject ;
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments