Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pôle IS
Bundles Symfony 2
ng-model-generator-bundle
Commits
e820f98b
Commit
e820f98b
authored
Feb 14, 2019
by
Guillaume Perréal
Browse files
Utilise un test un peu naïf mais efficace pour tester le type des IRIs.
parent
de4d5be2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Models/Types/Resources/IRI.php
View file @
e820f98b
...
...
@@ -76,15 +76,7 @@ final class IRI extends AbstractType
*/
public
function
checkType
(
string
$expr
,
bool
$explicit
=
false
):
string
{
return
sprintf
(
'(%s)'
,
implode
(
' || '
,
array_map
(
function
(
string
$name
)
use
(
$expr
)
{
return
sprintf
(
'%sRepository.isIRI(%s)'
,
$name
,
$expr
);
},
$this
->
getNames
()
)
));
return
sprintf
(
"(typeof %s === 'string')"
,
$expr
);
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment