Pontuador do jogo term.ooo

Related tags

React laravel
Overview

Setup de um Projeto Laravel

Criar novo projeto laravel

composer create-project laravel/laravel novo-app

1. PHP CS Fixer

composer require friendsofphp/php-cs-fixer --dev

Config file

php-cs-fixer.php

<?php

use PhpCsFixer\Config;
use PhpCsFixer\Finder;

$rules = [
    '@PSR2'                                       => true,
    'align_multiline_comment'                     => false,
    'array_indentation'                           => true,
    'array_syntax'                                => ['syntax' => 'short'],
    'binary_operator_spaces'                      => [
        'default' => 'align_single_space_minimal',
    ],
    'blank_line_after_namespace'                  => true,
    'blank_line_after_opening_tag'                => false,
    'blank_line_before_statement'                 => ['statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try']],
    'braces'                                      => [
        'allow_single_line_closure'                   => false,
        'position_after_anonymous_constructs'         => 'same',
        'position_after_control_structures'           => 'same',
        'position_after_functions_and_oop_constructs' => 'next',
    ],
    'cast_spaces'                                 => ['space' => 'none'],
    // 'class_attributes_separation' => [
    //     'elements' => ['method', 'property'],
    // ],
    'no_unused_imports'                           => true,
    'combine_consecutive_issets'                  => false,
    'combine_consecutive_unsets'                  => false,
    'combine_nested_dirname'                      => false,
    'comment_to_phpdoc'                           => false,
    'compact_nullable_typehint'                   => false,
    'concat_space'                                => ['spacing' => 'one'],
    'constant_case'                               => [
        'case' => 'lower',
    ],
    'date_time_immutable'                         => false,
    'declare_equal_normalize'                     => [
        'space' => 'single',
    ],
    'declare_strict_types'                        => false,
    'dir_constant'                                => false,
    'doctrine_annotation_array_assignment'        => false,
    'doctrine_annotation_braces'                  => false,
    'doctrine_annotation_indentation'             => [
        'ignored_tags'       => [],
        'indent_mixed_lines' => true,
    ],
    'doctrine_annotation_spaces'                  => [
        'after_argument_assignments'     => false,
        'after_array_assignments_colon'  => false,
        'after_array_assignments_equals' => false,
    ],
    'elseif'                                      => false,
    'encoding'                                    => true,
    'indentation_type'                            => true,
    'no_useless_else'                             => true,
    'no_useless_return'                           => true,
    'ordered_imports'                             => true,
    'single_quote'                                => false,
    'ternary_operator_spaces'                     => true,
    'no_extra_blank_lines'                        => true,
    'no_multiline_whitespace_around_double_arrow' => true,
    'multiline_whitespace_before_semicolons'      => true,
    'no_singleline_whitespace_before_semicolons'  => true,
    'no_spaces_around_offset'                     => true,
    'ternary_to_null_coalescing'                  => true,
    'whitespace_after_comma_in_array'             => true,
    'trim_array_spaces'                           => true,
    'unary_operator_spaces'                       => true,
];

$finder = new Finder();

$finder->in([
    __DIR__ . '/app',
    __DIR__ . '/database',
]);

$config = new Config();

$config->setIndent('    ');

$config
    ->setRiskyAllowed(false)
    ->setRules($rules)
    ->setFinder($finder);

return $config;

Run

./vendor/bin/php-cs-fixer fix

Ref

Workenck/Shift


2. Code Sniffer

composer require squizlabs/php_codesniffer --dev

Config file

phpcs.xml

<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         name="Pinguim"
         xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">

    <description>The coding standard for Pinguim do Laravel.</description>

    <file>app</file>

    <arg name="basepath" value="."/>
    <arg name="colors"/>
    <arg name="parallel" value="75"/>
    <arg value="np"/>

    <rule ref="Generic.Commenting.Todo">
        <type>error</type>
    </rule>

    <rule ref="PSR2.Methods.MethodDeclaration.Underscore">
        <type>error</type>
    </rule>

    <rule ref="PSR2.Classes.PropertyDeclaration.Underscore">
        <type>error</type>
    </rule>
</ruleset>

Run

./vendor/bin/cs

Ref

laravel-phpcs


3. LaraStan

composer require nunomaduro/larastan:^2.0 --dev

Config file

phpstan.neon

includes:
    - ./vendor/nunomaduro/larastan/extension.neon

parameters:

    paths:
        - app

    # The level 9 is the highest level
    level: 5

    checkMissingIterableValueType: false

Run

./vendor/bin/phpstan analyse

Ref PHPStan


4. Pest

composer require pestphp/pest --dev --with-all-dependencies
composer require pestphp/pest-plugin-laravel --dev
composer require pestphp/pest-plugin-parallel --dev

php artisan pest:install

Run

./vendor/bin/pest --parallel


5. DebugBar

composer require barryvdh/laravel-debugbar --dev

6. Telescope

composer require laravel/telescope --dev

php artisan telescope:install

php artisan migrate

Add in file App\Providers\AppServiceProvider:

public function register()
{
    if ($this->app->environment('local')) {
        $this->app->register(\Laravel\Telescope\TelescopeServiceProvider::class);
        $this->app->register(TelescopeServiceProvider::class);
    }
}

Adding the following to your composer.json file:

"extra": {
    "laravel": {
        "dont-discover": [
            "laravel/telescope"
        ]
    }
},

*Dark mode: uncomment (line 19) Telescope::night(); in file app/Providers/TelescopeServiceProvider.php.*



Git Hooks

Pre-Push

file .git/hooks/pre-push

#!/bin/sh


NC='\033[0m'
BBlue='\033[1;34m'
BRed='\033[1;31m'

NAME=$(git branch | grep '*' | sed 's/* //')
echo "\nRunning pre-push hook on: ${BBlue}" $NAME "${NC}\n"

# ---------------------------------------------------------------------------------------------------
# 1. Laravel Stan
echo "\n\n${BBlue}1. Larastan (PHPStan) ${NC}"
./vendor/bin/phpstan analyse

STATUS_CODE=$?

if [ $STATUS_CODE -ne 0 ]; then
    echo "${BRed}1.... larastan/phpstan: deu ruim ${NC}"
    exit 1
fi

# ---------------------------------------------------------------------------------------------------
# 2. PHP Code Sniffer
echo "\n\n${BBlue}2. PHP Code Sniffer ${NC}"
./vendor/bin/phpcs --standard=phpcs.xml

STATUS_CODE=$?

if [ $STATUS_CODE -ne 0 ]; then
    echo "${BRed}2.... php code sniffer${NC}"
    exit 1
fi

# ---------------------------------------------------------------------------------------------------
# 3. PHP Code Fixer
echo "\n\n${BBlue}3. PHP Code Fixer ${NC}"
./vendor/bin/php-cs-fixer fix --dry-run --using-cache=no --verbose --stop-on-violation

STATUS_CODE=$?

if [ $STATUS_CODE -ne 0 ]; then
    echo "${BRed}3.... php code fixer${NC}"
    exit 1
fi

# ---------------------------------------------------------------------------------------------------
# 4. PHP Tests
echo "\n\n${BBlue}4. PHP Unit Tests (Pest) ${NC}"
./vendor/bin/pest --parallel

STATUS_CODE=$?

if [ $STATUS_CODE -ne 0 ]; then
    echo "${BRed}4.... phpunit/pest${NC}"
    exit 1
fi

echo "${BBlue}pushing...${NC}\n"

pre-rebase

file .git/hooks/pre-rebase

#!/bin/sh
# Disallow all rebasing

NC='\033[0m'
BRed='\033[1;31m'

echo -e "\n${BRed}pre-rebase: Rebase is dangerous! 👿️ Don't do it.${NC}\n"

exit 1

commit-msg

file .git/hooks/commit-msg

#!/bin/sh

REGEX_ISSUE_ID="[a-zA-Z0-9,\.\_\-]+-[0-9]+"

NC='\033[0m'
BBlue='\033[1;34m'
BRed='\033[1;31m'

# Find current branch name
BRANCH_NAME=$(git symbolic-ref --short HEAD)

# Extract issue id from branch name
ISSUE_ID=$(echo "$BRANCH_NAME" | grep -o -E "$REGEX_ISSUE_ID")
if [-z "$ISSUE_ID"]; then
    echo -e "${BRed}Branch doesn't have Jira task code on itq....${NC}"
    echo -e "${BBlue}You can use ${BRed}git commit -m \"\" --no-verify${BBlue} to avoid this hook.${NC}"
    exit 1
fi
echo "$ISSUE_ID"': '$(cat "$1") > "$1"

Comments
  • feature: add README file

    feature: add README file

    Excelente a live do dia 10/03!!! Finalmente um setup prático e útil para um novo projeto em Laravel! Aqui fica uma pequena contribuição para o que foi dito. Parabéns pela live e pelo canal!

    opened by feliciotravareli 1
  • feature/TS 10

    feature/TS 10

    • TS-10: groups: create backend livewire component
    • TS-10: groups: update backend component
    • TS-10: groups: delete backend component
    • TS-10: groups: index backend component
    • TS-10: groups: adding listener to index to refresh the list on any action
    • TS-10: wip
    • TS-10: wip
    • TS-10: groups: changing to emmitTo
    • TS-10: wip
    opened by r2luna 0
  • feature/T 9

    feature/T 9

    • T-9: making sure that only admins can save the word of the day
    • T-9: fixing tests
    • T-9: showing a list of daily scores and total
    • T-9: fixing teste
    • T-9: fixing files
    • T-9: sending notification when we check the score of the user
    • T-9: sending a notification to the user
    • T-9: wip
    opened by r2luna 0
  • Log my daily score

    Log my daily score

    As a user I want to be able to log my daily score So I can't start tracking my progress


    Score system 1/6 = 10 2/6 = 5 3/6 = 4 4/6 = 2 5/6 = 1 6/6 = 0 não conseguiu = -1


    Examples of inputs

    joguei term.ooo #81 *2/6 🔥 1

    ⬛🟨🟨⬛⬛ 🟩🟩🟩🟩🟩


    joguei term.ooo #81 *3/6 🔥 1

    ⬛🟨🟨⬛🟨 🟩🟩🟩⬛⬛ 🟩🟩🟩🟩🟩


    joguei term.ooo #81 *4/6 🔥 4

    🟨⬛⬛⬛⬛ ⬛⬛🟨⬛⬛ 🟩🟩🟩⬛⬛ 🟩🟩🟩🟩🟩


    joguei term.ooo #81 5/6 🔥 1

    ⬛⬛🟨🟨⬛ 🟨🟨⬛🟨⬛ 🟨🟩⬛⬛🟩 ⬛🟩🟩🟨🟩 🟩🟩🟩🟩🟩


    joguei term.ooo #80 6/6

    ⬛⬛⬛⬛🟨 ⬛🟩⬛⬛🟨 ⬛🟩🟩🟩🟩 ⬛🟩🟩🟩🟩 ⬛🟩🟩🟩🟩 🟩🟩🟩🟩🟩


    joguei term.ooo #80 X/6 *

    🟨⬛⬛⬛🟨 ⬛🟩⬛⬛🟨 ⬛🟩🟨🟩⬛ 🟨🟩⬛🟩⬛ ⬛🟩🟩🟩🟩 ⬛🟩🟩🟩🟩

    opened by r2luna 0
  • Prevent LaraDumps in Tests

    Prevent LaraDumps in Tests

    1. Create .env.testing file (add to .gitignore)
    2. Add keys to .env.testing:
    DS_SEND_QUERIES=false
    DS_SEND_LOGS=false
    DS_SEND_LIVEWIRE_COMPONENTS=false
    DS_LIVEWIRE_EVENTS=false
    DS_LIVEWIRE_DISPATCH=false
    DS_SEND_LIVEWIRE_FAILED_VALIDATION=false
    DS_AUTO_CLEAR_ON_PAGE_RELOAD=false
    DS_AUTO_INVOKE_APP=false
    
    opened by luanfreitasdev 0
