@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * extend the functionality of the default get() of the Repository |
39 | 39 | * but always prepend the keys with the config file name. |
40 | 40 | * |
41 | - * @param $key |
|
41 | + * @param string $key |
|
42 | 42 | * |
43 | 43 | * @return mixed |
44 | 44 | */ |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * helper function to return the driver default name. |
52 | 52 | * |
53 | - * @return mixed |
|
53 | + * @return string |
|
54 | 54 | */ |
55 | 55 | public function driverName() |
56 | 56 | { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | /** |
61 | 61 | * helper function to return the parameters of the driver $name. |
62 | 62 | * |
63 | - * @param $name |
|
63 | + * @param string $name |
|
64 | 64 | * |
65 | 65 | * @return mixed |
66 | 66 | */ |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | /** |
102 | 102 | * Load the configuration items from all of the files. |
103 | 103 | * |
104 | - * @param $path |
|
104 | + * @param string $path |
|
105 | 105 | */ |
106 | 106 | private function loadConfigurationFiles($path) |
107 | 107 | { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function read($key) |
46 | 46 | { |
47 | - return $this->get(self::CONFIG_FILE_NAME.'.'.$key); |
|
47 | + return $this->get(self::CONFIG_FILE_NAME . '.' . $key); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function driverParameters($name) |
68 | 68 | { |
69 | - return $this->read('drivers'.'.'.$name); |
|
69 | + return $this->read('drivers' . '.' . $name); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | // check if this laravel specific function `config_path()` exist (means this package is used inside |
88 | 88 | // a laravel framework). If so then load then try to load the laravel config file if it exist. |
89 | 89 | if (function_exists('config_path')) { |
90 | - $config_file = config_path().'/'.self::CONFIG_FILE_NAME.'.php'; |
|
90 | + $config_file = config_path() . '/' . self::CONFIG_FILE_NAME . '.php'; |
|
91 | 91 | |
92 | 92 | if (file_exists($config_file)) { |
93 | 93 | // override the path by the laravel specific config directory |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $envConfig = require $path; |
116 | 116 | |
117 | 117 | foreach ($envConfig as $envKey => $value) { |
118 | - $this->set($fileKey.'.'.$envKey, $value); |
|
118 | + $this->set($fileKey . '.' . $envKey, $value); |
|
119 | 119 | } |
120 | 120 | } |
121 | 121 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
48 | - * @param $url |
|
48 | + * @param string $url |
|
49 | 49 | * @param $parameters |
50 | 50 | * |
51 | 51 | * @return mixed |
@@ -108,7 +108,7 @@ |
||
108 | 108 | */ |
109 | 109 | protected function url() |
110 | 110 | { |
111 | - return $this->domain.$this->endpoint; |
|
111 | + return $this->domain . $this->endpoint; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
@@ -79,9 +79,9 @@ |
||
79 | 79 | $prams_former = '?'; |
80 | 80 | |
81 | 81 | foreach ($parameters as $key => $value) { |
82 | - $prams_former = $prams_former.$key.'='.$value.'&'; |
|
82 | + $prams_former = $prams_former . $key . '=' . $value . '&'; |
|
83 | 83 | } |
84 | 84 | |
85 | - return $url.substr($prams_former, 0, -1); |
|
85 | + return $url . substr($prams_former, 0, -1); |
|
86 | 86 | } |
87 | 87 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | // prepare the full driver class name |
42 | - $driver_class = self::DRIVERS_NAMESPACE.ucwords($name); |
|
42 | + $driver_class = self::DRIVERS_NAMESPACE . ucwords($name); |
|
43 | 43 | |
44 | 44 | if (!class_exists($driver_class)) { |
45 | 45 | throw new UnsupportedDriverException("The driver ($name) is not supported."); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | { |
78 | 78 | // When users execute Laravel's vendor:publish command, the config file will be copied to the specified location |
79 | 79 | $this->publishes([ |
80 | - __DIR__.'/Config/url-shortener.php' => config_path('url-shortener.php'), |
|
80 | + __DIR__ . '/Config/url-shortener.php' => config_path('url-shortener.php'), |
|
81 | 81 | ]); |
82 | 82 | } |
83 | 83 | |
@@ -87,12 +87,12 @@ discard block |
||
87 | 87 | private function facadeBindings() |
88 | 88 | { |
89 | 89 | // Register 'vinelab.shorten' instance container |
90 | - $this->app['vinelab.shorten'] = $this->app->share(function ($app) { |
|
90 | + $this->app['vinelab.shorten'] = $this->app->share(function($app) { |
|
91 | 91 | return $app->make('Vinelab\UrlShortener\Shorten'); |
92 | 92 | }); |
93 | 93 | |
94 | 94 | // Register 'Shorten' Alias, So users don't have to add the Alias to the 'app/config/app.php' |
95 | - $this->app->booting(function () { |
|
95 | + $this->app->booting(function() { |
|
96 | 96 | $loader = \Illuminate\Foundation\AliasLoader::getInstance(); |
97 | 97 | $loader->alias('Shorten', 'Vinelab\UrlShortener\Facades\ShortenFacadeAccessor'); |
98 | 98 | }); |