Closes #568, adds copyright information.

This commit is contained in:
James Brooks 2015-04-19 08:52:39 +01:00
parent dc139ef09f
commit 80e3d9167d
210 changed files with 1880 additions and 215 deletions

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands; namespace CachetHQ\Cachet\Commands;
abstract class Command abstract class Command

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Composers; namespace CachetHQ\Cachet\Composers;
use CachetHQ\Cachet\Models\Component; use CachetHQ\Cachet\Models\Component;
@ -12,8 +21,6 @@ class DashboardComposer
* Bind data to the view. * Bind data to the view.
* *
* @param \Illuminate\View\View $view * @param \Illuminate\View\View $view
*
* @return void
*/ */
public function compose(View $view) public function compose(View $view)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Composers; namespace CachetHQ\Cachet\Composers;
use CachetHQ\Cachet\Models\Component; use CachetHQ\Cachet\Models\Component;
@ -12,8 +21,6 @@ class IndexComposer
* Index page view composer. * Index page view composer.
* *
* @param \Illuminate\View\View $view * @param \Illuminate\View\View $view
*
* @return void
*/ */
public function compose(View $view) public function compose(View $view)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Composers; namespace CachetHQ\Cachet\Composers;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
@ -11,8 +20,6 @@ class LoggedUserComposer
* Bind data to the view. * Bind data to the view.
* *
* @param \Illuminate\View\View $view * @param \Illuminate\View\View $view
*
* @return void
*/ */
public function compose(View $view) public function compose(View $view)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Composers; namespace CachetHQ\Cachet\Composers;
use DateTime; use DateTime;
@ -13,8 +22,6 @@ class TimezoneLocaleComposer
* Timezones and Locales composer. * Timezones and Locales composer.
* *
* @param \Illuminate\View\View $view * @param \Illuminate\View\View $view
*
* @return void
*/ */
public function compose(View $view) public function compose(View $view)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Config; namespace CachetHQ\Cachet\Config;
use CachetHQ\Cachet\Models\Setting; use CachetHQ\Cachet\Models\Setting;
@ -24,8 +33,6 @@ class Repository
* Create a new settings service instance. * Create a new settings service instance.
* *
* @param \CachetHQ\Cachet\Models\Setting $model * @param \CachetHQ\Cachet\Models\Setting $model
*
* @return void
*/ */
public function __construct(Setting $model) public function __construct(Setting $model)
{ {
@ -63,8 +70,6 @@ class Repository
* *
* @param string $name * @param string $name
* @param string $value * @param string $value
*
* @return void
*/ */
public function set($name, $value) public function set($name, $value)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Console\Commands; namespace CachetHQ\Cachet\Console\Commands;
use DirectoryIterator; use DirectoryIterator;
@ -56,8 +65,6 @@ class FixPermissionsCommand extends Command
* @param string $databaseDirectory * @param string $databaseDirectory
* @param string $databasePath * @param string $databasePath
* @param string $databaseDefault * @param string $databaseDefault
*
* @return void
*/ */
public function __construct($storageDirectory, $databaseDirectory, $databasePath, $databaseDefault) public function __construct($storageDirectory, $databaseDirectory, $databasePath, $databaseDefault)
{ {
@ -71,8 +78,6 @@ class FixPermissionsCommand extends Command
/** /**
* Execute the console command. * Execute the console command.
*
* @return void
*/ */
public function fire() public function fire()
{ {
@ -89,8 +94,6 @@ class FixPermissionsCommand extends Command
* *
* @param string $path * @param string $path
* @param string $mode * @param string $mode
*
* @return void
*/ */
protected function recursiveChmod($path, $mode = '0755') protected function recursiveChmod($path, $mode = '0755')
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Console; namespace CachetHQ\Cachet\Console;
use Illuminate\Console\Scheduling\Schedule; use Illuminate\Console\Scheduling\Schedule;
@ -20,8 +29,6 @@ class Kernel extends ConsoleKernel
* Define the application's command schedule. * Define the application's command schedule.
* *
* @param \Illuminate\Console\Scheduling\Schedule $schedule * @param \Illuminate\Console\Scheduling\Schedule $schedule
*
* @return void
*/ */
protected function schedule(Schedule $schedule) protected function schedule(Schedule $schedule)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events; namespace CachetHQ\Cachet\Events;
abstract class Event abstract class Event

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Exceptions; namespace CachetHQ\Cachet\Exceptions;
use CachetHQ\Cachet\Repositories\InvalidModelValidationException; use CachetHQ\Cachet\Repositories\InvalidModelValidationException;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Facades; namespace CachetHQ\Cachet\Facades;
use Illuminate\Support\Facades\Facade; use Illuminate\Support\Facades\Facade;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers; namespace CachetHQ\Cachet\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesCommands; use Illuminate\Foundation\Bus\DispatchesCommands;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin; namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController; use CachetHQ\Cachet\Http\Controllers\AbstractController;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin; namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController; use CachetHQ\Cachet\Http\Controllers\AbstractController;
@ -112,7 +121,7 @@ class ComponentController extends AbstractController
$component->update($_component); $component->update($_component);
if (! $component->isValid()) { if (!$component->isValid()) {
segment_track('Dashboard', [ segment_track('Dashboard', [
'event' => 'Edit Component', 'event' => 'Edit Component',
'success' => false, 'success' => false,
@ -182,7 +191,7 @@ class ComponentController extends AbstractController
$component = Component::create($_component); $component = Component::create($_component);
if (! $component->isValid()) { if (!$component->isValid()) {
segment_track('Dashboard', [ segment_track('Dashboard', [
'event' => 'Created Component', 'event' => 'Created Component',
'success' => false, 'success' => false,
@ -301,7 +310,7 @@ class ComponentController extends AbstractController
{ {
$group = ComponentGroup::create(Binput::get('group')); $group = ComponentGroup::create(Binput::get('group'));
if (! $group->isValid()) { if (!$group->isValid()) {
segment_track('Dashboard', [ segment_track('Dashboard', [
'event' => 'Created Component Group', 'event' => 'Created Component Group',
'success' => false, 'success' => false,
@ -342,7 +351,7 @@ class ComponentController extends AbstractController
$groupData = Binput::get('group'); $groupData = Binput::get('group');
$group->update($groupData); $group->update($groupData);
if (! $group->isValid()) { if (!$group->isValid()) {
segment_track('Dashboard', [ segment_track('Dashboard', [
'event' => 'Edit Component Group', 'event' => 'Edit Component Group',
'success' => false, 'success' => false,

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin; namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController; use CachetHQ\Cachet\Http\Controllers\AbstractController;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin; namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController; use CachetHQ\Cachet\Http\Controllers\AbstractController;
@ -106,7 +115,7 @@ class IncidentController extends AbstractController
$incident = Incident::create($incidentData); $incident = Incident::create($incidentData);
if (! $incident->isValid()) { if (!$incident->isValid()) {
segment_track('Dashboard', [ segment_track('Dashboard', [
'event' => 'Created Incident', 'event' => 'Created Incident',
'success' => false, 'success' => false,
@ -197,7 +206,7 @@ class IncidentController extends AbstractController
$_template = Binput::get('template'); $_template = Binput::get('template');
$template = IncidentTemplate::create($_template); $template = IncidentTemplate::create($_template);
if (! $template->isValid()) { if (!$template->isValid()) {
segment_track('Dashboard', [ segment_track('Dashboard', [
'event' => 'Created Incident Template', 'event' => 'Created Incident Template',
'success' => false, 'success' => false,
@ -277,7 +286,7 @@ class IncidentController extends AbstractController
$incidentData['user_id'] = Auth::user()->id; $incidentData['user_id'] = Auth::user()->id;
$incident->update($incidentData); $incident->update($incidentData);
if (! $incident->isValid()) { if (!$incident->isValid()) {
segment_track('Dashboard', [ segment_track('Dashboard', [
'event' => 'Edited Incident', 'event' => 'Edited Incident',
'success' => false, 'success' => false,

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin; namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController; use CachetHQ\Cachet\Http\Controllers\AbstractController;
@ -62,7 +71,7 @@ class MetricController extends AbstractController
$metricData = Binput::get('metric'); $metricData = Binput::get('metric');
$metric = Metric::create($metricData); $metric = Metric::create($metricData);
if (! $metric->isValid()) { if (!$metric->isValid()) {
segment_track('Dashboard', [ segment_track('Dashboard', [
'event' => 'Created Metric', 'event' => 'Created Metric',
'success' => false, 'success' => false,
@ -113,7 +122,7 @@ class MetricController extends AbstractController
$_point = Binput::get('point'); $_point = Binput::get('point');
$point = MetricPoint::create($_point); $point = MetricPoint::create($_point);
if (! $point->isValid()) { if (!$point->isValid()) {
return Redirect::back()->withInput(Binput::all()) return Redirect::back()->withInput(Binput::all())
->with('title', sprintf( ->with('title', sprintf(
'<strong>%s</strong> %s', '<strong>%s</strong> %s',
@ -173,7 +182,7 @@ class MetricController extends AbstractController
$_metric = Binput::get('metric'); $_metric = Binput::get('metric');
$metric->update($_metric); $metric->update($_metric);
if (! $metric->isValid()) { if (!$metric->isValid()) {
segment_track('Dashboard', [ segment_track('Dashboard', [
'event' => 'Edited Metric', 'event' => 'Edited Metric',
'success' => false, 'success' => false,

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin; namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Facades\Setting; use CachetHQ\Cachet\Facades\Setting;
@ -104,7 +113,7 @@ class ScheduleController extends AbstractController
$incident = Incident::create($scheduleData); $incident = Incident::create($scheduleData);
if (! $incident->isValid()) { if (!$incident->isValid()) {
segment_track('Dashboard', [ segment_track('Dashboard', [
'event' => 'Created Scheduled Maintenance', 'event' => 'Created Scheduled Maintenance',
'success' => false, 'success' => false,
@ -180,7 +189,7 @@ class ScheduleController extends AbstractController
$schedule->update($scheduleData); $schedule->update($scheduleData);
if (! $schedule->isValid()) { if (!$schedule->isValid()) {
segment_track('Dashboard', [ segment_track('Dashboard', [
'event' => 'Edited Schedule', 'event' => 'Edited Schedule',
'success' => false, 'success' => false,

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin; namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController; use CachetHQ\Cachet\Http\Controllers\AbstractController;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin; namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController; use CachetHQ\Cachet\Http\Controllers\AbstractController;
@ -59,7 +68,7 @@ class TeamController extends AbstractController
{ {
$user = User::create(Binput::all()); $user = User::create(Binput::all());
if (! $user->isValid()) { if (!$user->isValid()) {
segment_track('Dashboard', [ segment_track('Dashboard', [
'event' => 'Added User', 'event' => 'Added User',
'success' => false, 'success' => false,
@ -107,7 +116,7 @@ class TeamController extends AbstractController
$user->update($items); $user->update($items);
if (! $user->isValid()) { if (!$user->isValid()) {
segment_track('Dashboard', [ segment_track('Dashboard', [
'event' => 'Updated User', 'event' => 'Updated User',
'success' => false, 'success' => false,

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin; namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController; use CachetHQ\Cachet\Http\Controllers\AbstractController;
@ -37,14 +46,14 @@ class UserController extends AbstractController
$enable2FA = (bool) array_pull($items, 'google2fa'); $enable2FA = (bool) array_pull($items, 'google2fa');
// Let's enable/disable auth // Let's enable/disable auth
if ($enable2FA && ! Auth::user()->hasTwoFactor) { if ($enable2FA && !Auth::user()->hasTwoFactor) {
$items['google_2fa_secret'] = Google2FA::generateSecretKey(); $items['google_2fa_secret'] = Google2FA::generateSecretKey();
segment_track('User Management', [ segment_track('User Management', [
'event' => 'enabled_two_factor', 'event' => 'enabled_two_factor',
'value' => true, 'value' => true,
]); ]);
} elseif (! $enable2FA) { } elseif (!$enable2FA) {
$items['google_2fa_secret'] = ''; $items['google_2fa_secret'] = '';
segment_track('User Management', [ segment_track('User Management', [
@ -60,7 +69,7 @@ class UserController extends AbstractController
$user = Auth::user(); $user = Auth::user();
$user->update($items); $user->update($items);
if (! $user->isValid()) { if (!$user->isValid()) {
return Redirect::back()->withInput(Binput::except('password')) return Redirect::back()->withInput(Binput::except('password'))
->with('title', sprintf( ->with('title', sprintf(
'<strong>%s</strong> %s', '<strong>%s</strong> %s',

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Api; namespace CachetHQ\Cachet\Http\Controllers\Api;
use CachetHQ\Cachet\Http\Controllers\AbstractController as BaseController; use CachetHQ\Cachet\Http\Controllers\AbstractController as BaseController;
@ -145,7 +154,7 @@ abstract class AbstractApiController extends BaseController
*/ */
protected function respond() protected function respond()
{ {
if (! empty($this->meta)) { if (!empty($this->meta)) {
$response['meta'] = $this->meta; $response['meta'] = $this->meta;
} }

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Api; namespace CachetHQ\Cachet\Http\Controllers\Api;
use CachetHQ\Cachet\Models\Tag; use CachetHQ\Cachet\Models\Tag;
@ -20,8 +29,6 @@ class ComponentController extends AbstractApiController
* Create a new component controller instance. * Create a new component controller instance.
* *
* @param \CachetHQ\Cachet\Repositories\Component\ComponentRepository $component * @param \CachetHQ\Cachet\Repositories\Component\ComponentRepository $component
*
* @return void
*/ */
public function __construct(ComponentRepository $component) public function __construct(ComponentRepository $component)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Api; namespace CachetHQ\Cachet\Http\Controllers\Api;
use CachetHQ\Cachet\Repositories\Incident\IncidentRepository; use CachetHQ\Cachet\Repositories\Incident\IncidentRepository;
@ -19,8 +28,6 @@ class IncidentController extends AbstractApiController
* Create a new incident controller instance. * Create a new incident controller instance.
* *
* @param \CachetHQ\Cachet\Repositories\Incident\IncidentRepository $incident * @param \CachetHQ\Cachet\Repositories\Incident\IncidentRepository $incident
*
* @return void
*/ */
public function __construct(IncidentRepository $incident) public function __construct(IncidentRepository $incident)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Api; namespace CachetHQ\Cachet\Http\Controllers\Api;
use CachetHQ\Cachet\Repositories\Metric\MetricRepository; use CachetHQ\Cachet\Repositories\Metric\MetricRepository;
@ -19,8 +28,6 @@ class MetricController extends AbstractApiController
* Create a new metric controller instance. * Create a new metric controller instance.
* *
* @param \CachetHQ\Cachet\Repositories\Metric\MetricRepository $metric * @param \CachetHQ\Cachet\Repositories\Metric\MetricRepository $metric
*
* @return void
*/ */
public function __construct(MetricRepository $metric) public function __construct(MetricRepository $metric)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Api; namespace CachetHQ\Cachet\Http\Controllers\Api;
use CachetHQ\Cachet\Repositories\MetricPoint\MetricPointRepository; use CachetHQ\Cachet\Repositories\MetricPoint\MetricPointRepository;
@ -18,8 +27,6 @@ class MetricPointController extends AbstractApiController
* Create a new metric point controller instance. * Create a new metric point controller instance.
* *
* @param \CachetHQ\Cachet\Repositories\MetricPoint\MetricPointRepository $metricPoint * @param \CachetHQ\Cachet\Repositories\MetricPoint\MetricPointRepository $metricPoint
*
* @return void
*/ */
public function __construct(MetricPointRepository $metricPoint) public function __construct(MetricPointRepository $metricPoint)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers; namespace CachetHQ\Cachet\Http\Controllers;
use CachetHQ\Cachet\Facades\Setting; use CachetHQ\Cachet\Facades\Setting;
@ -44,8 +53,6 @@ class AtomController extends AbstractController
* *
* @param Roumen\Feed\Facades\Feed $feed * @param Roumen\Feed\Facades\Feed $feed
* @param \CachetHQ\Cachet\Models\Incident $incident * @param \CachetHQ\Cachet\Models\Incident $incident
*
* @return void
*/ */
private function feedAddItem(&$feed, $incident) private function feedAddItem(&$feed, $incident)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers; namespace CachetHQ\Cachet\Http\Controllers;
use GrahamCampbell\Binput\Facades\Binput; use GrahamCampbell\Binput\Facades\Binput;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers; namespace CachetHQ\Cachet\Http\Controllers;
use CachetHQ\Cachet\Facades\Setting; use CachetHQ\Cachet\Facades\Setting;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers; namespace CachetHQ\Cachet\Http\Controllers;
use CachetHQ\Cachet\Facades\Setting; use CachetHQ\Cachet\Facades\Setting;
@ -45,8 +54,6 @@ class RssController extends AbstractController
* *
* @param Roumen\Feed\Facades\Feed $feed * @param Roumen\Feed\Facades\Feed $feed
* @param \CachetHQ\Cachet\Models\Incident $incident * @param \CachetHQ\Cachet\Models\Incident $incident
*
* @return void
*/ */
private function feedAddItem(&$feed, $incident) private function feedAddItem(&$feed, $incident)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers; namespace CachetHQ\Cachet\Http\Controllers;
use CachetHQ\Cachet\Models\Setting; use CachetHQ\Cachet\Models\Setting;
@ -17,8 +26,6 @@ class SetupController extends AbstractController
{ {
/** /**
* Create a new setup controller instance. * Create a new setup controller instance.
*
* @return void
*/ */
public function __construct() public function __construct()
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http; namespace CachetHQ\Cachet\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel; use Illuminate\Foundation\Http\Kernel as HttpKernel;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Middleware; namespace CachetHQ\Cachet\Http\Middleware;
use Closure; use Closure;
@ -19,8 +28,6 @@ class Admin
* Create a new filter instance. * Create a new filter instance.
* *
* @param Guard $auth * @param Guard $auth
*
* @return void
*/ */
public function __construct(Guard $auth) public function __construct(Guard $auth)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Middleware; namespace CachetHQ\Cachet\Http\Middleware;
use CachetHQ\Cachet\Facades\Setting; use CachetHQ\Cachet\Facades\Setting;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Middleware; namespace CachetHQ\Cachet\Http\Middleware;
use CachetHQ\Cachet\Models\User; use CachetHQ\Cachet\Models\User;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Middleware; namespace CachetHQ\Cachet\Http\Middleware;
use CachetHQ\Cachet\Models\Setting; use CachetHQ\Cachet\Models\Setting;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Middleware; namespace CachetHQ\Cachet\Http\Middleware;
use Closure; use Closure;
@ -18,8 +27,6 @@ class Authenticate
* Create a new filter instance. * Create a new filter instance.
* *
* @param Guard $auth * @param Guard $auth
*
* @return void
*/ */
public function __construct(Guard $auth) public function __construct(Guard $auth)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Middleware; namespace CachetHQ\Cachet\Http\Middleware;
use Closure; use Closure;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Middleware; namespace CachetHQ\Cachet\Http\Middleware;
use CachetHQ\Cachet\Models\Setting; use CachetHQ\Cachet\Models\Setting;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Middleware; namespace CachetHQ\Cachet\Http\Middleware;
use Closure; use Closure;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Middleware; namespace CachetHQ\Cachet\Http\Middleware;
use Closure; use Closure;
@ -19,8 +28,6 @@ class RedirectIfAuthenticated
* Create a new filter instance. * Create a new filter instance.
* *
* @param Guard $auth * @param Guard $auth
*
* @return void
*/ */
public function __construct(Guard $auth) public function __construct(Guard $auth)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Middleware; namespace CachetHQ\Cachet\Http\Middleware;
use Closure; use Closure;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Requests; namespace CachetHQ\Cachet\Http\Requests;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Routes; namespace CachetHQ\Cachet\Http\Routes;
use Illuminate\Contracts\Routing\Registrar; use Illuminate\Contracts\Routing\Registrar;
@ -10,8 +19,6 @@ class AdminRoutes
* Define the dashboard routes. * Define the dashboard routes.
* *
* @param \Illuminate\Contracts\Routing\Registrar $router * @param \Illuminate\Contracts\Routing\Registrar $router
*
* @return void
*/ */
public function map(Registrar $router) public function map(Registrar $router)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Routes; namespace CachetHQ\Cachet\Http\Routes;
use Illuminate\Contracts\Routing\Registrar; use Illuminate\Contracts\Routing\Registrar;
@ -10,8 +19,6 @@ class ApiRoutes
* Define the api routes. * Define the api routes.
* *
* @param \Illuminate\Contracts\Routing\Registrar $router * @param \Illuminate\Contracts\Routing\Registrar $router
*
* @return void
*/ */
public function map(Registrar $router) public function map(Registrar $router)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Routes; namespace CachetHQ\Cachet\Http\Routes;
use Illuminate\Contracts\Routing\Registrar; use Illuminate\Contracts\Routing\Registrar;
@ -10,8 +19,6 @@ class AuthRoutes
* Define the auth routes. * Define the auth routes.
* *
* @param \Illuminate\Contracts\Routing\Registrar $router * @param \Illuminate\Contracts\Routing\Registrar $router
*
* @return void
*/ */
public function map(Registrar $router) public function map(Registrar $router)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Routes; namespace CachetHQ\Cachet\Http\Routes;
use Illuminate\Contracts\Routing\Registrar; use Illuminate\Contracts\Routing\Registrar;
@ -10,8 +19,6 @@ class SetupRoutes
* Define the setup routes. * Define the setup routes.
* *
* @param \Illuminate\Contracts\Routing\Registrar $router * @param \Illuminate\Contracts\Routing\Registrar $router
*
* @return void
*/ */
public function map(Registrar $router) public function map(Registrar $router)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Routes; namespace CachetHQ\Cachet\Http\Routes;
use Illuminate\Contracts\Routing\Registrar; use Illuminate\Contracts\Routing\Registrar;
@ -10,8 +19,6 @@ class StatusPageRoutes
* Define the status page routes. * Define the status page routes.
* *
* @param \Illuminate\Contracts\Routing\Registrar $router * @param \Illuminate\Contracts\Routing\Registrar $router
*
* @return void
*/ */
public function map(Registrar $router) public function map(Registrar $router)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use CachetHQ\Cachet\Facades\Setting; use CachetHQ\Cachet\Facades\Setting;
use CachetHQ\Segment\Facades\Segment; use CachetHQ\Segment\Facades\Segment;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Models; namespace CachetHQ\Cachet\Models;
use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Builder;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Models; namespace CachetHQ\Cachet\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Models; namespace CachetHQ\Cachet\Models;
use Carbon\Carbon; use Carbon\Carbon;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Models; namespace CachetHQ\Cachet\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@ -37,8 +46,6 @@ class IncidentTemplate extends Model
/** /**
* Overrides the models boot method. * Overrides the models boot method.
*
* @return void
*/ */
public static function boot() public static function boot()
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Models; namespace CachetHQ\Cachet\Models;
use DateInterval; use DateInterval;
@ -81,14 +90,14 @@ class Metric extends Model
$dateTime->sub(new DateInterval('PT'.$hour.'H')); $dateTime->sub(new DateInterval('PT'.$hour.'H'));
if (Config::get('database.default') === 'mysql') { if (Config::get('database.default') === 'mysql') {
if (! isset($this->calc_type) || $this->calc_type == self::CALC_SUM) { if (!isset($this->calc_type) || $this->calc_type == self::CALC_SUM) {
$value = (int) $this->points()->whereRaw('DATE_FORMAT(created_at, "%Y%m%e%H") = '.$dateTime->sub(new DateInterval('PT'.$hour.'H'))->format('YmdH'))->groupBy(DB::raw('HOUR(created_at)'))->sum('value'); $value = (int) $this->points()->whereRaw('DATE_FORMAT(created_at, "%Y%m%e%H") = '.$dateTime->sub(new DateInterval('PT'.$hour.'H'))->format('YmdH'))->groupBy(DB::raw('HOUR(created_at)'))->sum('value');
} elseif ($this->calc_type == self::CALC_AVG) { } elseif ($this->calc_type == self::CALC_AVG) {
$value = (int) $this->points()->whereRaw('DATE_FORMAT(created_at, "%Y%m%e%H") = '.$dateTime->sub(new DateInterval('PT'.$hour.'H'))->format('YmdH'))->groupBy(DB::raw('HOUR(created_at)'))->avg('value'); $value = (int) $this->points()->whereRaw('DATE_FORMAT(created_at, "%Y%m%e%H") = '.$dateTime->sub(new DateInterval('PT'.$hour.'H'))->format('YmdH'))->groupBy(DB::raw('HOUR(created_at)'))->avg('value');
} }
} else { } else {
// Default metrics calculations. // Default metrics calculations.
if (! isset($this->calc_type) || $this->calc_type == self::CALC_SUM) { if (!isset($this->calc_type) || $this->calc_type == self::CALC_SUM) {
$queryType = 'sum(metric_points.value)'; $queryType = 'sum(metric_points.value)';
} elseif ($this->calc_type == self::CALC_AVG) { } elseif ($this->calc_type == self::CALC_AVG) {
$queryType = 'avg(metric_points.value)'; $queryType = 'avg(metric_points.value)';

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Models; namespace CachetHQ\Cachet\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Models; namespace CachetHQ\Cachet\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Models; namespace CachetHQ\Cachet\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Models; namespace CachetHQ\Cachet\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Models; namespace CachetHQ\Cachet\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@ -23,8 +32,6 @@ class Tag extends Model
/** /**
* Overrides the models boot method. * Overrides the models boot method.
*
* @return void
*/ */
public static function boot() public static function boot()
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Models; namespace CachetHQ\Cachet\Models;
use Illuminate\Auth\Authenticatable; use Illuminate\Auth\Authenticatable;
@ -57,15 +66,13 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
/** /**
* Overrides the models boot method. * Overrides the models boot method.
*
* @return void
*/ */
public static function boot() public static function boot()
{ {
parent::boot(); parent::boot();
self::creating(function ($user) { self::creating(function ($user) {
if (! $user->api_key) { if (!$user->api_key) {
$user->api_key = self::generateApiKey(); $user->api_key = self::generateApiKey();
} }
}); });

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Presenters; namespace CachetHQ\Cachet\Presenters;
use CachetHQ\Cachet\Facades\Setting; use CachetHQ\Cachet\Facades\Setting;
@ -21,8 +30,6 @@ class IncidentPresenter extends BasePresenter
* Create a incident presenter instance. * Create a incident presenter instance.
* *
* @param object $resource * @param object $resource
*
* @return void
*/ */
public function __construct($resource) public function __construct($resource)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Providers; namespace CachetHQ\Cachet\Providers;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
@ -8,8 +17,6 @@ class AppServiceProvider extends ServiceProvider
{ {
/** /**
* Bootstrap any application services. * Bootstrap any application services.
*
* @return void
*/ */
public function boot() public function boot()
{ {
@ -22,8 +29,6 @@ class AppServiceProvider extends ServiceProvider
* This service provider is a great spot to register your various container * This service provider is a great spot to register your various container
* bindings with the application. As you can see, we are registering our * bindings with the application. As you can see, we are registering our
* "Registrar" implementation here. You can add your own bindings too! * "Registrar" implementation here. You can add your own bindings too!
*
* @return void
*/ */
public function register() public function register()
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Providers; namespace CachetHQ\Cachet\Providers;
use Illuminate\Bus\Dispatcher; use Illuminate\Bus\Dispatcher;
@ -11,8 +20,6 @@ class BusServiceProvider extends ServiceProvider
* Bootstrap any application services. * Bootstrap any application services.
* *
* @param \Illuminate\Bus\Dispatcher $dispatcher * @param \Illuminate\Bus\Dispatcher $dispatcher
*
* @return void
*/ */
public function boot(Dispatcher $dispatcher) public function boot(Dispatcher $dispatcher)
{ {
@ -25,8 +32,6 @@ class BusServiceProvider extends ServiceProvider
/** /**
* Register any application services. * Register any application services.
*
* @return void
*/ */
public function register() public function register()
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Providers; namespace CachetHQ\Cachet\Providers;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
@ -12,8 +21,6 @@ class ConfigServiceProvider extends ServiceProvider
* This service provider is intended to provide a convenient location for you * This service provider is intended to provide a convenient location for you
* to overwrite any "vendor" or package configuration that you may want to * to overwrite any "vendor" or package configuration that you may want to
* modify before the application handles the incoming request / command. * modify before the application handles the incoming request / command.
*
* @return void
*/ */
public function register() public function register()
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Providers; namespace CachetHQ\Cachet\Providers;
use CachetHQ\Cachet\Console\Commands\FixPermissionsCommand; use CachetHQ\Cachet\Console\Commands\FixPermissionsCommand;
@ -9,8 +18,6 @@ class ConsoleServiceProvider extends ServiceProvider
{ {
/** /**
* Boot the service provider. * Boot the service provider.
*
* @return void
*/ */
public function boot() public function boot()
{ {
@ -19,8 +26,6 @@ class ConsoleServiceProvider extends ServiceProvider
/** /**
* Register the service provider. * Register the service provider.
*
* @return void
*/ */
public function register() public function register()
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Providers; namespace CachetHQ\Cachet\Providers;
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
@ -22,8 +31,6 @@ class EventServiceProvider extends ServiceProvider
* Register any other events for your application. * Register any other events for your application.
* *
* @param \Illuminate\Contracts\Events\Dispatcher $events * @param \Illuminate\Contracts\Events\Dispatcher $events
*
* @return void
*/ */
public function boot(DispatcherContract $events) public function boot(DispatcherContract $events)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Providers; namespace CachetHQ\Cachet\Providers;
use CachetHQ\Cachet\Facades\Setting; use CachetHQ\Cachet\Facades\Setting;
@ -10,8 +19,6 @@ class LoadConfigServiceProvider extends ServiceProvider
{ {
/** /**
* Boot the service provider. * Boot the service provider.
*
* @return void
*/ */
public function boot() public function boot()
{ {
@ -43,8 +50,6 @@ class LoadConfigServiceProvider extends ServiceProvider
/** /**
* Register the service provider. * Register the service provider.
*
* @return void
*/ */
public function register() public function register()
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Providers; namespace CachetHQ\Cachet\Providers;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
@ -8,8 +17,6 @@ class RepositoryServiceProvider extends ServiceProvider
{ {
/** /**
* Boot the service provider. * Boot the service provider.
*
* @return void
*/ */
public function boot() public function boot()
{ {
@ -18,8 +25,6 @@ class RepositoryServiceProvider extends ServiceProvider
/** /**
* Register the service provider. * Register the service provider.
*
* @return void
*/ */
public function register() public function register()
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Providers; namespace CachetHQ\Cachet\Providers;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
@ -20,8 +29,6 @@ class RouteServiceProvider extends ServiceProvider
* Define your route model bindings, pattern filters, etc. * Define your route model bindings, pattern filters, etc.
* *
* @param \Illuminate\Routing\Router $router * @param \Illuminate\Routing\Router $router
*
* @return void
*/ */
public function boot(Router $router) public function boot(Router $router)
{ {
@ -32,8 +39,6 @@ class RouteServiceProvider extends ServiceProvider
/** /**
* Register model bindings. * Register model bindings.
*
* @return void
*/ */
protected function registerBindings() protected function registerBindings()
{ {
@ -51,8 +56,6 @@ class RouteServiceProvider extends ServiceProvider
* Define the routes for the application. * Define the routes for the application.
* *
* @param \Illuminate\Routing\Router $router * @param \Illuminate\Routing\Router $router
*
* @return void
*/ */
public function map(Router $router) public function map(Router $router)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Providers; namespace CachetHQ\Cachet\Providers;
use CachetHQ\Cachet\Segment\CacheRepository; use CachetHQ\Cachet\Segment\CacheRepository;
@ -11,8 +20,6 @@ class SegmentApiServiceProvider extends ServiceProvider
{ {
/** /**
* Boot the service provider. * Boot the service provider.
*
* @return void
*/ */
public function boot() public function boot()
{ {
@ -21,8 +28,6 @@ class SegmentApiServiceProvider extends ServiceProvider
/** /**
* Register the service provider. * Register the service provider.
*
* @return void
*/ */
public function register() public function register()
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Providers; namespace CachetHQ\Cachet\Providers;
use CachetHQ\Cachet\Config\Repository; use CachetHQ\Cachet\Config\Repository;
@ -10,8 +19,6 @@ class SettingsServiceProvider extends ServiceProvider
{ {
/** /**
* Boot the service provider. * Boot the service provider.
*
* @return void
*/ */
public function boot() public function boot()
{ {
@ -20,8 +27,6 @@ class SettingsServiceProvider extends ServiceProvider
/** /**
* Register the service provider. * Register the service provider.
*
* @return void
*/ */
public function register() public function register()
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Providers; namespace CachetHQ\Cachet\Providers;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
@ -8,8 +17,6 @@ class ViewComposerServiceProvider extends ServiceProvider
{ {
/** /**
* Boot the service provider. * Boot the service provider.
*
* @return void
*/ */
public function boot() public function boot()
{ {
@ -18,8 +25,6 @@ class ViewComposerServiceProvider extends ServiceProvider
/** /**
* Register the service provider. * Register the service provider.
*
* @return void
*/ */
public function register() public function register()
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Repositories\Component; namespace CachetHQ\Cachet\Repositories\Component;
interface ComponentRepository interface ComponentRepository

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Repositories\Component; namespace CachetHQ\Cachet\Repositories\Component;
use CachetHQ\Cachet\Models\Component; use CachetHQ\Cachet\Models\Component;
@ -18,8 +27,6 @@ class EloquentComponentRepository extends EloquentRepository implements Componen
* Create a new eloquent component repository instance. * Create a new eloquent component repository instance.
* *
* @param \CachetHQ\Cachet\Models\Component $model * @param \CachetHQ\Cachet\Models\Component $model
*
* @return void
*/ */
public function __construct(Component $model) public function __construct(Component $model)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Repositories; namespace CachetHQ\Cachet\Repositories;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@ -128,8 +137,6 @@ abstract class EloquentRepository
* Deletes a model by id. * Deletes a model by id.
* *
* @param int $id * @param int $id
*
* @return void
*/ */
public function destroy($id) public function destroy($id)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Repositories\Incident; namespace CachetHQ\Cachet\Repositories\Incident;
use CachetHQ\Cachet\Models\Incident; use CachetHQ\Cachet\Models\Incident;
@ -18,8 +27,6 @@ class EloquentIncidentRepository extends EloquentRepository implements IncidentR
* Create a new eloquent incident repository instance. * Create a new eloquent incident repository instance.
* *
* @param \CachetHQ\Cachet\Models\Incident $model * @param \CachetHQ\Cachet\Models\Incident $model
*
* @return void
*/ */
public function __construct(Incident $model) public function __construct(Incident $model)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Repositories\Incident; namespace CachetHQ\Cachet\Repositories\Incident;
interface IncidentRepository interface IncidentRepository

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Repositories; namespace CachetHQ\Cachet\Repositories;
use Exception; use Exception;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Repositories; namespace CachetHQ\Cachet\Repositories;
use Exception; use Exception;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Repositories\Metric; namespace CachetHQ\Cachet\Repositories\Metric;
use CachetHQ\Cachet\Models\Metric; use CachetHQ\Cachet\Models\Metric;
@ -18,8 +27,6 @@ class EloquentMetricRepository extends EloquentRepository implements MetricRepos
* Create a new eloquent metric repository instance. * Create a new eloquent metric repository instance.
* *
* @param \CachetHQ\Cachet\Models\Metric $model * @param \CachetHQ\Cachet\Models\Metric $model
*
* @return void
*/ */
public function __construct(Metric $model) public function __construct(Metric $model)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Repositories\Metric; namespace CachetHQ\Cachet\Repositories\Metric;
interface MetricRepository interface MetricRepository

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Repositories\MetricPoint; namespace CachetHQ\Cachet\Repositories\MetricPoint;
use CachetHQ\Cachet\Models\MetricPoint; use CachetHQ\Cachet\Models\MetricPoint;
@ -18,8 +27,6 @@ class EloquentMetricPointRepository extends EloquentRepository implements Metric
* Create a new eloquent metric point repository instance. * Create a new eloquent metric point repository instance.
* *
* @param \CachetHQ\Cachet\Models\MetricPoint $model * @param \CachetHQ\Cachet\Models\MetricPoint $model
*
* @return void
*/ */
public function __construct(MetricPoint $model) public function __construct(MetricPoint $model)
{ {

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Repositories\MetricPoint; namespace CachetHQ\Cachet\Repositories\MetricPoint;
interface MetricPointRepository interface MetricPointRepository

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Segment; namespace CachetHQ\Cachet\Segment;
use CachetHQ\Cachet\Facades\Setting; use CachetHQ\Cachet\Facades\Setting;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Segment; namespace CachetHQ\Cachet\Segment;
use GuzzleHttp\ClientInterface; use GuzzleHttp\ClientInterface;

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Segment; namespace CachetHQ\Cachet\Segment;
interface RepositoryInterface interface RepositoryInterface

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Services; namespace CachetHQ\Cachet\Services;
use CachetHQ\Cachet\User; use CachetHQ\Cachet\User;

View File

@ -1,15 +1,13 @@
<?php <?php
/* /*
|-------------------------------------------------------------------------- * This file is part of Cachet.
| Create The Application *
|-------------------------------------------------------------------------- * (c) James Brooks <james@cachethq.io>
| *
| The first thing we will do is create a new Laravel application instance * For the full copyright and license information, please view the LICENSE
| which serves as the "glue" for all the components of Laravel, and is * file that was distributed with this source code.
| the IoC container for the system binding all of the various parts. */
|
*/
$app = new Illuminate\Foundation\Application( $app = new Illuminate\Foundation\Application(
realpath(__DIR__.'/../') realpath(__DIR__.'/../')

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
define('LARAVEL_START', microtime(true)); define('LARAVEL_START', microtime(true));
/* /*

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return [ return [
/* /*

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return [ return [
/* /*

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return [ return [
/* /*

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return [ return [
/* /*

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return [ return [
/* /*

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return [ return [
/* /*

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return [ return [
// Enabled langs // Enabled langs
'en-UD' => 'CrowdIn - InContext Localization', 'en-UD' => 'CrowdIn - InContext Localization',

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return [ return [
/* /*

View File

@ -1,9 +1,9 @@
<?php <?php
/* /*
* This file is part of Laravel Markdown. * This file is part of Cachet.
* *
* (c) Graham Campbell <graham@mineuk.com> * (c) James Brooks <james@cachethq.io>
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.

View File

@ -1,5 +1,14 @@
<?php <?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return [ return [
/* /*

View File

@ -1,9 +1,9 @@
<?php <?php
/* /*
* This file is part of Laravel Security. * This file is part of Cachet.
* *
* (c) Graham Campbell <graham@mineuk.com> * (c) James Brooks <james@cachethq.io>
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.

Some files were not shown because too many files have changed in this diff Show More