From bdbd737000e7195e2cd088314b752099e63f5b95 Mon Sep 17 00:00:00 2001 From: Antoine Augusti Date: Tue, 25 Aug 2015 21:51:45 +0200 Subject: [PATCH 1/4] Update machine names for local env --- bootstrap/start.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/start.php b/bootstrap/start.php index 60b77396..56d0f66f 100644 --- a/bootstrap/start.php +++ b/bootstrap/start.php @@ -34,7 +34,7 @@ $env = $app->detectEnvironment([ - 'local' => ['antoine', 'aaugusti', 'aaugusti-mba', '*.home', '*.local', '*.lan'], + 'local' => ['cinderella', '*.home', '*.local', '*.lan'], 'staging' => ['teen-quotes-staging'], 'production' => ['teen-quotes-production'], From 1de3455074eed5f6a6182ecf4fae11f7958aa3fd Mon Sep 17 00:00:00 2001 From: Antoine Augusti Date: Tue, 25 Aug 2015 21:52:24 +0200 Subject: [PATCH 2/4] Change the login label on the signup page --- app/lang/en/auth.php | 2 +- ressources/views/auth/signup.blade.php | 10 +++++----- tests/_support/FormFillerHelper.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/lang/en/auth.php b/app/lang/en/auth.php index 7818211f..fc0b9076 100644 --- a/app/lang/en/auth.php +++ b/app/lang/en/auth.php @@ -4,7 +4,7 @@ 'alreadyLoggedIn' => 'You are already logged in.', 'loginSuccessfull' => 'Hi :login! Nice to see you :)', 'passwordInvalid' => 'Your password is invalid.', - 'login' => 'Login', + 'login' => 'Username', 'password' => 'Password', 'emailAddress' => 'Email address', 'loginButton' => 'Log me in!', diff --git a/ressources/views/auth/signup.blade.php b/ressources/views/auth/signup.blade.php index 8dd50ee4..a14d0d99 100644 --- a/ressources/views/auth/signup.blade.php +++ b/ressources/views/auth/signup.blade.php @@ -21,14 +21,14 @@
{{Lang::get('auth.signupText')}}
- {{ Form::open(array('url' => URL::route('users.store'), 'class' => 'form-horizontal')) }} + {{ Form::open(['url' => URL::route('users.store'), 'class' => 'form-horizontal']) }}
{{ Form::label('login', Lang::get('auth.login'), ['class' => 'col-sm-2 control-label']) }}
- {{ Form::text('login', Input::old('login'), array('class' => 'form-control', 'id' => 'login-signup')) }} + {{ Form::text('login', Input::old('login'), ['class' => 'form-control', 'id' => 'login-signup', 'placeholder' => 'janedoe']) }}
@@ -45,7 +45,7 @@ {{ Form::label('email', Lang::get('auth.emailAddress'), ['class' => 'col-sm-2 control-label']) }}
- {{ Form::email('email', Input::old('email'), array('class' => 'form-control', 'id' => 'email-signup')) }} + {{ Form::email('email', Input::old('email'), ['class' => 'form-control', 'id' => 'email-signup', 'placeholder' => 'jane@example.com']) }}
{{ Lang::get('auth.carefulPrivacy') }}
@@ -72,7 +72,7 @@
- {{ Form::submit(Lang::get('auth.signupButton'), array('class' => 'transition animated fadeInUp btn btn-primary btn-lg', 'id' => 'submit-form')) }} + {{ Form::submit(Lang::get('auth.signupButton'), ['class' => 'transition animated fadeInUp btn btn-primary btn-lg', 'id' => 'submit-form']) }}
@@ -80,4 +80,4 @@ {{ Form::close() }}
-@stop \ No newline at end of file +@stop diff --git a/tests/_support/FormFillerHelper.php b/tests/_support/FormFillerHelper.php index e8e2e559..a85025af 100644 --- a/tests/_support/FormFillerHelper.php +++ b/tests/_support/FormFillerHelper.php @@ -13,7 +13,7 @@ public function fillSigninForm($login, $password) { $I = $this->getModule('Laravel4'); - $I->fillField('Login', $login); + $I->fillField('Username', $login); $I->fillField('Password', $password); $I->click('Log me in!', 'form'); } From dbba36c5c8f605b48abb5c3f5d90a466dabd179e Mon Sep 17 00:00:00 2001 From: Antoine Augusti Date: Sun, 6 Sep 2015 17:12:08 +0200 Subject: [PATCH 3/4] Use only Codeception v2.0.13 for tests --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index af5cf6f4..960a8754 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "require-dev": { "way/generators": "2.*", "fzaninotto/faker": "dev-master", - "codeception/codeception": "~2.0", + "codeception/codeception": "2.0.13", "mockery/mockery": "dev-master", "captbaritone/mailcatcher-codeception-module": "dev-master" }, From ffee226ec1841dc7900a3385c29fff7f25d5154a Mon Sep 17 00:00:00 2001 From: Antoine Augusti Date: Sun, 6 Sep 2015 11:33:42 -0400 Subject: [PATCH 4/4] Applied fixes from StyleCI --- .../AdminPanel/AdminPanelServiceProvider.php | 9 ++ .../Composers/ModerationIndexComposer.php | 9 ++ .../Controllers/QuotesAdminController.php | 11 +- .../AdminPanel/Helpers/Moderation.php | 9 ++ app/TeenQuotes/Api/V1/ApiServiceProvider.php | 9 ++ .../V1/Controllers/APIGlobalController.php | 9 ++ .../Api/V1/Controllers/CommentsController.php | 23 ++-- .../V1/Controllers/CountriesController.php | 9 ++ .../Api/V1/Controllers/PasswordController.php | 21 +++- .../Api/V1/Controllers/QuotesController.php | 17 ++- .../Controllers/QuotesFavoriteController.php | 9 ++ .../Api/V1/Controllers/SearchController.php | 13 +- .../Api/V1/Controllers/StoriesController.php | 11 +- .../Api/V1/Controllers/UsersController.php | 25 ++-- .../V1/Interfaces/PageBuilderInterface.php | 9 ++ .../Interfaces/PaginatedContentInterface.php | 10 ++ app/TeenQuotes/Api/V1/Tools/PageBuilder.php | 13 +- app/TeenQuotes/Auth/AuthServiceProvider.php | 9 ++ .../Auth/Composers/ResetComposer.php | 11 +- .../Auth/Composers/SigninComposer.php | 9 ++ .../Auth/Composers/SignupComposer.php | 9 ++ .../Auth/Controllers/AuthController.php | 13 +- .../Auth/Controllers/RemindersController.php | 9 ++ .../Comments/CommentsServiceProvider.php | 9 ++ .../Comments/Composers/EditComposer.php | 9 ++ .../Controllers/CommentsController.php | 13 +- app/TeenQuotes/Comments/Models/Comment.php | 9 ++ .../Models/Relations/CommentTrait.php | 9 ++ .../Comments/Models/Scopes/CommentTrait.php | 9 ++ .../Comments/Observers/CommentObserver.php | 11 +- .../Comments/Presenters/CommentPresenter.php | 9 ++ .../Repositories/CachingCommentRepository.php | 9 ++ .../Repositories/CommentRepository.php | 9 ++ .../Repositories/DbCommentRepository.php | 15 ++- .../Comments/Validation/CommentValidator.php | 9 ++ .../Console/MostCommonCountryCommand.php | 11 +- .../Countries/CountriesServiceProvider.php | 9 ++ .../Countries/Localisation/CityDetector.php | 9 ++ .../Localisation/CountryDetector.php | 9 ++ .../Countries/Localisation/Detector.php | 9 ++ .../Localisation/GeoIPCityDetector.php | 9 ++ .../Localisation/GeoIPCountryDetector.php | 11 +- app/TeenQuotes/Countries/Models/Country.php | 9 ++ .../Models/Relations/CountryTrait.php | 9 ++ .../Countries/Presenters/CountryPresenter.php | 9 ++ .../Repositories/CachingCountryRepository.php | 9 ++ .../Repositories/CountryRepository.php | 9 ++ .../Repositories/DbCountryRepository.php | 9 ++ app/TeenQuotes/Database/Toloquent.php | 9 ++ .../Exceptions/ApiNotFoundException.php | 9 ++ .../Exceptions/CountryNotFoundException.php | 9 ++ .../Exceptions/HiddenProfileException.php | 9 ++ .../Exceptions/QuoteNotFoundException.php | 9 ++ .../Exceptions/StoryNotFoundException.php | 9 ++ .../Exceptions/TQNotFoundException.php | 9 ++ .../Exceptions/TagNotFoundException.php | 9 ++ .../Exceptions/TokenNotFoundException.php | 9 ++ .../Exceptions/UserNotFoundException.php | 9 ++ app/TeenQuotes/Http/Facades/Response.php | 9 ++ app/TeenQuotes/Http/JsonResponse.php | 9 ++ .../Mail/Composers/IndexQuotesComposer.php | 9 ++ .../Mail/Composers/WelcomeViewComposer.php | 13 +- .../Mail/Facades/MandrillClient.php | 9 ++ app/TeenQuotes/Mail/MailServiceProvider.php | 9 ++ app/TeenQuotes/Mail/MailSwitcher.php | 9 ++ app/TeenQuotes/Mail/Mailer.php | 9 ++ app/TeenQuotes/Mail/Mandrill.php | 11 +- .../Mail/MandrillServiceProvider.php | 9 ++ .../Mail/Transport/MandrillTransport.php | 9 ++ app/TeenQuotes/Mail/UserMailer.php | 9 ++ .../Console/SendNewsletterCommand.php | 11 +- .../Console/UnsubscribeUsersCommand.php | 13 +- .../Controllers/MailchimpWebhook.php | 9 ++ .../Newsletters/Mailchimp/NewsletterList.php | 19 ++- .../Newsletters/Models/Newsletter.php | 9 ++ .../Models/Relations/NewsletterTrait.php | 9 ++ .../Models/Scopes/NewsletterTrait.php | 9 ++ app/TeenQuotes/Newsletters/NewsletterList.php | 9 ++ .../NewsletterListServiceProvider.php | 9 ++ .../Newsletters/NewslettersManager.php | 9 ++ .../NewslettersServiceProvider.php | 9 ++ .../Repositories/DbNewsletterRepository.php | 9 ++ .../Repositories/NewsletterRepository.php | 9 ++ app/TeenQuotes/Notifiers/AdminNotifier.php | 9 ++ .../AdminNotifierServiceProvider.php | 9 ++ .../Pushbullet/PushbulletAdminNotifier.php | 9 ++ .../Notifiers/Sms/SmsAdminNotifier.php | 11 +- .../Pages/Composers/AppsComposer.php | 9 ++ .../Pages/Controllers/AppsController.php | 11 +- .../Pages/Controllers/ContactController.php | 27 ++-- .../Pages/Controllers/LegalController.php | 9 ++ app/TeenQuotes/Pages/PagesServiceProvider.php | 9 ++ .../Queues/QueuesServiceProvider.php | 9 ++ .../Queues/Workers/EasyrecWorker.php | 9 ++ .../Queues/Workers/ProfileVisitorWorker.php | 9 ++ .../Quotes/Composers/AddComposer.php | 9 ++ .../Quotes/Composers/IndexComposer.php | 9 ++ .../Quotes/Composers/IndexForTagComposer.php | 9 ++ .../Quotes/Composers/IndexForTopsComposer.php | 9 ++ .../Quotes/Composers/ResultsComposer.php | 9 ++ .../Quotes/Composers/ShowComposer.php | 11 +- .../Quotes/Composers/SingleComposer.php | 9 ++ .../Quotes/Console/QuotesPublishCommand.php | 11 +- .../Quotes/Console/WaitingQuotesCommand.php | 9 ++ .../Controllers/FavoriteQuoteController.php | 11 +- .../Quotes/Controllers/QuotesController.php | 15 ++- .../Quotes/Controllers/SearchController.php | 21 +++- .../Quotes/Models/FavoriteQuote.php | 9 ++ app/TeenQuotes/Quotes/Models/Quote.php | 11 +- .../Models/Relations/FavoriteQuoteTrait.php | 9 ++ .../Quotes/Models/Relations/QuoteTrait.php | 9 ++ .../Models/Scopes/FavoriteQuoteTrait.php | 12 +- .../Quotes/Models/Scopes/QuoteTrait.php | 9 ++ .../Quotes/Presenters/QuotePresenter.php | 27 ++-- .../Quotes/QuotesServiceProvider.php | 9 ++ .../CachingFavoriteQuoteRepository.php | 15 ++- .../Repositories/CachingQuoteRepository.php | 11 +- .../DbFavoriteQuoteRepository.php | 13 +- .../Quotes/Repositories/DbQuoteRepository.php | 21 +++- .../Repositories/FavoriteQuoteRepository.php | 9 ++ .../Quotes/Repositories/QuoteRepository.php | 13 +- .../Validation/FavoriteQuoteValidator.php | 9 ++ .../Quotes/Validation/QuoteValidator.php | 9 ++ .../Robots/Controllers/RobotsController.php | 11 +- .../Robots/RobotsServiceProvider.php | 9 ++ .../Models/Relations/SettingTrait.php | 9 ++ app/TeenQuotes/Settings/Models/Setting.php | 11 +- .../Repositories/CachingSettingRepository.php | 9 ++ .../Repositories/DbSettingRepository.php | 9 ++ .../Repositories/SettingRepository.php | 9 ++ .../Settings/SettingsServiceProvider.php | 9 ++ .../Stories/Controllers/StoriesController.php | 13 +- .../Stories/Models/Relations/StoryTrait.php | 9 ++ .../Stories/Models/Scopes/StoryTrait.php | 9 ++ app/TeenQuotes/Stories/Models/Story.php | 11 +- .../Stories/Presenters/StoryPresenter.php | 11 +- .../Repositories/DbStoryRepository.php | 13 +- .../Stories/Repositories/StoryRepository.php | 9 ++ .../Stories/StoriesServiceProvider.php | 9 ++ .../Stories/Validation/StoryValidator.php | 9 ++ .../Tags/Models/Relations/TagTrait.php | 9 ++ app/TeenQuotes/Tags/Models/Tag.php | 9 ++ .../Repositories/CachingTagRepository.php | 9 ++ .../Tags/Repositories/DbTagRepository.php | 9 ++ .../Tags/Repositories/TagRepository.php | 9 ++ app/TeenQuotes/Tags/TagsServiceProvider.php | 9 ++ app/TeenQuotes/Tools/BaseController.php | 9 ++ .../Tools/Colors/ColorGenerator.php | 9 ++ .../Tools/Colors/ColorGeneratorInterface.php | 9 ++ .../Composers/AbstractDeepLinksComposer.php | 9 ++ .../Tools/Composers/DeepLinksComposer.php | 9 ++ .../Interfaces/QuotesColorsExtractor.php | 9 ++ .../Tools/Namespaces/NamespaceTrait.php | 9 ++ app/TeenQuotes/Tools/TextTools.php | 9 ++ app/TeenQuotes/Tools/ToolsServiceProvider.php | 9 ++ app/TeenQuotes/Tools/Validation/Validator.php | 21 +++- .../Users/Composers/ProfileEditComposer.php | 15 ++- .../Composers/SearchUsersCountryComposer.php | 14 ++- .../Users/Composers/ShowComposer.php | 13 +- .../Users/Composers/WelcomeComposer.php | 21 +++- .../Console/EmailSpecialEventCommand.php | 13 +- .../Users/Console/SendBirthdayCommand.php | 11 +- .../Users/Controllers/UsersController.php | 11 +- .../Users/Models/ProfileVisitor.php | 11 +- .../Models/Relations/ProfileVisitorTrait.php | 9 ++ .../Users/Models/Relations/UserTrait.php | 9 ++ .../Users/Models/Scopes/UserTrait.php | 9 ++ app/TeenQuotes/Users/Models/User.php | 11 +- .../Users/Observers/UserObserver.php | 11 +- .../Users/Presenters/UserPresenter.php | 9 ++ .../DbProfileVisitorRepository.php | 9 ++ .../Users/Repositories/DbUserRepository.php | 21 +++- .../Repositories/ProfileVisitorRepository.php | 9 ++ .../Users/Repositories/UserRepository.php | 9 ++ app/TeenQuotes/Users/UsersServiceProvider.php | 13 +- .../Users/Validation/UserValidator.php | 9 ++ app/commands/QuoteRefuseTooSadCommand.php | 25 ++-- app/config/app.php | 11 +- app/config/auth.php | 9 ++ app/config/cache.php | 9 ++ app/config/codeception/app.php | 9 ++ app/config/codeception/cache.php | 9 ++ app/config/codeception/database.php | 9 ++ app/config/codeception/mail.php | 9 ++ app/config/codeception/queue.php | 9 ++ app/config/codeception/session.php | 9 ++ app/config/codeceptionMysql/app.php | 9 ++ app/config/codeceptionMysql/cache.php | 9 ++ app/config/codeceptionMysql/database.php | 9 ++ app/config/codeceptionMysql/mail.php | 9 ++ app/config/codeceptionMysql/queue.php | 9 ++ app/config/codeceptionMysql/session.php | 9 ++ app/config/compile.php | 9 ++ app/config/database.php | 17 ++- app/config/exceptions.php | 11 +- app/config/local/app.php | 9 ++ app/config/local/queue.php | 9 ++ app/config/mail.php | 9 ++ app/config/mobile.php | 11 +- .../antoineaugusti/laravel-easyrec/config.php | 9 ++ .../bugsnag/bugsnag-laravel/config.php | 9 ++ .../buonzz/laravel-4-freegeoip/config.php | 9 ++ .../packages/dinesh/bugonemail/config.php | 9 ++ .../graham-campbell/htmlmin/config.php | 9 ++ .../packages/laracasts/utilities/config.php | 9 ++ .../oauth2-server-laravel/oauth2.php | 9 ++ app/config/packages/philf/setting/setting.php | 15 ++- .../packages/philo/translate/config.php | 9 ++ .../thomaswelton/laravel-gravatar/config.php | 9 ++ app/config/queue.php | 9 ++ app/config/remote.php | 9 ++ app/config/services.php | 9 ++ app/config/session.php | 9 ++ app/config/staging/app.php | 9 ++ app/config/staging/queue.php | 9 ++ app/config/testing/cache.php | 9 ++ app/config/testing/database.php | 9 ++ app/config/testing/mail.php | 9 ++ app/config/testing/queue.php | 9 ++ app/config/testing/session.php | 9 ++ app/config/view.php | 9 ++ app/config/workbench.php | 9 ++ ...14_04_19_165416_create_countries_table.php | 9 ++ .../2014_04_20_081041_create_users_table.php | 9 ++ .../2014_04_20_082050_create_quotes_table.php | 9 ++ ...014_04_20_085037_create_comments_table.php | 9 ++ ...14_04_20_085307_create_user_user_table.php | 9 ++ ...4_04_20_085428_create_quote_user_table.php | 9 ++ ..._04_20_085555_create_newsletters_table.php | 9 ++ ...2014_04_20_085822_create_stories_table.php | 9 ++ ...155003_create_password_reminders_table.php | 9 ++ ...014_05_11_072156_create_settings_table.php | 9 ++ .../2015_02_08_170159_create_tags_table.php | 9 ++ ...15_02_08_170224_create_quote_tag_table.php | 9 ++ app/database/seeds/CommentsTableSeeder.php | 9 ++ app/database/seeds/CountriesTableSeeder.php | 9 ++ app/database/seeds/DatabaseSeeder.php | 9 ++ .../seeds/FavoriteQuotesTableSeeder.php | 9 ++ app/database/seeds/NewslettersTableSeeder.php | 9 ++ .../seeds/ProfileVisitorsTableSeeder.php | 9 ++ app/database/seeds/QuotesTableSeeder.php | 12 +- app/database/seeds/SettingsTableSeeder.php | 9 ++ app/database/seeds/StoriesTableSeeder.php | 9 ++ app/database/seeds/TagsTableSeeder.php | 9 ++ app/database/seeds/UsersTableSeeder.php | 9 ++ app/filters.php | 16 ++- app/helpers.php | 9 ++ app/lang/en/apps.php | 9 ++ app/lang/en/auth.php | 9 ++ app/lang/en/colors.php | 9 ++ app/lang/en/comments.php | 9 ++ app/lang/en/contact.php | 9 ++ app/lang/en/email.php | 9 ++ app/lang/en/errors.php | 9 ++ app/lang/en/feedback.php | 9 ++ app/lang/en/layout.php | 9 ++ app/lang/en/legal.php | 15 ++- app/lang/en/newsletters.php | 9 ++ app/lang/en/pagination.php | 9 ++ app/lang/en/quotes.php | 9 ++ app/lang/en/reminders.php | 9 ++ app/lang/en/search.php | 9 ++ app/lang/en/stories.php | 37 +++--- app/lang/en/tags.php | 9 ++ app/lang/en/users.php | 9 ++ app/lang/en/validation.php | 9 ++ app/start/artisan.php | 17 ++- app/start/global.php | 16 ++- app/start/local.php | 9 +- bootstrap/autoload.php | 19 ++- bootstrap/paths.php | 119 ++++++++++-------- bootstrap/start.php | 21 ++-- public/index.php | 13 +- server.php | 14 ++- tests/TestCase.php | 9 ++ tests/_bootstrap.php | 10 +- tests/_support/AdminPanelHelper.php | 9 ++ tests/_support/ApiHelper.php | 45 ++++--- tests/_support/AuthHelper.php | 9 ++ tests/_support/DbSeederHelper.php | 9 ++ tests/_support/FormFillerHelper.php | 9 ++ tests/_support/FunctionalHelper.php | 9 ++ tests/_support/IntegrationHelper.php | 9 ++ tests/_support/NavigationHelper.php | 9 ++ tests/_support/QuotesHelper.php | 9 ++ tests/_support/StoriesHelper.php | 9 ++ tests/_support/UserHelper.php | 13 +- .../AdminPanel/EditWaitingQuoteCest.php | 9 ++ .../AdminPanel/ListWaitingQuotesCest.php | 8 ++ tests/functional/Auth/LogOutCest.php | 9 ++ .../functional/Auth/PasswordForgottenCest.php | 9 ++ tests/functional/Auth/SignInCest.php | 9 ++ tests/functional/Auth/SignUpCest.php | 9 ++ tests/functional/Comment/AddCommentCest.php | 9 ++ .../functional/Comment/DeleteCommentCest.php | 11 +- tests/functional/Comment/EditCommentCest.php | 9 ++ .../FavoriteQuote/AddFavoriteCest.php | 11 +- .../FavoriteQuote/DeleteFavoriteCest.php | 11 +- tests/functional/Quote/AddQuoteCest.php | 9 ++ tests/functional/Quote/IndexQuotesCest.php | 11 +- tests/functional/Quote/ShowQuoteCest.php | 11 +- tests/functional/Story/AddStoryCest.php | 9 ++ tests/functional/Story/IndexStoriesCest.php | 9 ++ tests/functional/Story/ShowStoryCest.php | 9 ++ tests/functional/User/DeleteAccountCest.php | 9 ++ tests/functional/User/EditProfileCest.php | 9 ++ tests/functional/User/ShowProfileCest.php | 9 ++ tests/functional/User/UpdatePasswordCest.php | 11 +- tests/functional/User/UpdateSettingsCest.php | 11 +- tests/functional/_bootstrap.php | 10 +- tests/integration/CommentRepoCest.php | 13 +- tests/integration/CountryRepoCest.php | 9 ++ tests/integration/FavoriteQuoteRepoCest.php | 9 ++ tests/integration/NewsletterRepoCest.php | 9 ++ tests/integration/ProfileVisitorRepoCest.php | 9 ++ tests/integration/QuoteRepoCest.php | 19 ++- tests/integration/SettingRepoCest.php | 9 ++ tests/integration/StoryRepoCest.php | 9 ++ tests/integration/TagRepoCest.php | 15 ++- tests/integration/UserRepoCest.php | 44 ++++--- tests/integration/_bootstrap.php | 10 +- tests/search/SearchQuoteCest.php | 11 +- tests/search/SearchUserCest.php | 11 +- tests/search/_bootstrap.php | 10 +- tests/unit/Api/v1/ApiTest.php | 9 ++ tests/unit/Api/v1/CommentsTest.php | 13 +- tests/unit/Api/v1/CountriesTest.php | 8 ++ tests/unit/Api/v1/FavoriteQuotesTest.php | 15 ++- tests/unit/Api/v1/PasswordTest.php | 9 ++ tests/unit/Api/v1/QuotesTest.php | 21 +++- tests/unit/Api/v1/StoriesTest.php | 11 +- tests/unit/Api/v1/UsersTest.php | 21 +++- tests/unit/_bootstrap.php | 10 +- 333 files changed, 3311 insertions(+), 363 deletions(-) diff --git a/app/TeenQuotes/AdminPanel/AdminPanelServiceProvider.php b/app/TeenQuotes/AdminPanel/AdminPanelServiceProvider.php index fab48841..d6353202 100644 --- a/app/TeenQuotes/AdminPanel/AdminPanelServiceProvider.php +++ b/app/TeenQuotes/AdminPanel/AdminPanelServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\AdminPanel; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/AdminPanel/Composers/ModerationIndexComposer.php b/app/TeenQuotes/AdminPanel/Composers/ModerationIndexComposer.php index 3650c053..401a0b88 100644 --- a/app/TeenQuotes/AdminPanel/Composers/ModerationIndexComposer.php +++ b/app/TeenQuotes/AdminPanel/Composers/ModerationIndexComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\AdminPanel\Composers; use Config; diff --git a/app/TeenQuotes/AdminPanel/Controllers/QuotesAdminController.php b/app/TeenQuotes/AdminPanel/Controllers/QuotesAdminController.php index c4e2ae33..b4bf7a5d 100644 --- a/app/TeenQuotes/AdminPanel/Controllers/QuotesAdminController.php +++ b/app/TeenQuotes/AdminPanel/Controllers/QuotesAdminController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\AdminPanel\Controllers; use App; @@ -128,7 +137,7 @@ public function postModerate($id, $type) } $approved = $moderation->isApproved() ? Quote::PENDING : Quote::REFUSED; - $quote = $this->quoteRepo->updateApproved($id, $approved); + $quote = $this->quoteRepo->updateApproved($id, $approved); // Contact the author of the quote $this->sendMailForQuoteAndModeration($quote, $moderation); diff --git a/app/TeenQuotes/AdminPanel/Helpers/Moderation.php b/app/TeenQuotes/AdminPanel/Helpers/Moderation.php index 24ff1981..a78bd4e6 100644 --- a/app/TeenQuotes/AdminPanel/Helpers/Moderation.php +++ b/app/TeenQuotes/AdminPanel/Helpers/Moderation.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\AdminPanel\Helpers; class Moderation diff --git a/app/TeenQuotes/Api/V1/ApiServiceProvider.php b/app/TeenQuotes/Api/V1/ApiServiceProvider.php index 4a89dcbb..4827b481 100644 --- a/app/TeenQuotes/Api/V1/ApiServiceProvider.php +++ b/app/TeenQuotes/Api/V1/ApiServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Api\V1; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Api/V1/Controllers/APIGlobalController.php b/app/TeenQuotes/Api/V1/Controllers/APIGlobalController.php index 68a6584b..614c10e8 100644 --- a/app/TeenQuotes/Api/V1/Controllers/APIGlobalController.php +++ b/app/TeenQuotes/Api/V1/Controllers/APIGlobalController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Api\V1\Controllers; use Auth; diff --git a/app/TeenQuotes/Api/V1/Controllers/CommentsController.php b/app/TeenQuotes/Api/V1/Controllers/CommentsController.php index 1d2c1131..e7e19a41 100644 --- a/app/TeenQuotes/Api/V1/Controllers/CommentsController.php +++ b/app/TeenQuotes/Api/V1/Controllers/CommentsController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Api\V1\Controllers; use App; @@ -23,7 +32,7 @@ public function bootstrap() public function index($quote_id) { - $page = $this->getPage(); + $page = $this->getPage(); $pagesize = $this->getPagesize(); // Get comments @@ -39,7 +48,7 @@ public function index($quote_id) } // Get the total number of comments for the related quote - $relatedQuote = $this->quoteRepo->getById($quote_id); + $relatedQuote = $this->quoteRepo->getById($quote_id); $totalComments = $relatedQuote->total_comments; $data = $this->paginateContent($page, $pagesize, $totalComments, $content, 'comments'); @@ -49,7 +58,7 @@ public function index($quote_id) public function getCommentsForUser($user_id) { - $page = $this->getPage(); + $page = $this->getPage(); $pagesize = $this->getPagesize(); $user = $this->userRepo->getById($user_id); @@ -93,7 +102,7 @@ public function show($comment_id) public function store($quote_id, $doValidation = true) { - $user = $this->retrieveUser(); + $user = $this->retrieveUser(); $content = Input::get('content'); if ($doValidation) { @@ -106,7 +115,7 @@ public function store($quote_id, $doValidation = true) if (!$quote->isPublished()) { return Response::json([ 'status' => 'wrong_quote_id', - 'error' => 'The quote should be published.', + 'error' => 'The quote should be published.', ], 400); } @@ -118,7 +127,7 @@ public function store($quote_id, $doValidation = true) public function update($id) { - $user = $this->retrieveUser(); + $user = $this->retrieveUser(); $content = Input::get('content'); $comment = $this->commentRepo->findById($id); @@ -146,7 +155,7 @@ public function update($id) public function destroy($id) { - $user = $this->retrieveUser(); + $user = $this->retrieveUser(); $comment = $this->commentRepo->findById($id); // Handle not found diff --git a/app/TeenQuotes/Api/V1/Controllers/CountriesController.php b/app/TeenQuotes/Api/V1/Controllers/CountriesController.php index cb09174c..14ae5767 100644 --- a/app/TeenQuotes/Api/V1/Controllers/CountriesController.php +++ b/app/TeenQuotes/Api/V1/Controllers/CountriesController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Api\V1\Controllers; use TeenQuotes\Http\Facades\Response; diff --git a/app/TeenQuotes/Api/V1/Controllers/PasswordController.php b/app/TeenQuotes/Api/V1/Controllers/PasswordController.php index 229d814d..98484efc 100644 --- a/app/TeenQuotes/Api/V1/Controllers/PasswordController.php +++ b/app/TeenQuotes/Api/V1/Controllers/PasswordController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Api\V1\Controllers; use Input; @@ -18,7 +27,7 @@ public function postRemind() switch ($response) { case Password::INVALID_USER: $status = 400; - $data = [ + $data = [ 'status' => 'wrong_user', 'error' => "The email address doesn't match a user.", ]; @@ -26,7 +35,7 @@ public function postRemind() case Password::REMINDER_SENT: $status = 200; - $data = [ + $data = [ 'status' => 'reminder_sent', 'success' => 'An email was sent to the user.', ]; @@ -55,7 +64,7 @@ public function postReset() switch ($response) { case Password::INVALID_PASSWORD: $status = 400; - $data = [ + $data = [ 'status' => 'wrong_password', 'error' => 'The password is wrong.', ]; @@ -63,7 +72,7 @@ public function postReset() case Password::INVALID_TOKEN: $status = 400; - $data = [ + $data = [ 'status' => 'wrong_token', 'error' => 'The reset token is invalid.', ]; @@ -71,7 +80,7 @@ public function postReset() case Password::INVALID_USER: $status = 400; - $data = [ + $data = [ 'status' => 'wrong_user', 'error' => "The email address doesn't match a user.", ]; @@ -79,7 +88,7 @@ public function postReset() case Password::PASSWORD_RESET: $status = 200; - $data = [ + $data = [ 'status' => 'password_reset', 'success' => 'The new password has been set.', ]; diff --git a/app/TeenQuotes/Api/V1/Controllers/QuotesController.php b/app/TeenQuotes/Api/V1/Controllers/QuotesController.php index a0aa7b4c..3ade117b 100644 --- a/app/TeenQuotes/Api/V1/Controllers/QuotesController.php +++ b/app/TeenQuotes/Api/V1/Controllers/QuotesController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Api\V1\Controllers; use App; @@ -102,7 +111,7 @@ public function random() public function getTopFavoritedQuotes() { - $ids = $this->favQuoteRepo->getTopQuotes($this->getPage(), $this->getPagesize()); + $ids = $this->favQuoteRepo->getTopQuotes($this->getPage(), $this->getPagesize()); $quotes = $this->quoteRepo->getForIds($ids, 1, count($ids)); $total = $this->quoteRepo->nbQuotesWithFavorites(); @@ -112,7 +121,7 @@ public function getTopFavoritedQuotes() public function getTopCommentedQuotes() { - $ids = $this->commentRepo->getTopQuotes($this->getPage(), $this->getPagesize()); + $ids = $this->commentRepo->getTopQuotes($this->getPage(), $this->getPagesize()); $quotes = $this->quoteRepo->getForIds($ids, 1, count($ids)); $total = $this->quoteRepo->nbQuotesWithComments(); @@ -147,8 +156,8 @@ public function getQuotesForTag($tag_name) public function store($doValidation = true) { - $user = $this->retrieveUser(); - $content = Input::get('content'); + $user = $this->retrieveUser(); + $content = Input::get('content'); $quotesSubmittedToday = $this->quoteRepo->submittedTodayForUser($user); if ($doValidation) { diff --git a/app/TeenQuotes/Api/V1/Controllers/QuotesFavoriteController.php b/app/TeenQuotes/Api/V1/Controllers/QuotesFavoriteController.php index 5be3367d..8ec8dd20 100644 --- a/app/TeenQuotes/Api/V1/Controllers/QuotesFavoriteController.php +++ b/app/TeenQuotes/Api/V1/Controllers/QuotesFavoriteController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Api\V1\Controllers; use App; diff --git a/app/TeenQuotes/Api/V1/Controllers/SearchController.php b/app/TeenQuotes/Api/V1/Controllers/SearchController.php index 275b7aae..7c37db8b 100644 --- a/app/TeenQuotes/Api/V1/Controllers/SearchController.php +++ b/app/TeenQuotes/Api/V1/Controllers/SearchController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Api\V1\Controllers; use Config; @@ -13,12 +22,12 @@ class SearchController extends APIGlobalController implements PaginatedContentIn { public function getSearch($query) { - $page = $this->getPage(); + $page = $this->getPage(); $pagesize = $this->getPagesize(); // Get content list($quotes, $totalQuotes) = $this->getTotalQuotesAndQuotesForQuery($page, $pagesize, $query); - list($users, $totalUsers) = $this->getTotalUsersAndUsersForQuery($page, $pagesize, $query); + list($users, $totalUsers) = $this->getTotalUsersAndUsersForQuery($page, $pagesize, $query); // Handle no results if ($totalQuotes == 0 and $totalUsers == 0) { diff --git a/app/TeenQuotes/Api/V1/Controllers/StoriesController.php b/app/TeenQuotes/Api/V1/Controllers/StoriesController.php index 68c47b15..6af08fca 100644 --- a/app/TeenQuotes/Api/V1/Controllers/StoriesController.php +++ b/app/TeenQuotes/Api/V1/Controllers/StoriesController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Api\V1\Controllers; use App; @@ -23,7 +32,7 @@ protected function bootstrap() public function index() { - $page = $this->getPage(); + $page = $this->getPage(); $pagesize = $this->getPagesize(); // Get stories diff --git a/app/TeenQuotes/Api/V1/Controllers/UsersController.php b/app/TeenQuotes/Api/V1/Controllers/UsersController.php index d1ea84d4..e4eca611 100644 --- a/app/TeenQuotes/Api/V1/Controllers/UsersController.php +++ b/app/TeenQuotes/Api/V1/Controllers/UsersController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Api\V1\Controllers; use App; @@ -87,7 +96,7 @@ public function store($doValidation = true) // Try to detect the city and the country from the request $request = Input::instance(); $country = $this->localisationDetector->detectCountry($request); - $city = $this->localisationDetector->detectCity($request); + $city = $this->localisationDetector->detectCity($request); $user = $this->userRepo->create($data['login'], $data['email'], $data['password'], $_SERVER['REMOTE_ADDR'], Carbon::now()->toDateTimeString(), @@ -115,13 +124,13 @@ public function show($user_id) if ($this->isNotFound($user)) { return Response::json([ 'status' => 404, - 'error' => 'User not found.', + 'error' => 'User not found.', ], 404); } $data = $user->toArray(); foreach (User::$appendsFull as $key) { - $method = Str::camel('get_'.$key); + $method = Str::camel('get_'.$key); $data[$key] = $user->$method(); } @@ -135,9 +144,9 @@ public function show($user_id) * * @param string $query * - * @return \TeenQuotes\Http\Facades\Response - * * @throws \TeenQuotes\Exceptions\ApiNotFoundException If no users were found + * + * @return \TeenQuotes\Http\Facades\Response */ public function getSearch($query) { @@ -278,9 +287,9 @@ public function putSettings($userInstance = null) * * @param int $country_id The ID of the country * - * @return \TeenQuotes\Http\Facades\Response - * * @throws \TeenQuotes\Exceptions\ApiNotFoundException If no users were found + * + * @return \TeenQuotes\Http\Facades\Response */ public function fromCountry($country_id) { @@ -330,7 +339,7 @@ private function cropAndMoveAvatar(User $user, $avatar) Input::file('avatar')->move(Config::get('app.users.avatarPath'), $filename); // Crop the image and save it - $center = new CropEntropy($filepath); + $center = new CropEntropy($filepath); $croppedImage = $center->resizeAndCrop(Config::get('app.users.avatarWidth'), Config::get('app.users.avatarHeight')); $croppedImage->writeimage($filepath); } diff --git a/app/TeenQuotes/Api/V1/Interfaces/PageBuilderInterface.php b/app/TeenQuotes/Api/V1/Interfaces/PageBuilderInterface.php index 2656b2fb..f8cbec63 100644 --- a/app/TeenQuotes/Api/V1/Interfaces/PageBuilderInterface.php +++ b/app/TeenQuotes/Api/V1/Interfaces/PageBuilderInterface.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Api\V1\Interfaces; interface PageBuilderInterface diff --git a/app/TeenQuotes/Api/V1/Interfaces/PaginatedContentInterface.php b/app/TeenQuotes/Api/V1/Interfaces/PaginatedContentInterface.php index 1f76c8ce..9f5d4253 100644 --- a/app/TeenQuotes/Api/V1/Interfaces/PaginatedContentInterface.php +++ b/app/TeenQuotes/Api/V1/Interfaces/PaginatedContentInterface.php @@ -1,9 +1,19 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Api\V1\Interfaces; interface PaginatedContentInterface { public function getPagesize(); + public function getPage(); } diff --git a/app/TeenQuotes/Api/V1/Tools/PageBuilder.php b/app/TeenQuotes/Api/V1/Tools/PageBuilder.php index fca43b43..b113119c 100644 --- a/app/TeenQuotes/Api/V1/Tools/PageBuilder.php +++ b/app/TeenQuotes/Api/V1/Tools/PageBuilder.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Api\V1\Tools; use TeenQuotes\Api\V1\Interfaces\PageBuilderInterface; @@ -58,7 +67,7 @@ private function notNull($v) private function buildNextPage($page, $pagesize, $totalPages, $url, $getParams) { $hasNextPage = ($page < $totalPages); - $nextPage = null; + $nextPage = null; if ($hasNextPage) { $nextPage = $url.'?page='.($page + 1).'&pagesize='.$pagesize.$getParams; @@ -81,7 +90,7 @@ private function buildNextPage($page, $pagesize, $totalPages, $url, $getParams) private function buildPreviousPage($page, $pagesize, $url, $getParams) { $hasPreviousPage = ($page >= 2); - $previousPage = null; + $previousPage = null; if ($hasPreviousPage) { $previousPage = $url.'?page='.($page - 1).'&pagesize='.$pagesize.$getParams; diff --git a/app/TeenQuotes/Auth/AuthServiceProvider.php b/app/TeenQuotes/Auth/AuthServiceProvider.php index 93e2de48..8d26a9c9 100644 --- a/app/TeenQuotes/Auth/AuthServiceProvider.php +++ b/app/TeenQuotes/Auth/AuthServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Auth; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Auth/Composers/ResetComposer.php b/app/TeenQuotes/Auth/Composers/ResetComposer.php index c0b6e12e..9b2978e2 100644 --- a/app/TeenQuotes/Auth/Composers/ResetComposer.php +++ b/app/TeenQuotes/Auth/Composers/ResetComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Auth\Composers; use TeenQuotes\Tools\Composers\AbstractDeepLinksComposer; @@ -13,7 +22,7 @@ class ResetComposer extends AbstractDeepLinksComposer */ public function compose($view) { - $data = $view->getData(); + $data = $view->getData(); $token = $data['token']; // For deep links diff --git a/app/TeenQuotes/Auth/Composers/SigninComposer.php b/app/TeenQuotes/Auth/Composers/SigninComposer.php index e419b8e3..4da95155 100644 --- a/app/TeenQuotes/Auth/Composers/SigninComposer.php +++ b/app/TeenQuotes/Auth/Composers/SigninComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Auth\Composers; use JavaScript; diff --git a/app/TeenQuotes/Auth/Composers/SignupComposer.php b/app/TeenQuotes/Auth/Composers/SignupComposer.php index bbaffb10..bb9b2802 100644 --- a/app/TeenQuotes/Auth/Composers/SignupComposer.php +++ b/app/TeenQuotes/Auth/Composers/SignupComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Auth\Composers; use Config; diff --git a/app/TeenQuotes/Auth/Controllers/AuthController.php b/app/TeenQuotes/Auth/Controllers/AuthController.php index fcc47576..1539d57f 100644 --- a/app/TeenQuotes/Auth/Controllers/AuthController.php +++ b/app/TeenQuotes/Auth/Controllers/AuthController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Auth\Controllers; use Auth; @@ -32,7 +41,7 @@ public function __construct(UserRepository $userRepo, UserValidator $userValidat $this->beforeFilter('guest', ['only' => 'getSignin']); $this->beforeFilter('auth', ['only' => 'getLogout']); - $this->userRepo = $userRepo; + $this->userRepo = $userRepo; $this->userValidator = $userValidator; } @@ -71,7 +80,7 @@ public function postSignin() // Try to log the user in. if (Auth::attempt($data, true)) { - $user = Auth::user(); + $user = Auth::user(); $user->last_visit = Carbon::now()->toDateTimeString(); $user->save(); diff --git a/app/TeenQuotes/Auth/Controllers/RemindersController.php b/app/TeenQuotes/Auth/Controllers/RemindersController.php index b0aebb41..8f159126 100644 --- a/app/TeenQuotes/Auth/Controllers/RemindersController.php +++ b/app/TeenQuotes/Auth/Controllers/RemindersController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Auth\Controllers; use Auth; diff --git a/app/TeenQuotes/Comments/CommentsServiceProvider.php b/app/TeenQuotes/Comments/CommentsServiceProvider.php index ac7a6521..69be8696 100644 --- a/app/TeenQuotes/Comments/CommentsServiceProvider.php +++ b/app/TeenQuotes/Comments/CommentsServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Comments; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Comments/Composers/EditComposer.php b/app/TeenQuotes/Comments/Composers/EditComposer.php index c78c08e3..492f5dd0 100644 --- a/app/TeenQuotes/Comments/Composers/EditComposer.php +++ b/app/TeenQuotes/Comments/Composers/EditComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Comments\Composers; use JavaScript; diff --git a/app/TeenQuotes/Comments/Controllers/CommentsController.php b/app/TeenQuotes/Comments/Controllers/CommentsController.php index faa566f4..45278779 100644 --- a/app/TeenQuotes/Comments/Controllers/CommentsController.php +++ b/app/TeenQuotes/Comments/Controllers/CommentsController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Comments\Controllers; use App; @@ -30,7 +39,7 @@ class CommentsController extends BaseController public function __construct() { $this->beforeFilter('auth'); - $this->api = App::make('TeenQuotes\Api\V1\Controllers\CommentsController'); + $this->api = App::make('TeenQuotes\Api\V1\Controllers\CommentsController'); $this->commentValidator = App::make('TeenQuotes\Comments\Validation\CommentValidator'); } @@ -68,7 +77,7 @@ public function edit($id) return Redirect::home()->with('warning', Lang::get('comments.cantEditThisComment')); } - $data = compact('comment'); + $data = compact('comment'); $data['pageTitle'] = Lang::get('comments.updateCommentPageTitle'); return View::make('comments.edit', $data); diff --git a/app/TeenQuotes/Comments/Models/Comment.php b/app/TeenQuotes/Comments/Models/Comment.php index f6a50aec..6ef1cf0b 100644 --- a/app/TeenQuotes/Comments/Models/Comment.php +++ b/app/TeenQuotes/Comments/Models/Comment.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Comments\Models; use Auth; diff --git a/app/TeenQuotes/Comments/Models/Relations/CommentTrait.php b/app/TeenQuotes/Comments/Models/Relations/CommentTrait.php index 324a5bc4..d23b6d4e 100644 --- a/app/TeenQuotes/Comments/Models/Relations/CommentTrait.php +++ b/app/TeenQuotes/Comments/Models/Relations/CommentTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Comments\Models\Relations; use TeenQuotes\Quotes\Models\Quote; diff --git a/app/TeenQuotes/Comments/Models/Scopes/CommentTrait.php b/app/TeenQuotes/Comments/Models/Scopes/CommentTrait.php index 79e0e577..96a5d978 100644 --- a/app/TeenQuotes/Comments/Models/Scopes/CommentTrait.php +++ b/app/TeenQuotes/Comments/Models/Scopes/CommentTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Comments\Models\Scopes; use TeenQuotes\Quotes\Models\Quote; diff --git a/app/TeenQuotes/Comments/Observers/CommentObserver.php b/app/TeenQuotes/Comments/Observers/CommentObserver.php index e6d4bbf9..19ca32a1 100644 --- a/app/TeenQuotes/Comments/Observers/CommentObserver.php +++ b/app/TeenQuotes/Comments/Observers/CommentObserver.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Comments\Observers; use App; @@ -19,7 +28,7 @@ class CommentObserver public function __construct() { - $this->quoteRepo = App::make('TeenQuotes\Quotes\Repositories\QuoteRepository'); + $this->quoteRepo = App::make('TeenQuotes\Quotes\Repositories\QuoteRepository'); $this->userMailer = App::make('TeenQuotes\Mail\UserMailer'); } diff --git a/app/TeenQuotes/Comments/Presenters/CommentPresenter.php b/app/TeenQuotes/Comments/Presenters/CommentPresenter.php index 2648f022..5a89ced3 100644 --- a/app/TeenQuotes/Comments/Presenters/CommentPresenter.php +++ b/app/TeenQuotes/Comments/Presenters/CommentPresenter.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Comments\Presenters; use Laracasts\Presenter\Presenter; diff --git a/app/TeenQuotes/Comments/Repositories/CachingCommentRepository.php b/app/TeenQuotes/Comments/Repositories/CachingCommentRepository.php index abaccdad..45762eeb 100644 --- a/app/TeenQuotes/Comments/Repositories/CachingCommentRepository.php +++ b/app/TeenQuotes/Comments/Repositories/CachingCommentRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Comments\Repositories; use Cache; diff --git a/app/TeenQuotes/Comments/Repositories/CommentRepository.php b/app/TeenQuotes/Comments/Repositories/CommentRepository.php index d34bbd5c..f9832b51 100644 --- a/app/TeenQuotes/Comments/Repositories/CommentRepository.php +++ b/app/TeenQuotes/Comments/Repositories/CommentRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Comments\Repositories; use TeenQuotes\Quotes\Models\Quote; diff --git a/app/TeenQuotes/Comments/Repositories/DbCommentRepository.php b/app/TeenQuotes/Comments/Repositories/DbCommentRepository.php index 1ec97c9d..12c8fe7b 100644 --- a/app/TeenQuotes/Comments/Repositories/DbCommentRepository.php +++ b/app/TeenQuotes/Comments/Repositories/DbCommentRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Comments\Repositories; use DB; @@ -121,7 +130,7 @@ public function countForUser(User $user) */ public function create(Quote $q, User $u, $content) { - $comment = new Comment(); + $comment = new Comment(); $comment->content = $content; $comment->quote_id = $q->id; $comment->user_id = $u->id; @@ -198,9 +207,9 @@ public function nbCommentsForQuote(Quote $q) * * @param \TeenQuotes\Comments\Models\Comment|int $c * - * @return \TeenQuotes\Comments\Models\Comment - * * @throws \InvalidArgumentException If we can't retrieve a comment with the given data + * + * @return \TeenQuotes\Comments\Models\Comment */ private function retrieveComment($c) { diff --git a/app/TeenQuotes/Comments/Validation/CommentValidator.php b/app/TeenQuotes/Comments/Validation/CommentValidator.php index 0271244e..2123fa14 100644 --- a/app/TeenQuotes/Comments/Validation/CommentValidator.php +++ b/app/TeenQuotes/Comments/Validation/CommentValidator.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Comments\Validation; use TeenQuotes\Tools\Validation\Validator as BaseValidator; diff --git a/app/TeenQuotes/Countries/Console/MostCommonCountryCommand.php b/app/TeenQuotes/Countries/Console/MostCommonCountryCommand.php index 209c571d..9925bfc7 100644 --- a/app/TeenQuotes/Countries/Console/MostCommonCountryCommand.php +++ b/app/TeenQuotes/Countries/Console/MostCommonCountryCommand.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Countries\Console; use Indatus\Dispatcher\Scheduling\Schedulable; @@ -44,7 +53,7 @@ public function __construct(CountryRepository $countryRepo, UserRepository $user parent::__construct(); $this->countryRepo = $countryRepo; - $this->userRepo = $userRepo; + $this->userRepo = $userRepo; } /** diff --git a/app/TeenQuotes/Countries/CountriesServiceProvider.php b/app/TeenQuotes/Countries/CountriesServiceProvider.php index 26bddc1a..9e088376 100644 --- a/app/TeenQuotes/Countries/CountriesServiceProvider.php +++ b/app/TeenQuotes/Countries/CountriesServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Countries; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Countries/Localisation/CityDetector.php b/app/TeenQuotes/Countries/Localisation/CityDetector.php index 99a5b90d..94dad002 100644 --- a/app/TeenQuotes/Countries/Localisation/CityDetector.php +++ b/app/TeenQuotes/Countries/Localisation/CityDetector.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Countries\Localisation; use Symfony\Component\HttpFoundation\Request; diff --git a/app/TeenQuotes/Countries/Localisation/CountryDetector.php b/app/TeenQuotes/Countries/Localisation/CountryDetector.php index 54d69611..c6724e39 100644 --- a/app/TeenQuotes/Countries/Localisation/CountryDetector.php +++ b/app/TeenQuotes/Countries/Localisation/CountryDetector.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Countries\Localisation; use Symfony\Component\HttpFoundation\Request; diff --git a/app/TeenQuotes/Countries/Localisation/Detector.php b/app/TeenQuotes/Countries/Localisation/Detector.php index d76e8f44..fab074ab 100644 --- a/app/TeenQuotes/Countries/Localisation/Detector.php +++ b/app/TeenQuotes/Countries/Localisation/Detector.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Countries\Localisation; use Symfony\Component\HttpFoundation\Request; diff --git a/app/TeenQuotes/Countries/Localisation/GeoIPCityDetector.php b/app/TeenQuotes/Countries/Localisation/GeoIPCityDetector.php index cfe3d874..9849904a 100644 --- a/app/TeenQuotes/Countries/Localisation/GeoIPCityDetector.php +++ b/app/TeenQuotes/Countries/Localisation/GeoIPCityDetector.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Countries\Localisation; use Buonzz\GeoIP\GeoIP; diff --git a/app/TeenQuotes/Countries/Localisation/GeoIPCountryDetector.php b/app/TeenQuotes/Countries/Localisation/GeoIPCountryDetector.php index 6db531ca..c055d055 100644 --- a/app/TeenQuotes/Countries/Localisation/GeoIPCountryDetector.php +++ b/app/TeenQuotes/Countries/Localisation/GeoIPCountryDetector.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Countries\Localisation; use App; @@ -83,7 +92,7 @@ public function detectCountry(Request $request) */ public function setDefault($id) { - if (!is_integer($id)) { + if (!is_int($id)) { throw new InvalidArgumentException($id.' is not an integer.'); } diff --git a/app/TeenQuotes/Countries/Models/Country.php b/app/TeenQuotes/Countries/Models/Country.php index f4d70826..f74cc2a0 100644 --- a/app/TeenQuotes/Countries/Models/Country.php +++ b/app/TeenQuotes/Countries/Models/Country.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Countries\Models; use Eloquent; diff --git a/app/TeenQuotes/Countries/Models/Relations/CountryTrait.php b/app/TeenQuotes/Countries/Models/Relations/CountryTrait.php index 7e37fcc5..fc9d9d12 100644 --- a/app/TeenQuotes/Countries/Models/Relations/CountryTrait.php +++ b/app/TeenQuotes/Countries/Models/Relations/CountryTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Countries\Models\Relations; use TeenQuotes\Users\Models\User; diff --git a/app/TeenQuotes/Countries/Presenters/CountryPresenter.php b/app/TeenQuotes/Countries/Presenters/CountryPresenter.php index 1f1f272d..5cb93ab5 100644 --- a/app/TeenQuotes/Countries/Presenters/CountryPresenter.php +++ b/app/TeenQuotes/Countries/Presenters/CountryPresenter.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Countries\Presenters; use Laracasts\Presenter\Presenter; diff --git a/app/TeenQuotes/Countries/Repositories/CachingCountryRepository.php b/app/TeenQuotes/Countries/Repositories/CachingCountryRepository.php index ccb7f5d5..17f42657 100644 --- a/app/TeenQuotes/Countries/Repositories/CachingCountryRepository.php +++ b/app/TeenQuotes/Countries/Repositories/CachingCountryRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Countries\Repositories; use Cache; diff --git a/app/TeenQuotes/Countries/Repositories/CountryRepository.php b/app/TeenQuotes/Countries/Repositories/CountryRepository.php index fc3b8065..2bb86d30 100644 --- a/app/TeenQuotes/Countries/Repositories/CountryRepository.php +++ b/app/TeenQuotes/Countries/Repositories/CountryRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Countries\Repositories; interface CountryRepository diff --git a/app/TeenQuotes/Countries/Repositories/DbCountryRepository.php b/app/TeenQuotes/Countries/Repositories/DbCountryRepository.php index 4f423218..58fd75bf 100644 --- a/app/TeenQuotes/Countries/Repositories/DbCountryRepository.php +++ b/app/TeenQuotes/Countries/Repositories/DbCountryRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Countries\Repositories; use TeenQuotes\Countries\Models\Country; diff --git a/app/TeenQuotes/Database/Toloquent.php b/app/TeenQuotes/Database/Toloquent.php index 01fe93fc..784a43b1 100644 --- a/app/TeenQuotes/Database/Toloquent.php +++ b/app/TeenQuotes/Database/Toloquent.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Database; use Illuminate\Database\Eloquent\Model as Eloquent; diff --git a/app/TeenQuotes/Exceptions/ApiNotFoundException.php b/app/TeenQuotes/Exceptions/ApiNotFoundException.php index 3fc0dc1b..e2ead3b6 100644 --- a/app/TeenQuotes/Exceptions/ApiNotFoundException.php +++ b/app/TeenQuotes/Exceptions/ApiNotFoundException.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Exceptions; use Exception; diff --git a/app/TeenQuotes/Exceptions/CountryNotFoundException.php b/app/TeenQuotes/Exceptions/CountryNotFoundException.php index e15cd27c..56d46778 100644 --- a/app/TeenQuotes/Exceptions/CountryNotFoundException.php +++ b/app/TeenQuotes/Exceptions/CountryNotFoundException.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Exceptions; class CountryNotFoundException extends TQNotFoundException diff --git a/app/TeenQuotes/Exceptions/HiddenProfileException.php b/app/TeenQuotes/Exceptions/HiddenProfileException.php index 56ca6fc4..0653f2b2 100644 --- a/app/TeenQuotes/Exceptions/HiddenProfileException.php +++ b/app/TeenQuotes/Exceptions/HiddenProfileException.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Exceptions; use Exception; diff --git a/app/TeenQuotes/Exceptions/QuoteNotFoundException.php b/app/TeenQuotes/Exceptions/QuoteNotFoundException.php index e8d23c25..9ade85ca 100644 --- a/app/TeenQuotes/Exceptions/QuoteNotFoundException.php +++ b/app/TeenQuotes/Exceptions/QuoteNotFoundException.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Exceptions; class QuoteNotFoundException extends TQNotFoundException diff --git a/app/TeenQuotes/Exceptions/StoryNotFoundException.php b/app/TeenQuotes/Exceptions/StoryNotFoundException.php index e8df87f7..3b365483 100644 --- a/app/TeenQuotes/Exceptions/StoryNotFoundException.php +++ b/app/TeenQuotes/Exceptions/StoryNotFoundException.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Exceptions; class StoryNotFoundException extends TQNotFoundException diff --git a/app/TeenQuotes/Exceptions/TQNotFoundException.php b/app/TeenQuotes/Exceptions/TQNotFoundException.php index 854d5473..4df5d88a 100644 --- a/app/TeenQuotes/Exceptions/TQNotFoundException.php +++ b/app/TeenQuotes/Exceptions/TQNotFoundException.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Exceptions; use Exception; diff --git a/app/TeenQuotes/Exceptions/TagNotFoundException.php b/app/TeenQuotes/Exceptions/TagNotFoundException.php index 59626b7c..a824698e 100644 --- a/app/TeenQuotes/Exceptions/TagNotFoundException.php +++ b/app/TeenQuotes/Exceptions/TagNotFoundException.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Exceptions; class TagNotFoundException extends TQNotFoundException diff --git a/app/TeenQuotes/Exceptions/TokenNotFoundException.php b/app/TeenQuotes/Exceptions/TokenNotFoundException.php index c12fa031..1c654399 100644 --- a/app/TeenQuotes/Exceptions/TokenNotFoundException.php +++ b/app/TeenQuotes/Exceptions/TokenNotFoundException.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Exceptions; class TokenNotFoundException extends TQNotFoundException diff --git a/app/TeenQuotes/Exceptions/UserNotFoundException.php b/app/TeenQuotes/Exceptions/UserNotFoundException.php index 21f99dbe..3991fc94 100644 --- a/app/TeenQuotes/Exceptions/UserNotFoundException.php +++ b/app/TeenQuotes/Exceptions/UserNotFoundException.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Exceptions; class UserNotFoundException extends TQNotFoundException diff --git a/app/TeenQuotes/Http/Facades/Response.php b/app/TeenQuotes/Http/Facades/Response.php index eb136158..2cf4c6ec 100644 --- a/app/TeenQuotes/Http/Facades/Response.php +++ b/app/TeenQuotes/Http/Facades/Response.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Http\Facades; use Illuminate\Support\Facades\Response as ResponseFacadeOriginal; diff --git a/app/TeenQuotes/Http/JsonResponse.php b/app/TeenQuotes/Http/JsonResponse.php index 230a5b61..551e4ee1 100644 --- a/app/TeenQuotes/Http/JsonResponse.php +++ b/app/TeenQuotes/Http/JsonResponse.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Http; use Illuminate\Http\JsonResponse as JsonResponseOriginal; diff --git a/app/TeenQuotes/Mail/Composers/IndexQuotesComposer.php b/app/TeenQuotes/Mail/Composers/IndexQuotesComposer.php index 7121147a..46c98541 100644 --- a/app/TeenQuotes/Mail/Composers/IndexQuotesComposer.php +++ b/app/TeenQuotes/Mail/Composers/IndexQuotesComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Mail\Composers; use TeenQuotes\Tools\Colors\ColorGeneratorInterface; diff --git a/app/TeenQuotes/Mail/Composers/WelcomeViewComposer.php b/app/TeenQuotes/Mail/Composers/WelcomeViewComposer.php index 67b08e55..95328a10 100644 --- a/app/TeenQuotes/Mail/Composers/WelcomeViewComposer.php +++ b/app/TeenQuotes/Mail/Composers/WelcomeViewComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Mail\Composers; use TextTools; @@ -15,10 +24,10 @@ class WelcomeViewComposer public function compose($view) { $viewData = $view->getData(); - $login = $viewData['login']; + $login = $viewData['login']; // Construct a URL to track with Google Analytics - $urlProfile = URL::route('users.show', $login); + $urlProfile = URL::route('users.show', $login); $urlCampaignProfile = TextTools::linkCampaign($urlProfile, 'callToProfile', 'email', 'welcome', 'linkBodyEmail'); $data = compact('login', 'urlCampaignProfile', 'urlProfile'); diff --git a/app/TeenQuotes/Mail/Facades/MandrillClient.php b/app/TeenQuotes/Mail/Facades/MandrillClient.php index 9fe72e30..492dd29b 100644 --- a/app/TeenQuotes/Mail/Facades/MandrillClient.php +++ b/app/TeenQuotes/Mail/Facades/MandrillClient.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Mail\Facades; use Illuminate\Support\Facades\Facade; diff --git a/app/TeenQuotes/Mail/MailServiceProvider.php b/app/TeenQuotes/Mail/MailServiceProvider.php index 985099fb..f7ef0d08 100644 --- a/app/TeenQuotes/Mail/MailServiceProvider.php +++ b/app/TeenQuotes/Mail/MailServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Mail; use TeenQuotes\Mail\Transport\MandrillTransport; diff --git a/app/TeenQuotes/Mail/MailSwitcher.php b/app/TeenQuotes/Mail/MailSwitcher.php index c6a42827..2e65c1ea 100644 --- a/app/TeenQuotes/Mail/MailSwitcher.php +++ b/app/TeenQuotes/Mail/MailSwitcher.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Mail; use App; diff --git a/app/TeenQuotes/Mail/Mailer.php b/app/TeenQuotes/Mail/Mailer.php index a6dfa6df..29da771e 100644 --- a/app/TeenQuotes/Mail/Mailer.php +++ b/app/TeenQuotes/Mail/Mailer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Mail; use TijsVerkoyen\CssToInlineStyles\CssToInlineStyles; diff --git a/app/TeenQuotes/Mail/Mandrill.php b/app/TeenQuotes/Mail/Mandrill.php index 31a12f00..2f00b1f9 100644 --- a/app/TeenQuotes/Mail/Mandrill.php +++ b/app/TeenQuotes/Mail/Mandrill.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Mail; use Illuminate\Support\Collection; @@ -33,7 +42,7 @@ public function __construct(M $api, UserRepository $userRepo) */ public function getHardBouncedEmails() { - $result = $this->api->rejects->getList('', false); + $result = $this->api->rejects->getList('', false); $collection = new Collection($result); $hardBounced = $collection->filter(function ($a) { diff --git a/app/TeenQuotes/Mail/MandrillServiceProvider.php b/app/TeenQuotes/Mail/MandrillServiceProvider.php index 3a1deaa3..e6a5c547 100644 --- a/app/TeenQuotes/Mail/MandrillServiceProvider.php +++ b/app/TeenQuotes/Mail/MandrillServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Mail; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Mail/Transport/MandrillTransport.php b/app/TeenQuotes/Mail/Transport/MandrillTransport.php index de9bec19..65a864c1 100644 --- a/app/TeenQuotes/Mail/Transport/MandrillTransport.php +++ b/app/TeenQuotes/Mail/Transport/MandrillTransport.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Mail\Transport; use Illuminate\Mail\Transport\MandrillTransport as BaseMandrillTransport; diff --git a/app/TeenQuotes/Mail/UserMailer.php b/app/TeenQuotes/Mail/UserMailer.php index 13b3a899..f6e087a5 100644 --- a/app/TeenQuotes/Mail/UserMailer.php +++ b/app/TeenQuotes/Mail/UserMailer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Mail; use App; diff --git a/app/TeenQuotes/Newsletters/Console/SendNewsletterCommand.php b/app/TeenQuotes/Newsletters/Console/SendNewsletterCommand.php index 622602fc..f01ce9b9 100644 --- a/app/TeenQuotes/Newsletters/Console/SendNewsletterCommand.php +++ b/app/TeenQuotes/Newsletters/Console/SendNewsletterCommand.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Newsletters\Console; use Config; @@ -52,7 +61,7 @@ public function __construct(QuoteRepository $quoteRepo, NewsletterList $newslett { parent::__construct(); - $this->quoteRepo = $quoteRepo; + $this->quoteRepo = $quoteRepo; $this->newsletterList = $newsletterList; } diff --git a/app/TeenQuotes/Newsletters/Console/UnsubscribeUsersCommand.php b/app/TeenQuotes/Newsletters/Console/UnsubscribeUsersCommand.php index a83d29eb..f44f0135 100644 --- a/app/TeenQuotes/Newsletters/Console/UnsubscribeUsersCommand.php +++ b/app/TeenQuotes/Newsletters/Console/UnsubscribeUsersCommand.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Newsletters\Console; use Indatus\Dispatcher\Scheduling\Schedulable; @@ -49,8 +58,8 @@ public function __construct(UserRepository $userRepo, NewslettersManager $newsle parent::__construct(); $this->newslettersManager = $newslettersManager; - $this->userMailer = $userMailer; - $this->userRepo = $userRepo; + $this->userMailer = $userMailer; + $this->userRepo = $userRepo; } /** diff --git a/app/TeenQuotes/Newsletters/Controllers/MailchimpWebhook.php b/app/TeenQuotes/Newsletters/Controllers/MailchimpWebhook.php index 91476dd2..cef00ab8 100644 --- a/app/TeenQuotes/Newsletters/Controllers/MailchimpWebhook.php +++ b/app/TeenQuotes/Newsletters/Controllers/MailchimpWebhook.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Newsletters\Controllers; use BaseController; diff --git a/app/TeenQuotes/Newsletters/Mailchimp/NewsletterList.php b/app/TeenQuotes/Newsletters/Mailchimp/NewsletterList.php index a33b4b27..0e19cf0a 100644 --- a/app/TeenQuotes/Newsletters/Mailchimp/NewsletterList.php +++ b/app/TeenQuotes/Newsletters/Mailchimp/NewsletterList.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Newsletters\Mailchimp; use App; @@ -48,9 +57,9 @@ class NewsletterList implements NewsletterListInterface public function __construct(View $view, Config $config, UserRepository $userRepo) { $this->mailchimp = App::make('MailchimpClient'); - $this->view = $view; - $this->config = $config; - $this->userRepo = $userRepo; + $this->view = $view; + $this->config = $config; + $this->userRepo = $userRepo; } /** @@ -159,7 +168,7 @@ public function sendCampaign($listName, $subject, $toName, $viewName, $viewData) 'inline_css' => true, // Automatically inline CSS ]; - $html = $this->view->make($viewName, $viewData)->render(); + $html = $this->view->make($viewName, $viewData)->render(); $content = compact('html'); $campaign = $this->mailchimp->campaigns->create('regular', $options, $content); @@ -227,7 +236,7 @@ private function extractBatchSubscribe(Collection $c) $batch = []; foreach ($c as $user) { - $out['email'] = ['email' => $user->email]; + $out['email'] = ['email' => $user->email]; $out['email_type'] = 'html'; $out['merge_vars'] = $this->getMergeVarsForUser($user); diff --git a/app/TeenQuotes/Newsletters/Models/Newsletter.php b/app/TeenQuotes/Newsletters/Models/Newsletter.php index a0d837ff..16b2a72d 100644 --- a/app/TeenQuotes/Newsletters/Models/Newsletter.php +++ b/app/TeenQuotes/Newsletters/Models/Newsletter.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Newsletters\Models; use Eloquent; diff --git a/app/TeenQuotes/Newsletters/Models/Relations/NewsletterTrait.php b/app/TeenQuotes/Newsletters/Models/Relations/NewsletterTrait.php index 97f4e8e9..c4f97fcb 100644 --- a/app/TeenQuotes/Newsletters/Models/Relations/NewsletterTrait.php +++ b/app/TeenQuotes/Newsletters/Models/Relations/NewsletterTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Newsletters\Models\Relations; use TeenQuotes\Users\Models\User; diff --git a/app/TeenQuotes/Newsletters/Models/Scopes/NewsletterTrait.php b/app/TeenQuotes/Newsletters/Models/Scopes/NewsletterTrait.php index 11a9267b..a7549737 100644 --- a/app/TeenQuotes/Newsletters/Models/Scopes/NewsletterTrait.php +++ b/app/TeenQuotes/Newsletters/Models/Scopes/NewsletterTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Newsletters\Models\Scopes; use InvalidArgumentException; diff --git a/app/TeenQuotes/Newsletters/NewsletterList.php b/app/TeenQuotes/Newsletters/NewsletterList.php index 433c3d34..663fb8bd 100644 --- a/app/TeenQuotes/Newsletters/NewsletterList.php +++ b/app/TeenQuotes/Newsletters/NewsletterList.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Newsletters; use Illuminate\Support\Collection; diff --git a/app/TeenQuotes/Newsletters/NewsletterListServiceProvider.php b/app/TeenQuotes/Newsletters/NewsletterListServiceProvider.php index fb888e26..27bbdf53 100644 --- a/app/TeenQuotes/Newsletters/NewsletterListServiceProvider.php +++ b/app/TeenQuotes/Newsletters/NewsletterListServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Newsletters; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Newsletters/NewslettersManager.php b/app/TeenQuotes/Newsletters/NewslettersManager.php index 1e52215a..33cb989f 100644 --- a/app/TeenQuotes/Newsletters/NewslettersManager.php +++ b/app/TeenQuotes/Newsletters/NewslettersManager.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Newsletters; use App; diff --git a/app/TeenQuotes/Newsletters/NewslettersServiceProvider.php b/app/TeenQuotes/Newsletters/NewslettersServiceProvider.php index 4f18c9a6..a4e56f31 100644 --- a/app/TeenQuotes/Newsletters/NewslettersServiceProvider.php +++ b/app/TeenQuotes/Newsletters/NewslettersServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Newsletters; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Newsletters/Repositories/DbNewsletterRepository.php b/app/TeenQuotes/Newsletters/Repositories/DbNewsletterRepository.php index 96767df3..567cb8cc 100644 --- a/app/TeenQuotes/Newsletters/Repositories/DbNewsletterRepository.php +++ b/app/TeenQuotes/Newsletters/Repositories/DbNewsletterRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Newsletters\Repositories; use Illuminate\Support\Collection; diff --git a/app/TeenQuotes/Newsletters/Repositories/NewsletterRepository.php b/app/TeenQuotes/Newsletters/Repositories/NewsletterRepository.php index 6bbc3f45..69f3b6fb 100644 --- a/app/TeenQuotes/Newsletters/Repositories/NewsletterRepository.php +++ b/app/TeenQuotes/Newsletters/Repositories/NewsletterRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Newsletters\Repositories; use Illuminate\Support\Collection; diff --git a/app/TeenQuotes/Notifiers/AdminNotifier.php b/app/TeenQuotes/Notifiers/AdminNotifier.php index 5cfbaccf..d87b1f7e 100644 --- a/app/TeenQuotes/Notifiers/AdminNotifier.php +++ b/app/TeenQuotes/Notifiers/AdminNotifier.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Notifiers; interface AdminNotifier diff --git a/app/TeenQuotes/Notifiers/AdminNotifierServiceProvider.php b/app/TeenQuotes/Notifiers/AdminNotifierServiceProvider.php index 1b0130b9..168ab151 100644 --- a/app/TeenQuotes/Notifiers/AdminNotifierServiceProvider.php +++ b/app/TeenQuotes/Notifiers/AdminNotifierServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Notifiers; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Notifiers/Pushbullet/PushbulletAdminNotifier.php b/app/TeenQuotes/Notifiers/Pushbullet/PushbulletAdminNotifier.php index ead24957..68a845f3 100644 --- a/app/TeenQuotes/Notifiers/Pushbullet/PushbulletAdminNotifier.php +++ b/app/TeenQuotes/Notifiers/Pushbullet/PushbulletAdminNotifier.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Notifiers\Pushbullet; use Illuminate\Translation\Translator as Lang; diff --git a/app/TeenQuotes/Notifiers/Sms/SmsAdminNotifier.php b/app/TeenQuotes/Notifiers/Sms/SmsAdminNotifier.php index 3dad3b33..de32e44f 100644 --- a/app/TeenQuotes/Notifiers/Sms/SmsAdminNotifier.php +++ b/app/TeenQuotes/Notifiers/Sms/SmsAdminNotifier.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Notifiers\Sms; use TeenQuotes\Notifiers\AdminNotifier; @@ -48,7 +57,7 @@ public function notify($message) private function sendRequest($url, $data) { - $ch = curl_init(); + $ch = curl_init(); $full = $url.'?'.http_build_query($data, '', '&', PHP_QUERY_RFC3986); curl_setopt($ch, CURLOPT_URL, $full); diff --git a/app/TeenQuotes/Pages/Composers/AppsComposer.php b/app/TeenQuotes/Pages/Composers/AppsComposer.php index a0ccda1a..9cbbb99a 100644 --- a/app/TeenQuotes/Pages/Composers/AppsComposer.php +++ b/app/TeenQuotes/Pages/Composers/AppsComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Pages\Composers; use Agent; diff --git a/app/TeenQuotes/Pages/Controllers/AppsController.php b/app/TeenQuotes/Pages/Controllers/AppsController.php index 07979bbe..201f1b94 100644 --- a/app/TeenQuotes/Pages/Controllers/AppsController.php +++ b/app/TeenQuotes/Pages/Controllers/AppsController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Pages\Controllers; use Agent; @@ -21,7 +30,7 @@ public function redirectPlural() public function index() { $hasAndroidApp = Config::get('mobile.androidApp'); - $hasIOSApp = Config::get('mobile.iOSApp'); + $hasIOSApp = Config::get('mobile.iOSApp'); // Tablet if (Agent::isTablet()) { diff --git a/app/TeenQuotes/Pages/Controllers/ContactController.php b/app/TeenQuotes/Pages/Controllers/ContactController.php index e821f866..ab0ae87e 100644 --- a/app/TeenQuotes/Pages/Controllers/ContactController.php +++ b/app/TeenQuotes/Pages/Controllers/ContactController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Pages\Controllers; use BaseController; @@ -12,16 +21,16 @@ class ContactController extends BaseController public function index() { $data = [ - 'chooseYourWeapon' => Lang::get('contact.chooseYourWeapon'), - 'contactTitle' => Lang::get('contact.contactTitle'), - 'emailAddress' => Lang::get('contact.emailAddress'), - 'pageDescription' => Lang::get('contact.pageDescription'), - 'pageTitle' => Lang::get('contact.pageTitle'), - 'stayInTouchContent' => Lang::get('contact.stayInTouchContent'), - 'stayInTouchTitle' => Lang::get('contact.stayInTouchTitle'), - 'teamMembers' => LaraSetting::get('team'), + 'chooseYourWeapon' => Lang::get('contact.chooseYourWeapon'), + 'contactTitle' => Lang::get('contact.contactTitle'), + 'emailAddress' => Lang::get('contact.emailAddress'), + 'pageDescription' => Lang::get('contact.pageDescription'), + 'pageTitle' => Lang::get('contact.pageTitle'), + 'stayInTouchContent' => Lang::get('contact.stayInTouchContent'), + 'stayInTouchTitle' => Lang::get('contact.stayInTouchTitle'), + 'teamMembers' => LaraSetting::get('team'), 'teamTitle' => Lang::get('contact.teamTitle'), - 'twitterAccount' => Lang::get('layout.twitterUsername'), + 'twitterAccount' => Lang::get('layout.twitterUsername'), ]; // Add description for each team member diff --git a/app/TeenQuotes/Pages/Controllers/LegalController.php b/app/TeenQuotes/Pages/Controllers/LegalController.php index d1f8b24d..fbb21004 100644 --- a/app/TeenQuotes/Pages/Controllers/LegalController.php +++ b/app/TeenQuotes/Pages/Controllers/LegalController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Pages\Controllers; use BaseController; diff --git a/app/TeenQuotes/Pages/PagesServiceProvider.php b/app/TeenQuotes/Pages/PagesServiceProvider.php index 59f41369..da298d37 100644 --- a/app/TeenQuotes/Pages/PagesServiceProvider.php +++ b/app/TeenQuotes/Pages/PagesServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Pages; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Queues/QueuesServiceProvider.php b/app/TeenQuotes/Queues/QueuesServiceProvider.php index 51fb4892..894864bd 100644 --- a/app/TeenQuotes/Queues/QueuesServiceProvider.php +++ b/app/TeenQuotes/Queues/QueuesServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Queues; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Queues/Workers/EasyrecWorker.php b/app/TeenQuotes/Queues/Workers/EasyrecWorker.php index ad6effbd..3f8190d4 100644 --- a/app/TeenQuotes/Queues/Workers/EasyrecWorker.php +++ b/app/TeenQuotes/Queues/Workers/EasyrecWorker.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Queues\Workers; use Easyrec; diff --git a/app/TeenQuotes/Queues/Workers/ProfileVisitorWorker.php b/app/TeenQuotes/Queues/Workers/ProfileVisitorWorker.php index 1d31217d..09bb01a5 100644 --- a/app/TeenQuotes/Queues/Workers/ProfileVisitorWorker.php +++ b/app/TeenQuotes/Queues/Workers/ProfileVisitorWorker.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Queues\Workers; use TeenQuotes\Users\Repositories\ProfileVisitorRepository; diff --git a/app/TeenQuotes/Quotes/Composers/AddComposer.php b/app/TeenQuotes/Quotes/Composers/AddComposer.php index fbea49bf..77574179 100644 --- a/app/TeenQuotes/Quotes/Composers/AddComposer.php +++ b/app/TeenQuotes/Quotes/Composers/AddComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Composers; use JavaScript; diff --git a/app/TeenQuotes/Quotes/Composers/IndexComposer.php b/app/TeenQuotes/Quotes/Composers/IndexComposer.php index 4b5eeafd..ce7f4bef 100644 --- a/app/TeenQuotes/Quotes/Composers/IndexComposer.php +++ b/app/TeenQuotes/Quotes/Composers/IndexComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Composers; use Auth; diff --git a/app/TeenQuotes/Quotes/Composers/IndexForTagComposer.php b/app/TeenQuotes/Quotes/Composers/IndexForTagComposer.php index 4872780c..56b66cff 100644 --- a/app/TeenQuotes/Quotes/Composers/IndexForTagComposer.php +++ b/app/TeenQuotes/Quotes/Composers/IndexForTagComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Composers; use Route; diff --git a/app/TeenQuotes/Quotes/Composers/IndexForTopsComposer.php b/app/TeenQuotes/Quotes/Composers/IndexForTopsComposer.php index e5fc231b..4a8e747c 100644 --- a/app/TeenQuotes/Quotes/Composers/IndexForTopsComposer.php +++ b/app/TeenQuotes/Quotes/Composers/IndexForTopsComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Composers; use InvalidArgumentException; diff --git a/app/TeenQuotes/Quotes/Composers/ResultsComposer.php b/app/TeenQuotes/Quotes/Composers/ResultsComposer.php index 646e8521..2fe20bd0 100644 --- a/app/TeenQuotes/Quotes/Composers/ResultsComposer.php +++ b/app/TeenQuotes/Quotes/Composers/ResultsComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Composers; use TeenQuotes\Quotes\Models\Quote; diff --git a/app/TeenQuotes/Quotes/Composers/ShowComposer.php b/app/TeenQuotes/Quotes/Composers/ShowComposer.php index 51d7dfe4..d5bd0177 100644 --- a/app/TeenQuotes/Quotes/Composers/ShowComposer.php +++ b/app/TeenQuotes/Quotes/Composers/ShowComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Composers; use JavaScript; @@ -33,7 +42,7 @@ public function compose($view) $colors = Session::get('colors.quote'); } else { // Fall back to the default color - $colors = []; + $colors = []; $colors[$id] = 'color-1'; } diff --git a/app/TeenQuotes/Quotes/Composers/SingleComposer.php b/app/TeenQuotes/Quotes/Composers/SingleComposer.php index 1de39113..b132c19f 100644 --- a/app/TeenQuotes/Quotes/Composers/SingleComposer.php +++ b/app/TeenQuotes/Quotes/Composers/SingleComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Composers; use JavaScript; diff --git a/app/TeenQuotes/Quotes/Console/QuotesPublishCommand.php b/app/TeenQuotes/Quotes/Console/QuotesPublishCommand.php index 03afb64c..c29e8510 100644 --- a/app/TeenQuotes/Quotes/Console/QuotesPublishCommand.php +++ b/app/TeenQuotes/Quotes/Console/QuotesPublishCommand.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Console; use Config; @@ -153,7 +162,7 @@ private function notifyAdministrator() private function getNbRemainingDaysPublication() { $nbQuotesPending = $this->quoteRepo->nbPending(); - $quotesPerDay = Config::get('app.quotes.nbQuotesToPublishPerDay'); + $quotesPerDay = Config::get('app.quotes.nbQuotesToPublishPerDay'); return ceil($nbQuotesPending / $quotesPerDay); } diff --git a/app/TeenQuotes/Quotes/Console/WaitingQuotesCommand.php b/app/TeenQuotes/Quotes/Console/WaitingQuotesCommand.php index 0f63cdff..01e2658d 100644 --- a/app/TeenQuotes/Quotes/Console/WaitingQuotesCommand.php +++ b/app/TeenQuotes/Quotes/Console/WaitingQuotesCommand.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Console; use Carbon; diff --git a/app/TeenQuotes/Quotes/Controllers/FavoriteQuoteController.php b/app/TeenQuotes/Quotes/Controllers/FavoriteQuoteController.php index d178fb8d..0758d5ba 100644 --- a/app/TeenQuotes/Quotes/Controllers/FavoriteQuoteController.php +++ b/app/TeenQuotes/Quotes/Controllers/FavoriteQuoteController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Controllers; use App; @@ -25,7 +34,7 @@ class FavoriteQuoteController extends BaseController public function __construct() { - $this->api = App::make('TeenQuotes\Api\V1\Controllers\QuotesFavoriteController'); + $this->api = App::make('TeenQuotes\Api\V1\Controllers\QuotesFavoriteController'); $this->favQuoteValidator = App::make('TeenQuotes\Quotes\Validation\FavoriteQuoteValidator'); } diff --git a/app/TeenQuotes/Quotes/Controllers/QuotesController.php b/app/TeenQuotes/Quotes/Controllers/QuotesController.php index 41b7ad7e..2db968fa 100644 --- a/app/TeenQuotes/Quotes/Controllers/QuotesController.php +++ b/app/TeenQuotes/Quotes/Controllers/QuotesController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Controllers; use App; @@ -43,8 +52,8 @@ class QuotesController extends BaseController public function __construct(QuoteRepository $quoteRepo) { $this->beforeFilter('auth', ['on' => 'store']); - $this->api = App::make('TeenQuotes\Api\V1\Controllers\QuotesController'); - $this->quoteRepo = $quoteRepo; + $this->api = App::make('TeenQuotes\Api\V1\Controllers\QuotesController'); + $this->quoteRepo = $quoteRepo; $this->quoteValidator = App::make('TeenQuotes\Quotes\Validation\QuoteValidator'); } @@ -202,7 +211,7 @@ public function show($id) public function getDataFavoritesInfo() { $quote = $this->quoteRepo->getById(Input::get('id')); - $data = $quote->present()->favoritesData; + $data = $quote->present()->favoritesData; $translate = Lang::choice('quotes.favoritesText', $data['nbFavorites'], $data); diff --git a/app/TeenQuotes/Quotes/Controllers/SearchController.php b/app/TeenQuotes/Quotes/Controllers/SearchController.php index a286cffe..9c957c60 100644 --- a/app/TeenQuotes/Quotes/Controllers/SearchController.php +++ b/app/TeenQuotes/Quotes/Controllers/SearchController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Controllers; use BaseController; @@ -76,14 +85,14 @@ public function getResults($query) // Search quotes $nbQuotes = $this->quoteRepo->searchCountPublishedWithQuery($query); - $quotes = $this->quoteRepo->searchPublishedWithQuery($query, 1, $nbResultsPerCategory); + $quotes = $this->quoteRepo->searchPublishedWithQuery($query, 1, $nbResultsPerCategory); // Search users $nbUsers = 0; - $users = null; + $users = null; if ($this->shouldSearchForUsers($query)) { $nbUsers = $this->userRepo->countByPartialLogin($query); - $users = $this->userRepo->searchByPartialLogin($query, 1, $nbResultsPerCategory); + $users = $this->userRepo->searchByPartialLogin($query, 1, $nbResultsPerCategory); } // Handle no results @@ -91,7 +100,7 @@ public function getResults($query) return Redirect::route('search.form')->with('warning', Lang::get('search.noResultsAtAll')); } - $data = compact('quotes', 'users', 'nbQuotes', 'nbUsers', 'query'); + $data = compact('quotes', 'users', 'nbQuotes', 'nbUsers', 'query'); $data['maxNbResultPerCategory'] = Config::get('app.search.maxResultsPerCategory'); $data['pageTitle'] = Lang::get('search.resultsPageTitle', compact('query')); $data['pageDescription'] = Lang::get('search.resultsPageDescription', compact('query')); @@ -118,7 +127,7 @@ public function usersFromCountry($country_id) throw new CountryNotFoundException(); } - $page = Input::get('page', 1); + $page = Input::get('page', 1); $pagesize = $this->nbOfResultsPerCategory(); $users = $this->userRepo->fromCountry($country, $page, $pagesize); @@ -131,7 +140,7 @@ public function usersFromCountry($country_id) $totalResults = $this->userRepo->countFromCountry($country); $paginator = Paginator::make($users->toArray(), $totalResults, $pagesize); - $data = compact('users', 'paginator', 'country'); + $data = compact('users', 'paginator', 'country'); return View::make('search.users', $data); } diff --git a/app/TeenQuotes/Quotes/Models/FavoriteQuote.php b/app/TeenQuotes/Quotes/Models/FavoriteQuote.php index 453e0d6b..68adef28 100644 --- a/app/TeenQuotes/Quotes/Models/FavoriteQuote.php +++ b/app/TeenQuotes/Quotes/Models/FavoriteQuote.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Models; use Eloquent; diff --git a/app/TeenQuotes/Quotes/Models/Quote.php b/app/TeenQuotes/Quotes/Models/Quote.php index 0bdd9851..7e907f9e 100644 --- a/app/TeenQuotes/Quotes/Models/Quote.php +++ b/app/TeenQuotes/Quotes/Models/Quote.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Models; use App; @@ -215,7 +224,7 @@ public function registerViewAction() if (!in_array(App::environment(), ['testing', 'codeception'])) { // Try to retrieve the ID of the user if (Auth::guest()) { - $idUserApi = ResourceServer::getOwnerId(); + $idUserApi = ResourceServer::getOwnerId(); $userRecommendation = !empty($idUserApi) ? $idUserApi : null; } else { $userRecommendation = Auth::id(); diff --git a/app/TeenQuotes/Quotes/Models/Relations/FavoriteQuoteTrait.php b/app/TeenQuotes/Quotes/Models/Relations/FavoriteQuoteTrait.php index 2f340fa0..3268fe61 100644 --- a/app/TeenQuotes/Quotes/Models/Relations/FavoriteQuoteTrait.php +++ b/app/TeenQuotes/Quotes/Models/Relations/FavoriteQuoteTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Models\Relations; use TeenQuotes\Quotes\Models\Quote; diff --git a/app/TeenQuotes/Quotes/Models/Relations/QuoteTrait.php b/app/TeenQuotes/Quotes/Models/Relations/QuoteTrait.php index 8ab677c0..ad97392e 100644 --- a/app/TeenQuotes/Quotes/Models/Relations/QuoteTrait.php +++ b/app/TeenQuotes/Quotes/Models/Relations/QuoteTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Models\Relations; use TeenQuotes\Comments\Models\Comment; diff --git a/app/TeenQuotes/Quotes/Models/Scopes/FavoriteQuoteTrait.php b/app/TeenQuotes/Quotes/Models/Scopes/FavoriteQuoteTrait.php index 4224ce58..7d0e9bf4 100644 --- a/app/TeenQuotes/Quotes/Models/Scopes/FavoriteQuoteTrait.php +++ b/app/TeenQuotes/Quotes/Models/Scopes/FavoriteQuoteTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Models\Scopes; use Auth; @@ -10,10 +19,11 @@ trait FavoriteQuoteTrait /** * Get the FavoriteQuote for the current user. * - * @throws \NotAllowedException when calling this when the visitor is not logged in * * @param \Illuminate\Database\Query\Builder $query * + * @throws \NotAllowedException when calling this when the visitor is not logged in + * * @return \Illuminate\Database\Query\Builder */ public function scopeCurrentUser($query) diff --git a/app/TeenQuotes/Quotes/Models/Scopes/QuoteTrait.php b/app/TeenQuotes/Quotes/Models/Scopes/QuoteTrait.php index 3288b57b..dec27a97 100644 --- a/app/TeenQuotes/Quotes/Models/Scopes/QuoteTrait.php +++ b/app/TeenQuotes/Quotes/Models/Scopes/QuoteTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Models\Scopes; use Carbon; diff --git a/app/TeenQuotes/Quotes/Presenters/QuotePresenter.php b/app/TeenQuotes/Quotes/Presenters/QuotePresenter.php index 85fc18c3..aff54312 100644 --- a/app/TeenQuotes/Quotes/Presenters/QuotePresenter.php +++ b/app/TeenQuotes/Quotes/Presenters/QuotePresenter.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Presenters; use Lang; @@ -15,13 +24,13 @@ class QuotePresenter extends Presenter */ public function textTweet() { - $content = $this->content; - $maxLength = 115; - $twitterUsername = Lang::get('layout.twitterUsername'); + $content = $this->content; + $maxLength = 115; + $twitterUsername = Lang::get('layout.twitterUsername'); $maxLengthAddTwitterUsername = $maxLength - strlen($twitterUsername); if (strlen($content) > $maxLength) { - $content = substr($content, 0, $maxLength); + $content = substr($content, 0, $maxLength); $lastSpace = strrpos($content, ' '); // After the space, add … @@ -40,11 +49,11 @@ public function textTweet() */ public function textTwitterCard() { - $content = $this->content; + $content = $this->content; $maxLength = 197; if (strlen($content) > $maxLength) { - $content = substr($content, 0, $maxLength); + $content = substr($content, 0, $maxLength); $lastSpace = strrpos($content, ' '); // After the space, add … @@ -62,7 +71,7 @@ public function textTwitterCard() public function favoritesData() { $nbFavorites = count($this->favorites); - $data = compact('nbFavorites'); + $data = compact('nbFavorites'); // We have got too much people who favorited this quote if ($nbFavorites > 3) { @@ -70,11 +79,11 @@ public function favoritesData() } // Collect a maximum of 3 users - $i = 0; + $i = 0; $favorites = $this->favorites; while ($i < 3 and !$favorites->isEmpty()) { - $fav = $favorites->shift(); + $fav = $favorites->shift(); $data['name'.$i] = $this->linkForUser($fav->user); $i++; } diff --git a/app/TeenQuotes/Quotes/QuotesServiceProvider.php b/app/TeenQuotes/Quotes/QuotesServiceProvider.php index b9396b83..b3c0d7eb 100644 --- a/app/TeenQuotes/Quotes/QuotesServiceProvider.php +++ b/app/TeenQuotes/Quotes/QuotesServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Quotes/Repositories/CachingFavoriteQuoteRepository.php b/app/TeenQuotes/Quotes/Repositories/CachingFavoriteQuoteRepository.php index e262e7d1..8ea6ce45 100644 --- a/app/TeenQuotes/Quotes/Repositories/CachingFavoriteQuoteRepository.php +++ b/app/TeenQuotes/Quotes/Repositories/CachingFavoriteQuoteRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Repositories; use Cache; @@ -31,7 +40,7 @@ public function isFavoriteForUserAndQuote($u, $quote_id) */ public function deleteForUserAndQuote($u, $quote_id) { - $cacheKeyUser = $this->getCacheKeyForUser($u); + $cacheKeyUser = $this->getCacheKeyForUser($u); $cacheKeyQuote = $this->getCacheKeyForQuote($quote_id); $quotes = Cache::get($cacheKeyUser, null); @@ -61,7 +70,7 @@ public function nbFavoritesForQuotes($idsQuotes) public function quotesFavoritesForUser($u) { $cacheKey = $this->getCacheKeyForUser($u); - $quotes = Cache::get($cacheKey, null); + $quotes = Cache::get($cacheKey, null); if (!is_null($quotes)) { return $quotes; @@ -77,7 +86,7 @@ public function quotesFavoritesForUser($u) */ public function create(User $u, $quote_id) { - $cacheKeyUser = $this->getCacheKeyForUser($u); + $cacheKeyUser = $this->getCacheKeyForUser($u); $cacheKeyQuote = $this->getCacheKeyForQuote($quote_id); $quotes = Cache::get($cacheKeyUser, null); diff --git a/app/TeenQuotes/Quotes/Repositories/CachingQuoteRepository.php b/app/TeenQuotes/Quotes/Repositories/CachingQuoteRepository.php index 37d6ce41..d7bc33f2 100644 --- a/app/TeenQuotes/Quotes/Repositories/CachingQuoteRepository.php +++ b/app/TeenQuotes/Quotes/Repositories/CachingQuoteRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Repositories; use Cache; @@ -296,7 +305,7 @@ public function countWaitingQuotesSince(Carbon $date) private function flushQuotesForQuote($id) { - $quote = $this->getByIdWithUser($id); + $quote = $this->getByIdWithUser($id); $author = $quote->user; // Increment the number of published quotes for the author diff --git a/app/TeenQuotes/Quotes/Repositories/DbFavoriteQuoteRepository.php b/app/TeenQuotes/Quotes/Repositories/DbFavoriteQuoteRepository.php index ad1e7a5c..4703a0b2 100644 --- a/app/TeenQuotes/Quotes/Repositories/DbFavoriteQuoteRepository.php +++ b/app/TeenQuotes/Quotes/Repositories/DbFavoriteQuoteRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Repositories; use DB; @@ -81,8 +90,8 @@ public function quotesFavoritesForUser($u) */ public function create(User $u, $quote_id) { - $favorite = new FavoriteQuote(); - $favorite->user_id = $u->id; + $favorite = new FavoriteQuote(); + $favorite->user_id = $u->id; $favorite->quote_id = $quote_id; $favorite->save(); diff --git a/app/TeenQuotes/Quotes/Repositories/DbQuoteRepository.php b/app/TeenQuotes/Quotes/Repositories/DbQuoteRepository.php index 1bc93b96..732f118f 100644 --- a/app/TeenQuotes/Quotes/Repositories/DbQuoteRepository.php +++ b/app/TeenQuotes/Quotes/Repositories/DbQuoteRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Repositories; use Carbon; @@ -149,8 +158,8 @@ public function updateContentAndApproved($id, $content, $approved) { $this->guardApproved($approved); - $q = $this->getById($id); - $q->content = $content; + $q = $this->getById($id); + $q->content = $content; $q->approved = $approved; $q->save(); @@ -169,7 +178,7 @@ public function updateApproved($id, $approved) { $this->guardApproved($approved); - $q = $this->getById($id); + $q = $this->getById($id); $q->approved = $approved; $q->save(); @@ -229,7 +238,7 @@ public function submittedTodayForUser(User $u) */ public function createQuoteForUser(User $u, $content) { - $quote = new Quote(); + $quote = new Quote(); $quote->content = $content; $u->quotes()->save($quote); @@ -414,9 +423,9 @@ public function getQuotesByApprovedForUser(User $u, $approved, $page, $pagesize) * * @param \TeenQuotes\Quotes\Models\Quote|int $q * - * @return int - * * @throws \InvalidArgumentException If the quote is not waiting to be published + * + * @return int */ public function nbDaysUntilPublication($q) { diff --git a/app/TeenQuotes/Quotes/Repositories/FavoriteQuoteRepository.php b/app/TeenQuotes/Quotes/Repositories/FavoriteQuoteRepository.php index 54011614..24aa890b 100644 --- a/app/TeenQuotes/Quotes/Repositories/FavoriteQuoteRepository.php +++ b/app/TeenQuotes/Quotes/Repositories/FavoriteQuoteRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Repositories; use TeenQuotes\Users\Models\User; diff --git a/app/TeenQuotes/Quotes/Repositories/QuoteRepository.php b/app/TeenQuotes/Quotes/Repositories/QuoteRepository.php index 2fd0298d..995bd40d 100644 --- a/app/TeenQuotes/Quotes/Repositories/QuoteRepository.php +++ b/app/TeenQuotes/Quotes/Repositories/QuoteRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Repositories; use Carbon; @@ -235,9 +244,9 @@ public function getQuotesByApprovedForUser(User $u, $approved, $page, $pagesize) * * @param \TeenQuotes\Quotes\Models\Quote|int $q * - * @return int - * * @throws \InvalidArgumentException If the quote is not waiting to be published + * + * @return int */ public function nbDaysUntilPublication($q); diff --git a/app/TeenQuotes/Quotes/Validation/FavoriteQuoteValidator.php b/app/TeenQuotes/Quotes/Validation/FavoriteQuoteValidator.php index e4d79121..f5bd6a5f 100644 --- a/app/TeenQuotes/Quotes/Validation/FavoriteQuoteValidator.php +++ b/app/TeenQuotes/Quotes/Validation/FavoriteQuoteValidator.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Validation; use TeenQuotes\Tools\Validation\Validator as BaseValidator; diff --git a/app/TeenQuotes/Quotes/Validation/QuoteValidator.php b/app/TeenQuotes/Quotes/Validation/QuoteValidator.php index a5c81bd8..8543f2ef 100644 --- a/app/TeenQuotes/Quotes/Validation/QuoteValidator.php +++ b/app/TeenQuotes/Quotes/Validation/QuoteValidator.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Quotes\Validation; use TeenQuotes\Tools\Validation\Validator as BaseValidator; diff --git a/app/TeenQuotes/Robots/Controllers/RobotsController.php b/app/TeenQuotes/Robots/Controllers/RobotsController.php index 66fd6617..22312711 100644 --- a/app/TeenQuotes/Robots/Controllers/RobotsController.php +++ b/app/TeenQuotes/Robots/Controllers/RobotsController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Robots\Controllers; use BaseController; @@ -26,7 +35,7 @@ class RobotsController extends BaseController public function __construct(Robots $robots, App $app) { $this->robots = $robots; - $this->app = $app; + $this->app = $app; } public function getRobots() diff --git a/app/TeenQuotes/Robots/RobotsServiceProvider.php b/app/TeenQuotes/Robots/RobotsServiceProvider.php index 593663df..15e0dd89 100644 --- a/app/TeenQuotes/Robots/RobotsServiceProvider.php +++ b/app/TeenQuotes/Robots/RobotsServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Robots; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Settings/Models/Relations/SettingTrait.php b/app/TeenQuotes/Settings/Models/Relations/SettingTrait.php index 4de1b7cc..99880af2 100644 --- a/app/TeenQuotes/Settings/Models/Relations/SettingTrait.php +++ b/app/TeenQuotes/Settings/Models/Relations/SettingTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Settings\Models\Relations; use TeenQuotes\Users\Models\User; diff --git a/app/TeenQuotes/Settings/Models/Setting.php b/app/TeenQuotes/Settings/Models/Setting.php index 030619c9..7f06ee7c 100644 --- a/app/TeenQuotes/Settings/Models/Setting.php +++ b/app/TeenQuotes/Settings/Models/Setting.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Settings\Models; use Eloquent; @@ -10,5 +19,5 @@ class Setting extends Eloquent use SettingRelationsTrait; protected $fillable = ['user_id', 'key', 'value']; - public $timestamps = false; + public $timestamps = false; } diff --git a/app/TeenQuotes/Settings/Repositories/CachingSettingRepository.php b/app/TeenQuotes/Settings/Repositories/CachingSettingRepository.php index cbd94f60..c2324b34 100644 --- a/app/TeenQuotes/Settings/Repositories/CachingSettingRepository.php +++ b/app/TeenQuotes/Settings/Repositories/CachingSettingRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Settings\Repositories; use Illuminate\Cache\Repository as Cache; diff --git a/app/TeenQuotes/Settings/Repositories/DbSettingRepository.php b/app/TeenQuotes/Settings/Repositories/DbSettingRepository.php index 0c28ffb1..459f0c44 100644 --- a/app/TeenQuotes/Settings/Repositories/DbSettingRepository.php +++ b/app/TeenQuotes/Settings/Repositories/DbSettingRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Settings\Repositories; use TeenQuotes\Settings\Models\Setting; diff --git a/app/TeenQuotes/Settings/Repositories/SettingRepository.php b/app/TeenQuotes/Settings/Repositories/SettingRepository.php index 20224e65..bfdbb540 100644 --- a/app/TeenQuotes/Settings/Repositories/SettingRepository.php +++ b/app/TeenQuotes/Settings/Repositories/SettingRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Settings\Repositories; use TeenQuotes\Users\Models\User; diff --git a/app/TeenQuotes/Settings/SettingsServiceProvider.php b/app/TeenQuotes/Settings/SettingsServiceProvider.php index 3757b983..18313953 100644 --- a/app/TeenQuotes/Settings/SettingsServiceProvider.php +++ b/app/TeenQuotes/Settings/SettingsServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Settings; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Stories/Controllers/StoriesController.php b/app/TeenQuotes/Stories/Controllers/StoriesController.php index ef984cc2..dc4a5b41 100644 --- a/app/TeenQuotes/Stories/Controllers/StoriesController.php +++ b/app/TeenQuotes/Stories/Controllers/StoriesController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Stories\Controllers; use App; @@ -29,7 +38,7 @@ class StoriesController extends BaseController public function __construct() { - $this->api = App::make('TeenQuotes\Api\V1\Controllers\StoriesController'); + $this->api = App::make('TeenQuotes\Api\V1\Controllers\StoriesController'); $this->storyValidator = App::make('TeenQuotes\Stories\Validation\StoryValidator'); } @@ -43,7 +52,7 @@ public function index() // Extract the stories collection $response = $apiResponse->getOriginalData(); - $stories = $response['stories']; + $stories = $response['stories']; $totalQuotes = $stories->first()->present()->totalQuotes; diff --git a/app/TeenQuotes/Stories/Models/Relations/StoryTrait.php b/app/TeenQuotes/Stories/Models/Relations/StoryTrait.php index 23c0a7cc..4b56eab7 100644 --- a/app/TeenQuotes/Stories/Models/Relations/StoryTrait.php +++ b/app/TeenQuotes/Stories/Models/Relations/StoryTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Stories\Models\Relations; use TeenQuotes\Users\Models\User; diff --git a/app/TeenQuotes/Stories/Models/Scopes/StoryTrait.php b/app/TeenQuotes/Stories/Models/Scopes/StoryTrait.php index 816b3cd3..3aa46b12 100644 --- a/app/TeenQuotes/Stories/Models/Scopes/StoryTrait.php +++ b/app/TeenQuotes/Stories/Models/Scopes/StoryTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Stories\Models\Scopes; trait StoryTrait diff --git a/app/TeenQuotes/Stories/Models/Story.php b/app/TeenQuotes/Stories/Models/Story.php index 8d3b4419..0bbd7d1c 100644 --- a/app/TeenQuotes/Stories/Models/Story.php +++ b/app/TeenQuotes/Stories/Models/Story.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Stories\Models; use Laracasts\Presenter\PresentableTrait; @@ -13,6 +22,6 @@ class Story extends Toloquent protected $presenter = 'TeenQuotes\Stories\Presenters\StoryPresenter'; - protected $table = 'stories'; + protected $table = 'stories'; protected $fillable = []; } diff --git a/app/TeenQuotes/Stories/Presenters/StoryPresenter.php b/app/TeenQuotes/Stories/Presenters/StoryPresenter.php index cbbb3f07..7d27d035 100644 --- a/app/TeenQuotes/Stories/Presenters/StoryPresenter.php +++ b/app/TeenQuotes/Stories/Presenters/StoryPresenter.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Stories\Presenters; use App; @@ -26,7 +35,7 @@ public function storyAge() */ public function totalQuotes() { - $repo = App::make(QuoteRepository::class); + $repo = App::make(QuoteRepository::class); $nbPublished = $repo->totalPublished(); // Round to nearest thousand diff --git a/app/TeenQuotes/Stories/Repositories/DbStoryRepository.php b/app/TeenQuotes/Stories/Repositories/DbStoryRepository.php index 98928297..7deecf80 100644 --- a/app/TeenQuotes/Stories/Repositories/DbStoryRepository.php +++ b/app/TeenQuotes/Stories/Repositories/DbStoryRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Stories\Repositories; use TeenQuotes\Stories\Models\Story; @@ -59,10 +68,10 @@ public function total() */ public function create(User $u, $represent_txt, $frequence_txt) { - $story = new Story(); + $story = new Story(); $story->represent_txt = $represent_txt; $story->frequence_txt = $frequence_txt; - $story->user_id = $u->id; + $story->user_id = $u->id; $story->save(); return $story; diff --git a/app/TeenQuotes/Stories/Repositories/StoryRepository.php b/app/TeenQuotes/Stories/Repositories/StoryRepository.php index a8047c01..0fdda316 100644 --- a/app/TeenQuotes/Stories/Repositories/StoryRepository.php +++ b/app/TeenQuotes/Stories/Repositories/StoryRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Stories\Repositories; use TeenQuotes\Users\Models\User; diff --git a/app/TeenQuotes/Stories/StoriesServiceProvider.php b/app/TeenQuotes/Stories/StoriesServiceProvider.php index c742d17d..b1db3a24 100644 --- a/app/TeenQuotes/Stories/StoriesServiceProvider.php +++ b/app/TeenQuotes/Stories/StoriesServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Stories; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Stories/Validation/StoryValidator.php b/app/TeenQuotes/Stories/Validation/StoryValidator.php index 5cfaeb5c..6b769deb 100644 --- a/app/TeenQuotes/Stories/Validation/StoryValidator.php +++ b/app/TeenQuotes/Stories/Validation/StoryValidator.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Stories\Validation; use TeenQuotes\Tools\Validation\Validator as BaseValidator; diff --git a/app/TeenQuotes/Tags/Models/Relations/TagTrait.php b/app/TeenQuotes/Tags/Models/Relations/TagTrait.php index 23bc5838..fe9809da 100644 --- a/app/TeenQuotes/Tags/Models/Relations/TagTrait.php +++ b/app/TeenQuotes/Tags/Models/Relations/TagTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tags\Models\Relations; use TeenQuotes\Quotes\Models\Quote; diff --git a/app/TeenQuotes/Tags/Models/Tag.php b/app/TeenQuotes/Tags/Models/Tag.php index ffc81392..66fe6304 100644 --- a/app/TeenQuotes/Tags/Models/Tag.php +++ b/app/TeenQuotes/Tags/Models/Tag.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tags\Models; use Eloquent; diff --git a/app/TeenQuotes/Tags/Repositories/CachingTagRepository.php b/app/TeenQuotes/Tags/Repositories/CachingTagRepository.php index ee8bb2a1..cc31a8eb 100644 --- a/app/TeenQuotes/Tags/Repositories/CachingTagRepository.php +++ b/app/TeenQuotes/Tags/Repositories/CachingTagRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tags\Repositories; use Cache; diff --git a/app/TeenQuotes/Tags/Repositories/DbTagRepository.php b/app/TeenQuotes/Tags/Repositories/DbTagRepository.php index 0696fd50..1067f7f7 100644 --- a/app/TeenQuotes/Tags/Repositories/DbTagRepository.php +++ b/app/TeenQuotes/Tags/Repositories/DbTagRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tags\Repositories; use TeenQuotes\Quotes\Models\Quote; diff --git a/app/TeenQuotes/Tags/Repositories/TagRepository.php b/app/TeenQuotes/Tags/Repositories/TagRepository.php index f5e49c61..8f221237 100644 --- a/app/TeenQuotes/Tags/Repositories/TagRepository.php +++ b/app/TeenQuotes/Tags/Repositories/TagRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tags\Repositories; use TeenQuotes\Quotes\Models\Quote; diff --git a/app/TeenQuotes/Tags/TagsServiceProvider.php b/app/TeenQuotes/Tags/TagsServiceProvider.php index 2911827f..7ba83aa9 100644 --- a/app/TeenQuotes/Tags/TagsServiceProvider.php +++ b/app/TeenQuotes/Tags/TagsServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tags; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Tools/BaseController.php b/app/TeenQuotes/Tools/BaseController.php index 41e8b0df..7e72b932 100644 --- a/app/TeenQuotes/Tools/BaseController.php +++ b/app/TeenQuotes/Tools/BaseController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tools; use App; diff --git a/app/TeenQuotes/Tools/Colors/ColorGenerator.php b/app/TeenQuotes/Tools/Colors/ColorGenerator.php index bd452b1b..7b8c5b51 100644 --- a/app/TeenQuotes/Tools/Colors/ColorGenerator.php +++ b/app/TeenQuotes/Tools/Colors/ColorGenerator.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tools\Colors; use InvalidArgumentException; diff --git a/app/TeenQuotes/Tools/Colors/ColorGeneratorInterface.php b/app/TeenQuotes/Tools/Colors/ColorGeneratorInterface.php index 01bd95bb..ae84daec 100644 --- a/app/TeenQuotes/Tools/Colors/ColorGeneratorInterface.php +++ b/app/TeenQuotes/Tools/Colors/ColorGeneratorInterface.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tools\Colors; use InvalidArgumentException; diff --git a/app/TeenQuotes/Tools/Composers/AbstractDeepLinksComposer.php b/app/TeenQuotes/Tools/Composers/AbstractDeepLinksComposer.php index 2b496058..dd1d901a 100644 --- a/app/TeenQuotes/Tools/Composers/AbstractDeepLinksComposer.php +++ b/app/TeenQuotes/Tools/Composers/AbstractDeepLinksComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tools\Composers; use Config; diff --git a/app/TeenQuotes/Tools/Composers/DeepLinksComposer.php b/app/TeenQuotes/Tools/Composers/DeepLinksComposer.php index dc87f841..888875a8 100644 --- a/app/TeenQuotes/Tools/Composers/DeepLinksComposer.php +++ b/app/TeenQuotes/Tools/Composers/DeepLinksComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tools\Composers; use Route; diff --git a/app/TeenQuotes/Tools/Composers/Interfaces/QuotesColorsExtractor.php b/app/TeenQuotes/Tools/Composers/Interfaces/QuotesColorsExtractor.php index e29100a5..9da2d3bc 100644 --- a/app/TeenQuotes/Tools/Composers/Interfaces/QuotesColorsExtractor.php +++ b/app/TeenQuotes/Tools/Composers/Interfaces/QuotesColorsExtractor.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tools\Composers\Interfaces; interface QuotesColorsExtractor diff --git a/app/TeenQuotes/Tools/Namespaces/NamespaceTrait.php b/app/TeenQuotes/Tools/Namespaces/NamespaceTrait.php index 4421152f..3aece6bf 100644 --- a/app/TeenQuotes/Tools/Namespaces/NamespaceTrait.php +++ b/app/TeenQuotes/Tools/Namespaces/NamespaceTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tools\Namespaces; use ReflectionClass; diff --git a/app/TeenQuotes/Tools/TextTools.php b/app/TeenQuotes/Tools/TextTools.php index 9cf7b209..0dc3e571 100644 --- a/app/TeenQuotes/Tools/TextTools.php +++ b/app/TeenQuotes/Tools/TextTools.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tools; class TextTools diff --git a/app/TeenQuotes/Tools/ToolsServiceProvider.php b/app/TeenQuotes/Tools/ToolsServiceProvider.php index 49748f40..5e1d1d41 100644 --- a/app/TeenQuotes/Tools/ToolsServiceProvider.php +++ b/app/TeenQuotes/Tools/ToolsServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tools; use Illuminate\Support\ServiceProvider; diff --git a/app/TeenQuotes/Tools/Validation/Validator.php b/app/TeenQuotes/Tools/Validation/Validator.php index 755fc06a..654e7c70 100644 --- a/app/TeenQuotes/Tools/Validation/Validator.php +++ b/app/TeenQuotes/Tools/Validation/Validator.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Tools\Validation; use BadMethodCallException; @@ -17,9 +26,9 @@ abstract class Validator extends LaravelValidator * @param string $rule The name of the property for the rules * @param array $messages * - * @return bool - * * @throws \Laracasts\Validation\FormValidationException + * + * @return bool */ protected function validateForRule($data, $rule, $messages = []) { @@ -52,9 +61,9 @@ public function getFailedReasonFor($key) * @param string $name * @param array $arguments * - * @return mixed - * * @throws BadMethodCallException + * + * @return mixed */ public function __call($name, $arguments) { @@ -97,9 +106,9 @@ private function getFailedReasonForKey($failed, $key) /** * Perform validation when the validator has been bound. * - * @return bool - * * @throws FormValidationException When the validation has failed + * + * @return bool */ private function handleValidation() { diff --git a/app/TeenQuotes/Users/Composers/ProfileEditComposer.php b/app/TeenQuotes/Users/Composers/ProfileEditComposer.php index 1a7e1363..7e21c19c 100644 --- a/app/TeenQuotes/Users/Composers/ProfileEditComposer.php +++ b/app/TeenQuotes/Users/Composers/ProfileEditComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Composers; use Config; @@ -16,8 +25,8 @@ class ProfileEditComposer extends AbstractDeepLinksComposer */ public function compose($view) { - $data = $view->getData(); - $user = $data['user']; + $data = $view->getData(); + $user = $data['user']; $login = $user->login; // For deep links @@ -38,7 +47,7 @@ private function createSelectColorsData() // Create an array like // ['blue' => 'Blue', 'red' => 'Red'] $colorsInConf = Config::get('app.users.colorsAvailableQuotesPublished'); - $func = function ($colorName) { + $func = function ($colorName) { return Lang::get('colors.'.$colorName); }; $colorsAvailable = array_combine($colorsInConf, array_map($func, $colorsInConf)); diff --git a/app/TeenQuotes/Users/Composers/SearchUsersCountryComposer.php b/app/TeenQuotes/Users/Composers/SearchUsersCountryComposer.php index 1df6ba73..aa01e4f4 100644 --- a/app/TeenQuotes/Users/Composers/SearchUsersCountryComposer.php +++ b/app/TeenQuotes/Users/Composers/SearchUsersCountryComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Composers; use Lang; @@ -11,6 +20,7 @@ class SearchUsersCountryComposer * * @param \Illuminate\View\View $view */ + /** * Add data to the view. * @@ -18,8 +28,8 @@ class SearchUsersCountryComposer */ public function compose($view) { - $data = $view->getData(); - $country = $data['country']; + $data = $view->getData(); + $country = $data['country']; $countryName = $country->name; $view->with('pageTitle', Lang::get('search.usersCountryPageTitle', compact('countryName'))); diff --git a/app/TeenQuotes/Users/Composers/ShowComposer.php b/app/TeenQuotes/Users/Composers/ShowComposer.php index e52ab62b..a6f683a8 100644 --- a/app/TeenQuotes/Users/Composers/ShowComposer.php +++ b/app/TeenQuotes/Users/Composers/ShowComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Composers; use Auth; @@ -33,7 +42,7 @@ class ShowComposer implements QuotesColorsExtractor */ public function compose($view) { - $data = $view->getData(); + $data = $view->getData(); $this->type = $data['type']; $this->user = $data['user']; @@ -53,7 +62,7 @@ public function compose($view) private function registerVisit() { if (Auth::check()) { - $user_id = $this->user->id; + $user_id = $this->user->id; $visitor_id = Auth::id(); if ($user_id != $visitor_id) { diff --git a/app/TeenQuotes/Users/Composers/WelcomeComposer.php b/app/TeenQuotes/Users/Composers/WelcomeComposer.php index 0cb58e3c..9549c067 100644 --- a/app/TeenQuotes/Users/Composers/WelcomeComposer.php +++ b/app/TeenQuotes/Users/Composers/WelcomeComposer.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Composers; use Lang; @@ -17,21 +26,21 @@ class WelcomeComposer extends AbstractDeepLinksComposer public function compose($view) { $viewData = $view->getData(); - $login = $viewData['user']->login; - $type = $viewData['type']; + $login = $viewData['user']->login; + $type = $viewData['type']; $welcomeText = Lang::get('users.newUserWelcomeProfile', ['login' => $login]); - $updateProfileTitle = Lang::get('users.newUserTutorialProfileTitle'); + $updateProfileTitle = Lang::get('users.newUserTutorialProfileTitle'); $updateProfileContent = Lang::get('users.newUserTutorialProfileContent', ['url' => URL::route('users.edit', $login)]); - $addingQuoteTitle = Lang::get('users.newUserTutorialAddingQuoteTitle'); + $addingQuoteTitle = Lang::get('users.newUserTutorialAddingQuoteTitle'); $addingQuoteContent = Lang::get('users.newUserTutorialAddingQuoteContent', ['url' => URL::route('addquote')]); - $addingFavoritesTitle = Lang::get('users.newUserTutorialFavoritesTitle'); + $addingFavoritesTitle = Lang::get('users.newUserTutorialFavoritesTitle'); $addingFavoritesContent = Lang::get('users.newUserTutorialFavoritesContent'); - $editSettingsTitle = Lang::get('users.newUserTutorialSettingsTitle'); + $editSettingsTitle = Lang::get('users.newUserTutorialSettingsTitle'); $editSettingsContent = Lang::get('users.newUserTutorialSettingsContent', ['url' => URL::route('users.edit', $login).'#edit-settings']); // Content diff --git a/app/TeenQuotes/Users/Console/EmailSpecialEventCommand.php b/app/TeenQuotes/Users/Console/EmailSpecialEventCommand.php index dcda1ebb..f9cb831e 100644 --- a/app/TeenQuotes/Users/Console/EmailSpecialEventCommand.php +++ b/app/TeenQuotes/Users/Console/EmailSpecialEventCommand.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Console; use Carbon; @@ -50,7 +59,7 @@ public function __construct(UserRepository $userRepo, UserMailer $userMailer) { parent::__construct(); - $this->userRepo = $userRepo; + $this->userRepo = $userRepo; $this->userMailer = $userMailer; } @@ -102,7 +111,7 @@ public function fire() $allUsers = $this->userRepo->getLoggedInSince(Carbon::now()->subYear(1), 1, 2000); $delay = Carbon::now()->addMinutes(5); - $i = 1; + $i = 1; // We will send 60 emails every hour foreach ($allUsers->chunk(60) as $users) { $driver = $this->determineMailDriver($i); diff --git a/app/TeenQuotes/Users/Console/SendBirthdayCommand.php b/app/TeenQuotes/Users/Console/SendBirthdayCommand.php index a919af14..87ad2f01 100644 --- a/app/TeenQuotes/Users/Console/SendBirthdayCommand.php +++ b/app/TeenQuotes/Users/Console/SendBirthdayCommand.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Console; use Indatus\Dispatcher\Scheduling\Schedulable; @@ -41,7 +50,7 @@ public function __construct(UserRepository $userRepo, UserMailer $userMailer) { parent::__construct(); - $this->userRepo = $userRepo; + $this->userRepo = $userRepo; $this->userMailer = $userMailer; } diff --git a/app/TeenQuotes/Users/Controllers/UsersController.php b/app/TeenQuotes/Users/Controllers/UsersController.php index 1ca55b5d..63619bdf 100644 --- a/app/TeenQuotes/Users/Controllers/UsersController.php +++ b/app/TeenQuotes/Users/Controllers/UsersController.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Controllers; use App; @@ -272,7 +281,7 @@ public function show($user_id, $type = 'published') // Build the data array. Keys: quotes, paginator $methodName = 'dataShow'.ucfirst($type); - $data = $this->$methodName($user); + $data = $this->$methodName($user); $data['user'] = $user; // Used for deep linking in ProfileComposer diff --git a/app/TeenQuotes/Users/Models/ProfileVisitor.php b/app/TeenQuotes/Users/Models/ProfileVisitor.php index 9e1b796d..11028454 100644 --- a/app/TeenQuotes/Users/Models/ProfileVisitor.php +++ b/app/TeenQuotes/Users/Models/ProfileVisitor.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Models; use Eloquent; @@ -9,6 +18,6 @@ class ProfileVisitor extends Eloquent { use ProfileVisitorRelationsTrait; - protected $table = 'profile_visitors'; + protected $table = 'profile_visitors'; protected $fillable = []; } diff --git a/app/TeenQuotes/Users/Models/Relations/ProfileVisitorTrait.php b/app/TeenQuotes/Users/Models/Relations/ProfileVisitorTrait.php index 93a3a226..677609c1 100644 --- a/app/TeenQuotes/Users/Models/Relations/ProfileVisitorTrait.php +++ b/app/TeenQuotes/Users/Models/Relations/ProfileVisitorTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Models\Relations; use TeenQuotes\Users\Models\User; diff --git a/app/TeenQuotes/Users/Models/Relations/UserTrait.php b/app/TeenQuotes/Users/Models/Relations/UserTrait.php index 553a55e5..9f3ad526 100644 --- a/app/TeenQuotes/Users/Models/Relations/UserTrait.php +++ b/app/TeenQuotes/Users/Models/Relations/UserTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Models\Relations; use TeenQuotes\Comments\Models\Comment; diff --git a/app/TeenQuotes/Users/Models/Scopes/UserTrait.php b/app/TeenQuotes/Users/Models/Scopes/UserTrait.php index 4e45bbf3..75c2e70e 100644 --- a/app/TeenQuotes/Users/Models/Scopes/UserTrait.php +++ b/app/TeenQuotes/Users/Models/Scopes/UserTrait.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Models\Scopes; use DB; diff --git a/app/TeenQuotes/Users/Models/User.php b/app/TeenQuotes/Users/Models/User.php index d51023d1..fef051f7 100644 --- a/app/TeenQuotes/Users/Models/User.php +++ b/app/TeenQuotes/Users/Models/User.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Models; use App; @@ -240,7 +249,7 @@ public function registerViewUserProfile() // Try to retrieve the ID of the user if (Auth::guest()) { - $idUserApi = ResourceServer::getOwnerId(); + $idUserApi = ResourceServer::getOwnerId(); $viewingUserId = !empty($idUserApi) ? $idUserApi : null; } else { $viewingUserId = Auth::id(); diff --git a/app/TeenQuotes/Users/Observers/UserObserver.php b/app/TeenQuotes/Users/Observers/UserObserver.php index 0f3e9d4e..09fcded4 100644 --- a/app/TeenQuotes/Users/Observers/UserObserver.php +++ b/app/TeenQuotes/Users/Observers/UserObserver.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Observers; use App; @@ -20,7 +29,7 @@ class UserObserver public function __construct() { $this->newsletterManager = App::make('TeenQuotes\Newsletters\NewslettersManager'); - $this->userMailer = App::make('TeenQuotes\Mail\UserMailer'); + $this->userMailer = App::make('TeenQuotes\Mail\UserMailer'); } /** diff --git a/app/TeenQuotes/Users/Presenters/UserPresenter.php b/app/TeenQuotes/Users/Presenters/UserPresenter.php index 05a325c3..504a4b09 100644 --- a/app/TeenQuotes/Users/Presenters/UserPresenter.php +++ b/app/TeenQuotes/Users/Presenters/UserPresenter.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Presenters; use Carbon; diff --git a/app/TeenQuotes/Users/Repositories/DbProfileVisitorRepository.php b/app/TeenQuotes/Users/Repositories/DbProfileVisitorRepository.php index af363398..7d8a1b29 100644 --- a/app/TeenQuotes/Users/Repositories/DbProfileVisitorRepository.php +++ b/app/TeenQuotes/Users/Repositories/DbProfileVisitorRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Repositories; use TeenQuotes\Users\Models\User; diff --git a/app/TeenQuotes/Users/Repositories/DbUserRepository.php b/app/TeenQuotes/Users/Repositories/DbUserRepository.php index 5e466e2c..913f1082 100644 --- a/app/TeenQuotes/Users/Repositories/DbUserRepository.php +++ b/app/TeenQuotes/Users/Repositories/DbUserRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Repositories; use Carbon; @@ -80,7 +89,7 @@ public function countByPartialLogin($login) */ public function updatePassword($u, $password) { - $user = $this->retrieveUser($u); + $user = $this->retrieveUser($u); $user->password = $password; $user->save(); } @@ -93,7 +102,7 @@ public function updatePassword($u, $password) */ public function updateEmail($u, $email) { - $user = $this->retrieveUser($u); + $user = $this->retrieveUser($u); $user->email = $email; $user->save(); } @@ -128,7 +137,7 @@ public function updateProfile($u, $gender, $country, $city, $about_me, $birthdat $user->birthdate = empty($birthdate) ? null : $birthdate; if (!is_null($avatar)) { - $filename = $user->id.'.'.$avatar->getClientOriginalExtension(); + $filename = $user->id.'.'.$avatar->getClientOriginalExtension(); $user->avatar = $filename; } @@ -144,7 +153,7 @@ public function updateProfile($u, $gender, $country, $city, $about_me, $birthdat */ public function updateSettings($u, $notification_comment_quote, $hide_profile) { - $user = $this->retrieveUser($u); + $user = $this->retrieveUser($u); $user->notification_comment_quote = $notification_comment_quote; $user->hide_profile = $hide_profile; $user->save(); @@ -346,9 +355,9 @@ private function computeSkip($page, $pagesize) * * @param \TeenQuotes\Users\Models\User|int $u * - * @return \TeenQuotes\Users\Models\User - * * @throws \InvalidArgumentException If the type can't be recognised + * + * @return \TeenQuotes\Users\Models\User */ private function retrieveUser($u) { diff --git a/app/TeenQuotes/Users/Repositories/ProfileVisitorRepository.php b/app/TeenQuotes/Users/Repositories/ProfileVisitorRepository.php index f1418baf..b555190e 100644 --- a/app/TeenQuotes/Users/Repositories/ProfileVisitorRepository.php +++ b/app/TeenQuotes/Users/Repositories/ProfileVisitorRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Repositories; interface ProfileVisitorRepository diff --git a/app/TeenQuotes/Users/Repositories/UserRepository.php b/app/TeenQuotes/Users/Repositories/UserRepository.php index 9900a0a1..d0e4c8b3 100644 --- a/app/TeenQuotes/Users/Repositories/UserRepository.php +++ b/app/TeenQuotes/Users/Repositories/UserRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Repositories; use TeenQuotes\Countries\Models\Country; diff --git a/app/TeenQuotes/Users/UsersServiceProvider.php b/app/TeenQuotes/Users/UsersServiceProvider.php index 73a581df..a36e8257 100644 --- a/app/TeenQuotes/Users/UsersServiceProvider.php +++ b/app/TeenQuotes/Users/UsersServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users; use Illuminate\Support\ServiceProvider; @@ -79,8 +88,8 @@ private function registerRoutes() private function registerSearchRoutes() { - $controller = 'SearchController'; - $routeGroup = $this->getRouteGroupParams(); + $controller = 'SearchController'; + $routeGroup = $this->getRouteGroupParams(); $routeGroup['namespace'] = 'TeenQuotes\Quotes\Controllers'; $this->app['router']->group($routeGroup, function () use ($controller) { diff --git a/app/TeenQuotes/Users/Validation/UserValidator.php b/app/TeenQuotes/Users/Validation/UserValidator.php index adaab5db..732f10c8 100644 --- a/app/TeenQuotes/Users/Validation/UserValidator.php +++ b/app/TeenQuotes/Users/Validation/UserValidator.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace TeenQuotes\Users\Validation; use TeenQuotes\Tools\Validation\Validator as BaseValidator; diff --git a/app/commands/QuoteRefuseTooSadCommand.php b/app/commands/QuoteRefuseTooSadCommand.php index 868499ee..b0d9fa48 100644 --- a/app/commands/QuoteRefuseTooSadCommand.php +++ b/app/commands/QuoteRefuseTooSadCommand.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Console\Command; use Symfony\Component\Console\Input\InputArgument; @@ -50,14 +59,14 @@ public function fire() $step = is_null($this->argument('step')) ? 0.02 : $this->argument('step'); // Build initial arrays with thresholds, initialized at 0 - $thresholds = range($lowerBound, $upperBound, $step); + $thresholds = range($lowerBound, $upperBound, $step); $wrongClassifications = array_fill_keys($thresholds, 0); - $foundSadQuotes = $wrongClassifications; + $foundSadQuotes = $wrongClassifications; $confidenceScoresNotPublished = array_fill_keys($thresholds, []); - $confidenceScoresPublished = array_fill_keys($thresholds, []); + $confidenceScoresPublished = array_fill_keys($thresholds, []); - $quotes = Quote::all(); + $quotes = Quote::all(); $numberOfQuotes = count($quotes); $this->info('Analyzing '.$numberOfQuotes.' quotes...'); @@ -74,7 +83,7 @@ public function fire() if (SentimentAnalysis::isNegative($quote->content)) { $scores = SentimentAnalysis::scores($quote->content); rsort($scores); - $score = $scores[0]; + $score = $scores[0]; $confidenceGap = $this->computeConfidenceGap($scores); // Update number of sad quotes found for the appropriate thresholds @@ -103,10 +112,10 @@ public function fire() // Display the results foreach ($wrongClassifications as $threshold => $value) { // Both arrays have got the same keys - $nbQuotes = $foundSadQuotes[$threshold]; + $nbQuotes = $foundSadQuotes[$threshold]; $wrongNbClassifications = $value; - $gapNotPublished = $this->arrayAverage($confidenceScoresNotPublished[$threshold]); - $gapPublished = $this->arrayAverage($confidenceScoresPublished[$threshold]); + $gapNotPublished = $this->arrayAverage($confidenceScoresNotPublished[$threshold]); + $gapPublished = $this->arrayAverage($confidenceScoresPublished[$threshold]); // Compute percentage and display some info $percentage = $this->getPercentage($wrongNbClassifications, $nbQuotes); diff --git a/app/config/app.php b/app/config/app.php index 7f89a597..ae19cff1 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* @@ -85,7 +94,7 @@ | */ - 'key' => 'zXPYTseYZiFjua90HVGJMro7CYb8USRg', + 'key' => 'zXPYTseYZiFjua90HVGJMro7CYb8USRg', 'cipher' => MCRYPT_RIJNDAEL_256, /* diff --git a/app/config/auth.php b/app/config/auth.php index 3c020bbb..5714cab1 100644 --- a/app/config/auth.php +++ b/app/config/auth.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/config/cache.php b/app/config/cache.php index c5878209..c4ca69ab 100644 --- a/app/config/cache.php +++ b/app/config/cache.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/config/codeception/app.php b/app/config/codeception/app.php index 5edb1cc8..73e0dcbf 100644 --- a/app/config/codeception/app.php +++ b/app/config/codeception/app.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'domain' => 'localhost', 'users.avatarPath' => 'public/uploads/avatar', diff --git a/app/config/codeception/cache.php b/app/config/codeception/cache.php index f9cd95f7..98047581 100644 --- a/app/config/codeception/cache.php +++ b/app/config/codeception/cache.php @@ -1,3 +1,12 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return require dirname(__DIR__).'/testing/cache.php'; diff --git a/app/config/codeception/database.php b/app/config/codeception/database.php index 8bcf8449..1b46f0a7 100644 --- a/app/config/codeception/database.php +++ b/app/config/codeception/database.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'default' => 'codeception', diff --git a/app/config/codeception/mail.php b/app/config/codeception/mail.php index 96709e10..87bf4c29 100644 --- a/app/config/codeception/mail.php +++ b/app/config/codeception/mail.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'driver' => 'smtp', 'host' => 'localhost', diff --git a/app/config/codeception/queue.php b/app/config/codeception/queue.php index 870164f7..be0b2e05 100644 --- a/app/config/codeception/queue.php +++ b/app/config/codeception/queue.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'default' => 'sync', ]; diff --git a/app/config/codeception/session.php b/app/config/codeception/session.php index 81d814d0..81a82113 100644 --- a/app/config/codeception/session.php +++ b/app/config/codeception/session.php @@ -1,3 +1,12 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return require dirname(__DIR__).'/testing/session.php'; diff --git a/app/config/codeceptionMysql/app.php b/app/config/codeceptionMysql/app.php index 52072d32..ea29884c 100644 --- a/app/config/codeceptionMysql/app.php +++ b/app/config/codeceptionMysql/app.php @@ -1,3 +1,12 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return require dirname(__DIR__).'/codeception/app.php'; diff --git a/app/config/codeceptionMysql/cache.php b/app/config/codeceptionMysql/cache.php index db6c1358..87abe115 100644 --- a/app/config/codeceptionMysql/cache.php +++ b/app/config/codeceptionMysql/cache.php @@ -1,3 +1,12 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return require dirname(__DIR__).'/codeception/cache.php'; diff --git a/app/config/codeceptionMysql/database.php b/app/config/codeceptionMysql/database.php index 720b6fe6..63cbb65d 100644 --- a/app/config/codeceptionMysql/database.php +++ b/app/config/codeceptionMysql/database.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'default' => 'mysql', diff --git a/app/config/codeceptionMysql/mail.php b/app/config/codeceptionMysql/mail.php index 0d318597..d585b70e 100644 --- a/app/config/codeceptionMysql/mail.php +++ b/app/config/codeceptionMysql/mail.php @@ -1,3 +1,12 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return require dirname(__DIR__).'/codeception/mail.php'; diff --git a/app/config/codeceptionMysql/queue.php b/app/config/codeceptionMysql/queue.php index 870164f7..be0b2e05 100644 --- a/app/config/codeceptionMysql/queue.php +++ b/app/config/codeceptionMysql/queue.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'default' => 'sync', ]; diff --git a/app/config/codeceptionMysql/session.php b/app/config/codeceptionMysql/session.php index 477b8d9c..8414866b 100644 --- a/app/config/codeceptionMysql/session.php +++ b/app/config/codeceptionMysql/session.php @@ -1,3 +1,12 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return require dirname(__DIR__).'/codeception/session.php'; diff --git a/app/config/compile.php b/app/config/compile.php index 63f57375..a9db525b 100644 --- a/app/config/compile.php +++ b/app/config/compile.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/config/database.php b/app/config/database.php index bd26cc90..c7c08635 100644 --- a/app/config/database.php +++ b/app/config/database.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* @@ -54,10 +63,10 @@ 'mysql' => [ 'driver' => 'mysql', - 'host' => getenv('MYSQL_HOST'), - 'database' => getenv('MYSQL_DATABASE'), - 'username' => getenv('MYSQL_USERNAME'), - 'password' => getenv('MYSQL_PASSWORD'), + 'host' => getenv('MYSQL_HOST'), + 'database' => getenv('MYSQL_DATABASE'), + 'username' => getenv('MYSQL_USERNAME'), + 'password' => getenv('MYSQL_PASSWORD'), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', diff --git a/app/config/exceptions.php b/app/config/exceptions.php index 65b0b56a..0d3ef8f8 100644 --- a/app/config/exceptions.php +++ b/app/config/exceptions.php @@ -1,6 +1,15 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ // HTTP code => view name - 500 => 'errors.500', + 500 => 'errors.500', ]; diff --git a/app/config/local/app.php b/app/config/local/app.php index dc9a0ccb..929a8265 100644 --- a/app/config/local/app.php +++ b/app/config/local/app.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/config/local/queue.php b/app/config/local/queue.php index 870164f7..be0b2e05 100644 --- a/app/config/local/queue.php +++ b/app/config/local/queue.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'default' => 'sync', ]; diff --git a/app/config/mail.php b/app/config/mail.php index 194520f9..37a70fc1 100644 --- a/app/config/mail.php +++ b/app/config/mail.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/config/mobile.php b/app/config/mobile.php index 39fb165e..00869485 100644 --- a/app/config/mobile.php +++ b/app/config/mobile.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ // Do we have an iOS app? 'iOSApp' => true, @@ -14,7 +23,7 @@ 'androidPackage' => 'com.mytriber.ohteenquotes', // URLs to download applications - 'downloadLinkiOS' => 'https://itunes.apple.com/us/app/id1008642341', + 'downloadLinkiOS' => 'https://itunes.apple.com/us/app/id1008642341', 'downloadLinkAndroid' => 'https://play.google.com/store/apps/details?id=com.mytriber.ohteenquotes', // Scheme for deep links diff --git a/app/config/packages/antoineaugusti/laravel-easyrec/config.php b/app/config/packages/antoineaugusti/laravel-easyrec/config.php index 43321cbd..68be0daa 100644 --- a/app/config/packages/antoineaugusti/laravel-easyrec/config.php +++ b/app/config/packages/antoineaugusti/laravel-easyrec/config.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'baseURL' => 'https://demo.easyrec.org', 'apiVersion' => '1.0', diff --git a/app/config/packages/bugsnag/bugsnag-laravel/config.php b/app/config/packages/bugsnag/bugsnag-laravel/config.php index 4761d29a..7b9f8e1e 100644 --- a/app/config/packages/bugsnag/bugsnag-laravel/config.php +++ b/app/config/packages/bugsnag/bugsnag-laravel/config.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/config/packages/buonzz/laravel-4-freegeoip/config.php b/app/config/packages/buonzz/laravel-4-freegeoip/config.php index 681d0d2d..02b71bed 100644 --- a/app/config/packages/buonzz/laravel-4-freegeoip/config.php +++ b/app/config/packages/buonzz/laravel-4-freegeoip/config.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ // The URL of the FreeGeoIP API 'freegeopipURL' => 'http://www.freegeoip.net/json/', diff --git a/app/config/packages/dinesh/bugonemail/config.php b/app/config/packages/dinesh/bugonemail/config.php index 8b048e55..099d1e5c 100644 --- a/app/config/packages/dinesh/bugonemail/config.php +++ b/app/config/packages/dinesh/bugonemail/config.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'project_name' => Lang::get('layout.nameWebsite'), 'notify_emails' => ['antoine.augusti@teen-quotes.com'], diff --git a/app/config/packages/graham-campbell/htmlmin/config.php b/app/config/packages/graham-campbell/htmlmin/config.php index c34e2428..120b5244 100644 --- a/app/config/packages/graham-campbell/htmlmin/config.php +++ b/app/config/packages/graham-campbell/htmlmin/config.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + /** * This file is part of Laravel HTMLMin by Graham Campbell. * diff --git a/app/config/packages/laracasts/utilities/config.php b/app/config/packages/laracasts/utilities/config.php index 9e866db6..92a9920c 100644 --- a/app/config/packages/laracasts/utilities/config.php +++ b/app/config/packages/laracasts/utilities/config.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/config/packages/lucadegasperi/oauth2-server-laravel/oauth2.php b/app/config/packages/lucadegasperi/oauth2-server-laravel/oauth2.php index 061d5799..35c29e58 100644 --- a/app/config/packages/lucadegasperi/oauth2-server-laravel/oauth2.php +++ b/app/config/packages/lucadegasperi/oauth2-server-laravel/oauth2.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/config/packages/philf/setting/setting.php b/app/config/packages/philf/setting/setting.php index 0bfd950a..675ba418 100644 --- a/app/config/packages/philf/setting/setting.php +++ b/app/config/packages/philf/setting/setting.php @@ -1,8 +1,17 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ - 'path' => app_path().'/storage/meta', - 'filename' => 'settings.json', - 'fallback' => true, + 'path' => app_path().'/storage/meta', + 'filename' => 'settings.json', + 'fallback' => true, 'autoAlias' => false, ]; diff --git a/app/config/packages/philo/translate/config.php b/app/config/packages/philo/translate/config.php index b76bdfa3..08a8e242 100644 --- a/app/config/packages/philo/translate/config.php +++ b/app/config/packages/philo/translate/config.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'search_ignore_folders' => ['config', 'database', 'lang', 'start', 'storage', 'tests'], 'search_exclude_files' => ['pagination', 'reminders', 'validation'], diff --git a/app/config/packages/thomaswelton/laravel-gravatar/config.php b/app/config/packages/thomaswelton/laravel-gravatar/config.php index 12e7cf4a..ae5ae1a3 100644 --- a/app/config/packages/thomaswelton/laravel-gravatar/config.php +++ b/app/config/packages/thomaswelton/laravel-gravatar/config.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'size' => 150, 'default' => '404', diff --git a/app/config/queue.php b/app/config/queue.php index 8892fc32..34674255 100644 --- a/app/config/queue.php +++ b/app/config/queue.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/config/remote.php b/app/config/remote.php index 6ceb7016..53a03010 100644 --- a/app/config/remote.php +++ b/app/config/remote.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/config/services.php b/app/config/services.php index 80bde434..d4a76e20 100644 --- a/app/config/services.php +++ b/app/config/services.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/config/session.php b/app/config/session.php index 7d8437dd..5ae0e0c3 100644 --- a/app/config/session.php +++ b/app/config/session.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/config/staging/app.php b/app/config/staging/app.php index 4dc602a0..758fefa9 100644 --- a/app/config/staging/app.php +++ b/app/config/staging/app.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'url' => 'http://dev.teen-quotes.com', 'domain' => 'dev.teen-quotes.com', diff --git a/app/config/staging/queue.php b/app/config/staging/queue.php index 870164f7..be0b2e05 100644 --- a/app/config/staging/queue.php +++ b/app/config/staging/queue.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'default' => 'sync', ]; diff --git a/app/config/testing/cache.php b/app/config/testing/cache.php index 9f436e27..0f541f88 100644 --- a/app/config/testing/cache.php +++ b/app/config/testing/cache.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/config/testing/database.php b/app/config/testing/database.php index 290210a8..e23e4f55 100644 --- a/app/config/testing/database.php +++ b/app/config/testing/database.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'default' => 'sqlite', diff --git a/app/config/testing/mail.php b/app/config/testing/mail.php index d244a885..c01bd0b8 100644 --- a/app/config/testing/mail.php +++ b/app/config/testing/mail.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'driver' => 'log', ]; diff --git a/app/config/testing/queue.php b/app/config/testing/queue.php index 870164f7..be0b2e05 100644 --- a/app/config/testing/queue.php +++ b/app/config/testing/queue.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'default' => 'sync', ]; diff --git a/app/config/testing/session.php b/app/config/testing/session.php index 17de8095..33198f35 100644 --- a/app/config/testing/session.php +++ b/app/config/testing/session.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/config/view.php b/app/config/view.php index 2724364e..54ed9a90 100644 --- a/app/config/view.php +++ b/app/config/view.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/config/workbench.php b/app/config/workbench.php index c2e6a7c3..fd2bae16 100644 --- a/app/config/workbench.php +++ b/app/config/workbench.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/database/migrations/2014_04_19_165416_create_countries_table.php b/app/database/migrations/2014_04_19_165416_create_countries_table.php index 8aaaa63d..57aec470 100644 --- a/app/database/migrations/2014_04_19_165416_create_countries_table.php +++ b/app/database/migrations/2014_04_19_165416_create_countries_table.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; diff --git a/app/database/migrations/2014_04_20_081041_create_users_table.php b/app/database/migrations/2014_04_20_081041_create_users_table.php index 012e142d..d6d3f578 100644 --- a/app/database/migrations/2014_04_20_081041_create_users_table.php +++ b/app/database/migrations/2014_04_20_081041_create_users_table.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; diff --git a/app/database/migrations/2014_04_20_082050_create_quotes_table.php b/app/database/migrations/2014_04_20_082050_create_quotes_table.php index 9af80f01..ec1b600f 100644 --- a/app/database/migrations/2014_04_20_082050_create_quotes_table.php +++ b/app/database/migrations/2014_04_20_082050_create_quotes_table.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; diff --git a/app/database/migrations/2014_04_20_085037_create_comments_table.php b/app/database/migrations/2014_04_20_085037_create_comments_table.php index 41eab22f..86b3361b 100644 --- a/app/database/migrations/2014_04_20_085037_create_comments_table.php +++ b/app/database/migrations/2014_04_20_085037_create_comments_table.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; diff --git a/app/database/migrations/2014_04_20_085307_create_user_user_table.php b/app/database/migrations/2014_04_20_085307_create_user_user_table.php index 1d8832d3..6ce33d8f 100644 --- a/app/database/migrations/2014_04_20_085307_create_user_user_table.php +++ b/app/database/migrations/2014_04_20_085307_create_user_user_table.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; diff --git a/app/database/migrations/2014_04_20_085428_create_quote_user_table.php b/app/database/migrations/2014_04_20_085428_create_quote_user_table.php index 72c5652c..d34f6b82 100644 --- a/app/database/migrations/2014_04_20_085428_create_quote_user_table.php +++ b/app/database/migrations/2014_04_20_085428_create_quote_user_table.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; diff --git a/app/database/migrations/2014_04_20_085555_create_newsletters_table.php b/app/database/migrations/2014_04_20_085555_create_newsletters_table.php index 6a1740db..b9403684 100644 --- a/app/database/migrations/2014_04_20_085555_create_newsletters_table.php +++ b/app/database/migrations/2014_04_20_085555_create_newsletters_table.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use TeenQuotes\Newsletters\Models\Newsletter; diff --git a/app/database/migrations/2014_04_20_085822_create_stories_table.php b/app/database/migrations/2014_04_20_085822_create_stories_table.php index 778415e3..c253bc0e 100644 --- a/app/database/migrations/2014_04_20_085822_create_stories_table.php +++ b/app/database/migrations/2014_04_20_085822_create_stories_table.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; diff --git a/app/database/migrations/2014_04_25_155003_create_password_reminders_table.php b/app/database/migrations/2014_04_25_155003_create_password_reminders_table.php index de888d61..d2681b1e 100644 --- a/app/database/migrations/2014_04_25_155003_create_password_reminders_table.php +++ b/app/database/migrations/2014_04_25_155003_create_password_reminders_table.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; diff --git a/app/database/migrations/2014_05_11_072156_create_settings_table.php b/app/database/migrations/2014_05_11_072156_create_settings_table.php index cd38cd1b..1546df4f 100644 --- a/app/database/migrations/2014_05_11_072156_create_settings_table.php +++ b/app/database/migrations/2014_05_11_072156_create_settings_table.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; diff --git a/app/database/migrations/2015_02_08_170159_create_tags_table.php b/app/database/migrations/2015_02_08_170159_create_tags_table.php index 9b754e54..0682a35c 100644 --- a/app/database/migrations/2015_02_08_170159_create_tags_table.php +++ b/app/database/migrations/2015_02_08_170159_create_tags_table.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; diff --git a/app/database/migrations/2015_02_08_170224_create_quote_tag_table.php b/app/database/migrations/2015_02_08_170224_create_quote_tag_table.php index b8886a34..2e680da4 100644 --- a/app/database/migrations/2015_02_08_170224_create_quote_tag_table.php +++ b/app/database/migrations/2015_02_08_170224_create_quote_tag_table.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; diff --git a/app/database/seeds/CommentsTableSeeder.php b/app/database/seeds/CommentsTableSeeder.php index 6c5c08b8..bf6331bd 100644 --- a/app/database/seeds/CommentsTableSeeder.php +++ b/app/database/seeds/CommentsTableSeeder.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Faker\Factory as Faker; use TeenQuotes\Comments\Models\Comment; diff --git a/app/database/seeds/CountriesTableSeeder.php b/app/database/seeds/CountriesTableSeeder.php index ea4f9406..28d7dd9b 100644 --- a/app/database/seeds/CountriesTableSeeder.php +++ b/app/database/seeds/CountriesTableSeeder.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use TeenQuotes\Countries\Models\Country; class CountriesTableSeeder extends Seeder diff --git a/app/database/seeds/DatabaseSeeder.php b/app/database/seeds/DatabaseSeeder.php index dad27b29..e3686752 100644 --- a/app/database/seeds/DatabaseSeeder.php +++ b/app/database/seeds/DatabaseSeeder.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class DatabaseSeeder extends Seeder { /** diff --git a/app/database/seeds/FavoriteQuotesTableSeeder.php b/app/database/seeds/FavoriteQuotesTableSeeder.php index 1a44874c..e2b1915c 100644 --- a/app/database/seeds/FavoriteQuotesTableSeeder.php +++ b/app/database/seeds/FavoriteQuotesTableSeeder.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Faker\Factory as Faker; use TeenQuotes\Quotes\Models\FavoriteQuote; diff --git a/app/database/seeds/NewslettersTableSeeder.php b/app/database/seeds/NewslettersTableSeeder.php index 252dac71..d48f464e 100644 --- a/app/database/seeds/NewslettersTableSeeder.php +++ b/app/database/seeds/NewslettersTableSeeder.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Faker\Factory as Faker; use TeenQuotes\Newsletters\Models\Newsletter; diff --git a/app/database/seeds/ProfileVisitorsTableSeeder.php b/app/database/seeds/ProfileVisitorsTableSeeder.php index 830bbc1a..acda3643 100644 --- a/app/database/seeds/ProfileVisitorsTableSeeder.php +++ b/app/database/seeds/ProfileVisitorsTableSeeder.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Faker\Factory as Faker; use TeenQuotes\Users\Models\ProfileVisitor; diff --git a/app/database/seeds/QuotesTableSeeder.php b/app/database/seeds/QuotesTableSeeder.php index 6d4f8441..a1f46a95 100644 --- a/app/database/seeds/QuotesTableSeeder.php +++ b/app/database/seeds/QuotesTableSeeder.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Faker\Factory as Faker; use TeenQuotes\Quotes\Models\Quote; @@ -13,13 +22,12 @@ public function run() $faker = Faker::create(); $this->command->info('Seeding Quotes table using Faker...'); - $i = 1; + $i = 1; $date = Carbon::createFromDate(2011, 12, 1); foreach (range(1, 750) as $index) { // Generate 50 quotes for each approved value // between -1 and 2 - Quote::create([ 'content' => $faker->paragraph(3), 'user_id' => $faker->numberBetween(1, 100), diff --git a/app/database/seeds/SettingsTableSeeder.php b/app/database/seeds/SettingsTableSeeder.php index bde24ef4..7985d7b2 100644 --- a/app/database/seeds/SettingsTableSeeder.php +++ b/app/database/seeds/SettingsTableSeeder.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Faker\Factory as Faker; use TeenQuotes\Settings\Models\Setting; diff --git a/app/database/seeds/StoriesTableSeeder.php b/app/database/seeds/StoriesTableSeeder.php index 7f597509..d13ba3c9 100644 --- a/app/database/seeds/StoriesTableSeeder.php +++ b/app/database/seeds/StoriesTableSeeder.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Faker\Factory as Faker; use TeenQuotes\Stories\Models\Story; diff --git a/app/database/seeds/TagsTableSeeder.php b/app/database/seeds/TagsTableSeeder.php index 7431dda6..94f33df3 100644 --- a/app/database/seeds/TagsTableSeeder.php +++ b/app/database/seeds/TagsTableSeeder.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Faker\Factory as Faker; use TeenQuotes\Quotes\Models\Quote; use TeenQuotes\Tags\Models\Tag; diff --git a/app/database/seeds/UsersTableSeeder.php b/app/database/seeds/UsersTableSeeder.php index d81dbddd..1aab460c 100644 --- a/app/database/seeds/UsersTableSeeder.php +++ b/app/database/seeds/UsersTableSeeder.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Faker\Factory as Faker; use TeenQuotes\Users\Models\User; diff --git a/app/filters.php b/app/filters.php index ccd0cc64..65c20d2b 100644 --- a/app/filters.php +++ b/app/filters.php @@ -1,15 +1,13 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ App::before(function ($request) { if (Config::get('database.log', false) or App::environment('local')) { diff --git a/app/helpers.php b/app/helpers.php index 9128e62a..639ef84f 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + if (!function_exists('elixir')) { /** * Get the path to a versioned Elixir file. diff --git a/app/lang/en/apps.php b/app/lang/en/apps.php index 5c311364..53d9b517 100644 --- a/app/lang/en/apps.php +++ b/app/lang/en/apps.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'androidTitle' => 'Android application', 'iosTitle' => 'iOS application', diff --git a/app/lang/en/auth.php b/app/lang/en/auth.php index fc0b9076..19cab4c8 100644 --- a/app/lang/en/auth.php +++ b/app/lang/en/auth.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'alreadyLoggedIn' => 'You are already logged in.', 'loginSuccessfull' => 'Hi :login! Nice to see you :)', diff --git a/app/lang/en/colors.php b/app/lang/en/colors.php index cc97abf8..ce43fc3f 100644 --- a/app/lang/en/colors.php +++ b/app/lang/en/colors.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'blue' => 'Blue', 'red' => 'Red', diff --git a/app/lang/en/comments.php b/app/lang/en/comments.php index 4852d866..edee314c 100644 --- a/app/lang/en/comments.php +++ b/app/lang/en/comments.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'comments' => 'Comments', 'addComment' => 'Add a comment', diff --git a/app/lang/en/contact.php b/app/lang/en/contact.php index 17af2e2f..b7b6e64e 100644 --- a/app/lang/en/contact.php +++ b/app/lang/en/contact.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'pageTitle' => 'Contact | '.Lang::get('layout.nameWebsite'), 'pageDescription' => 'Contact the team. Say hi, report a bug or propose a feature!', diff --git a/app/lang/en/email.php b/app/lang/en/email.php index 315e7cb9..007df199 100644 --- a/app/lang/en/email.php +++ b/app/lang/en/email.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'birthdayContent' => 'Today is a special day for you :login! :age years old, how amazing it is? You will have to celebrate this day with your family and your friends!

All the team want to wish you a happy birthday! We hope that you will have a great day :)

