Skip to content

Commit

Permalink
refactor: change namespace to CodeIgniter\DataConverter
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Nov 24, 2023
1 parent d99187b commit b31402b
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 33 deletions.
11 changes: 9 additions & 2 deletions deptrac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ parameters:
collectors:
- type: className
regex: ^Codeigniter\\Database\\.*
- name: DataConverter
collectors:
- type: className
regex: ^Codeigniter\\DataConverter\\.*
- name: Email
collectors:
- type: className
Expand Down Expand Up @@ -166,6 +170,9 @@ parameters:
- Entity
- Events
- I18n
DataConverter:
- I18n
- URI
Email:
- I18n
- Events
Expand Down Expand Up @@ -227,8 +234,8 @@ parameters:
- CodeIgniter\HTTP\CLIRequest
- CodeIgniter\HTTP\IncomingRequest
- CodeIgniter\HTTP\ResponseInterface
CodeIgniter\Database\DataConverter\Cast\URICast:
- CodeIgniter\HTTP\URI
CodeIgniter\DataConverter\Exceptions\CastException:
- CodeIgniter\Entity\Exceptions\CastException
CodeIgniter\Entity\Cast\URICast:
- CodeIgniter\HTTP\URI
CodeIgniter\Log\Handlers\ChromeLoggerHandler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Database\DataConverter\Cast;
namespace CodeIgniter\DataConverter\Cast;

/**
* Class ArrayCast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Database\DataConverter\Cast;
namespace CodeIgniter\DataConverter\Cast;

use TypeError;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Database\DataConverter\Cast;
namespace CodeIgniter\DataConverter\Cast;

/**
* Class BooleanCast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Database\DataConverter\Cast;
namespace CodeIgniter\DataConverter\Cast;

/**
* Class CSVCast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Database\DataConverter\Cast;
namespace CodeIgniter\DataConverter\Cast;

/**
* @template TPhpValue PHP data type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Database\DataConverter\Cast;
namespace CodeIgniter\DataConverter\Cast;

use CodeIgniter\I18n\Time;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Database\DataConverter\Cast;
namespace CodeIgniter\DataConverter\Cast;

/**
* Class FloatCast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Database\DataConverter\Cast;
namespace CodeIgniter\DataConverter\Cast;

/**
* Int Bool Cast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Database\DataConverter\Cast;
namespace CodeIgniter\DataConverter\Cast;

/**
* Class IntegerCast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Database\DataConverter\Cast;
namespace CodeIgniter\DataConverter\Cast;

use CodeIgniter\Database\DataConverter\Exceptions\CastException;
use CodeIgniter\DataConverter\Exceptions\CastException;
use JsonException;
use stdClass;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Database\DataConverter\Cast;
namespace CodeIgniter\DataConverter\Cast;

use CodeIgniter\I18n\Time;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Database\DataConverter\Cast;
namespace CodeIgniter\DataConverter\Cast;

use CodeIgniter\HTTP\URI;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Database\DataConverter;

use CodeIgniter\Database\DataConverter\Cast\ArrayCast;
use CodeIgniter\Database\DataConverter\Cast\BooleanCast;
use CodeIgniter\Database\DataConverter\Cast\CastInterface;
use CodeIgniter\Database\DataConverter\Cast\CSVCast;
use CodeIgniter\Database\DataConverter\Cast\DatetimeCast;
use CodeIgniter\Database\DataConverter\Cast\FloatCast;
use CodeIgniter\Database\DataConverter\Cast\IntBoolCast;
use CodeIgniter\Database\DataConverter\Cast\IntegerCast;
use CodeIgniter\Database\DataConverter\Cast\JsonCast;
use CodeIgniter\Database\DataConverter\Cast\TimestampCast;
use CodeIgniter\Database\DataConverter\Cast\URICast;
namespace CodeIgniter\DataConverter;

use CodeIgniter\DataConverter\Cast\ArrayCast;
use CodeIgniter\DataConverter\Cast\BooleanCast;
use CodeIgniter\DataConverter\Cast\CastInterface;
use CodeIgniter\DataConverter\Cast\CSVCast;
use CodeIgniter\DataConverter\Cast\DatetimeCast;
use CodeIgniter\DataConverter\Cast\FloatCast;
use CodeIgniter\DataConverter\Cast\IntBoolCast;
use CodeIgniter\DataConverter\Cast\IntegerCast;
use CodeIgniter\DataConverter\Cast\JsonCast;
use CodeIgniter\DataConverter\Cast\TimestampCast;
use CodeIgniter\DataConverter\Cast\URICast;
use InvalidArgumentException;

/**
* PHP data <==> DataSource data converter
*
* @see \CodeIgniter\Database\DataConverter\DataConverterTest
* @see \CodeIgniter\DataConverter\DataConverterTest
*/
class DataConverter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Database\DataConverter\Exceptions;
namespace CodeIgniter\DataConverter\Exceptions;

use CodeIgniter\Entity\Exceptions\CastException as EntityCastException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Database\DataConverter;
namespace CodeIgniter\DataConverter;

use CodeIgniter\HTTP\URI;
use CodeIgniter\I18n\Time;
Expand Down Expand Up @@ -451,7 +451,7 @@ public function testInvalidValue(): void
{
$this->expectException(TypeError::class);
$this->expectExceptionMessage(
'[CodeIgniter\Database\DataConverter\Cast\JsonCast] Invalid value type: bool, and its value: true'
'[CodeIgniter\DataConverter\Cast\JsonCast] Invalid value type: bool, and its value: true'
);

$types = [
Expand All @@ -471,7 +471,7 @@ public function testInvalidCastHandler(): void
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage(
'Invalid class type. It must implement CastInterface. class: CodeIgniter\Database\DataConverter\DataConverter'
'Invalid class type. It must implement CastInterface. class: CodeIgniter\DataConverter\DataConverter'
);

$types = [
Expand Down

0 comments on commit b31402b

Please sign in to comment.