DASPRiD / Flitch

PHP Coding Standard Validator
BSD 2-Clause "Simplified" License
58 stars 9 forks source link

MustStartWithOpenTag checks file bottom #3

Closed drdev closed 12 years ago

drdev commented 12 years ago

$file->bottom()->getType() !== T_OPEN_TAG should be $file->top()->getType() !== T_OPEN_TAG, shouldn't it?

DASPRiD commented 12 years ago

Does the unit test for it fail?

DASPRiD commented 12 years ago

Actually no, this is all correct, see: http://www.php.net/manual/de/spldoublylinkedlist.bottom.php

"SplDoublyLinkedList::bottom — Peeks at the node from the beginning of the doubly linked list" "The value of the first node."