Pessoa   F
last analyzed

Complexity

Total Complexity 61

Size/Duplication

Total Lines 697
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 61
lcom 1
cbo 1
dl 0
loc 697
rs 3.423
c 0
b 0
f 0

60 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getId() 0 4 1
A setId() 0 5 1
A getPessoaProprietario() 0 4 1
A setPessoaProprietario() 0 5 1
A getPessoasDoProprietario() 0 4 1
A setPessoasDoProprietario() 0 5 1
A getPessoaCheckInVendedor() 0 4 1
A setPessoaCheckInVendedor() 0 5 1
A getPessoasClientes() 0 4 1
A setPessoasClientes() 0 5 1
A getPessoaStatus() 0 4 1
A setPessoaStatus() 0 9 2
A isPessoaJuridica() 0 4 1
A setPessoaJuridica() 0 5 1
A getNomeRazaoSocial() 0 4 1
A setNomeRazaoSocial() 0 5 1
A getSobrenomeNomeFantasia() 0 4 1
A setSobrenomeNomeFantasia() 0 5 1
A getFoto() 0 4 1
A setFoto() 0 5 1
A getFotoUrl() 0 4 1
A setFotoUrl() 0 5 1
A getCpfCnpj() 0 4 1
A setCpfCnpj() 0 5 1
A getEmail() 0 4 1
A setEmail() 0 5 1
A getSenha() 0 4 1
A setSenha() 0 5 1
A getTelefone1() 0 4 1
A setTelefone1() 0 5 1
A getTelefone2() 0 4 1
A setTelefone2() 0 5 1
A getReferenciaCliente() 0 4 1
A setReferenciaCliente() 0 5 1
A isMaster() 0 4 1
A setMaster() 0 5 1
A getKey() 0 4 1
A setKey() 0 5 1
A getLatitude() 0 4 1
A setLatitude() 0 5 1
A getLongitude() 0 4 1
A setLongitude() 0 5 1
A getIp() 0 4 1
A setIp() 0 5 1
A getData() 0 4 1
A setData() 0 5 1
A getDataLogin() 0 4 1
A setDataLogin() 0 5 1
A getDataLoginAnterior() 0 4 1
A setDataLoginAnterior() 0 5 1
A getDataLogout() 0 4 1
A setDataLogout() 0 5 1
A getDataAcesso() 0 4 1
A setDataAcesso() 0 5 1
A getDataCheckIn() 0 4 1
A setDataCheckIn() 0 5 1
A getEndereco() 0 4 1
A setEndereco() 0 5 1
A jsonSerialize() 0 29 1

How to fix   Complexity   

Complex Class

Complex classes like Pessoa often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use Pessoa, and based on these observations, apply Extract Interface, too.

1
<?php
2
3
namespace Integracao\ControlPay\Model;
4
use Integracao\ControlPay\Helpers\SerializerHelper;
5
6
/**
7
 * Class Pessoa
8
 * @package Integracao\ControlPay\Model
9
 */
