@@ -25,7 +25,7 @@ class AnyPatternImpl implements AnyPattern
25
25
*
26
26
* @return bool true, if this instance is a blank node, false otherwise
27
27
*/
28
- public function isBlank ()
28
+ public function isBlank (): bool
29
29
{
30
30
return false ;
31
31
}
@@ -35,7 +35,7 @@ public function isBlank()
35
35
*
36
36
* @return bool true, if this instance is concrete, false otherwise
37
37
*/
38
- public function isConcrete ()
38
+ public function isConcrete (): bool
39
39
{
40
40
return false ;
41
41
}
@@ -45,7 +45,7 @@ public function isConcrete()
45
45
*
46
46
* @return bool true, if it is a literal, false otherwise
47
47
*/
48
- public function isLiteral ()
48
+ public function isLiteral (): bool
49
49
{
50
50
return false ;
51
51
}
@@ -55,7 +55,7 @@ public function isLiteral()
55
55
*
56
56
* @return bool true, if it is a named node, false otherwise
57
57
*/
58
- public function isNamed ()
58
+ public function isNamed (): bool
59
59
{
60
60
return false ;
61
61
}
@@ -65,7 +65,7 @@ public function isNamed()
65
65
*
66
66
* @return bool true, if this instance is a pattern, false otherwise
67
67
*/
68
- public function isPattern ()
68
+ public function isPattern (): bool
69
69
{
70
70
return true ;
71
71
}
@@ -77,7 +77,7 @@ public function isPattern()
77
77
*
78
78
* @return bool true, if both instances are semantically equal, false otherwise
79
79
*/
80
- public function equals (Node $ toCompare )
80
+ public function equals (Node $ toCompare ): bool
81
81
{
82
82
// Only compare, if given instance is an AnyPattern too
83
83
return $ toCompare instanceof AnyPatternImpl;
@@ -90,7 +90,7 @@ public function equals(Node $toCompare)
90
90
*
91
91
* @return bool always true
92
92
*/
93
- public function matches (Node $ toMatch )
93
+ public function matches (Node $ toMatch ): bool
94
94
{
95
95
return true ;
96
96
}
@@ -101,7 +101,7 @@ public function matches(Node $toMatch)
101
101
*
102
102
* @return string a human readable string representation of the node
103
103
*/
104
- public function __toString ()
104
+ public function __toString (): string
105
105
{
106
106
return 'ANY ' ;
107
107
}
@@ -113,7 +113,7 @@ public function __toString()
113
113
*
114
114
* @throws \Exception if no n-quads representation is available
115
115
*/
116
- public function toNQuads ()
116
+ public function toNQuads (): string
117
117
{
118
118
throw new \Exception ('The AnyPattern is not valid in NQuads ' );
119
119
}
0 commit comments