Skip to content

Commit 2c0bc36

Browse files
committed
Autoload functions.php File (#10)
* Autoload functions.php file for consoleOutput() command * Rename consoleOutput function to avoid collisions
1 parent d8c280e commit 2c0bc36

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
"autoload": {
2020
"psr-4": {
2121
"EricMakesStuff\\ServerMonitor\\": "src/"
22-
}
22+
},
23+
"files": [
24+
"src/Helpers/functions.php"
25+
]
2326
},
2427
"require": {
2528
"illuminate/support": "^5.1",

src/Helpers/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* @return \EricMakesStuff\ServerMonitor\Helpers\ConsoleOutput
77
*/
8-
function consoleOutput()
8+
function monitorConsoleOutput()
99
{
1010
return app(ConsoleOutput::class);
1111
}

src/Notifications/Notifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ protected function sendNotification($eventName, $subject, $message, $type)
156156
.$exception->getTraceAsString();
157157

158158
$this->log->error($errorMessage);
159-
consoleOutput()->error($errorMessage);
159+
monitorConsoleOutput()->error($errorMessage);
160160
}
161161
});
162162
}

0 commit comments

Comments
 (0)