@@ -89,7 +89,7 @@ public function loadString($string)
89
89
*/
90
90
public function parse ()
91
91
{
92
- $ results = array () ;
92
+ $ results = [] ;
93
93
foreach ($ this ->parseStatementData () as $ this ->currentStatementData ) {
94
94
$ statement = new Statement ();
95
95
if ($ this ->debug ) {
@@ -145,10 +145,10 @@ protected function parseStatementData()
145
145
*/
146
146
protected function parseTransactionData ()
147
147
{
148
- $ results = array () ;
148
+ $ results = [] ;
149
149
preg_match_all ('/^:61:(.*?)(?=^:61:|^-X{,3}$|\Z)/sm ' , $ this ->getCurrentStatementData (), $ results );
150
150
151
- return ((!empty ($ results [0 ])) ? $ results [0 ] : array () );
151
+ return ((!empty ($ results [0 ])) ? $ results [0 ] : [] );
152
152
}
153
153
154
154
/**
@@ -195,7 +195,7 @@ protected function parseStatementBank()
195
195
*/
196
196
protected function parseStatementAccount ()
197
197
{
198
- $ results = array () ;
198
+ $ results = [] ;
199
199
if (preg_match ('/:25:([\d\.]+)*/ ' , $ this ->getCurrentStatementData (), $ results )
200
200
&& !empty ($ results [1 ])
201
201
) {
@@ -218,7 +218,7 @@ protected function parseStatementAccount()
218
218
*/
219
219
protected function parseStatementStartPrice ()
220
220
{
221
- $ results = array () ;
221
+ $ results = [] ;
222
222
if (preg_match ('/:60F:.*EUR([\d,\.]+)*/ ' , $ this ->getCurrentStatementData (), $ results )
223
223
&& !empty ($ results [1 ])
224
224
) {
@@ -234,7 +234,7 @@ protected function parseStatementStartPrice()
234
234
*/
235
235
protected function parseStatementEndPrice ()
236
236
{
237
- $ results = array () ;
237
+ $ results = [] ;
238
238
if (preg_match ('/:62F:.*EUR([\d,\.]+)*/ ' , $ this ->getCurrentStatementData (), $ results )
239
239
&& !empty ($ results [1 ])
240
240
) {
@@ -250,7 +250,7 @@ protected function parseStatementEndPrice()
250
250
*/
251
251
protected function parseStatementTimestamp ()
252
252
{
253
- $ results = array () ;
253
+ $ results = [] ;
254
254
if (preg_match ('/:60F:[C|D](\d{6})*/ ' , $ this ->getCurrentStatementData (), $ results )
255
255
&& !empty ($ results [1 ])
256
256
) {
@@ -266,7 +266,7 @@ protected function parseStatementTimestamp()
266
266
*/
267
267
protected function parseStatementNumber ()
268
268
{
269
- $ results = array () ;
269
+ $ results = [] ;
270
270
if (preg_match ('/:28C?:(.*)/ ' , $ this ->getCurrentStatementData (), $ results )
271
271
&& !empty ($ results [1 ])
272
272
) {
@@ -283,7 +283,7 @@ protected function parseStatementNumber()
283
283
*/
284
284
protected function parseTransactionAccount ()
285
285
{
286
- $ results = array () ;
286
+ $ results = [] ;
287
287
if (preg_match ('/^:86: ?([\d\.]+)\s/im ' , $ this ->getCurrentTransactionData (), $ results )
288
288
&& !empty ($ results [1 ])
289
289
) {
@@ -299,7 +299,7 @@ protected function parseTransactionAccount()
299
299
*/
300
300
protected function parseTransactionAccountName ()
301
301
{
302
- $ results = array () ;
302
+ $ results = [] ;
303
303
if (preg_match ('/:86: ?[\d\.]+ (.+)/ ' , $ this ->getCurrentTransactionData (), $ results )
304
304
&& !empty ($ results [1 ])
305
305
) {
@@ -315,7 +315,7 @@ protected function parseTransactionAccountName()
315
315
*/
316
316
protected function parseTransactionPrice ()
317
317
{
318
- $ results = array () ;
318
+ $ results = [] ;
319
319
if (preg_match ('/^:61:.*[CD]([\d,\.]+)N/i ' , $ this ->getCurrentTransactionData (), $ results )
320
320
&& !empty ($ results [1 ])
321
321
) {
@@ -331,7 +331,7 @@ protected function parseTransactionPrice()
331
331
*/
332
332
protected function parseTransactionDebitCredit ()
333
333
{
334
- $ results = array () ;
334
+ $ results = [] ;
335
335
if (preg_match ('/^:61:\d+([CD])\d+/ ' , $ this ->getCurrentTransactionData (), $ results )
336
336
&& !empty ($ results [1 ])
337
337
) {
@@ -347,7 +347,7 @@ protected function parseTransactionDebitCredit()
347
347
*/
348
348
protected function parseTransactionDescription ()
349
349
{
350
- $ results = array () ;
350
+ $ results = [] ;
351
351
if (preg_match_all ('/[\n]:86:(.*?)(?=\n(:6(1|2))|$)/s ' , $ this ->getCurrentTransactionData (), $ results )
352
352
&& !empty ($ results [1 ])
353
353
) {
@@ -363,7 +363,7 @@ protected function parseTransactionDescription()
363
363
*/
364
364
protected function parseTransactionEntryTimestamp ()
365
365
{
366
- $ results = array () ;
366
+ $ results = [] ;
367
367
if (preg_match ('/^:61:(\d{6})/ ' , $ this ->getCurrentTransactionData (), $ results )
368
368
&& !empty ($ results [1 ])
369
369
) {
@@ -379,7 +379,7 @@ protected function parseTransactionEntryTimestamp()
379
379
*/
380
380
protected function parseTransactionValueTimestamp ()
381
381
{
382
- $ results = array () ;
382
+ $ results = [] ;
383
383
if (preg_match ('/^:61:(\d{6})/ ' , $ this ->getCurrentTransactionData (), $ results )
384
384
&& !empty ($ results [1 ])
385
385
) {
@@ -395,7 +395,7 @@ protected function parseTransactionValueTimestamp()
395
395
*/
396
396
protected function parseTransactionCode ()
397
397
{
398
- $ results = array () ;
398
+ $ results = [] ;
399
399
if (preg_match ('/^:61:.*?N(.{3}).*/ ' , $ this ->getCurrentTransactionData (), $ results )
400
400
&& !empty ($ results [1 ])
401
401
) {
@@ -412,11 +412,11 @@ protected function parseTransactionCode()
412
412
*/
413
413
protected function sanitizeAccount ($ string )
414
414
{
415
- static $ crudeReplacements = array (
415
+ static $ crudeReplacements = [
416
416
'. ' => '' ,
417
417
' ' => '' ,
418
418
'GIRO ' => 'P ' ,
419
- ) ;
419
+ ] ;
420
420
421
421
// crude IBAN to 'old' converter
422
422
if (Mt940::$ removeIBAN
0 commit comments