See you soon on '.Lang::get('layout.nameWebsite').' and have a nice day!', 'christmasBody' => 'The entire team of '.Lang::get('layout.nameWebsite')." wishes you a Merry Christmas and hope you enjoy these few days of family vacation. We hope you've been nice this year and that Santa will give you great gifts!

We're looking forward to see you soon on ".Lang::get('layout.nameWebsite').'!', diff --git a/app/lang/en/errors.php b/app/lang/en/errors.php index a4eb1e4a..3364e073 100644 --- a/app/lang/en/errors.php +++ b/app/lang/en/errors.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'defaultNotFound' => "
diff --git a/app/lang/en/feedback.php b/app/lang/en/feedback.php index 44ca86c4..3fd6e595 100644 --- a/app/lang/en/feedback.php +++ b/app/lang/en/feedback.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'welcomeContent' => "It's been a bit less than a week since you signed up for ".Lang::get('layout.nameWebsite').' and we are really happy to have you on board!

We are committed to offering a great experience to our beloved users. If you have any questions, feedback or need help with anything at all, reply to this email and a member of our support team will get back to you with a personal reply. Go ahead and try!

Have an awesome day!', 'welcomeSubject' => 'How is it going so far?', diff --git a/app/lang/en/layout.php b/app/lang/en/layout.php index e5103d6d..11643f13 100644 --- a/app/lang/en/layout.php +++ b/app/lang/en/layout.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'addQuote' => 'Add your quote', 'apps' => 'Apps', diff --git a/app/lang/en/legal.php b/app/lang/en/legal.php index 6cf52945..55107163 100644 --- a/app/lang/en/legal.php +++ b/app/lang/en/legal.php @@ -1,8 +1,17 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ - 'termsOfUseTitle' => 'Terms of use', - 'pageDescription' => 'Our terms of use and our privacy are available here. Ready to have a lot of fun?', + 'termsOfUseTitle' => 'Terms of use', + 'pageDescription' => 'Our terms of use and our privacy are available here. Ready to have a lot of fun?', 'termsOfUseContent' => '

