�PNG  IHDR��;���IDATx��ܻn�0���K�� �)(�pA��� ���7�LeG{�� �§㻢|��ذaÆ 6lذaÆ 6lذaÆ 6lom��$^�y���ذag�5bÆ 6lذaÆ 6lذa{���� 6lذaÆ �`����}H�Fkm�,�m����Ӫ���ô�ô!� �x�|'ܢ˟;�E:���9�&ᶒ�}�{�v]�n&�6� �h��_��t�ڠ͵-ҫ���Z;��Z$�.�P���k�ž)�!��o���>}l�eQfJ�T��u і���چ��\��X=8��Rن4`Vw�l�>����n�G�^��i�s��"ms�$�u��i��?w�bs[m�6�K4���O���.�4��%����/����b�C%��t ��M�ז� �-l�G6�mrz2���s�%�9��s@���-�k�9�=���)������k�B5����\��+͂�Zsٲ ��Rn��~G���R���C����� �wIcI��n7jJ���hۛNCS|���j0��8y�iHKֶۛ�k�Ɉ+;Sz������L/��F�*\��Ԕ�#"5��m�2��[S��������=�g��n�a�P�e�ғ�L�� lذaÆ 6l�^k��̱aÆ 6lذaÆ 6lذa;���� �_��ذaÆ 6lذaÆ 6lذaÆ ���R���IEND�B` atLeastPhp71 = \version_compare(\PHP_VERSION, '7.1', '>='); } /** * {@inheritdoc} */ public function enterNode(Node $node) { if (!$this->atLeastPhp71) { return; // @codeCoverageIgnore } if ($this->isFunctionNode($node)) { $this->returnTypeStack[] = $node->returnType; return; } if (!empty($this->returnTypeStack) && $node instanceof Return_) { $expectedType = \end($this->returnTypeStack); if ($expectedType === null) { return; } $msg = null; if ($this->typeName($expectedType) === 'void') { // Void functions if ($expectedType instanceof NullableType) { $msg = self::NULLABLE_VOID_MESSAGE; } elseif ($node->expr instanceof ConstFetch && \strtolower($node->expr->name) === 'null') { $msg = self::VOID_NULL_MESSAGE; } elseif ($node->expr !== null) { $msg = self::VOID_MESSAGE; } } else { // Everything else if ($node->expr === null) { $msg = $expectedType instanceof NullableType ? self::NULLABLE_MESSAGE : self::MESSAGE; } } if ($msg !== null) { throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); } } } /** * {@inheritdoc} */ public function leaveNode(Node $node) { if (!$this->atLeastPhp71) { return; // @codeCoverageIgnore } if (!empty($this->returnTypeStack) && $this->isFunctionNode($node)) { \array_pop($this->returnTypeStack); } } private function isFunctionNode(Node $node) { return $node instanceof Function_ || $node instanceof Closure; } private function typeName(Node $node) { if ($node instanceof NullableType) { return \strtolower($node->type->name); } if ($node instanceof Identifier) { return \strtolower($node->name); } throw new \InvalidArgumentException('Unable to find type name'); } }