Remove constructor from member and memberships

This commit is contained in:
philipp lang 2022-01-02 11:41:08 +01:00
parent f5223c79fe
commit 99486140bf
3 changed files with 2 additions and 10 deletions

View File

@ -105,10 +105,6 @@ class Member extends Model {
]; ];
} }
public function __construct($member) {
parent::__construct($member);
}
public function getBirthdayAttribute() { public function getBirthdayAttribute() {
return Carbon::parse($this->attributes['birthday'])->format('Y-m-d'); return Carbon::parse($this->attributes['birthday'])->format('Y-m-d');
} }

View File

@ -40,10 +40,6 @@ class Membership extends Model {
return (new self($item)); return (new self($item));
} }
public function __construct($membership) {
parent::__construct($membership);
}
public function setAttribute($key, $value) { public function setAttribute($key, $value) {
if (in_array($key, $this->nullable) && $value === '') { if (in_array($key, $this->nullable) && $value === '') {
return parent::setAttribute($key, null); return parent::setAttribute($key, null);

View File

@ -2,10 +2,10 @@
namespace Zoomyboy\LaravelNami\Tests\Unit; namespace Zoomyboy\LaravelNami\Tests\Unit;
use Zoomyboy\LaravelNami\Nami;
use Zoomyboy\LaravelNami\Tests\TestCase;
use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Http;
use Zoomyboy\LaravelNami\LoginException; use Zoomyboy\LaravelNami\LoginException;
use Zoomyboy\LaravelNami\Nami;
use Zoomyboy\LaravelNami\Tests\TestCase;
class LoginTest extends TestCase class LoginTest extends TestCase
{ {