Skip to content

Commit

Permalink
php-cs-fixer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vinicius73 committed Oct 29, 2015
1 parent 3fa4327 commit 65cc402
Show file tree
Hide file tree
Showing 34 changed files with 117 additions and 54 deletions.
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/vendor
/node_modules
/.idea
.env
*.cache
Homestead.yaml
Homestead.json
.env
bower_components
public/build
public/css
public/fonts
/.idea
public/fonts
74 changes: 74 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?php

$finder = Symfony\Component\Finder\Finder::create()
->files()
->in(__DIR__)
->exclude('vendor')
->exclude('node_modules')
->exclude('bower_packages')
->exclude('storage')
->exclude('bootstrap/cache')
->exclude('public')
->exclude('resources/assets')
->notName("*.txt")
->notName("*.js")
->notName("*.json")
->notName("*.map")
->notName("*.less")
->notName("*.css")
->notName("*.phar")
->ignoreDotFiles(true)
->ignoreVCS(true);

$fixers = [
'-psr0',
'-php_closing_tag',
'blankline_after_open_tag',
'concat_without_spaces',
'double_arrow_multiline_whitespaces',
'duplicate_semicolon',
'empty_return',
'extra_empty_lines',
'include',
'join_function',
'list_commas',
'multiline_array_trailing_comma',
'namespace_no_leading_whitespace',
'no_blank_lines_after_class_opening',
'no_empty_lines_after_phpdocs',
'object_operator',
'operators_spaces',
'phpdoc_indent',
'phpdoc_no_access',
'phpdoc_no_package',
'phpdoc_scalar',
'phpdoc_short_description',
'phpdoc_to_comment',
'phpdoc_trim',
'phpdoc_type_to_var',
'phpdoc_var_without_name',
'remove_leading_slash_use',
'remove_lines_between_uses',
'return',
'self_accessor',
'single_array_no_trailing_comma',
'single_blank_line_before_namespace',
'single_quote',
'spaces_before_semicolon',
'spaces_cast',
'standardize_not_equal',
'ternary_spaces',
'trim_array_spaces',
'unalign_equals',
'unary_operators_spaces',
'whitespacy_lines',
'multiline_spaces_before_semicolon',
'short_array_syntax',
'short_echo_tag',
];

return Symfony\CS\Config\Config::create()
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
->fixers($fixers)
->finder($finder)
->setUsingCache(true);
3 changes: 1 addition & 2 deletions app/Core/Contracts/Repositories/CommonRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@

interface CommonRepository extends Common
{

}
}
2 changes: 1 addition & 1 deletion app/Core/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ abstract class Controller extends BaseController
protected function view($view = null, $data = [], $mergeData = [])
{
if (!empty($this->view_namespace) and !str_contains($view, '::')) {
$view = $this->view_namespace . $view;
$view = $this->view_namespace.$view;
}

return view($view, $data, $mergeData);
Expand Down
2 changes: 1 addition & 1 deletion app/Core/Http/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
*/
3 changes: 1 addition & 2 deletions app/Core/Illuminate/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@

class Application extends BaseApplication
{

}
}
2 changes: 1 addition & 1 deletion app/Core/Providers/ViewServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ViewServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->loadViewsFrom(__DIR__ . '/../resources/views', 'core');
$this->loadViewsFrom(__DIR__.'/../resources/views', 'core');
}

/**
Expand Down
3 changes: 1 addition & 2 deletions app/Core/Repositories/CommonRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@

class CommonRepository extends BaseRepository
{

}
}
2 changes: 1 addition & 1 deletion app/Core/Traits/UseFlash.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public function flash()
{
return flash();
}
}
}
2 changes: 1 addition & 1 deletion app/Domain/Answers/Answer.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ public function question()
{
return $this->hasMany(Question::class);
}
}
}
2 changes: 1 addition & 1 deletion app/Domain/Answers/AnswerRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
class AnswerRepository extends CommonRepository implements AnswerRepositoryContact
{
protected $modelClass = Answer::class;
}
}
3 changes: 1 addition & 2 deletions app/Domain/Answers/Contracts/AnswerRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@

interface AnswerRepository extends CommonRepository
{

}
}
2 changes: 0 additions & 2 deletions app/Domain/Auth/AuthService.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Contracts\Auth\Guard;


class AuthService implements AuthServiceContract
{
/**
Expand All @@ -22,7 +21,6 @@ public function __construct(Guard $auth)
$this->auth = $auth;
}


/**
* @param array $credentials
*
Expand Down
4 changes: 2 additions & 2 deletions app/Domain/Auth/Contracts/AuthService.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function byCredentials(array $credentials, $remeber = false);
public function login(Authenticatable $user, $remember = false);

/**
* @return void
*/
* @return void
*/
public function logout();
}
2 changes: 1 addition & 1 deletion app/Domain/Categories/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
class Category extends Model
{
protected $table = 'categories';
}
}
1 change: 0 additions & 1 deletion app/Domain/DomainServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ public function register()
\Artesaos\Domain\Users\UserRepository::class
);
}

}
3 changes: 1 addition & 2 deletions app/Domain/Questions/Contracts/QuestionRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@

