Skip to content

[Insight] Text files should end with a newline character - in Examples/WeatherHistory.php, line 44 #31

@hubdotcom

Description

@hubdotcom

in Examples/WeatherHistory.php, line 44

This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

// Example 1: Get hourly weather history between 2014-01-01 and today.
$history = $owm->getWeatherHistory('Berlin', new \DateTime('2014-01-01'), new \DateTime('now'), 'hour', $units, $lang);

foreach ($history as $weather) {
    echo "Average temperature at " . $weather->time->format('d.m.Y H:i') . ": " . $weather->temperature . "\n\r<br />";
}

Posted from SensioLabsInsight

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions