-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add some new base object class, add some tests
- Loading branch information
Showing
10 changed files
with
635 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="test/bootstrap.php" colors="true" | ||
stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" | ||
backupStaticProperties="false"> | ||
<testsuites> | ||
<testsuite name="Php Library Test Suite"> | ||
<directory>test</directory> | ||
</testsuite> | ||
</testsuites> | ||
<coverage> | ||
<include> | ||
<directory suffix=".php">src</directory> | ||
</include> | ||
</coverage> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="test/bootstrap.php" colors="true" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false"> | ||
<testsuites> | ||
<testsuite name="Php Library Test Suite"> | ||
<directory>test</directory> | ||
</testsuite> | ||
</testsuites> | ||
<coverage/> | ||
<source> | ||
<include> | ||
<directory suffix=".php">src</directory> | ||
</include> | ||
</source> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,11 @@ | ||
<?php declare(strict_types=1); | ||
/** | ||
* This file is part of toolkit/stdlib. | ||
* | ||
* @author https://github.com/inhere | ||
* @link https://github.com/php-toolkit/stdlib | ||
* @license MIT | ||
*/ | ||
|
||
namespace Toolkit\Stdlib\Obj; | ||
|
||
use Toolkit\Stdlib\Obj; | ||
use Toolkit\Stdlib\Obj\Traits\QuickInitTrait; | ||
|
||
/** | ||
* Class AbstractObj | ||
* | ||
* @package Toolkit\Stdlib\Obj | ||
*/ | ||
abstract class AbstractObj | ||
abstract class AbstractObj extends BaseObject | ||
{ | ||
use QuickInitTrait; | ||
|
||
/** | ||
* Class constructor. | ||
* | ||
* @param array $config | ||
*/ | ||
public function __construct(array $config = []) | ||
{ | ||
Obj::init($this, $config); | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function toArray(): array | ||
{ | ||
return Obj::toArray($this, false, false); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Toolkit\Stdlib\Obj; | ||
|
||
/** | ||
* Class BaseObj | ||
*/ | ||
abstract class BaseObj extends BaseObject | ||
{ | ||
|
||
} |
Oops, something went wrong.