interface QuestionRepository extends CommonRepository
{

}
}
2 changes: 1 addition & 1 deletion app/Domain/Questions/Question.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ public function categories()
{
return $this->belongsToMany(Category::class);
}
}
}
2 changes: 1 addition & 1 deletion app/Domain/Questions/QuestionPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ public function isResolvedLabel()

return "<span class='label label-success'>RESOLVIDO</span>";
}
}
}
2 changes: 1 addition & 1 deletion app/Domain/Questions/QuestionRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
class QuestionRepository extends CommonRepository implements QuestionRepositoryContract
{
protected $modelClass = Question::class;
}
}
1 change: 0 additions & 1 deletion app/Domain/Users/Contracts/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@

interface UserRepository extends CommonRepository
{

}
1 change: 0 additions & 1 deletion app/Domain/Users/Http/Requests/RegisterFormRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

class RegisterFormRequest extends RequestsBase
{

public function authorize()
{
return true;
Expand Down
5 changes: 3 additions & 2 deletions app/Domain/Users/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class User extends Model implements AuthenticatableContract,
*/
protected $hidden = ['password', 'remember_token'];

public function setPasswordAttribute($value){
$this->attributes['password'] = bcrypt($value);
public function setPasswordAttribute($value)
{
$this->attributes['password'] = bcrypt($value);
}
}
2 changes: 1 addition & 1 deletion app/Domain/Users/UserPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ public function avatar($size = 100)

return "//www.gravatar.com/avatar/{$hash}?d=identicon&s={$size}";
}
}
}
8 changes: 4 additions & 4 deletions app/Forum/Http/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
use Artesaos\Domain\Users\Http\Requests\RegisterFormRequest;

/**
* Class AuthController
* @package Artesaos\Forum\Http\Controllers
* Class AuthController.
*/
class AuthController extends BaseController
{
Expand All @@ -29,7 +28,7 @@ class AuthController extends BaseController
*/
public function __construct(AuthService $authService, UserRepository $userRepository)
{
$this->authService = $authService;
$this->authService = $authService;
$this->userRepository = $userRepository;
}

Expand All @@ -50,6 +49,7 @@ public function logout()
{
$this->authService->logout();
$this->flash()->success('Deslogado, volte sempre!');

return redirect('/');
}

Expand All @@ -63,7 +63,7 @@ public function store(LoginFormRequest $request)
// @TODO Error and Success messages

$credentials = $request->only(['password', 'email']);
$remember = $request->has('remember');
$remember = $request->has('remember');

if ($this->authService->byCredentials($credentials, $remember)) {
$this->flash()->success('Bem vindo manolo!');
Expand Down
2 changes: 1 addition & 1 deletion app/Forum/Http/Controllers/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ abstract class BaseController extends Controller
use UseSEOTools, UseFlash;

protected $view_namespace = 'forum::';
}
}
2 changes: 1 addition & 1 deletion app/Forum/Http/Controllers/PagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ public function home(QuestionRepository $repository)

return $this->view('pages.home', compact('questions'));
}
}
}
2 changes: 1 addition & 1 deletion app/Forum/Http/Controllers/QuestionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ public function show($id)

return $this->view('questions.show', compact('question'));
}
}
}
1 change: 1 addition & 0 deletions app/Forum/Http/routes.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/*
|--------------------------------------------------------------------------
| Front Application Routes
Expand Down
2 changes: 1 addition & 1 deletion app/Forum/Providers/ForumServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ForumServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->loadViewsFrom(__DIR__ . '/../resources/views', 'forum');
$this->loadViewsFrom(__DIR__.'/../resources/views', 'forum');
$this->routes($this->app['router']);
}

Expand Down
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Flash' => Laracasts\Flash\Flash::class
'Flash' => Laracasts\Flash\Flash::class,

],

Expand Down
12 changes: 6 additions & 6 deletions config/seotools.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* The default configurations to be used by the meta generator.
*/
'defaults' => [
'title' => "Forum Laravel Brasil", // set false to total remove
'title' => 'Forum Laravel Brasil', // set false to total remove
'description' => 'Um forum para artesaos', // set false to total remove
'separator' => ' - ',
'keywords' => [],
Expand All @@ -20,8 +20,8 @@
'bing' => null,
'alexa' => null,
'pinterest' => null,
'yandex' => null
]
'yandex' => null,
],
],
'opengraph' => [
/*
Expand All @@ -34,7 +34,7 @@
'type' => false,
'site_name' => false,
'images' => [],
]
],
],
'twitter' => [
/*
Expand All @@ -43,6 +43,6 @@
'defaults' => [
//'card' => 'summary',
//'site' => '@LuizVinicius73',
]
]
],
],
];
Loading

0 comments on commit 65cc402

Please sign in to comment.