@@ -29,11 +29,11 @@ |
||
| 29 | 29 | // parameter represents the DataTables column identifier. In this case simple |
| 30 | 30 | // indexes |
| 31 | 31 | $columns = [ |
| 32 | - ['db' => 'id', 'dt' => 0], |
|
| 33 | - ['db' => 'firstname', 'dt' => 1], |
|
| 34 | - ['db' => 'surname', 'dt' => 2], |
|
| 35 | - ['db' => 'zip', 'dt' => 3], |
|
| 36 | - ['db' => 'country', 'dt' => 4], |
|
| 32 | + ['db' => 'id', 'dt' => 0], |
|
| 33 | + ['db' => 'firstname', 'dt' => 1], |
|
| 34 | + ['db' => 'surname', 'dt' => 2], |
|
| 35 | + ['db' => 'zip', 'dt' => 3], |
|
| 36 | + ['db' => 'country', 'dt' => 4], |
|
| 37 | 37 | ]; |
| 38 | 38 | |
| 39 | 39 | // SQL server connection information |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public function map(Router $router) |
| 41 | 41 | { |
| 42 | - $router->group(['namespace' => $this->namespace], function ($router) { |
|
| 42 | + $router->group(['namespace' => $this->namespace], function($router) { |
|
| 43 | 43 | require app_path('Http/routes.php'); |
| 44 | 44 | }); |
| 45 | 45 | } |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * @param null|string $accessTokenSecret |
| 54 | 54 | * @throws TwitterRestApiException |
| 55 | 55 | */ |
| 56 | - public function __construct($consumerKey,$consumerSecret,$accessToken = null,$accessTokenSecret = null) |
|
| 56 | + public function __construct($consumerKey, $consumerSecret, $accessToken = null, $accessTokenSecret = null) |
|
| 57 | 57 | { |
| 58 | 58 | if (!function_exists('curl_init')) { |
| 59 | 59 | throw new TwitterRestApiException('You must have the cURL extension enabled to use this library'); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | public function connectAsApplication() |
| 74 | 74 | { |
| 75 | - return new Application($this->_consumerKey,$this->_consumerSecret); |
|
| 75 | + return new Application($this->_consumerKey, $this->_consumerSecret); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | if (!$this->_accessToken || !$this->_accessTokenSecret) { |
| 88 | 88 | throw new TwitterRestApiException('Missing ACCESS_TOKEN OR ACCESS_TOKEN_SECRET'); |
| 89 | 89 | } |
| 90 | - return new User($this->_consumerKey,$this->_consumerSecret,$this->_accessToken,$this->_accessTokenSecret); |
|
| 90 | + return new User($this->_consumerKey, $this->_consumerSecret, $this->_accessToken, $this->_accessTokenSecret); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | } |
| 94 | 94 | \ No newline at end of file |
@@ -54,11 +54,11 @@ discard block |
||
| 54 | 54 | * @since 1.0.0 |
| 55 | 55 | * @param string $api_key flickr API key. |
| 56 | 56 | */ |
| 57 | - public function __construct($consumer_key,$consumer_secret,$access_token,$access_token_secret) { |
|
| 58 | - $this->consumer_key = $consumer_key; |
|
| 59 | - $this->consumer_secret = $consumer_secret; |
|
| 60 | - $this->access_token = $access_token; |
|
| 61 | - $this->access_token_secret = $access_token_secret; |
|
| 57 | + public function __construct($consumer_key, $consumer_secret, $access_token, $access_token_secret) { |
|
| 58 | + $this->consumer_key = $consumer_key; |
|
| 59 | + $this->consumer_secret = $consumer_secret; |
|
| 60 | + $this->access_token = $access_token; |
|
| 61 | + $this->access_token_secret = $access_token_secret; |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
@@ -67,8 +67,8 @@ discard block |
||
| 67 | 67 | * @since 1.0.0 |
| 68 | 68 | * @param string $twitter_account Twitter account without trailing @ char |
| 69 | 69 | */ |
| 70 | - public function get_public_photos($twitter_account){ |
|
| 71 | - $twitter = new \TwitterPhp\RestApi($this->consumer_key,$this->consumer_secret,$this->access_token,$this->access_token_secret); |
|
| 70 | + public function get_public_photos($twitter_account) { |
|
| 71 | + $twitter = new \TwitterPhp\RestApi($this->consumer_key, $this->consumer_secret, $this->access_token, $this->access_token_secret); |
|
| 72 | 72 | /* |
| 73 | 73 | * Connect as application |
| 74 | 74 | * https://dev.twitter.com/docs/auth/application-only-auth |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | * Collection of the most recent Tweets posted by the user indicated by the screen_name, without replies |
| 80 | 80 | * https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline |
| 81 | 81 | */ |
| 82 | - $tweets = $connection->get('/statuses/user_timeline',array('screen_name' => $twitter_account, 'entities' => 1, 'trim_user' => 0 , 'exclude_replies' => 'true')); |
|
| 82 | + $tweets = $connection->get('/statuses/user_timeline', array('screen_name' => $twitter_account, 'entities' => 1, 'trim_user' => 0, 'exclude_replies' => 'true')); |
|
| 83 | 83 | //var_dump($tweets); |
| 84 | 84 | return $tweets; |
| 85 | 85 | } |
@@ -94,12 +94,12 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | public static function array_find_element_by_key($key, $form) { |
| 96 | 96 | if (array_key_exists($key, $form)) { |
| 97 | - $ret =& $form[$key]; |
|
| 97 | + $ret = & $form[$key]; |
|
| 98 | 98 | return $ret; |
| 99 | 99 | } |
| 100 | 100 | foreach ($form as $k => $v) { |
| 101 | 101 | if (is_array($v)) { |
| 102 | - $ret =TP_twitter::array_find_element_by_key($key, $form[$k]); |
|
| 102 | + $ret = TP_twitter::array_find_element_by_key($key, $form[$k]); |
|
| 103 | 103 | if ($ret) { |
| 104 | 104 | return $ret; |
| 105 | 105 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function register() |
| 22 | 22 | { |
| 23 | - $this->app->singleton('hash', function () { |
|
| 23 | + $this->app->singleton('hash', function() { |
|
| 24 | 24 | return new BcryptHasher; |
| 25 | 25 | }); |
| 26 | 26 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | register_shutdown_function([$this, 'handleShutdown']); |
| 38 | 38 | |
| 39 | - if (! $app->environment('testing')) { |
|
| 39 | + if (!$app->environment('testing')) { |
|
| 40 | 40 | ini_set('display_errors', 'Off'); |
| 41 | 41 | } |
| 42 | 42 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | public function handleException($e) |
| 74 | 74 | { |
| 75 | - if (! $e instanceof Exception) { |
|
| 75 | + if (!$e instanceof Exception) { |
|
| 76 | 76 | $e = new FatalThrowableError($e); |
| 77 | 77 | } |
| 78 | 78 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | public function handleShutdown() |
| 116 | 116 | { |
| 117 | - if (! is_null($error = error_get_last()) && $this->isFatal($error['type'])) { |
|
| 117 | + if (!is_null($error = error_get_last()) && $this->isFatal($error['type'])) { |
|
| 118 | 118 | $this->handleException($this->fatalExceptionFromError($error, 0)); |
| 119 | 119 | } |
| 120 | 120 | } |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | */ |
| 87 | 87 | public function register() |
| 88 | 88 | { |
| 89 | - if (! $this->registered) { |
|
| 89 | + if (!$this->registered) { |
|
| 90 | 90 | $this->prependToLoaderStack(); |
| 91 | 91 | |
| 92 | 92 | $this->registered = true; |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | // First we will check if an environment argument was passed via console arguments |
| 48 | 48 | // and if it was that automatically overrides as the environment. Otherwise, we |
| 49 | 49 | // will check the environment as a "web" request like a typical HTTP request. |
| 50 | - if (! is_null($value = $this->getEnvironmentArgument($args))) { |
|
| 50 | + if (!is_null($value = $this->getEnvironmentArgument($args))) { |
|
| 51 | 51 | return head(array_slice(explode('=', $value), 1)); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | protected function getEnvironmentArgument(array $args) |
| 64 | 64 | { |
| 65 | - return Arr::first($args, function ($k, $v) { |
|
| 65 | + return Arr::first($args, function($k, $v) { |
|
| 66 | 66 | return Str::startsWith($v, '--env'); |
| 67 | 67 | }); |
| 68 | 68 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public function cant($ability, $arguments = []) |
| 29 | 29 | { |
| 30 | - return ! $this->can($ability, $arguments); |
|
| 30 | + return !$this->can($ability, $arguments); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |