Skip to content
This repository was archived by the owner on Apr 5, 2020. It is now read-only.

Commit 6621f4b

Browse files
committed
Replace xp::typeOf() with typeof()
1 parent 2933774 commit 6621f4b

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

ChangeLog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Scriptlets for the XP Framework ChangeLog
22
========================================================================
33

4+
## 8.4.6 / 2017-05-20
5+
6+
* Refactored code to use `typeof()` instead of `xp::typeOf()`, see
7+
https://github.com/xp-framework/rfc/issues/323
8+
(@thekid)
9+
410
## 8.4.5 / 2017-03-17
511

612
* Merged pull request #22: Fix for global exception handling

src/main/php/scriptlet/xml/XMLScriptletRequest.class.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php namespace scriptlet\xml;
22

33
use scriptlet\HttpScriptletRequest;
4-
4+
use lang\IllegalArgumentException;
55

66
/**
77
* Wraps XML request
@@ -35,11 +35,12 @@ class XMLScriptletRequest extends HttpScriptletRequest {
3535
/**
3636
* Sets request's URL
3737
*
38-
* @param scriptlet.xml.XMLScriptletURL url
38+
* @param scriptlet.xml.XMLScriptletURL $url
39+
* @throws lang.IllegalArgumentException
3940
*/
4041
public function setURL(\scriptlet\HttpScriptletURL $url) {
41-
if (!$url instanceof XMLScriptletURL) throw new \lang\IllegalArgumentException(
42-
__METHOD__.' expects instanceof scriptlet.xml.XMLScriptletURL, '.\xp::typeof($url).' given.'
42+
if (!$url instanceof XMLScriptletURL) throw new IllegalArgumentException(
43+
'Expecting an scriptlet.xml.XMLScriptletURL, '.typeof($url)->getName().' given'
4344
);
4445

4546
with ($this->url= $url); {

src/main/php/scriptlet/xml/workflow/AbstractHandler.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function toString() {
6767
$this->wrapper ? nameof($this->wrapper) : '(null)'
6868
);
6969
foreach (array_keys($this->values[HVAL_PERSISTENT]) as $key) {
70-
$s.= sprintf(" [%-20s] %s\n", $key, \xp::typeOf($this->values[$key]));
70+
$s.= sprintf(" [%-20s] %s\n", $key, typeof($this->values[$key])->getName());
7171
}
7272
return $s.'}';
7373
}

0 commit comments

Comments
 (0)