Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lbs4-borrower-update
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SUBHH
Public
lbs4-borrower-update
Commits
71c572d1
Commit
71c572d1
authored
3 months ago
by
Maus, David
Browse files
Options
Downloads
Patches
Plain Diff
Fix Borrower and Membership classes
parent
3a256e2c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/php/Model/Borrower.php
+2
-2
2 additions, 2 deletions
src/main/php/Model/Borrower.php
src/main/php/Model/Membership.php
+0
-3
0 additions, 3 deletions
src/main/php/Model/Membership.php
with
2 additions
and
5 deletions
src/main/php/Model/Borrower.php
+
2
−
2
View file @
71c572d1
...
...
@@ -5,7 +5,6 @@ declare(strict_types=1);
namespace
SUBHH\LBS4\BorrowerUpdate\Model
;
use
DateTimeImmutable
;
use
SUBHH\LBS4\BorrowerUpdate\BorrowerUpdateAction
;
use
SplObjectStorage
;
final
class
Borrower
...
...
@@ -46,6 +45,7 @@ final class Borrower
public
function
__construct
(
string
$registrationNumber
)
{
$this
->
memberships
=
new
SplObjectStorage
();
$this
->
registrationNumber
=
new
StringField
(
'101'
,
$registrationNumber
);
}
...
...
@@ -188,7 +188,7 @@ final class Borrower
usort
(
$fields
,
'SUBHH\LBS4\BorrowerUpdate\Model\Field::compareTags'
);
foreach
(
$this
->
memberships
as
$membership
)
{
$fields
[]
=
new
StringField
(
'200'
,
$this
->
memberships
->
offsetGet
(
$membership
));
$fields
[]
=
new
StringField
(
'200'
,
$this
->
memberships
->
offsetGet
(
$membership
)
->
value
);
$fields
=
array_merge
(
$fields
,
$membership
->
getFields
());
}
foreach
(
$this
->
addresses
as
$address
)
{
...
...
This diff is collapsed.
Click to expand it.
src/main/php/Model/Membership.php
+
0
−
3
View file @
71c572d1
...
...
@@ -11,9 +11,6 @@ final class Membership
private
IntField
$departmentGroup
;
private
DateField
$expirationDate
;
/** @var Field[] */
private
array
$fields
=
array
();
public
function
__construct
(
int
$departmentGroup
,
DateTimeImmutable
$expirationDate
)
{
$this
->
departmentGroup
=
new
IntField
(
'201'
,
$departmentGroup
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment