Skip to content

Commit

Permalink
Applied fixes from StyleCI
Browse files Browse the repository at this point in the history
[ci skip] [skip ci]
  • Loading branch information
jbrooksuk authored and StyleCIBot committed Oct 6, 2016
1 parent 0d86bfa commit 9b936aa
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace CachetHQ\Cachet\Bus\Handlers\Commands\IncidentUpdate;

use CachetHQ\Cachet\Bus\Commands\IncidentUpdate\ReportIncidentUpdateCommand;
use CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand;
use CachetHQ\Cachet\Bus\Commands\IncidentUpdate\ReportIncidentUpdateCommand;
use CachetHQ\Cachet\Bus\Events\IncidentUpdate\IncidentUpdateWasReportedEvent;
use CachetHQ\Cachet\Models\IncidentUpdate;

Expand Down
8 changes: 4 additions & 4 deletions app/Models/Incident.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,28 @@ class Incident extends Model implements HasPresenter
*/
const INVESTIGATING = 1;

/**
/**
* Status for incident having been identified.
*
* @var int
*/
const IDENTIFIED = 2;

/**
/**
* Status for incident being watched.
*
* @var int
*/
const WATCHED = 3;

/**
/**
* Status for incident now being fixed.
*
* @var int
*/
const FIXED = 4;

/**
/**
* The accessors to append to the model's array form.
*
* @var string[]
Expand Down
44 changes: 22 additions & 22 deletions app/Presenters/IncidentPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

use CachetHQ\Cachet\Dates\DateFactory;
use CachetHQ\Cachet\Presenters\Traits\TimestampsTrait;
use Carbon\Carbon;
use GrahamCampbell\Markdown\Facades\Markdown;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Support\Facades\Config;
Expand Down Expand Up @@ -197,10 +196,10 @@ public function human_status()
}

/**
* Returns the latest update.
*
* @return int|null
*/
* Returns the latest update.
*
* @return int|null
*/
public function latest_status()
{
if ($update = $this->latest()) {
Expand All @@ -211,10 +210,10 @@ public function latest_status()
}

/**
* Returns the latest update.
*
* @return string|null
*/
* Returns the latest update.
*
* @return string|null
*/
public function latest_human_status()
{
if ($update = $this->latest()) {
Expand All @@ -225,10 +224,10 @@ public function latest_human_status()
}

/**
* Present the latest icon.
*
* @return string
*/
* Present the latest icon.
*
* @return string
*/
public function latest_icon()
{
if ($update = $this->latest()) {
Expand All @@ -237,14 +236,14 @@ public function latest_icon()
}
}

return $this->icon();
return $this->icon();
}

/**
* Fetch the latest incident update.
*
* @return \CachetHQ\Cachet\Models\IncidentUpdate|void
*/
* Fetch the latest incident update.
*
* @return \CachetHQ\Cachet\Models\IncidentUpdate|void
*/
public function latest()
{
if ($update = $this->wrappedObject->updates()->orderBy('created_at', 'desc')->first()) {
Expand All @@ -253,10 +252,10 @@ public function latest()
}

/**
* Get the incident permalink.
*
* @return string
*/
* Get the incident permalink.
*
* @return string
*/
public function permalink()
{
return route('incident', $this->wrappedObject->id);
Expand All @@ -271,6 +270,7 @@ public function duration()
{
if ($update = $this->latest()) {
dd($update->created_at->diffInSeconds($this->wrappedObject->created_at));

return $this->wrappedObject->created_at->diffInSeconds($update->created_at);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* @author James Brooks <james@alt-three.com>
*/
abstract class AbstractIncidentUpdateEventTestCase extends AbstractTestCase
abstract class AbstractIncidentUpdateCommandTest extends AbstractTestCase
{
use EventTrait;

Expand Down

0 comments on commit 9b936aa

Please sign in to comment.