Owner
Pinguim Do Laravel
Pinguim Do Laravel
Project Security Term 3.2 @ PIM

Security This project was generated with Angular CLI version 12.2.10. Development server Run ng serve for a dev server. Navigate to http://localhost:4

Padonlabhat Sitthiparn 2 Apr 11, 2022
long-term project untuk menunggu lebaran (update versi always bro) wkwkwk

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Dea Aprizal 61 Jan 3, 2023
A Bower wrapper for @bartaz modification to the jQuery Term Highlighting plugin.

jQuery.Highlight.js Text highlighting plugin for jQuery. Original code and documentation. Install API Examples Attribution Install How to use this plu

Ilya Radchenko 46 Dec 30, 2022
Um jogo diário de adivinhação de palavras. Versão brasileira não-oficial do Wordle.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Gabriel Toschi 82 Oct 19, 2022
Trivia-Quiz é uma aplicação baseada no jogo Perguntados, em que consiste em um quiz de diferentes questões. Feito com ReactJS, JavaScript, Styled-Components, Axios, React-Feather e Open Trivia Database.

TRIVIA-QUIZ Trivia-Quiz é uma aplicação baseada no jogo Perguntados, em que consiste em um quiz de diferentes questões. Feito com ReactJS, JavaScript,

Daniela Farias 2 Feb 6, 2022
Jogo da Memória é um projeto proposto no curso do Programador Br.

Jogo da Memória ?? Repositório do projeto Jogo da Memória proposto no curso de Desenvolvimento Web Full Stack (Programdor Br). ?? Menu Clique para exp

Bruno Seghese 9 Sep 20, 2022
jogo para dois jogadores, onde se joga com X ou O:

Jogo da Velha Link para o github sites jogo para dois jogadores, onde se joga com X ou O: X O e vão marcando no tabuleiro, alternadamente até obter um

Angela 2 Apr 5, 2022
Repositório oficial do jogo de advinhar palavras, Xingo

O Xingo é um site brasileiro de advinhação diária de palavras, baseado no Wordle e no Lewdle. Porém todas as palavras são de baixo calão, vulgares e o

João 24 Dec 30, 2022
Recriação do jogo da forca utilizando JavaScript

Jogo da Forca ☠️ Introdução O projeto consiste na recriação do jogo da forca utilizando JavaScript, com todas as animações e sistema feitos por mim. C

Gabriel Lopes 7 Jun 2, 2022
🟩 Um ranking do jogo de palavras Termo

termo-rank ?? Um ranking do jogo de palavras Termo ?? Sobre Eu e alguns amigos estamos jogando jogos de adivinhação de palavras diariamente. Todos os

Luis Felipe Santos do Nascimento 7 May 3, 2022
Jogo da Forca em JavaScript - Alura Challenge - Oracle ONE

❗ Jogo da Forca | Segundo Desafio Proposto | Alura - ONE | ?? Tecs Utilizadas ⭐ ⭐ ⭐ ✍?? Descrição Clássico jogo da forca que marcou nossas infâncias,

Euclides G S 16 Nov 16, 2022
A ideia do projeto era desenvolver um jogo onde o usuário pode tentar "descobrir" ou melhor dizendo, lembrar a maior quantidade de HTML Tags em um determinado tempo.

HTML Tag Memory Test ?? Tecnologias Esse projeto foi desenvolvido com as seguintes tecnologias: ViteJS ReactJS Typescript Tailwind Zustand Immer Axios

Igor Santos 4 May 17, 2022
Um jogo da memória tematizado com One Piece.

Getting Started - Jogo da Memória Eis um joguinho da memória . Também foi o primeiro projeto meio complicadinho que consegui resolver por conta própri

Gabriel Machado 14 Sep 27, 2022
Jogo de batalha-naval desenvolvido por alunos da Fatec

encouracadoValente Projeto de jogo Batalha-Naval desenvolvido por alunos da Fatec Para testar em localhost: Pre-requisitos Node.js instalado Servidor

Leandro Alves 3 Nov 27, 2022