Skip to content

Commit f05b9b2

Browse files
committed
adjust for happiness of both testcases and ecs
1 parent 56c03dd commit f05b9b2

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/phpDocumentor/Reflection/NodeVisitor/ElementNameResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function enterNode(Node $node)
7777
case Interface_::class:
7878
$this->parts->push((string) $node->name);
7979

80-
if ($node->name === null) {
80+
if (empty($node->name)) {
8181
return NodeTraverser::DONT_TRAVERSE_CHILDREN;
8282
}
8383

src/phpDocumentor/Reflection/Php/ProjectFactory.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,31 +121,31 @@ private function getNamespaceByName(Project $project, $name)
121121
private function buildNamespace(File $file, Namespace_ $namespace)
122122
{
123123
foreach ($file->getClasses() as $class) {
124-
if ($namespace->getFqsen() . '\\' . $class->getName() === $class->getFqsen()) {
124+
if ($namespace->getFqsen() . '\\' . $class->getName() === (string) $class->getFqsen()) {
125125
$namespace->addClass($class->getFqsen());
126126
}
127127
}
128128

129129
foreach ($file->getInterfaces() as $interface) {
130-
if ($namespace->getFqsen() . '\\' . $interface->getName() === $interface->getFqsen()) {
130+
if ($namespace->getFqsen() . '\\' . $interface->getName() === (string) $interface->getFqsen()) {
131131
$namespace->addInterface($interface->getFqsen());
132132
}
133133
}
134134

135135
foreach ($file->getFunctions() as $function) {
136-
if ($namespace->getFqsen() . '\\' . $function->getName() . '()' === $function->getFqsen()) {
136+
if ($namespace->getFqsen() . '\\' . $function->getName() . '()' === (string) $function->getFqsen()) {
137137
$namespace->addFunction($function->getFqsen());
138138
}
139139
}
140140

141141
foreach ($file->getConstants() as $constant) {
142-
if ($namespace->getFqsen() . '::' . $constant->getName() === $constant->getFqsen()) {
142+
if ($namespace->getFqsen() . '::' . $constant->getName() === (string) $constant->getFqsen()) {
143143
$namespace->addConstant($constant->getFqsen());
144144
}
145145
}
146146

147147
foreach ($file->getTraits() as $trait) {
148-
if ($namespace->getFqsen() . '\\' . $trait->getName() === $trait->getFqsen()) {
148+
if ($namespace->getFqsen() . '\\' . $trait->getName() === (string) $trait->getFqsen()) {
149149
$namespace->addTrait($trait->getFqsen());
150150
}
151151
}

tests/component/project/Luigi/Pizza.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ private function __construct(Pizza\Style $style)
5959
* This method can be used to instantiate a new object of this class which can then be retrieved using
6060
* {@see self::getInstance()}.
6161
*
62+
* @param Pizza\Style $style style of pizza
63+
*
6264
* @see self::getInstance to retrieve the pizza object.
6365
*/
6466
public static function createInstance(Pizza\Style $style)

0 commit comments

Comments
 (0)