| @@ -377,7 +377,7 @@ | ||
| 377 | 377 | /** | 
| 378 | 378 | * Obtain package. | 
| 379 | 379 | * | 
| 380 | - * @param $name | |
| 380 | + * @param string $name | |
| 381 | 381 | * @return array|int | 
| 382 | 382 | */ | 
| 383 | 383 |      private function obtainPackage($name){ | 
| @@ -149,7 +149,7 @@ discard block | ||
| 149 | 149 | $process = new Process($composer.' require '.$package.''.$this->getDevOption(), | 
| 150 | 150 | null, null, null, null); | 
| 151 | 151 |          $this->output->writeln('<info>Running composer require '.$package.$this->getDevOption().'</info>'); | 
| 152 | -        $process->run(function ($type, $line) { | |
| 152 | +        $process->run(function($type, $line) { | |
| 153 | 153 | $this->output->write($line); | 
| 154 | 154 | }); | 
| 155 | 155 | } | 
| @@ -264,7 +264,7 @@ discard block | ||
| 264 | 264 | private function getPackageNameByComposerName($composerPackageName) | 
| 265 | 265 |      { | 
| 266 | 266 |          foreach ($this->config->all() as $key => $configItem) { | 
| 267 | -            if ($configItem['name'] == $composerPackageName) { | |
| 267 | +            if ($configItem[ 'name' ] == $composerPackageName) { | |
| 268 | 268 | return $key; | 
| 269 | 269 | } | 
| 270 | 270 | } | 
| @@ -301,9 +301,9 @@ discard block | ||
| 301 | 301 | $this->setName($name) | 
| 302 | 302 | ->setDescription($description); | 
| 303 | 303 |          if ($command->argument() != null) { | 
| 304 | - $this->addArgument($command->argument()['name'], | |
| 305 | - $command->argument()['type'], | |
| 306 | - $command->argument()['description'] | |
| 304 | + $this->addArgument($command->argument()[ 'name' ], | |
| 305 | + $command->argument()[ 'type' ], | |
| 306 | + $command->argument()[ 'description' ] | |
| 307 | 307 | ); | 
| 308 | 308 | } | 
| 309 | 309 | } | 
| @@ -328,7 +328,7 @@ discard block | ||
| 328 | 328 | return; | 
| 329 | 329 | } | 
| 330 | 330 | |
| 331 | - $this->$method($input,$output); | |
| 331 | + $this->$method($input, $output); | |
| 332 | 332 | } | 
| 333 | 333 | |
| 334 | 334 | /** | 
| @@ -112,9 +112,9 @@ | ||
| 112 | 112 | /** | 
| 113 | 113 | * Insert file into file using mountpoint. | 
| 114 | 114 | * | 
| 115 | - * @param $mountpoint | |
| 115 | + * @param string $mountpoint | |
| 116 | 116 | * @param $fileToInsert | 
| 117 | - * @return mixed | |
| 117 | + * @return integer|null | |
| 118 | 118 | */ | 
| 119 | 119 | private function addFileIntoMountPoint($mountpoint, $fileToInsert) | 
| 120 | 120 |      { | 
| @@ -48,6 +48,6 @@ | ||
| 48 | 48 | */ | 
| 49 | 49 | private function parsePackageInfo($package) | 
| 50 | 50 |      { | 
| 51 | - return 'Composer name: '.$package['name']; | |
| 51 | + return 'Composer name: '.$package[ 'name' ]; | |
| 52 | 52 | } | 
| 53 | 53 | } | 
| @@ -111,7 +111,6 @@ | ||
| 111 | 111 | /** | 
| 112 | 112 | * Get credentials. | 
| 113 | 113 | * | 
| 114 | - * @param OutputInterface $input | |
| 115 | 114 | * @return array | 
| 116 | 115 | */ | 
| 117 | 116 | public function getCredentials(OutputInterface $output) | 
| @@ -79,15 +79,15 @@ discard block | ||
| 79 | 79 | $this->api->setCredentials($this->getCredentials($output)); | 
| 80 | 80 | $name = $this->repoName($input); | 
| 81 | 81 |          try { | 
| 82 | - $this->api->createRepo($name,$this->repoDescription($input)); | |
| 82 | + $this->api->createRepo($name, $this->repoDescription($input)); | |
| 83 | 83 |          } catch (ServerException $se) { | 
| 84 | 84 | //TODO | 
| 85 | 85 |              $output->writeln('<error>Server exception thrown</error>'); | 
| 86 | 86 | die(); | 
| 87 | 87 |          } catch (ClientException $ce) { | 
| 88 | - $this->showError( $ce , $output ); | |
| 88 | + $this->showError($ce, $output); | |
| 89 | 89 | } | 
| 90 | -        $output->writeln('<info>Repository ' . $name . ' created</info>'); | |
| 90 | +        $output->writeln('<info>Repository '.$name.' created</info>'); | |
| 91 | 91 | } | 
| 92 | 92 | |
| 93 | 93 | |
| @@ -117,8 +117,8 @@ discard block | ||
| 117 | 117 | public function getCredentials(OutputInterface $output) | 
| 118 | 118 |      { | 
| 119 | 119 | $credentials = $this->parser->getCredentials(); | 
| 120 | -        if ( is_null($credentials)) { | |
| 121 | - $this->showErrorRunLlumInitFirst($output,"Credentials"); | |
| 120 | +        if (is_null($credentials)) { | |
| 121 | + $this->showErrorRunLlumInitFirst($output, "Credentials"); | |
| 122 | 122 | }; | 
| 123 | 123 | return $credentials; | 
| 124 | 124 | } | 
| @@ -16,7 +16,7 @@ discard block | ||
| 16 | 16 | * | 
| 17 | 17 | * Overwrite file with provided content. | 
| 18 | 18 | * | 
| 19 | - * @param $file | |
| 19 | + * @param string $file | |
| 20 | 20 | * @param $content | 
| 21 | 21 | */ | 
| 22 | 22 | public function overwrite($file, $content) | 
| @@ -42,6 +42,7 @@ discard block | ||
| 42 | 42 | |
| 43 | 43 | /** | 
| 44 | 44 | * Get file contents | 
| 45 | + * @param string $file | |
| 45 | 46 | */ | 
| 46 | 47 |      public function get($file) { | 
| 47 | 48 | return file_get_contents($file); | 
| @@ -33,7 +33,7 @@ | ||
| 33 | 33 | */ | 
| 34 | 34 | public function make($file, $content) | 
| 35 | 35 |      { | 
| 36 | - if ( $this->exists($file)) | |
| 36 | + if ($this->exists($file)) | |
| 37 | 37 |          { | 
| 38 | 38 | throw new FileAlreadyExists; | 
| 39 | 39 | } | 
| @@ -126,7 +126,7 @@ discard block | ||
| 126 | 126 | * | 
| 127 | 127 | * @param $repo_name | 
| 128 | 128 | * @param $repo_description | 
| 129 | - * @return mixed | |
| 129 | + * @return \Psr\Http\Message\ResponseInterface | |
| 130 | 130 | */ | 
| 131 | 131 | public function createRepo($repo_name, $repo_description) | 
| 132 | 132 |      { | 
| @@ -166,7 +166,7 @@ discard block | ||
| 166 | 166 | * | 
| 167 | 167 | * @param $repo_name | 
| 168 | 168 | * @param $repo_description | 
| 169 | - * @return mixed | |
| 169 | + * @return string | |
| 170 | 170 | */ | 
| 171 | 171 | protected function compileStub($repo_name, $repo_description) | 
| 172 | 172 |      { | 
| @@ -182,7 +182,7 @@ discard block | ||
| 182 | 182 | /** | 
| 183 | 183 | * Compile the template using the given data. | 
| 184 | 184 | * | 
| 185 | - * @param $template | |
| 185 | + * @param string $template | |
| 186 | 186 | * @param $data | 
| 187 | 187 | * @return mixed | 
| 188 | 188 | */ | 
| @@ -70,7 +70,7 @@ discard block | ||
| 70 | 70 | * @return string | 
| 71 | 71 | */ | 
| 72 | 72 |      protected function repo_json_stub() { | 
| 73 | - return __DIR__ . '/stubs/repo_json.stub'; | |
| 73 | + return __DIR__.'/stubs/repo_json.stub'; | |
| 74 | 74 | } | 
| 75 | 75 | |
| 76 | 76 | /** | 
| @@ -79,7 +79,7 @@ discard block | ||
| 79 | 79 | * @return string | 
| 80 | 80 | */ | 
| 81 | 81 |      protected function authorization_url() { | 
| 82 | - return $this->api_url . $this->authorizations_uri; | |
| 82 | + return $this->api_url.$this->authorizations_uri; | |
| 83 | 83 | } | 
| 84 | 84 | |
| 85 | 85 | /** | 
| @@ -88,7 +88,7 @@ discard block | ||
| 88 | 88 | * @return string | 
| 89 | 89 | */ | 
| 90 | 90 |      protected function create_repo_url() { | 
| 91 | - return $this->api_url . $this->repos_uri; | |
| 91 | + return $this->api_url.$this->repos_uri; | |
| 92 | 92 | } | 
| 93 | 93 | |
| 94 | 94 | /** | 
| @@ -102,7 +102,7 @@ discard block | ||
| 102 | 102 |      { | 
| 103 | 103 |          $response = $this->client->request('POST', $this->authorization_url(), | 
| 104 | 104 | [ | 
| 105 | - "auth" => [ $username, $password], | |
| 105 | + "auth" => [ $username, $password ], | |
| 106 | 106 | "json" => $this->authorizationsRequestJson() | 
| 107 | 107 | ] | 
| 108 | 108 | ); | 
| @@ -114,7 +114,7 @@ discard block | ||
| 114 | 114 | /** | 
| 115 | 115 | * @return array | 
| 116 | 116 | */ | 
| 117 | -    protected function authorizationsRequestJson(){ | |
| 117 | +    protected function authorizationsRequestJson() { | |
| 118 | 118 | return [ | 
| 119 | 119 | 'scopes' => [ 'public_repo' ], | 
| 120 | 120 |              'note' =>  uniqid('llum_') | 
| @@ -133,7 +133,7 @@ discard block | ||
| 133 | 133 |          return $this->client->request('POST', $this->create_repo_url(), | 
| 134 | 134 | [ | 
| 135 | 135 | "auth" => $this->credentials(), | 
| 136 | - "json" => json_decode($this->compileStub($repo_name, $repo_description),true), | |
| 136 | + "json" => json_decode($this->compileStub($repo_name, $repo_description), true), | |
| 137 | 137 | ] | 
| 138 | 138 | ); | 
| 139 | 139 | } | 
| @@ -175,7 +175,7 @@ discard block | ||
| 175 | 175 | "REPO_DESCRIPTION" => $repo_description | 
| 176 | 176 | ]; | 
| 177 | 177 | return $this->compile( | 
| 178 | - $this->filesystem->get($this->repo_json_stub()) , | |
| 178 | + $this->filesystem->get($this->repo_json_stub()), | |
| 179 | 179 | $data); | 
| 180 | 180 | } | 
| 181 | 181 | |
| @@ -188,7 +188,7 @@ discard block | ||
| 188 | 188 | */ | 
| 189 | 189 | protected function compile($template, $data) | 
| 190 | 190 |      { | 
| 191 | - foreach($data as $key => $value) | |
| 191 | + foreach ($data as $key => $value) | |
| 192 | 192 |          { | 
| 193 | 193 |              $template = preg_replace("/\\$$key\\$/i", $value, $template); | 
| 194 | 194 | } | 
| @@ -156,8 +156,9 @@ | ||
| 156 | 156 | */ | 
| 157 | 157 | protected function credentials() | 
| 158 | 158 |      { | 
| 159 | - if (isset($this->credentials)) | |
| 160 | - return $this->credentials; | |
| 159 | +        if (isset($this->credentials)) { | |
| 160 | + return $this->credentials; | |
| 161 | + } | |
| 161 | 162 | throw new CredentialsException; | 
| 162 | 163 | } | 
| 163 | 164 | |
| @@ -50,8 +50,8 @@ discard block | ||
| 50 | 50 | public function getCredentials() | 
| 51 | 51 |      { | 
| 52 | 52 | $rc_file = $this->parse(); | 
| 53 | -        if ( array_key_exists('username',$rc_file) && array_key_exists('username',$rc_file)) { | |
| 54 | - return [$rc_file['username'],$rc_file['token']]; | |
| 53 | +        if (array_key_exists('username', $rc_file) && array_key_exists('username', $rc_file)) { | |
| 54 | + return [ $rc_file[ 'username' ], $rc_file[ 'token' ] ]; | |
| 55 | 55 | } | 
| 56 | 56 | } | 
| 57 | 57 | |
| @@ -63,8 +63,8 @@ discard block | ||
| 63 | 63 | public function getGitHubUsername() | 
| 64 | 64 |      { | 
| 65 | 65 | $rc_file = $this->parse(); | 
| 66 | -        if ( array_key_exists('username',$rc_file)) { | |
| 67 | - return $rc_file['username']; | |
| 66 | +        if (array_key_exists('username', $rc_file)) { | |
| 67 | + return $rc_file[ 'username' ]; | |
| 68 | 68 | } | 
| 69 | 69 | } | 
| 70 | 70 | |
| @@ -13,7 +13,7 @@ | ||
| 13 | 13 | */ | 
| 14 | 14 | public function compile($template, $data) | 
| 15 | 15 |      { | 
| 16 | - foreach($data as $key => $value) | |
| 16 | + foreach ($data as $key => $value) | |
| 17 | 17 |          { | 
| 18 | 18 |              $template = preg_replace("/\\$$key\\$/i", $value, $template); | 
| 19 | 19 | } | 
| @@ -13,62 +13,62 @@ | ||
| 13 | 13 | |
| 14 | 14 | 'AdminLTE' => [ | 
| 15 | 15 | 'name' => 'acacha/admin-lte-template-laravel', | 
| 16 | - 'providers' => ['Acacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class'], | |
| 17 | - 'aliases' => ['AdminLTE' => 'Acacha\AdminLTETemplateLaravel\Facades\AdminLTE::class'], | |
| 16 | + 'providers' => [ 'Acacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class' ], | |
| 17 | + 'aliases' => [ 'AdminLTE' => 'Acacha\AdminLTETemplateLaravel\Facades\AdminLTE::class' ], | |
| 18 | 18 | 'after' => 'php artisan adminlte-laravel:publish --force', | 
| 19 | 19 | ], | 
| 20 | 20 | |
| 21 | 21 | 'AdminLTEDontForce' => [ | 
| 22 | 22 | 'name' => 'acacha/admin-lte-template-laravel', | 
| 23 | - 'providers' => ['Acacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class'], | |
| 24 | - 'aliases' => ['AdminLTE' => 'Acacha\AdminLTETemplateLaravel\Facades\AdminLTE::class'], | |
| 23 | + 'providers' => [ 'Acacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class' ], | |
| 24 | + 'aliases' => [ 'AdminLTE' => 'Acacha\AdminLTETemplateLaravel\Facades\AdminLTE::class' ], | |
| 25 | 25 | 'after' => 'php artisan adminlte-laravel:publish', | 
| 26 | - 'aliases' => ['AdminLTE' => 'Acacha\AdminLTETemplateLaravel\Facades\AdminLTE::class'], | |
| 26 | + 'aliases' => [ 'AdminLTE' => 'Acacha\AdminLTETemplateLaravel\Facades\AdminLTE::class' ], | |
| 27 | 27 | 'after' => 'php artisan adminlte-laravel:publish', | 
| 28 | 28 | ], | 
| 29 | 29 | |
| 30 | 30 | 'AdminLTEVendorPublish' => [ | 
| 31 | 31 | 'name' => 'acacha/admin-lte-template-laravel', | 
| 32 | - 'providers' => ['Acacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class'], | |
| 33 | - 'aliases' => ['AdminLTE' => 'Acacha\AdminLTETemplateLaravel\Facades\AdminLTE::class'], | |
| 32 | + 'providers' => [ 'Acacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class' ], | |
| 33 | + 'aliases' => [ 'AdminLTE' => 'Acacha\AdminLTETemplateLaravel\Facades\AdminLTE::class' ], | |
| 34 | 34 | 'after' => 'php artisan vendor:publish --tag=adminlte --force', | 
| 35 | 35 | ], | 
| 36 | 36 | |
| 37 | 37 | 'AdminLTEVendorPublishDontForce' => [ | 
| 38 | 38 | 'name' => 'acacha/admin-lte-template-laravel', | 
| 39 | - 'providers' => ['Acacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class'], | |
| 40 | - 'aliases' => ['AdminLTE' => 'Acacha\AdminLTETemplateLaravel\Facades\AdminLTE::class'], | |
| 39 | + 'providers' => [ 'Acacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class' ], | |
| 40 | + 'aliases' => [ 'AdminLTE' => 'Acacha\AdminLTETemplateLaravel\Facades\AdminLTE::class' ], | |
| 41 | 41 | 'after' => 'php artisan vendor:publish --tag=adminlte', | 
| 42 | 42 | ], | 
| 43 | 43 | |
| 44 | 44 | 'LaravelDebugbar' => [ | 
| 45 | 45 | 'name' => 'barryvdh/laravel-debugbar', | 
| 46 | - 'providers' => ['Barryvdh\Debugbar\ServiceProvider::class'], | |
| 47 | - 'aliases' => ['Debugbar' => 'Barryvdh\Debugbar\Facade::class'], | |
| 46 | + 'providers' => [ 'Barryvdh\Debugbar\ServiceProvider::class' ], | |
| 47 | + 'aliases' => [ 'Debugbar' => 'Barryvdh\Debugbar\Facade::class' ], | |
| 48 | 48 | 'after' => 'php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider"', | 
| 49 | 49 | ], | 
| 50 | 50 | |
| 51 | 51 | 'LaravelIdeHelper' => [ | 
| 52 | 52 | 'name' => 'barryvdh/laravel-ide-helper', | 
| 53 | - 'providers' => ['Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class'], | |
| 53 | + 'providers' => [ 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class' ], | |
| 54 | 54 | 'after' => 'php artisan ide-helper:generate', | 
| 55 | 55 | ], | 
| 56 | 56 | |
| 57 | 57 | 'Socialite' => [ | 
| 58 | 58 | 'name' => 'laravel/socialite', | 
| 59 | - 'providers' => ['Laravel\Socialite\SocialiteServiceProvider::class'], | |
| 60 | - 'aliases' => ['Socialite' => 'Laravel\Socialite\Facades\Socialite::class'], | |
| 59 | + 'providers' => [ 'Laravel\Socialite\SocialiteServiceProvider::class' ], | |
| 60 | + 'aliases' => [ 'Socialite' => 'Laravel\Socialite\Facades\Socialite::class' ], | |
| 61 | 61 | ], | 
| 62 | 62 | |
| 63 | 63 | 'AcachaSocialite' => [ | 
| 64 | 64 | 'name' => 'acacha/acacha-socialite', | 
| 65 | - 'providers' => ['Acacha\Socialite\Providers\AcachaSocialiteServiceProvider::class'], | |
| 65 | + 'providers' => [ 'Acacha\Socialite\Providers\AcachaSocialiteServiceProvider::class' ], | |
| 66 | 66 | 'after' => 'php artisan vendor:publish --tag=acachasocialite --force', | 
| 67 | 67 | ], | 
| 68 | 68 | |
| 69 | 69 | 'LaravelPassport' => [ | 
| 70 | 70 | 'name' => 'acacha/passport', | 
| 71 | - 'providers' => ['Laravel\Passport\PassportServiceProvider::class'], | |
| 71 | + 'providers' => [ 'Laravel\Passport\PassportServiceProvider::class' ], | |
| 72 | 72 | 'after' => 'php artisan migrate;php artisan passport:install', | 
| 73 | 73 | ], | 
| 74 | 74 | |