From 7bf7e00aa8483b4e4246064d0168fd476a877aae Mon Sep 17 00:00:00 2001
From: Chris Coley <chris@codingallnight.com>
Date: Mon, 15 Feb 2016 01:52:26 -0800
Subject: [PATCH] Fixing some typos

---
 src/TrustedProxies.php                | 4 ++--
 src/TrustedProxiesServiceProvider.php | 5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/TrustedProxies.php b/src/TrustedProxies.php
index 61f6a09..0c253cf 100644
--- a/src/TrustedProxies.php
+++ b/src/TrustedProxies.php
@@ -19,7 +19,7 @@ class TrustedProxies
      *
      * @param \Illuminate\Contracts\Config\Repository $config
      */
-    public function __construction(Repository $config) {
+    public function __construct(Repository $config) {
         $this->config = $config;
     }
 
@@ -47,7 +47,7 @@ class TrustedProxies
      * @param array $clientIpAddresses Array of client IP addresses.
      * @return array An array of IP addresses of the trusted proxies.
      */
-    protected function getTrustedProxies(array $clientIpAddress = []) {
+    protected function getTrustedProxies(array $clientIpAddresses = []) {
         $trustedProxies = $this->config->get('trustedproxies.proxies');
 
         // Trust all proxies
diff --git a/src/TrustedProxiesServiceProvider.php b/src/TrustedProxiesServiceProvider.php
index 867d016..069d2f3 100644
--- a/src/TrustedProxiesServiceProvider.php
+++ b/src/TrustedProxiesServiceProvider.php
@@ -2,6 +2,7 @@
 
 namespace CodingAllNight\Proxy;
 
+use Illuminate\Foundation\Application;
 use Illuminate\Support\ServiceProvider;
 
 class TrustedProxiesServiceProvider extends ServiceProvider
@@ -15,7 +16,9 @@ class TrustedProxiesServiceProvider extends ServiceProvider
         $config = realpath(__DIR__ . '/../config/trustedproxies.php');
 
         // Publish the config to the application's config directory
-        $this->publishes([$config => config_path('trustedproxies.php')]);
+        if ($this->app instanceof Application && $this->app->runningInConsole()) {
+            $this->publishes([$config => config_path('trustedproxies.php')]);
+        }
 
         // Merge the config
         $this->mergeConfigFrom($config, 'trustedproxies');
-- 
GitLab