10
class Pessoa implements \JsonSerializable
11
{
12
    /**
13
     * @var integer
14
     */
15
    private $id;
16
17
    /**
18
     * @var Pessoa
19
     */
20
    private $pessoaProprietario;
21
22
    /**
23
     * @var PessoaStatus
24
     */
25
    private $pessoaStatus;
26
27
    /**
28
     * @var boolean
29
     */
30
    private $pessoaJuridica;
31
32
    /**
33
     * @var string
34
     */
35
    private $nomeRazaoSocial;
36
37
    /**
38
     * @var string
39
     */
40
    private $sobrenomeNomeFantasia;
41
42
    /**
43
     * @var string
44
     */
45
    private $foto;
46
47
    /**
48
     * @var string
49
     */
50
    private $fotoUrl;
51
52
    /**
53
     * @var string
54
     */
55
    private $cpfCnpj;
56
57
    /**
58
     * @var string
59
     */
60
    private $email;
61
62
    /**
63
     * @var string
64
     */
65
    private $senha;
66
67
    /**
68
     * @var string
69
     */
70
    private $telefone1;
71
72
    /**
73
     * @var string
74
     */
75
    private $telefone2;
76
77
    /**
78
     * @var string
79
     */
80
    private $referenciaCliente;
81
82
    /**
83
     * @var boolean
84
     */
85
    private $master;
86
87
    /**
88
     * @var string
89
     */
90
    private $key;
91
92
    /**
93
     * @var float
94
     */
95
    private $latitude;
96
97
    /**
98
     * @var float
99
     */
100
    private $longitude;
101
102
    /**
103
     * @var string
104
     */
105
    private $ip;
106
107
    /**
108
     * @var \DateTime
109
     */
110
    private $data;
111
112
    /**
113
     * @var \DateTime
114
     */
115
    private $dataLogin;
116
117
    /**
118
     * @var \DateTime
119
     */
120
    private $dataLoginAnterior;
121
122
    /**
123
     * @var \DateTime
124
     */
125
    private $dataLogout;
126
127
    /**
128
     * @var \DateTime
129
     */
130
    private $dataAcesso;
131
132
    /**
133
     * @var \DateTime
134
     */
135
    private $dataCheckIn;
136
137
    /**
138
     * @var array
139
     */
140
    private $endereco;
141
142
    /**
143
     * Pessoa constructor.
144
     */
145
    public function __construct()
146
    {
147
    }
148
149
    /**
150
     * @return int
151
     */
152
    public function getId()
153
    {
154
        return $this->id;
155
    }
156
157
    /**
158
     * @param int $id
159
     * @return Pessoa
160
     */
161
    public function setId($id)
162
    {
163
        $this->id = $id;
164
        return $this;
165
    }
166
167
    /**
168
     * @return Pessoa
169
     */
170
    public function getPessoaProprietario()
171
    {
172
        return $this->pessoaProprietario;
173
    }
174
175
    /**
176
     * @param Pessoa $pessoaProprietario
177
     * @return Pessoa
178
     */
179
    public function setPessoaProprietario($pessoaProprietario)
180
    {
181
        $this->pessoaProprietario = $pessoaProprietario;
182
        return $this;
183
    }
184
185
    /**
186
     * @return array
187
     */
188
    public function getPessoasDoProprietario()
189
    {
190
        return $this->pessoasDoProprietario;
0 ignored issues
show
Bug introduced by
The property pessoasDoProprietario does not seem to exist. Did you mean pessoaProprietario?

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
191
    }
192
193
    /**
194
     * @param array $pessoasDoProprietario
195
     * @return Pessoa
196
     */
197
    public function setPessoasDoProprietario($pessoasDoProprietario)
198
    {
199
        $this->pessoasDoProprietario = $pessoasDoProprietario;
0 ignored issues
show
Bug introduced by
The property pessoasDoProprietario does not seem to exist. Did you mean pessoaProprietario?

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
200
        return $this;
201
    }
202
203
    /**
204
     * @return Pessoa
205
     */
206
    public function getPessoaCheckInVendedor()
207
    {
208
        return $this->pessoaCheckInVendedor;
0 ignored issues
show
Bug introduced by
The property pessoaCheckInVendedor does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
209
    }
210
211
    /**
212
     * @param Pessoa $pessoaCheckInVendedor
213
     * @return Pessoa
214
     */
215
    public function setPessoaCheckInVendedor($pessoaCheckInVendedor)
216
    {
217
        $this->pessoaCheckInVendedor = $pessoaCheckInVendedor;
218
        return $this;
219
    }
220
221
    /**
222
     * @return array
223
     */
224
    public function getPessoasClientes()
225
    {
226
        return $this->pessoasClientes;
0 ignored issues
show
Bug introduced by
The property pessoasClientes does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
227
    }
228
229
    /**
230
     * @param array $pessoasClientes
231
     * @return Pessoa
232
     */
233
    public function setPessoasClientes($pessoasClientes)
234
    {
235
        $this->pessoasClientes = $pessoasClientes;
236
        return $this;
237
    }
238
239
    /**
240
     * @return PessoaStatus
241
     */
242
    public function getPessoaStatus()
243
    {
244
        return $this->pessoaStatus;
245
    }
246
247
    /**
248
     * @param PessoaStatus $pessoaStatus
249
     * @return Pessoa
250
     */
251
    public function setPessoaStatus($pessoaStatus)
252
    {
253
        $this->pessoaStatus = $pessoaStatus;
254
255
        if(is_array($this->pessoaStatus))
256
            $this->pessoaStatus = SerializerHelper::denormalize($this->pessoaStatus, PessoaStatus::class);
257
258
        return $this;
259
    }
260
261
    /**
262
     * @return boolean
263
     */
264
    public function isPessoaJuridica()
265
    {
266
        return $this->pessoaJuridica;
267
    }
268
269
    /**
270
     * @param boolean $pessoaJuridica
271
     * @return Pessoa
272
     */
273
    public function setPessoaJuridica($pessoaJuridica)
274
    {
275
        $this->pessoaJuridica = $pessoaJuridica;
276
        return $this;
277
    }
278
279
    /**
280
     * @return string
281
     */
282
    public function getNomeRazaoSocial()
283
    {
284
        return $this->nomeRazaoSocial;
285
    }
286
287
    /**
288
     * @param string $nomeRazaoSocial
289
     * @return Pessoa
290
     */
291
    public function setNomeRazaoSocial($nomeRazaoSocial)
292
    {
293
        $this->nomeRazaoSocial = $nomeRazaoSocial;
294
        return $this;
295
    }
296
297
    /**
298
     * @return string
299
     */
300
    public function getSobrenomeNomeFantasia()
301
    {
302
        return $this->sobrenomeNomeFantasia;
303
    }
304
305
    /**
306
     * @param string $sobrenomeNomeFantasia
307
     * @return Pessoa
308
     */
309
    public function setSobrenomeNomeFantasia($sobrenomeNomeFantasia)
310
    {
311
        $this->sobrenomeNomeFantasia = $sobrenomeNomeFantasia;
312
        return $this;
313
    }
314
315
    /**
316
     * @return string
317
     */
318
    public function getFoto()
319
    {
320
        return $this->foto;
321
    }
322
323
    /**
324
     * @param string $foto
325
     * @return Pessoa
326
     */
327
    public function setFoto($foto)
328
    {
329
        $this->foto = $foto;
330
        return $this;
331
    }
332
333
    /**
334
     * @return string
335
     */
336
    public function getFotoUrl()
337
    {
338
        return $this->fotoUrl;
339
    }
340
341
    /**
342
     * @param string $fotoUrl
343
     * @return Pessoa
344
     */
345
    public function setFotoUrl($fotoUrl)
346
    {
347
        $this->fotoUrl = $fotoUrl;
348
        return $this;
349
    }
350
351
    /**
352
     * @return string
353
     */
354
    public function getCpfCnpj()
355
    {
356
        return $this->cpfCnpj;
357
    }
358
359
    /**
360
     * @param string $cpfCnpj
361
     * @return Pessoa
362
     */
363
    public function setCpfCnpj($cpfCnpj)
364
    {
365
        $this->cpfCnpj = $cpfCnpj;
366
        return $this;
367
    }
368
369
    /**
370
     * @return string
371
     */
372
    public function getEmail()
373
    {
374
        return $this->email;
375
    }
376
377
    /**
378
     * @param string $email
379
     * @return Pessoa
380
     */
381
    public function setEmail($email)
382
    {
383
        $this->email = $email;
384
        return $this;
385
    }
386
387
    /**
388
     * @return string
389
     */
390
    public function getSenha()
391
    {
392
        return $this->senha;
393
    }
394
395
    /**
396
     * @param string $senha
397
     * @return Pessoa
398
     */
399
    public function setSenha($senha)
400
    {
401
        $this->senha = $senha;
402
        return $this;
403
    }
404
405
    /**
406
     * @return string
407
     */
408
    public function getTelefone1()
409
    {
410
        return $this->telefone1;
411
    }
412
413
    /**
414
     * @param string $telefone1
415
     * @return Pessoa
416
     */
417
    public function setTelefone1($telefone1)
418
    {
419
        $this->telefone1 = $telefone1;
420
        return $this;
421
    }
422
423
    /**
424
     * @return string
425
     */
426
    public function getTelefone2()
427
    {
428
        return $this->telefone2;
429
    }
430
431
    /**
432
     * @param string $telefone2
433
     * @return Pessoa
434
     */
435
    public function setTelefone2($telefone2)
436
    {
437
        $this->telefone2 = $telefone2;
438
        return $this;
439
    }
440
441
    /**
442
     * @return string
443
     */
444
    public function getReferenciaCliente()
445
    {
446
        return $this->referenciaCliente;
447
    }
448
449
    /**
450
     * @param string $referenciaCliente
451
     * @return Pessoa
452
     */
453
    public function setReferenciaCliente($referenciaCliente)
454
    {
455
        $this->referenciaCliente = $referenciaCliente;
456
        return $this;
457
    }
458
459
    /**
460
     * @return boolean
461
     */
462
    public function isMaster()
463
    {
464
        return $this->master;
465
    }
466
467
    /**
468
     * @param boolean $master
469
     * @return Pessoa
470
     */
471
    public function setMaster($master)
472
    {
473
        $this->master = $master;
474
        return $this;
475
    }
476
477
    /**
478
     * @return string
479
     */
480
    public function getKey()
481
    {
482
        return $this->key;
483
    }
484
485
    /**
486
     * @param string $key
487
     * @return Pessoa
488
     */
489
    public function setKey($key)
490
    {
491
        $this->key = $key;
492
        return $this;
493
    }
494
495
    /**
496
     * @return float
497
     */
498
    public function getLatitude()
499
    {
500
        return $this->latitude;
501
    }
502
503
    /**
504
     * @param float $latitude
505
     * @return Pessoa
506
     */
507
    public function setLatitude($latitude)
508
    {
509
        $this->latitude = $latitude;
510
        return $this;
511
    }
512
513
    /**
514
     * @return float
515
     */
516
    public function getLongitude()
517
    {
518
        return $this->longitude;
519
    }
520
521
    /**
522
     * @param float $longitude
523
     * @return Pessoa
524
     */
525
    public function setLongitude($longitude)
526
    {
527
        $this->longitude = $longitude;
528
        return $this;
529
    }
530
531
    /**
532
     * @return string
533
     */
534
    public function getIp()
535
    {
536
        return $this->ip;
537
    }
538
539
    /**
540
     * @param string $ip
541
     * @return Pessoa
542
     */
543
    public function setIp($ip)
544
    {
545
        $this->ip = $ip;
546
        return $this;
547
    }
548
549
    /**
550
     * @return \DateTime
551
     */
552
    public function getData()
553
    {
554
        return $this->data;
555
    }
556
557
    /**
558
     * @param \DateTime $data
559
     * @return Pessoa
560
     */
561
    public function setData($data)
562
    {
563
        $this->data = \DateTime::createFromFormat('d/m/Y H:i:s.u', $data);
0 ignored issues
show
Documentation Bug introduced by
It seems like \DateTime::createFromFor...'d/m/Y H:i:s.u', $data) can also be of type false. However, the property $data is declared as type object<DateTime>. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
564
        return $this;
565
    }
566
567
    /**
568
     * @return \DateTime
569
     */
570
    public function getDataLogin()
571
    {
572
        return $this->dataLogin;
573
    }
574
575
    /**
576
     * @param \DateTime $dataLogin
577
     * @return Pessoa
578
     */
579
    public function setDataLogin($dataLogin)
580
    {
581
        $this->dataLogin = \DateTime::createFromFormat('d/m/Y H:i:s.u', $dataLogin);
0 ignored issues
show
Documentation Bug introduced by
It seems like \DateTime::createFromFor...Y H:i:s.u', $dataLogin) can also be of type false. However, the property $dataLogin is declared as type object<DateTime>. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
582
       return $this;
583
    }
584
585
    /**
586
     * @return \DateTime
587
     */
588
    public function getDataLoginAnterior()
589
    {
590
        return $this->dataLoginAnterior;
591
    }
592
593
    /**
594
     * @param \DateTime $dataLoginAnterior
595
     * @return Pessoa
596
     */
597
    public function setDataLoginAnterior($dataLoginAnterior)
598
    {
599
        $this->dataLoginAnterior = \DateTime::createFromFormat('d/m/Y H:i:s.u', $dataLoginAnterior);
0 ignored issues
show
Documentation Bug introduced by
It seems like \DateTime::createFromFor...u', $dataLoginAnterior) can also be of type false. However, the property $dataLoginAnterior is declared as type object<DateTime>. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
600
        return $this;
601
    }
