Skip to content

Commit 18f50e6

Browse files
committed
v1.0.6
1 parent ea427dd commit 18f50e6

File tree

4 files changed

+26
-28
lines changed

4 files changed

+26
-28
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
/.phpunit.cache
2-
.phpunit.result.cache
2+
/.phpunit.result.cache
33
/nbproject

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This Serializer also supported unicode text.
77
[![License](https://poser.pugx.org/rundiz/serializer/license)](https://packagist.org/packages/rundiz/serializer)
88
[![Total Downloads](https://poser.pugx.org/rundiz/serializer/downloads)](https://packagist.org/packages/rundiz/serializer)
99

10-
Tested up to PHP 8.4.
10+
Tested up to PHP 8.5.
1111

1212
## Example:
1313

Rundiz/Serializer/Serializer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Works with serialization such as check if string is serialized.
1515
*
1616
* @package Serializer
17-
* @version 1.0.5
17+
* @version 1.0.6
1818
* @author Vee W.
1919
* @since 1.0
2020
*/
@@ -155,10 +155,10 @@ public function isSerialized($string)
155155
}
156156
case 'i':
157157
// this maybe integer
158-
return (boolean) preg_match('#^'.$string[0].':[0-9\-]+\\'.$last_char.'#', $string);
158+
return (bool) preg_match('#^'.$string[0].':[0-9\-]+\\'.$last_char.'#', $string);
159159
case 'd':
160160
// this maybe double or float
161-
return (boolean) preg_match('#^'.$string[0].':[0-9\.E\-\+]+\\'.$last_char.'#', $string);
161+
return (bool) preg_match('#^'.$string[0].':[0-9\.E\-\+]+\\'.$last_char.'#', $string);
162162
case 's':
163163
// this maybe string
164164
$exp_string = explode(':', $string);
@@ -174,7 +174,7 @@ public function isSerialized($string)
174174
// this maybe array
175175
case 'O':
176176
// this maybe object
177-
return (boolean) preg_match('#^'.$string[0].':[0-9]+\:#s', $string);
177+
return (bool) preg_match('#^'.$string[0].':[0-9]+\:#s', $string);
178178
}// endswitch;
179179

180180
return false;

phpunit.xml

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
bootstrap="./tests/phpunit/phpunit.php"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false"
11-
verbose="true"
12-
>
13-
<testsuites>
14-
<testsuite name="tests/phpunit">
15-
<directory suffix=".php">./tests/phpunit/</directory>
16-
</testsuite>
17-
</testsuites>
18-
<filter>
19-
<whitelist>
20-
<directory suffix=".php">./Rundiz/Serializer/</directory>
21-
</whitelist>
22-
</filter>
23-
</phpunit>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
backupGlobals="false"
4+
backupStaticProperties="false"
5+
bootstrap="./tests/phpunit/phpunit.php"
6+
cacheDirectory=".phpunit.cache"
7+
colors="true"
8+
processIsolation="false"
9+
stopOnFailure="false"
10+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd" >
11+
<testsuites>
12+
<testsuite name="tests/phpunit">
13+
<directory suffix="Test.php">./tests/phpunit/</directory>
14+
</testsuite>
15+
</testsuites>
16+
<source>
17+
<include>
18+
<directory suffix=".php">./Rundiz/Serializer/</directory>
19+
</include>
20+
</source>
21+
</phpunit>

0 commit comments

Comments
 (0)