The use of submissions found in the server '.Config::get('app.domain').' is authorized under condition of non-alteration of its contents and the restriction of its use to personal use only and for the purpose of information. Its use for commercial activities is strictly prohibited. Any other use than the above herein mentioned is strictly prohibited by law.

@@ -16,7 +25,7 @@ Regarding the comments and other submissions by any member, the author of the before mentioned submissions acknowledges full agreement to '.Lang::get('layout.nameWebsite').' to (1) use, copy, distribute, transmit, publicly display, publicly perform, reproduce, edit, modify, translate and reformat his or her contribution within the framework of the website '.Config::get('app.domain').' and any of its partners, (2) to redistribute its rights in the full extent permitted by the applicable regulations.

The contributions posted on '.Config::get('app.domain').' are not financially compensated. '.Config::get('app.domain').' reserves the right to remove comments and submissions at any time without prior notice. By submitting or posting to any part of the site, you automatically grant, and you represent and warrant that you have the right to grant to '.Lang::get('layout.nameWebsite').' the authorizations stipulated in the present article. '.Lang::get('layout.nameWebsite').' reserves the right to change, modify, add, or delete portions of the terms of use and caution sentences of its websites at any time without further notice. It is your responsibility to regularly check the site to determine if there have been changes to these terms of use and to review such changes. Your continued use of the service or the site '.Config::get('app.domain').' after any such changes constitutes your acceptance of the new terms of use.

