This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$finder = Symfony\Component\Finder\Finder::create() | |
->in([ | |
__DIR__ . '/src', | |
]) | |
->name('*.php') | |
->ignoreDotFiles(true) | |
->ignoreVCS(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"preset": "laravel", | |
"rules": { | |
"array_push": true, | |
"assign_null_coalescing_to_coalesce_equal": true, | |
"combine_consecutive_issets": true, | |
"combine_consecutive_unsets": true, | |
"concat_space": { | |
"spacing": "one" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Auth\EloquentUserProvider; | |
use Illuminate\Contracts\Auth\Authenticatable as UserContract; | |
class UserProvider extends EloquentUserProvider | |
{ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
/* | |
|-------------------------------------------------------------------------- | |
| Authentication Defaults | |
|-------------------------------------------------------------------------- | |
| | |
| This option controls the default authentication "guard" and password | |
| reset options for your application. You may change these defaults | |
| as required, but they're a perfect start for most applications. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
web: | |
image: nginx:latest | |
container_name: elastic-test-web | |
ports: | |
- "8080:80" | |
volumes: | |
- ./app:/app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Client extends Model | |
{ | |
public function tickets() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* PROBLEM: | |
* Create a function that receives a string like "[[[]]]" or "[][]][" and returns true if the string is balanced | |
* or false if the string isn't (to be balanced the string must have the same number of opening and closing brackets | |
* and they must be in the correct order). For example the first given string must return true and the second one must | |
* return false. | |
*/ | |
const isStringBalanced = string => { | |
return !string.split('').reduce((previous, char) => { | |
if (previous < 0) return previous; |