602
603
    /**
604
     * @return \DateTime
605
     */
606
    public function getDataLogout()
607
    {
608
        return $this->dataLogout;
609
    }
610
611
    /**
612
     * @param \DateTime $dataLogout
613
     * @return Pessoa
614
     */
615
    public function setDataLogout($dataLogout)
616
    {
617
        $this->dataLogout = \DateTime::createFromFormat('d/m/Y H:i:s.u', $dataLogout);
0 ignored issues
show
Documentation Bug introduced by
It seems like \DateTime::createFromFor... H:i:s.u', $dataLogout) can also be of type false. However, the property $dataLogout is declared as type object<DateTime>. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
618
        return $this;
619
    }
620
621
    /**
622
     * @return \DateTime
623
     */
624
    public function getDataAcesso()
625
    {
626
        return $this->dataAcesso;
627
    }
628
629
    /**
630
     * @param \DateTime $dataAcesso
631
     * @return Pessoa
632
     */
633
    public function setDataAcesso($dataAcesso)
634
    {
635
        $this->dataAcesso = \DateTime::createFromFormat('d/m/Y H:i:s.u', $dataAcesso);
0 ignored issues
show
Documentation Bug introduced by
It seems like \DateTime::createFromFor... H:i:s.u', $dataAcesso) can also be of type false. However, the property $dataAcesso is declared as type object<DateTime>. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
636
        return $this;
637
    }
638
639
    /**
640
     * @return \DateTime
641
     */
642
    public function getDataCheckIn()
643
    {
644
        return $this->dataCheckIn;
645
    }
646
647
    /**
648
     * @param \DateTime $dataCheckIn
649
     * @return Pessoa
650
     */
651
    public function setDataCheckIn($dataCheckIn)
652
    {
653
        $this->dataCheckIn = \DateTime::createFromFormat('d/m/Y H:i:s.u', $dataCheckIn);
0 ignored issues
show
Documentation Bug introduced by
It seems like \DateTime::createFromFor...H:i:s.u', $dataCheckIn) can also be of type false. However, the property $dataCheckIn is declared as type object<DateTime>. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
654
        return $this;
655
    }
656
657
    /**
658
     * @return array
659
     */
660
    public function getEndereco()
661
    {
662
        return $this->endereco;
663
    }
664
665
    /**
666
     * @param array $endereco
667
     * @return Pessoa
668
     */
669
    public function setEndereco($endereco)
670
    {
671
        $this->endereco = $endereco;
672
        return $this;
673
    }
674
675
    function jsonSerialize()
676
    {
677
        return [
678
            'id' => $this->id,
679
            'cpfCnpj' => $this->cpfCnpj,
680
            'data' => $this->data,
681
            'dataAcesso' => $this->dataAcesso,
682
            'dataCheckIn' => $this->dataCheckIn,
683
            'dataLogin' => $this->dataLogin,
684
            'dataLoginAnterior' => $this->dataLoginAnterior,
685
            'dataLogout' => $this->dataLogout,
686
            'email' => $this->email,
687
            'endereco' => $this->endereco,
688
            'foto' => $this->foto,
689
            'fotoUrl' => $this->fotoUrl,
690
            'ip' => $this->ip,
691
            'key' => $this->key,
692
            'latitude' => $this->latitude,
693
            'longitude' => $this->longitude,
694
            'nomeRazaoSocial' => $this->nomeRazaoSocial,
695
            'sobrenomeNomeFantasia' => $this->sobrenomeNomeFantasia,
696
            'telefone1' => $this->telefone1,
697
            'telefone2' => $this->telefone2,
698
            'senha' => $this->senha,
699
            'pessoaJuridica' => $this->pessoaJuridica,
700
            'pessoaProprietario' => $this->pessoaProprietario,
701
            'pessoaStatus' => $this->pessoaStatus,
702
        ];
703
    }
704
705
706
}