', - 'privacyPolicyTitle' => 'Privacy Policy', + 'privacyPolicyTitle' => 'Privacy Policy', 'privacyPolicyContent' => '

This Privacy Policy discloses the privacy practices of the '.Config::get('app.domain')." website (the Site). Specifically, it outlines the types of information that we gather about you while you are using the Site, and the ways in which we use and share this information.

diff --git a/app/lang/en/newsletters.php b/app/lang/en/newsletters.php index 06c03545..5bcedc41 100644 --- a/app/lang/en/newsletters.php +++ b/app/lang/en/newsletters.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'beenWaitingForLong' => "You've been waiting for a long time, but here it is! The weekly newsletter is out and it is in your inbox!

Here is a bunch of cool quotes published on ".Lang::get('layout.nameWebsite').':', 'callToVisitWebsite' => "And remember: if you want to read more awesome quotes there is only a place to do that, and it's called ".Lang::get('layout.nameWebsite').'!', diff --git a/app/lang/en/pagination.php b/app/lang/en/pagination.php index b9940a13..994428ff 100644 --- a/app/lang/en/pagination.php +++ b/app/lang/en/pagination.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/lang/en/quotes.php b/app/lang/en/quotes.php index f6e2db37..399ded7f 100644 --- a/app/lang/en/quotes.php +++ b/app/lang/en/quotes.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'adblockDisclaimer' => '

