Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix for array_sort.
  • Loading branch information
fractalzombie committed Dec 31, 2018
commit a03b0ad5b99409c034cc600f48715e77956e61e6
2 changes: 1 addition & 1 deletion src/HotReload/FSEventParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function toEvent(string $event): ?FSEvent
$path = $matches[static::PATH];
$events = explode(' ', $matches[static::EVENTS]);
$events = array_intersect(FSEvent::getPossibleTypes(), $events);
asort($events, SORT_ASC);
asort($events);

return new FSEvent($date, $path, $events);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/HotReload/FSEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function testObjectIsCorrect()
$path = '/Some/Path/To/File/File.php';
$events = explode(' ', 'Renamed OwnerModified IsFile');
$events = array_intersect(FSEvent::getPossibleTypes(), $events);
asort($events, SORT_ASC);
asort($events);
$event = new FSEvent($date, $path, $events);

$this->assertTrue(array_diff($event->getTypes(), [FSEvent::Renamed, FSEvent::OwnerModified]) === []);
Expand Down