Hi Adblock user!

It appears that you are blocking our only ad. We don\'t use '.Lang::get('layout.nameWebsite').' to be rich, we just use ads to pay our servers. Please consider disabling your ad blocker here: we promise, we will continue to work hard for you.

Thanks a lot
Antoine - Lead developer at '.Lang::get('layout.nameWebsite').'
', 'addquotePageDescription' => 'Speak your mind and share your thoughts with the world. Add a quote right now!', diff --git a/app/lang/en/reminders.php b/app/lang/en/reminders.php index d449262a..cfa9b46e 100644 --- a/app/lang/en/reminders.php +++ b/app/lang/en/reminders.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/lang/en/search.php b/app/lang/en/search.php index 432b7572..fa7df334 100644 --- a/app/lang/en/search.php +++ b/app/lang/en/search.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'formPageDescription' => 'Do a search and find quotes, users and more on '.Lang::get('layout.nameWebsite').'.', 'formPageTitle' => 'Search form | '.Lang::get('layout.nameWebsite'), diff --git a/app/lang/en/stories.php b/app/lang/en/stories.php index b3a150a5..bb142c9c 100644 --- a/app/lang/en/stories.php +++ b/app/lang/en/stories.php @@ -1,19 +1,28 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ - 'pageTitleIndex' => 'Stories | '.Lang::get('layout.nameWebsite'), + 'pageTitleIndex' => 'Stories | '.Lang::get('layout.nameWebsite'), 'pageTitleShow' => 'Story #:nb | '.Lang::get('layout.nameWebsite'), - 'pageDescriptionIndex' => 'Tell us how you use '.Lang::get('layout.nameWebsite').' in your daily life to share your feelings', - 'heroText' => 'When we built '.Lang::get('layout.nameWebsite').', we wanted to share our feelings with the Internet. Today, thousands of people read more than :nb quotes on '.Lang::get('layout.nameWebsite').', everyday.', - 'storiesTellTitle' => 'Tell us your story', - 'useTellTitle' => 'Tell us how you use '.Lang::get('layout.nameWebsite'), - 'storyTitle' => 'Story', - 'submitStory' => 'Add my story!', - 'addStory' => 'Add my story', - 'inputRepresent' => 'How do you use '.Lang::get('layout.nameWebsite').'?', - 'placeholderRepresent' => 'Why is it useful to you? What have you learned? Does it help you to feel better?', - 'inputFrequence' => 'How often do you use '.Lang::get('layout.nameWebsite').'? Where?', - 'placeholderFrequence' => 'Do you use the website / mobile / app? How often do you visit '.Lang::get('layout.nameWebsite').'? Do you share some quotes with your friends? Do you write some quotes?', - 'storyAddedSuccessfull' => 'Your story has been added :login!', - 'mustBeLogged' => 'You must be logged in if you want to add your story ', + 'pageDescriptionIndex' => 'Tell us how you use '.Lang::get('layout.nameWebsite').' in your daily life to share your feelings', + 'heroText' => 'When we built '.Lang::get('layout.nameWebsite').', we wanted to share our feelings with the Internet. Today, thousands of people read more than :nb quotes on '.Lang::get('layout.nameWebsite').', everyday.', + 'storiesTellTitle' => 'Tell us your story', + 'useTellTitle' => 'Tell us how you use '.Lang::get('layout.nameWebsite'), + 'storyTitle' => 'Story', + 'submitStory' => 'Add my story!', + 'addStory' => 'Add my story', + 'inputRepresent' => 'How do you use '.Lang::get('layout.nameWebsite').'?', + 'placeholderRepresent' => 'Why is it useful to you? What have you learned? Does it help you to feel better?', + 'inputFrequence' => 'How often do you use '.Lang::get('layout.nameWebsite').'? Where?', + 'placeholderFrequence' => 'Do you use the website / mobile / app? How often do you visit '.Lang::get('layout.nameWebsite').'? Do you share some quotes with your friends? Do you write some quotes?', + 'storyAddedSuccessfull' => 'Your story has been added :login!', + 'mustBeLogged' => 'You must be logged in if you want to add your story ', ]; diff --git a/app/lang/en/tags.php b/app/lang/en/tags.php index 4e2fd38d..9bcfc340 100644 --- a/app/lang/en/tags.php +++ b/app/lang/en/tags.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'school' => 'School', 'family' => 'Family', diff --git a/app/lang/en/users.php b/app/lang/en/users.php index 8033fad4..e203f12e 100644 --- a/app/lang/en/users.php +++ b/app/lang/en/users.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ 'aboutMeInput' => 'About me', 'aboutMePlacehoolder' => "I'm awesome, I love life, I listen to music...", diff --git a/app/lang/en/validation.php b/app/lang/en/validation.php index dbb1fd40..bf70b604 100644 --- a/app/lang/en/validation.php +++ b/app/lang/en/validation.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ /* diff --git a/app/start/artisan.php b/app/start/artisan.php index 136bda0f..34910d5c 100644 --- a/app/start/artisan.php +++ b/app/start/artisan.php @@ -1,13 +1,12 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + Artisan::add(new QuoteRefuseTooSadCommand()); diff --git a/app/start/global.php b/app/start/global.php index 7dc53b1c..2a0b8bb3 100644 --- a/app/start/global.php +++ b/app/start/global.php @@ -1,15 +1,13 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ ClassLoader::addDirectories([ diff --git a/app/start/local.php b/app/start/local.php index 3d9949b8..e5a6cd62 100644 --- a/app/start/local.php +++ b/app/start/local.php @@ -1,3 +1,10 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php index 6b329312..3a3081a0 100644 --- a/bootstrap/autoload.php +++ b/bootstrap/autoload.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + define('LARAVEL_START', microtime(true)); /* @@ -27,9 +36,8 @@ | */ -if (file_exists($compiled = __DIR__.'/compiled.php')) -{ - require $compiled; +if (file_exists($compiled = __DIR__.'/compiled.php')) { + require $compiled; } /* @@ -69,7 +77,6 @@ | */ -if (is_dir($workbench = __DIR__.'/../workbench')) -{ - Illuminate\Workbench\Starter::start($workbench); +if (is_dir($workbench = __DIR__.'/../workbench')) { + Illuminate\Workbench\Starter::start($workbench); } diff --git a/bootstrap/paths.php b/bootstrap/paths.php index 5a1f640b..929cf811 100644 --- a/bootstrap/paths.php +++ b/bootstrap/paths.php @@ -1,57 +1,66 @@ __DIR__.'/../app', - - /* - |-------------------------------------------------------------------------- - | Public Path - |-------------------------------------------------------------------------- - | - | The public path contains the assets for your web application, such as - | your JavaScript and CSS files, and also contains the primary entry - | point for web requests into these applications from the outside. - | - */ - - 'public' => __DIR__.'/../public', - - /* - |-------------------------------------------------------------------------- - | Base Path - |-------------------------------------------------------------------------- - | - | The base path is the root of the Laravel installation. Most likely you - | will not need to change this value. But, if for some wild reason it - | is necessary you will do so here, just proceed with some caution. - | - */ - - 'base' => __DIR__.'/..', - - /* - |-------------------------------------------------------------------------- - | Storage Path - |-------------------------------------------------------------------------- - | - | The storage path is used by Laravel to store cached Blade views, logs - | and other pieces of information. You may modify the path here when - | you want to change the location of this directory for your apps. - | - */ - - 'storage' => __DIR__.'/../app/storage', - -); +/* + * This file is part of the Teen Quotes website. + * + * (c) Antoine Augusti + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return [ + + /* + |-------------------------------------------------------------------------- + | Application Path + |-------------------------------------------------------------------------- + | + | Here we just defined the path to the application directory. Most likely + | you will never need to change this value as the default setup should + | work perfectly fine for the vast majority of all our applications. + | + */ + + 'app' => __DIR__.'/../app', + + /* + |-------------------------------------------------------------------------- + | Public Path + |-------------------------------------------------------------------------- + | + | The public path contains the assets for your web application, such as + | your JavaScript and CSS files, and also contains the primary entry + | point for web requests into these applications from the outside. + | + */ + + 'public' => __DIR__.'/../public', + + /* + |-------------------------------------------------------------------------- + | Base Path + |-------------------------------------------------------------------------- + | + | The base path is the root of the Laravel installation. Most likely you + | will not need to change this value. But, if for some wild reason it + | is necessary you will do so here, just proceed with some caution. + | + */ + + 'base' => __DIR__.'/..', + + /* + |-------------------------------------------------------------------------- + | Storage Path + |-------------------------------------------------------------------------- + | + | The storage path is used by Laravel to store cached Blade views, logs + | and other pieces of information. You may modify the path here when + | you want to change the location of this directory for your apps. + | + */ + + 'storage' => __DIR__.'/../app/storage', + +]; diff --git a/bootstrap/start.php b/bootstrap/start.php index 56d0f66f..00baa623 100644 --- a/bootstrap/start.php +++ b/bootstrap/start.php @@ -1,11 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + Dotenv::load(dirname(__DIR__)); /* @@ -19,7 +22,7 @@ | */ -$app = new Illuminate\Foundation\Application; +$app = new Illuminate\Foundation\Application(); /* |-------------------------------------------------------------------------- @@ -34,9 +37,9 @@ $env = $app->detectEnvironment([ - 'local' => ['cinderella', '*.home', '*.local', '*.lan'], - 'staging' => ['teen-quotes-staging'], - 'production' => ['teen-quotes-production'], + 'local' => ['cinderella', '*.home', '*.local', '*.lan'], + 'staging' => ['teen-quotes-staging'], + 'production' => ['teen-quotes-production'], ]); diff --git a/public/index.php b/public/index.php index f08822d9..e6d4644e 100644 --- a/public/index.php +++ b/public/index.php @@ -1,8 +1,17 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + /** - * Laravel - A PHP Framework For Web Artisans + * Laravel - A PHP Framework For Web Artisans. * - * @package Laravel * @author Taylor Otwell */ diff --git a/server.php b/server.php index 5f187f34..e5d463af 100644 --- a/server.php +++ b/server.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); $uri = urldecode($uri); @@ -11,9 +20,8 @@ // This file allows us to emulate Apache's "mod_rewrite" functionality from the // built-in PHP web server. This provides a convenient way to test a Laravel // application without having installed a "real" web server software here. -if ($uri !== '/' and file_exists($requested)) -{ - return false; +if ($uri !== '/' and file_exists($requested)) { + return false; } require_once $paths['public'].'/index.php'; diff --git a/tests/TestCase.php b/tests/TestCase.php index 3e9f0ac6..64217f5c 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class TestCase extends Illuminate\Foundation\Testing\TestCase { /** diff --git a/tests/_bootstrap.php b/tests/_bootstrap.php index 243f9c85..e5a6cd62 100644 --- a/tests/_bootstrap.php +++ b/tests/_bootstrap.php @@ -1,2 +1,10 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ diff --git a/tests/_support/AdminPanelHelper.php b/tests/_support/AdminPanelHelper.php index 28e365a0..ed74e37f 100644 --- a/tests/_support/AdminPanelHelper.php +++ b/tests/_support/AdminPanelHelper.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Codeception\Module; use Codeception\Module; diff --git a/tests/_support/ApiHelper.php b/tests/_support/ApiHelper.php index 17d00aeb..0a9ad522 100644 --- a/tests/_support/ApiHelper.php +++ b/tests/_support/ApiHelper.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Codeception\Module; use Auth; @@ -151,7 +160,7 @@ private function assertObjectHasAttributes($object, $array) foreach ($array as $value) { $this->assertObjectHasAttribute($value, $object); if (Str::contains($value, '_id')) { - $this->assertTrue(is_integer($object->$value)); + $this->assertTrue(is_int($object->$value)); } } } @@ -258,7 +267,7 @@ public function tryShowFound($id) public function tryFirstPage($method = 'index', $requestParams = null) { - $this->page = 1; + $this->page = 1; $this->pagesize = $this->nbRessources; $this->replacePagesInput(); @@ -268,7 +277,7 @@ public function tryFirstPage($method = 'index', $requestParams = null) $this->assertIsPaginatedResponse(); $objectName = $this->contentType; - $objects = $this->json->$objectName; + $objects = $this->json->$objectName; for ($i = 0; $i < $this->nbRessources; $i++) { $this->assertObjectMatchesExpectedSchema($objects[$i]); } @@ -301,7 +310,7 @@ private function assertObjectMatchesExpectedSchema($object) public function tryMiddlePage($method = 'index', $requestParams = null) { - $this->page = max(2, ($this->nbRessources / 2)); + $this->page = max(2, ($this->nbRessources / 2)); $this->pagesize = 1; $this->replacePagesInput(); @@ -312,7 +321,7 @@ public function tryMiddlePage($method = 'index', $requestParams = null) $this->assertHasNextAndPreviousPage(); $objectName = $this->contentType; - $objects = $this->json->$objectName; + $objects = $this->json->$objectName; $this->assertObjectMatchesExpectedSchema(reset($objects)); @@ -413,7 +422,7 @@ private function assertNeighborsPagesMatch() { $this->checkPagesAreSet(); - $nextPage = $this->page + 1; + $nextPage = $this->page + 1; $previousPage = $this->page - 1; if ($nextPage < $this->computeTotalPages()) { @@ -435,7 +444,7 @@ private function assertObjectIsSmallUser($object) $this->assertObjectHasAttribute('wants_notification_comment_quote', $object); // Assert types - $this->assertTrue(is_integer($object->id)); + $this->assertTrue(is_int($object->id)); $this->assertTrue(is_bool($object->is_admin)); $this->assertTrue(is_bool($object->profile_hidden)); $this->assertTrue(is_bool($object->wants_notification_comment_quote)); @@ -457,15 +466,15 @@ private function assertObjectIsQuote($object) $this->assertObjectHasAttribute('tags_list', $object); // Assert types - $this->assertTrue(is_integer($object->id)); + $this->assertTrue(is_int($object->id)); $this->assertTrue(is_string($object->content)); - $this->assertTrue(is_integer($object->user_id)); - $this->assertTrue(is_integer($object->approved)); + $this->assertTrue(is_int($object->user_id)); + $this->assertTrue(is_int($object->approved)); $this->assertTrue(is_string($object->created_at)); $this->assertTrue(is_bool($object->has_comments)); - $this->assertTrue(is_integer($object->total_comments)); + $this->assertTrue(is_int($object->total_comments)); $this->assertTrue(is_bool($object->is_favorite)); - $this->assertTrue(is_integer($object->total_favorites)); + $this->assertTrue(is_int($object->total_favorites)); $this->assertTrue(is_array($object->tags_list)); } @@ -477,7 +486,7 @@ private function assertObjectIsCountry($object) $this->assertObjectHasAttribute('country_code', $object); // Assert types - $this->assertTrue(is_integer($object->id)); + $this->assertTrue(is_int($object->id)); $this->assertTrue(is_string($object->name)); $this->assertTrue(is_string($object->country_code)); } @@ -490,7 +499,7 @@ private function assertObjectIsNewsletter($object) $this->assertObjectHasAttribute('created_at', $object); // Assert types - $this->assertTrue(is_integer($object->user_id)); + $this->assertTrue(is_int($object->user_id)); $this->assertTrue(is_string($object->type)); $this->assertTrue(in_array($object->type, ['weekly', 'daily'])); $this->assertTrue(is_string($object->created_at)); @@ -519,10 +528,10 @@ private function assertIsPaginatedResponse() } // Assert types - $this->assertTrue(is_integer($this->json->$attributeName)); - $this->assertTrue(is_integer($this->json->total_pages)); - $this->assertTrue(is_integer($this->json->page)); - $this->assertTrue(is_integer($this->json->pagesize)); + $this->assertTrue(is_int($this->json->$attributeName)); + $this->assertTrue(is_int($this->json->total_pages)); + $this->assertTrue(is_int($this->json->page)); + $this->assertTrue(is_int($this->json->pagesize)); $this->assertTrue(is_bool($this->json->has_next_page)); $this->assertTrue(is_bool($this->json->has_previous_page)); diff --git a/tests/_support/AuthHelper.php b/tests/_support/AuthHelper.php index 88f8b54b..a0774def 100644 --- a/tests/_support/AuthHelper.php +++ b/tests/_support/AuthHelper.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Codeception\Module; use Codeception\Module; diff --git a/tests/_support/DbSeederHelper.php b/tests/_support/DbSeederHelper.php index 244fbc98..86f2ce15 100644 --- a/tests/_support/DbSeederHelper.php +++ b/tests/_support/DbSeederHelper.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Codeception\Module; use Codeception\Module; diff --git a/tests/_support/FormFillerHelper.php b/tests/_support/FormFillerHelper.php index a85025af..72970b30 100644 --- a/tests/_support/FormFillerHelper.php +++ b/tests/_support/FormFillerHelper.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Codeception\Module; use Codeception\Module; diff --git a/tests/_support/FunctionalHelper.php b/tests/_support/FunctionalHelper.php index 58c8479a..91faeea6 100644 --- a/tests/_support/FunctionalHelper.php +++ b/tests/_support/FunctionalHelper.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Codeception\Module; use Codeception\Module; diff --git a/tests/_support/IntegrationHelper.php b/tests/_support/IntegrationHelper.php index f0d4e771..7d90f7fc 100644 --- a/tests/_support/IntegrationHelper.php +++ b/tests/_support/IntegrationHelper.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Codeception\Module; use Codeception\Module; diff --git a/tests/_support/NavigationHelper.php b/tests/_support/NavigationHelper.php index 25b663b6..41bbcb3c 100644 --- a/tests/_support/NavigationHelper.php +++ b/tests/_support/NavigationHelper.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Codeception\Module; use Codeception\Module; diff --git a/tests/_support/QuotesHelper.php b/tests/_support/QuotesHelper.php index 5ce59a28..ee585aa8 100644 --- a/tests/_support/QuotesHelper.php +++ b/tests/_support/QuotesHelper.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Codeception\Module; use Codeception\Module; diff --git a/tests/_support/StoriesHelper.php b/tests/_support/StoriesHelper.php index 02aab9f8..b8d03cf2 100644 --- a/tests/_support/StoriesHelper.php +++ b/tests/_support/StoriesHelper.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Codeception\Module; use Carbon; diff --git a/tests/_support/UserHelper.php b/tests/_support/UserHelper.php index 393beb91..4022111f 100644 --- a/tests/_support/UserHelper.php +++ b/tests/_support/UserHelper.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Codeception\Module; use Carbon\Carbon; @@ -83,7 +92,7 @@ public function assertEditProfileFormIsFilledWith(array $params) */ public function assertProfileHasBeenChangedWithParams(array $params) { - $I = $this->getModule('Laravel4'); + $I = $this->getModule('Laravel4'); $user = Auth::user(); $I->seeCurrentRouteIs('users.edit', $user->login); @@ -102,7 +111,7 @@ public function assertProfileHasBeenChangedWithParams(array $params) */ public function assertProfileContainsInformation(array $params) { - $I = $this->getModule('Laravel4'); + $I = $this->getModule('Laravel4'); $user = Auth::user(); if (array_key_exists('country_name', $params)) { diff --git a/tests/functional/AdminPanel/EditWaitingQuoteCest.php b/tests/functional/AdminPanel/EditWaitingQuoteCest.php index 06ec4d1b..dcf36120 100644 --- a/tests/functional/AdminPanel/EditWaitingQuoteCest.php +++ b/tests/functional/AdminPanel/EditWaitingQuoteCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use TeenQuotes\Quotes\Models\Quote; class EditWaitingQuoteCest diff --git a/tests/functional/AdminPanel/ListWaitingQuotesCest.php b/tests/functional/AdminPanel/ListWaitingQuotesCest.php index 583ee9ca..d65ad7cf 100644 --- a/tests/functional/AdminPanel/ListWaitingQuotesCest.php +++ b/tests/functional/AdminPanel/ListWaitingQuotesCest.php @@ -1,5 +1,13 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ class ListWaitingQuotesCest { diff --git a/tests/functional/Auth/LogOutCest.php b/tests/functional/Auth/LogOutCest.php index d6c9ff76..8a6c2ac2 100644 --- a/tests/functional/Auth/LogOutCest.php +++ b/tests/functional/Auth/LogOutCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class LogOutCest { public function _before(FunctionalTester $I) diff --git a/tests/functional/Auth/PasswordForgottenCest.php b/tests/functional/Auth/PasswordForgottenCest.php index ee7a2e14..f2c88a11 100644 --- a/tests/functional/Auth/PasswordForgottenCest.php +++ b/tests/functional/Auth/PasswordForgottenCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class PasswordForgottenCest { public function _before(FunctionalTester $I) diff --git a/tests/functional/Auth/SignInCest.php b/tests/functional/Auth/SignInCest.php index e6a3cc68..f1bbd444 100644 --- a/tests/functional/Auth/SignInCest.php +++ b/tests/functional/Auth/SignInCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class SignInCest { public function _before(FunctionalTester $I) diff --git a/tests/functional/Auth/SignUpCest.php b/tests/functional/Auth/SignUpCest.php index a9ee957f..11e9e788 100644 --- a/tests/functional/Auth/SignUpCest.php +++ b/tests/functional/Auth/SignUpCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class SignUpCest { public function _before(FunctionalTester $I) diff --git a/tests/functional/Comment/AddCommentCest.php b/tests/functional/Comment/AddCommentCest.php index ca515c8e..ba246a00 100644 --- a/tests/functional/Comment/AddCommentCest.php +++ b/tests/functional/Comment/AddCommentCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use TeenQuotes\Quotes\Models\Quote; class AddCommentCest diff --git a/tests/functional/Comment/DeleteCommentCest.php b/tests/functional/Comment/DeleteCommentCest.php index 7be9bbb0..0fba33ee 100644 --- a/tests/functional/Comment/DeleteCommentCest.php +++ b/tests/functional/Comment/DeleteCommentCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use TeenQuotes\Quotes\Models\Quote; class DeleteCommentCest @@ -28,7 +37,7 @@ class DeleteCommentCest public function _before(FunctionalTester $I) { - $this->user = $I->logANewUser(); + $this->user = $I->logANewUser(); $this->quotes = $I->createSomePublishedQuotes(); // Insert some comments, the last one should have been written by the logged in user diff --git a/tests/functional/Comment/EditCommentCest.php b/tests/functional/Comment/EditCommentCest.php index da034c45..740e0138 100644 --- a/tests/functional/Comment/EditCommentCest.php +++ b/tests/functional/Comment/EditCommentCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use TeenQuotes\Quotes\Models\Quote; class EditCommentCest diff --git a/tests/functional/FavoriteQuote/AddFavoriteCest.php b/tests/functional/FavoriteQuote/AddFavoriteCest.php index 20626ffc..2108af57 100644 --- a/tests/functional/FavoriteQuote/AddFavoriteCest.php +++ b/tests/functional/FavoriteQuote/AddFavoriteCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class AddFavoriteCest { /** @@ -21,7 +30,7 @@ public function _before(FunctionalTester $I) $I->createSomePublishedQuotes(); // Create a new user and a fresh published quote - $this->user = $I->logANewUser(); + $this->user = $I->logANewUser(); $this->firstQuote = $I->insertInDatabase(1, 'Quote', ['created_at' => Carbon::now()->addMonth(), 'user_id' => $this->user->id]); } diff --git a/tests/functional/FavoriteQuote/DeleteFavoriteCest.php b/tests/functional/FavoriteQuote/DeleteFavoriteCest.php index f1d3ad73..742248e3 100644 --- a/tests/functional/FavoriteQuote/DeleteFavoriteCest.php +++ b/tests/functional/FavoriteQuote/DeleteFavoriteCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class DeleteFavoriteCest { /** @@ -21,7 +30,7 @@ public function _before(FunctionalTester $I) $I->createSomePublishedQuotes(); // Create a new user and a fresh published quote - $this->user = $I->logANewUser(); + $this->user = $I->logANewUser(); $this->firstQuote = $I->insertInDatabase(1, 'Quote', ['created_at' => Carbon::now()->addMonth(), 'user_id' => $this->user->id]); // Add to the user's favorites the first quote diff --git a/tests/functional/Quote/AddQuoteCest.php b/tests/functional/Quote/AddQuoteCest.php index 1741df4e..88cda151 100644 --- a/tests/functional/Quote/AddQuoteCest.php +++ b/tests/functional/Quote/AddQuoteCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class AddQuoteCest { public function _before(FunctionalTester $I) diff --git a/tests/functional/Quote/IndexQuotesCest.php b/tests/functional/Quote/IndexQuotesCest.php index 188e7b98..fb8ee933 100644 --- a/tests/functional/Quote/IndexQuotesCest.php +++ b/tests/functional/Quote/IndexQuotesCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class IndexQuotesCest { /** @@ -21,7 +30,7 @@ public function _before(FunctionalTester $I) $I->createSomePublishedQuotes(['nb_quotes' => $I->getTotalNumberOfQuotesToCreate()]); // Create a new user, a fresh published quote and some comments to it - $this->user = $I->logANewUser(); + $this->user = $I->logANewUser(); $this->firstQuote = $I->insertInDatabase(1, 'Quote', ['created_at' => Carbon::now()->addMonth(), 'user_id' => $this->user->id]); $I->insertInDatabase($I->getNbComments(), 'Comment', ['quote_id' => $this->firstQuote->id]); } diff --git a/tests/functional/Quote/ShowQuoteCest.php b/tests/functional/Quote/ShowQuoteCest.php index ea4b3b2d..c7cf26e7 100644 --- a/tests/functional/Quote/ShowQuoteCest.php +++ b/tests/functional/Quote/ShowQuoteCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class ShowQuoteCest { /** @@ -21,7 +30,7 @@ public function _before(FunctionalTester $I) $I->createSomePublishedQuotes(['nb_quotes' => $I->getTotalNumberOfQuotesToCreate()]); // Create a new user, a fresh published quote - $this->user = $I->logANewUser(); + $this->user = $I->logANewUser(); $this->firstQuote = $I->insertInDatabase(1, 'Quote', ['created_at' => Carbon::now()->addMonth(), 'user_id' => $this->user->id]); // Add some comments to the quote diff --git a/tests/functional/Story/AddStoryCest.php b/tests/functional/Story/AddStoryCest.php index 27eedc74..c207b149 100644 --- a/tests/functional/Story/AddStoryCest.php +++ b/tests/functional/Story/AddStoryCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class AddStoryCest { /** diff --git a/tests/functional/Story/IndexStoriesCest.php b/tests/functional/Story/IndexStoriesCest.php index ae96107d..f44e9ced 100644 --- a/tests/functional/Story/IndexStoriesCest.php +++ b/tests/functional/Story/IndexStoriesCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class IndexStoriesCest { /** diff --git a/tests/functional/Story/ShowStoryCest.php b/tests/functional/Story/ShowStoryCest.php index d4413e57..5a699597 100644 --- a/tests/functional/Story/ShowStoryCest.php +++ b/tests/functional/Story/ShowStoryCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class ShowStoryCest { /** diff --git a/tests/functional/User/DeleteAccountCest.php b/tests/functional/User/DeleteAccountCest.php index 21e54bcd..e61a5d78 100644 --- a/tests/functional/User/DeleteAccountCest.php +++ b/tests/functional/User/DeleteAccountCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class DeleteAccountCest { /** diff --git a/tests/functional/User/EditProfileCest.php b/tests/functional/User/EditProfileCest.php index 3465587b..a5898ae4 100644 --- a/tests/functional/User/EditProfileCest.php +++ b/tests/functional/User/EditProfileCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class EditProfileCest { /** diff --git a/tests/functional/User/ShowProfileCest.php b/tests/functional/User/ShowProfileCest.php index a8b12f2d..fae3c4e4 100644 --- a/tests/functional/User/ShowProfileCest.php +++ b/tests/functional/User/ShowProfileCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class ShowProfileCest { /** diff --git a/tests/functional/User/UpdatePasswordCest.php b/tests/functional/User/UpdatePasswordCest.php index 93eb1833..1f954642 100644 --- a/tests/functional/User/UpdatePasswordCest.php +++ b/tests/functional/User/UpdatePasswordCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class UpdatePasswordCest { /** @@ -43,7 +52,7 @@ public function updateMyPasswordWithADifferentConfirmationPassword(FunctionalTes $I->am('a logged in Teen Quotes member'); $I->wantTo('update my password with a different confirmation password'); - $newPassword = 'azerty42'; + $newPassword = 'azerty42'; $confirmPassword = 'azerty22'; // Try to update the user's password diff --git a/tests/functional/User/UpdateSettingsCest.php b/tests/functional/User/UpdateSettingsCest.php index c247e76b..3c2a80c4 100644 --- a/tests/functional/User/UpdateSettingsCest.php +++ b/tests/functional/User/UpdateSettingsCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class UpdateSettingsCest { /** @@ -25,7 +34,7 @@ public function updateMySettings(FunctionalTester $I) $I->assertMySettingsHaveDefaultValues(); $newColor = 'red'; - $params = [ + $params = [ 'color' => ucfirst($newColor), 'notification_comment_quote' => 0, 'hide_profile' => 1, diff --git a/tests/functional/_bootstrap.php b/tests/functional/_bootstrap.php index 8a885558..e5a6cd62 100644 --- a/tests/functional/_bootstrap.php +++ b/tests/functional/_bootstrap.php @@ -1,2 +1,10 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ diff --git a/tests/integration/CommentRepoCest.php b/tests/integration/CommentRepoCest.php index f947b679..596eeca2 100644 --- a/tests/integration/CommentRepoCest.php +++ b/tests/integration/CommentRepoCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class CommentRepoCest { /** @@ -90,7 +99,7 @@ public function testCreate(IntegrationTester $I) public function testUpdate(IntegrationTester $I) { - $c = $I->insertInDatabase(1, 'Comment'); + $c = $I->insertInDatabase(1, 'Comment'); $newContent = 'Foobar'; $this->repo->update($c, $newContent); @@ -121,7 +130,7 @@ public function testGetTopQuotes(IntegrationTester $I) public function testGetNbCommentsForQuote(IntegrationTester $I) { - $first = $I->insertInDatabase(1, 'Quote'); + $first = $I->insertInDatabase(1, 'Quote'); $second = $I->insertInDatabase(1, 'Quote'); $I->insertInDatabase(2, 'Comment', ['quote_id' => 2]); diff --git a/tests/integration/CountryRepoCest.php b/tests/integration/CountryRepoCest.php index 1447dedd..9873744f 100644 --- a/tests/integration/CountryRepoCest.php +++ b/tests/integration/CountryRepoCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use TeenQuotes\Countries\Models\Country; class CountryRepoCest diff --git a/tests/integration/FavoriteQuoteRepoCest.php b/tests/integration/FavoriteQuoteRepoCest.php index 2181b0e0..6f14ea55 100644 --- a/tests/integration/FavoriteQuoteRepoCest.php +++ b/tests/integration/FavoriteQuoteRepoCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class FavoriteQuoteRepoCest { /** diff --git a/tests/integration/NewsletterRepoCest.php b/tests/integration/NewsletterRepoCest.php index c1ac8ff0..b9a16e0d 100644 --- a/tests/integration/NewsletterRepoCest.php +++ b/tests/integration/NewsletterRepoCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Support\Collection; use TeenQuotes\Newsletters\Models\Newsletter; diff --git a/tests/integration/ProfileVisitorRepoCest.php b/tests/integration/ProfileVisitorRepoCest.php index 1717bfe8..0a2215fc 100644 --- a/tests/integration/ProfileVisitorRepoCest.php +++ b/tests/integration/ProfileVisitorRepoCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class ProfileVisitorRepoCest { /** diff --git a/tests/integration/QuoteRepoCest.php b/tests/integration/QuoteRepoCest.php index 1d05d1d9..7935905d 100644 --- a/tests/integration/QuoteRepoCest.php +++ b/tests/integration/QuoteRepoCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use TeenQuotes\Quotes\Models\Quote; class QuoteRepoCest @@ -16,7 +25,7 @@ class QuoteRepoCest public function _before() { - $this->repo = App::make('TeenQuotes\Quotes\Repositories\QuoteRepository'); + $this->repo = App::make('TeenQuotes\Quotes\Repositories\QuoteRepository'); $this->tagRepo = App::make('TeenQuotes\Tags\Repositories\TagRepository'); } @@ -99,7 +108,7 @@ public function testCountQuotesByApprovedForUser(IntegrationTester $I) public function testUpdateContentAndApproved(IntegrationTester $I) { $newContent = 'Hello World'; - $q = $I->insertInDatabase(1, 'Quote', ['approved' => Quote::WAITING]); + $q = $I->insertInDatabase(1, 'Quote', ['approved' => Quote::WAITING]); $this->repo->updateContentAndApproved($q->id, $newContent, Quote::PUBLISHED); @@ -138,7 +147,7 @@ public function testSubmittedTodayForUser(IntegrationTester $I) public function testCreateQuoteForUser(IntegrationTester $I) { $content = 'Hello World'; - $user = $I->insertInDatabase(1, 'User'); + $user = $I->insertInDatabase(1, 'User'); $q = $this->repo->createQuoteForUser($user, $content); $q = $this->repo->getById($q->id); @@ -154,7 +163,7 @@ public function testIndex(IntegrationTester $I) $I->insertInDatabase(3, 'Quote', ['approved' => Quote::WAITING]); $quotes = $this->repo->index(1, 5); - $ids = $quotes->lists('id'); + $ids = $quotes->lists('id'); sort($ids); $I->assertIsCollection($quotes); $I->assertEquals(range(1, 5), $ids); @@ -272,7 +281,7 @@ public function testNbQuotesWithFavorites(IntegrationTester $I) public function testGetQuotesForTag(IntegrationTester $I) { $quotes = $I->insertInDatabase(2, 'Quote'); - $tags = $I->insertInDatabase(2, 'Tag'); + $tags = $I->insertInDatabase(2, 'Tag'); $I->assertEmpty($this->repo->getQuotesForTag($tags[0], 1, 10)); diff --git a/tests/integration/SettingRepoCest.php b/tests/integration/SettingRepoCest.php index f9b0dd7b..f27f68e1 100644 --- a/tests/integration/SettingRepoCest.php +++ b/tests/integration/SettingRepoCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class SettingRepoCest { /** diff --git a/tests/integration/StoryRepoCest.php b/tests/integration/StoryRepoCest.php index a131d9c3..b8cc1a37 100644 --- a/tests/integration/StoryRepoCest.php +++ b/tests/integration/StoryRepoCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class StoryRepoCest { /** diff --git a/tests/integration/TagRepoCest.php b/tests/integration/TagRepoCest.php index 784d4267..7c65e36d 100644 --- a/tests/integration/TagRepoCest.php +++ b/tests/integration/TagRepoCest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class TagRepoCest { /** @@ -39,7 +48,7 @@ public function testTagQuote(IntegrationTester $I) { $I->insertInDatabase(1, 'Quote'); $quote = $I->insertInDatabase(1, 'Quote'); - $tag = $I->insertInDatabase(1, 'Tag', compact('name')); + $tag = $I->insertInDatabase(1, 'Tag', compact('name')); $this->repo->tagQuote($quote, $tag); @@ -50,7 +59,7 @@ public function testUntagQuote(IntegrationTester $I) { $I->insertInDatabase(1, 'Quote'); $quote = $I->insertInDatabase(1, 'Quote'); - $tag = $I->insertInDatabase(1, 'Tag', compact('name')); + $tag = $I->insertInDatabase(1, 'Tag', compact('name')); $this->repo->tagQuote($quote, $tag); @@ -94,7 +103,7 @@ public function testTagsForQuote(IntegrationTester $I) public function testTotalQuotesForTag(IntegrationTester $I) { $quotes = $I->insertInDatabase(2, 'Quote'); - $tag = $I->insertInDatabase(1, 'Tag'); + $tag = $I->insertInDatabase(1, 'Tag'); $I->assertEquals(0, $this->repo->totalQuotesForTag($tag)); diff --git a/tests/integration/UserRepoCest.php b/tests/integration/UserRepoCest.php index a5bd234e..15d89595 100644 --- a/tests/integration/UserRepoCest.php +++ b/tests/integration/UserRepoCest.php @@ -1,5 +1,13 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ class UserRepoCest { @@ -81,7 +89,7 @@ public function testCountByPartialLogin(IntegrationTester $I) public function testUpdatePassword(IntegrationTester $I) { - $u = $I->insertInDatabase(1, 'User'); + $u = $I->insertInDatabase(1, 'User'); $newPassword = 'foobar22'; $credentials = ['login' => $u->login, 'password' => $newPassword]; @@ -92,7 +100,7 @@ public function testUpdatePassword(IntegrationTester $I) public function testUpdateEmail(IntegrationTester $I) { - $u = $I->insertInDatabase(1, 'User'); + $u = $I->insertInDatabase(1, 'User'); $newEmail = 'foobar@bar.com'; $this->repo->updateEmail($u, $newEmail); @@ -104,12 +112,12 @@ public function testUpdateEmail(IntegrationTester $I) public function testUpdateProfile(IntegrationTester $I) { - $gender = 'F'; - $country = 10; // Argentina - $city = 'Foobar'; - $about_me = 'Enjoying integration tests'; + $gender = 'F'; + $country = 10; // Argentina + $city = 'Foobar'; + $about_me = 'Enjoying integration tests'; $birthdate = '1900-12-01'; - $avatar = null; + $avatar = null; $u = $I->insertInDatabase(1, 'User'); @@ -128,7 +136,7 @@ public function testUpdateProfile(IntegrationTester $I) public function testUpdateSettings(IntegrationTester $I) { $notification_comment_quote = false; - $hide_profile = false; + $hide_profile = false; $u = $I->insertInDatabase(1, 'User', ['notification_comment_quote' => true, 'hide_profile' => true]); @@ -152,7 +160,7 @@ public function testGetAll(IntegrationTester $I) public function testBirthdayToday(IntegrationTester $I) { - $birthDate = Carbon::now()->subYears(20)->format('Y-m-d'); + $birthDate = Carbon::now()->subYears(20)->format('Y-m-d'); $notBirthDate = Carbon::now()->subYears(2)->subDays(5)->format('Y-m-d'); $I->insertInDatabase(2, 'User', ['birthdate' => $notBirthDate]); $u = $I->insertInDatabase(1, 'User', ['birthdate' => $birthDate]); @@ -201,13 +209,13 @@ public function testSearchByPartialLogin(IntegrationTester $I) public function testCreate(IntegrationTester $I) { - $login = 'foobar'; - $email = 'foo@bar.com'; - $password = 'foobar22'; - $ip = '22.22.22.22'; + $login = 'foobar'; + $email = 'foo@bar.com'; + $password = 'foobar22'; + $ip = '22.22.22.22'; $lastVisit = Carbon::now(); - $country = 10; // Argentina - $city = 'Foo City'; + $country = 10; // Argentina + $city = 'Foo City'; $this->repo->create($login, $email, $password, $ip, $lastVisit, $country, $city); @@ -245,7 +253,7 @@ public function testMostCommon(IntegrationTester $I) public function testGetNonActiveHavingNewsletter(IntegrationTester $I) { $lastYear = Carbon::now()->subDays(370); - $u = $I->insertInDatabase(1, 'User', ['last_visit' => $lastYear]); + $u = $I->insertInDatabase(1, 'User', ['last_visit' => $lastYear]); // A user, who haven't logged in the last year, but without newsletters $fake = $I->insertInDatabase(1, 'User', ['last_visit' => $lastYear]); @@ -260,7 +268,7 @@ public function testGetNonActiveHavingNewsletter(IntegrationTester $I) public function testFromCountry(IntegrationTester $I) { - $firstCountry = $this->countryRepo->findById(1); + $firstCountry = $this->countryRepo->findById(1); $secondCountry = $this->countryRepo->findById(2); // Create some users from the first country @@ -276,7 +284,7 @@ public function testFromCountry(IntegrationTester $I) public function testCountFromCountry(IntegrationTester $I) { - $firstCountry = $this->countryRepo->findById(1); + $firstCountry = $this->countryRepo->findById(1); $secondCountry = $this->countryRepo->findById(2); // Create some users from the first country diff --git a/tests/integration/_bootstrap.php b/tests/integration/_bootstrap.php index 8a885558..e5a6cd62 100644 --- a/tests/integration/_bootstrap.php +++ b/tests/integration/_bootstrap.php @@ -1,2 +1,10 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ diff --git a/tests/search/SearchQuoteCest.php b/tests/search/SearchQuoteCest.php index f053af29..985433c3 100644 --- a/tests/search/SearchQuoteCest.php +++ b/tests/search/SearchQuoteCest.php @@ -1,8 +1,17 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class SearchQuoteCest { - private $nbQuotes = 5; + private $nbQuotes = 5; private $searchFor = 'foobar'; public function _before(SearchTester $I) diff --git a/tests/search/SearchUserCest.php b/tests/search/SearchUserCest.php index 350e9152..8ddbc4e0 100644 --- a/tests/search/SearchUserCest.php +++ b/tests/search/SearchUserCest.php @@ -1,8 +1,17 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + class SearchUserCest { - private $nbUsers = 5; + private $nbUsers = 5; private $searchFor = 'foobar'; public function _before(SearchTester $I) diff --git a/tests/search/_bootstrap.php b/tests/search/_bootstrap.php index 8a885558..e5a6cd62 100644 --- a/tests/search/_bootstrap.php +++ b/tests/search/_bootstrap.php @@ -1,2 +1,10 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ diff --git a/tests/unit/Api/v1/ApiTest.php b/tests/unit/Api/v1/ApiTest.php index 5a0d6c2f..d3936ccc 100644 --- a/tests/unit/Api/v1/ApiTest.php +++ b/tests/unit/Api/v1/ApiTest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Codeception\TestCase\Test; abstract class ApiTest extends Test diff --git a/tests/unit/Api/v1/CommentsTest.php b/tests/unit/Api/v1/CommentsTest.php index a18ebf69..844ce06e 100644 --- a/tests/unit/Api/v1/CommentsTest.php +++ b/tests/unit/Api/v1/CommentsTest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Http\Response; use TeenQuotes\Comments\Models\Comment; use TeenQuotes\Quotes\Models\Quote; @@ -7,7 +16,7 @@ class CommentsTest extends ApiTest { protected $requiredAttributes = ['id', 'content', 'quote_id', 'user_id', 'created_at']; - protected $embedsRelation = ['user_small', 'quote']; + protected $embedsRelation = ['user_small', 'quote']; protected $quoteId; protected function _before() @@ -19,7 +28,7 @@ protected function _before() $this->unitTester->setContentType('comments'); // Create a quote and add some comments to it - $q = $this->unitTester->insertInDatabase(1, 'Quote'); + $q = $this->unitTester->insertInDatabase(1, 'Quote'); $this->quoteId = $q['id']; $this->unitTester->insertInDatabase($this->unitTester->getNbRessources(), 'Comment', ['quote_id' => $this->quoteId]); } diff --git a/tests/unit/Api/v1/CountriesTest.php b/tests/unit/Api/v1/CountriesTest.php index a2473ee0..6c18a6f2 100644 --- a/tests/unit/Api/v1/CountriesTest.php +++ b/tests/unit/Api/v1/CountriesTest.php @@ -1,5 +1,13 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ class CountriesTest extends ApiTest { diff --git a/tests/unit/Api/v1/FavoriteQuotesTest.php b/tests/unit/Api/v1/FavoriteQuotesTest.php index 397aad25..96e60ce3 100644 --- a/tests/unit/Api/v1/FavoriteQuotesTest.php +++ b/tests/unit/Api/v1/FavoriteQuotesTest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Http\Response; use Illuminate\Support\Facades\Cache; use TeenQuotes\Quotes\Models\Quote; @@ -18,10 +27,10 @@ protected function _before() $this->unitTester->setController(App::make('TeenQuotes\Api\V1\Controllers\QuotesFavoriteController')); // Create a user and log him in - $user = $this->unitTester->insertInDatabase(1, 'User'); + $user = $this->unitTester->insertInDatabase(1, 'User'); $this->user = $this->unitTester->logUserWithId($user['id']); - $this->idRefusedQuote = $this->getIdRefusedQuote(); + $this->idRefusedQuote = $this->getIdRefusedQuote(); $this->idPublishedQuote = $this->getIdPublishedQuote(); } @@ -46,7 +55,7 @@ public function testPostQuoteNotPublished() public function testPostQuoteSuccess() { $idPublishedQuote = $this->idPublishedQuote; - $quote = Quote::find($idPublishedQuote); + $quote = Quote::find($idPublishedQuote); $this->post($idPublishedQuote); diff --git a/tests/unit/Api/v1/PasswordTest.php b/tests/unit/Api/v1/PasswordTest.php index 61655653..22c37d7b 100644 --- a/tests/unit/Api/v1/PasswordTest.php +++ b/tests/unit/Api/v1/PasswordTest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Http\Response; use Illuminate\Support\Facades\Password; use TeenQuotes\Users\Models\User; diff --git a/tests/unit/Api/v1/QuotesTest.php b/tests/unit/Api/v1/QuotesTest.php index 86137105..ad38eb58 100644 --- a/tests/unit/Api/v1/QuotesTest.php +++ b/tests/unit/Api/v1/QuotesTest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Http\Response; use TeenQuotes\Quotes\Models\Quote; use TeenQuotes\Tags\Models\Tag; @@ -7,8 +16,8 @@ class QuotesTest extends ApiTest { protected $requiredAttributes = ['id', 'content', 'user_id', 'approved', 'created_at', 'has_comments', 'total_comments', 'is_favorite', 'total_favorites', 'tags_list']; - protected $embedsRelation = ['user_small']; - protected $approvedTypes = ['waiting', 'refused', 'pending', 'published']; + protected $embedsRelation = ['user_small']; + protected $approvedTypes = ['waiting', 'refused', 'pending', 'published']; /** * @var \TeenQuotes\Tags\Repositories\TagRepository @@ -188,7 +197,7 @@ public function testQuotesByApprovedUnexistingQuotes() foreach ($this->approvedTypes as $approved) { // Create a new user each time, with no quotes - $u = $this->unitTester->insertInDatabase(1, 'User'); + $u = $this->unitTester->insertInDatabase(1, 'User'); $idUser = $u['id']; $this->unitTester->logUserWithId($idUser); @@ -201,7 +210,7 @@ public function testQuotesByApprovedUnexistingQuotes() public function testQuotesByApprovedExistingQuotes() { - $u = $this->unitTester->insertInDatabase(1, 'User'); + $u = $this->unitTester->insertInDatabase(1, 'User'); $idUser = $u['id']; $this->unitTester->logUserWithId($idUser); @@ -252,7 +261,7 @@ public function testQuotesForTagSuccess() { // Create a tag $name = 'love'; - $tag = $this->unitTester->insertInDatabase(1, 'Tag', compact('name')); + $tag = $this->unitTester->insertInDatabase(1, 'Tag', compact('name')); // Associate quotes to this tag $this->createQuotesWithTag($tag); @@ -266,7 +275,7 @@ public function testQuotesForTagSuccess() private function createQuotesWithTag(Tag $t) { $totalQuotes = $this->unitTester->getNbRessources(); - $quotes = $this->unitTester->insertInDatabase($totalQuotes, 'Quote'); + $quotes = $this->unitTester->insertInDatabase($totalQuotes, 'Quote'); foreach ($quotes as $quote) { $this->tagRepo->tagQuote($quote, $t); diff --git a/tests/unit/Api/v1/StoriesTest.php b/tests/unit/Api/v1/StoriesTest.php index ff21b2dc..aca976a5 100644 --- a/tests/unit/Api/v1/StoriesTest.php +++ b/tests/unit/Api/v1/StoriesTest.php @@ -1,10 +1,19 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Http\Response; class StoriesTest extends ApiTest { - protected $embedsRelation = ['user_small']; + protected $embedsRelation = ['user_small']; protected $requiredAttributes = ['id', 'represent_txt', 'frequence_txt', 'user_id', 'created_at', 'updated_at']; protected function _before() diff --git a/tests/unit/Api/v1/UsersTest.php b/tests/unit/Api/v1/UsersTest.php index ba6191b3..d594e61b 100644 --- a/tests/unit/Api/v1/UsersTest.php +++ b/tests/unit/Api/v1/UsersTest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Illuminate\Http\Response; use TeenQuotes\Countries\Models\Country; use TeenQuotes\Users\Models\User; @@ -7,8 +16,8 @@ class UsersTest extends ApiTest { protected $requiredAttributes = ['id', 'login', 'email', 'last_visit', 'created_at', 'profile_hidden', 'url_avatar', 'wants_notification_comment_quote', 'is_admin']; - protected $requiredFull = ['id', 'login', 'email', 'birthdate', 'gender', 'country', 'city', 'about_me', 'last_visit', 'created_at', 'profile_hidden', 'url_avatar', 'wants_notification_comment_quote', 'is_admin', 'total_comments', 'favorite_count', 'added_fav_count', 'published_quotes_count', 'is_subscribed_to_daily', 'is_subscribed_to_weekly']; - protected $embedsRelation = ['newsletters', 'country']; + protected $requiredFull = ['id', 'login', 'email', 'birthdate', 'gender', 'country', 'city', 'about_me', 'last_visit', 'created_at', 'profile_hidden', 'url_avatar', 'wants_notification_comment_quote', 'is_admin', 'total_comments', 'favorite_count', 'added_fav_count', 'published_quotes_count', 'is_subscribed_to_daily', 'is_subscribed_to_weekly']; + protected $embedsRelation = ['newsletters', 'country']; protected function _before() { @@ -229,7 +238,7 @@ public function testPutPasswordNotSame() public function testPutPasswordSuccess() { $newPassword = 'azerty'; - $idUser = 1; + $idUser = 1; $this->unitTester->addInputReplace([ 'password' => $newPassword, @@ -309,10 +318,10 @@ public function testPutProfileWrongAboutMe() public function testPutProfileSuccess() { - $gender = 'M'; + $gender = 'M'; $birthdate = '1975-01-25'; - $country = Country::first()->id; - $about_me = $this->unitTester->generateString(200); + $country = Country::first()->id; + $about_me = $this->unitTester->generateString(200); $data = compact('gender', 'birthdate', 'country', 'about_me'); $this->unitTester->addInputReplace($data); diff --git a/tests/unit/_bootstrap.php b/tests/unit/_bootstrap.php index 8a885558..e5a6cd62 100644 --- a/tests/unit/_bootstrap.php +++ b/tests/unit/_bootstrap.php @@ -1,2 +1,10 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */