file cleanup

This commit is contained in:
2019-12-25 06:39:54 +00:00
parent dbfdc41029
commit d4b64055d0
48 changed files with 706 additions and 136 deletions

45
composer.lock generated
View File

@@ -1069,16 +1069,16 @@
},
{
"name": "laravel/horizon",
"version": "v3.4.3",
"version": "v3.4.4",
"source": {
"type": "git",
"url": "https://github.com/laravel/horizon.git",
"reference": "37226dd66318014fac20351b4cc7ca209dd4ccb6"
"reference": "7c36d24b200b60a059ab20f5b53f5bb6f4d2da40"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/horizon/zipball/37226dd66318014fac20351b4cc7ca209dd4ccb6",
"reference": "37226dd66318014fac20351b4cc7ca209dd4ccb6",
"url": "https://api.github.com/repos/laravel/horizon/zipball/7c36d24b200b60a059ab20f5b53f5bb6f4d2da40",
"reference": "7c36d24b200b60a059ab20f5b53f5bb6f4d2da40",
"shasum": ""
},
"require": {
@@ -1086,9 +1086,9 @@
"ext-json": "*",
"ext-pcntl": "*",
"ext-posix": "*",
"illuminate/contracts": "~5.7.0|~5.8.0|^6.0|^7.0",
"illuminate/queue": "~5.7.0|~5.8.0|^6.0|^7.0",
"illuminate/support": "~5.7.0|~5.8.0|^6.0|^7.0",
"illuminate/contracts": "~5.7.0|~5.8.0|^6.0",
"illuminate/queue": "~5.7.0|~5.8.0|^6.0",
"illuminate/support": "~5.7.0|~5.8.0|^6.0",
"php": ">=7.1.0",
"predis/predis": "^1.1",
"ramsey/uuid": "^3.5",
@@ -1097,7 +1097,7 @@
},
"require-dev": {
"mockery/mockery": "^1.0",
"orchestra/testbench": "^3.7|^4.0|^5.0",
"orchestra/testbench": "^3.7|^4.0",
"phpunit/phpunit": "^7.0|^8.0"
},
"type": "library",
@@ -1134,7 +1134,7 @@
"laravel",
"queue"
],
"time": "2019-11-19T16:23:21+00:00"
"time": "2019-12-10T16:50:59+00:00"
},
{
"name": "laravel/socialite",
@@ -1785,28 +1785,29 @@
},
{
"name": "phpoption/phpoption",
"version": "1.6.0",
"version": "1.7.1",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/php-option.git",
"reference": "f4e7a6a1382183412246f0d361078c29fb85089e"
"reference": "100a25207566930efd926cf205542946aa692e01"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/schmittjoh/php-option/zipball/f4e7a6a1382183412246f0d361078c29fb85089e",
"reference": "f4e7a6a1382183412246f0d361078c29fb85089e",
"url": "https://api.github.com/repos/schmittjoh/php-option/zipball/100a25207566930efd926cf205542946aa692e01",
"reference": "100a25207566930efd926cf205542946aa692e01",
"shasum": ""
},
"require": {
"php": "^5.5.9 || ^7.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.3",
"phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.6-dev"
"dev-master": "1.7-dev"
}
},
"autoload": {
@@ -1835,7 +1836,7 @@
"php",
"type"
],
"time": "2019-11-30T20:20:49+00:00"
"time": "2019-12-14T13:46:39+00:00"
},
{
"name": "predis/predis",
@@ -4051,16 +4052,16 @@
},
{
"name": "fzaninotto/faker",
"version": "v1.9.0",
"version": "v1.9.1",
"source": {
"type": "git",
"url": "https://github.com/fzaninotto/Faker.git",
"reference": "27a216cbe72327b2d6369fab721a5843be71e57d"
"reference": "fc10d778e4b84d5bd315dad194661e091d307c6f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/27a216cbe72327b2d6369fab721a5843be71e57d",
"reference": "27a216cbe72327b2d6369fab721a5843be71e57d",
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fc10d778e4b84d5bd315dad194661e091d307c6f",
"reference": "fc10d778e4b84d5bd315dad194661e091d307c6f",
"shasum": ""
},
"require": {
@@ -4073,7 +4074,9 @@
},
"type": "library",
"extra": {
"branch-alias": []
"branch-alias": {
"dev-master": "1.9-dev"
}
},
"autoload": {
"psr-4": {
@@ -4095,7 +4098,7 @@
"faker",
"fixtures"
],
"time": "2019-11-14T13:13:06+00:00"
"time": "2019-12-12T13:22:17+00:00"
},
{
"name": "hamcrest/hamcrest-php",

74
config/lavacharts.php Normal file
View File

@@ -0,0 +1,74 @@
<?php
/*
|--------------------------------------------------------------------------
| Default Lavacharts Configuration
|--------------------------------------------------------------------------
|
| Here is where you can customize some of the default values that lavacharts
| uses when creating charts.
|
*/
return [
/*
|--------------------------------------------------------------------------
| Auto Run
|--------------------------------------------------------------------------
|
| Toggle for whether or not the lava.js module will run on page load. This
| can be set to false for you to manually call lava.run() when ready.
|
*/
'auto_run' => true,
/*
|--------------------------------------------------------------------------
| Locale
|--------------------------------------------------------------------------
|
| When aspects of the chart have writing generated by Google, it will be in
| this language.
|
*/
'locale' => 'en',
/*
|--------------------------------------------------------------------------
| Timezone
|--------------------------------------------------------------------------
|
| When date, time, and datetime columns are used, they will be based upon
| this timezone.
|
*/
'timezone' => 'America/Los_Angeles',
/*
|--------------------------------------------------------------------------
| DateTime Format
|--------------------------------------------------------------------------
|
| This is the format string that Carbon will use to try and parse datetime
| strings. Only applies to date, time, and datetime columns.
|
*/
'datetime_format' => 'Y-m-d H:i:s',
/*
|--------------------------------------------------------------------------
| Google Maps API Key
|--------------------------------------------------------------------------
|
| Set your API key here to quiet the warnings that get thrown for using the
| public API.
|
| https://developers.google.com/maps/documentation/javascript/get-api-key
|
*/
'maps_api_key' => '',
];

View File

@@ -0,0 +1,62 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@yield('title')</title>
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
<!-- Styles -->
<style>
html, body {
background-color: #fff;
color: #636b6f;
font-family: 'Nunito', sans-serif;
font-weight: 100;
height: 100vh;
margin: 0;
}
.full-height {
height: 100vh;
}
.flex-center {
align-items: center;
display: flex;
justify-content: center;
}
.position-ref {
position: relative;
}
.code {
border-right: 2px solid;
font-size: 26px;
padding: 0 15px 0 15px;
text-align: center;
}
.message {
font-size: 18px;
text-align: center;
}
</style>
</head>
<body>
<div class="flex-center position-ref full-height">
<div class="code">
@yield('code')
</div>
<div class="message" style="padding: 10px;">
@yield('message')
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,3 @@
# Charts Views
All the charts views are located in this folder

View File

@@ -0,0 +1,3 @@
<div id="{{ $chart->id }}" {!! $chart->formatContainerOptions('css') !!}>
</div>
@include('charts::loader')

View File

@@ -0,0 +1,29 @@
<script {!! $chart->displayScriptAttributes() !!}>
function {{ $chart->id }}_create(data) {
{{ $chart->id }}_rendered = true;
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
window.{{ $chart->id }} = c3.generate({
bindto: '#{{ $chart->id }}',
data: data,
{!! $chart->formatOptions(false, true) !!}
});
}
@if ($chart->api_url)
let {{ $chart->id }}_refresh = function (url) {
document.getElementById("{{ $chart->id }}").style.display = 'none';
document.getElementById("{{ $chart->id }}_loader").style.display = 'flex';
if (typeof url !== 'undefined') {
{{ $chart->id }}_api_url = url;
}
fetch({{ $chart->id }}_api_url)
.then(data => data.json())
.then(data => {
{{ $chart->id }}.load(data);
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
});
};
@endif
@include('charts::init')
</script>

View File

@@ -0,0 +1,2 @@
<canvas style="display: none;" id="{{ $chart->id }}" {!! $chart->formatContainerOptions('html') !!}></canvas>
@include('charts::loader')

View File

@@ -0,0 +1,41 @@
@foreach ($chart->plugins as $plugin)
@include($chart->pluginsViews[$plugin]);
@endforeach
<script {!! $chart->displayScriptAttributes() !!}>
var ctvChart = document.getElementById('{{ $chart->id }}').getContext('2d');
function {{ $chart->id }}_create(data) {
{{ $chart->id }}_rendered = true;
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
window.{{ $chart->id }} = new Chart(document.getElementById("{{ $chart->id }}").getContext("2d"), {
type: {!! $chart->type ? "'{$chart->type}'" : 'data[0].type' !!},
data: {
labels: {!! $chart->formatLabels() !!},
datasets: data
},
options: {!! $chart->formatOptions(true) !!},
plugins: {!! $chart->formatPlugins(true) !!}
});
}
@if ($chart->api_url)
let {{ $chart->id }}_refresh = function (url) {
document.getElementById("{{ $chart->id }}").style.display = 'none';
document.getElementById("{{ $chart->id }}_loader").style.display = 'flex';
if (typeof url !== 'undefined') {
{{ $chart->id }}_api_url = url;
}
fetch({{ $chart->id }}_api_url)
.then(data => data.json())
.then(data => {
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
{{ $chart->id }}.data.datasets = data;
{{ $chart->id }}.update();
});
};
@endif
@include('charts::init')
</script>

View File

@@ -0,0 +1,3 @@
<div id="{{ $chart->id }}" {!! $chart->formatContainerOptions('css') !!}>
</div>
@include('charts::loader')

View File

@@ -0,0 +1,29 @@
<script {!! $chart->displayScriptAttributes() !!}>
function {{ $chart->id }}_create(data) {
{{ $chart->id }}_rendered = true;
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
window.{{ $chart->id }} = echarts.init(document.getElementById("{{ $chart->id }}"),'{{ $chart->theme }}');
window.{{ $chart->id }}.setOption({
series: data,
{!! $chart->formatOptions(false, true) !!}
});
}
@if ($chart->api_url)
let {{ $chart->id }}_refresh = function (url) {
document.getElementById("{{ $chart->id }}").style.display = 'none';
document.getElementById("{{ $chart->id }}_loader").style.display = 'flex';
if (typeof url !== 'undefined') {
{{ $chart->id }}_api_url = url;
}
fetch({{ $chart->id }}_api_url)
.then(data => data.json())
.then(data => {
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
{{ $chart->id }}.setOption({series: data});
});
};
@endif
@include('charts::init')
</script>

View File

@@ -0,0 +1,3 @@
<div id="{{ $chart->id }}">
</div>
@include('charts::loader')

View File

@@ -0,0 +1,44 @@
<script {!! $chart->displayScriptAttributes() !!}>
function {{ $chart->id }}_getType(data) {
var special_datasets = {!! json_encode($chart->special_datasets) !!};
for (var i = 0; i < special_datasets.length; i++) {
for (var k = 0; k < data.length; k++) {
if (special_datasets[i] == data[k].chartType) {
return special_datasets[i];
}
}
}
return 'axis-mixed';
}
function {{ $chart->id }}_create(data) {
{{ $chart->id }}_rendered = true;
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
window.{{ $chart->id }} = new frappe.Chart("#{{ $chart->id }}", {
{!! $chart->formatContainerOptions('js') !!}
labels: {!! $chart->formatLabels() !!},
type: {{ $chart->id }}_getType(data),
data: {
labels: {!! $chart->formatLabels() !!},
datasets: data
},
{!! $chart->formatOptions(false, true) !!}
});
}
@if ($chart->api_url)
let {{ $chart->id }}_refresh = function (url) {
document.getElementById("{{ $chart->id }}").style.display = 'none';
document.getElementById("{{ $chart->id }}_loader").style.display = 'flex';
if (typeof url !== 'undefined') {
{{ $chart->id }}_api_url = url;
}
fetch({{ $chart->id }}_api_url)
.then(data => data.json())
.then(data => {
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
{{ $chart->id }}.update({labels: {!! $chart->formatLabels() !!}, datasets: data});
});
};
@endif
@include('charts::init')
</script>

View File

@@ -0,0 +1,3 @@
<div id="{{ $chart->id }}" {!! $chart->formatContainerOptions('css') !!}>
</div>
@include('charts::loader')

View File

@@ -0,0 +1,48 @@
<script {!! $chart->displayScriptAttributes() !!}>
function {{ $chart->id }}_create(data) {
{{ $chart->id }}_rendered = true;
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
@if ($chart->type)
let {{ $chart->id }}_type = {{ $chart->type }}
@else
let {{ $chart->id }}_type = data[0].renderAs;
@endif
if (!{!! json_encode($chart->keepType) !!}.includes({{ $chart->id }}_type)) {
{{ $chart->id }}_type = "{{ $chart->comboType }}"
}
FusionCharts.ready(function () {
window.{{ $chart->id }} = new FusionCharts({
type: {{ $chart->id }}_type,
renderAt: "{{ $chart->id }}",
dataFormat: 'json',
{!! $chart->formatContainerOptions('js', true) !!}
dataSource: {
categories: [{
category: {!! $chart->formatLabels() !!}
}],
dataset: data,
chart: {!! $chart->formatOptions(true) !!}
}
}).render();
});
}
@if ($chart->api_url)
let {{ $chart->id }}_refresh = function (url) {
document.getElementById("{{ $chart->id }}").style.display = 'none';
document.getElementById("{{ $chart->id }}_loader").style.display = 'flex';
if (typeof url !== 'undefined') {
{{ $chart->id }}_api_url = url;
}
fetch({{ $chart->id }}_api_url)
.then(data => data.json())
.then(data => {
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
let chartData = {{ $chart->id }}.getChartData("json");
chartData.dataset = data;
{{ $chart->id }}.setChartData(chartData, "json");
});
};
@endif
@include('charts::init')
</script>

View File

@@ -0,0 +1,3 @@
<div id="{{ $chart->id }}" {!! $chart->formatContainerOptions('css') !!}>
</div>
@include('charts::loader')

View File

@@ -0,0 +1,27 @@
<script {!! $chart->displayScriptAttributes() !!}>
function {{ $chart->id }}_create(data) {
{{ $chart->id }}_rendered = true;
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
window.{{ $chart->id }} = new Highcharts.Chart("{{ $chart->id }}", {
series: data,
{!! $chart->formatOptions(false, true) !!}
});
}
@if ($chart->api_url)
let {{ $chart->id }}_refresh = function (url) {
document.getElementById("{{ $chart->id }}").style.display = 'none';
document.getElementById("{{ $chart->id }}_loader").style.display = 'flex';
if (typeof url !== 'undefined') {
{{ $chart->id }}_api_url = url;
}
fetch({{ $chart->id }}_api_url)
.then(data => data.json())
.then(data => {
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
{{ $chart->id }}.update({series: data});
});
};
@endif
@include('charts::init')
</script>

View File

@@ -0,0 +1,17 @@
let {{ $chart->id }}_rendered = false;
@if ($chart->api_url)
let {{ $chart->id }}_api_url = "{!! $chart->api_url !!}";
@endif
let {{ $chart->id }}_load = function () {
if (document.getElementById("{{ $chart->id }}") && !{{ $chart->id }}_rendered) {
@if ($chart->api_url)
fetch({{ $chart->id }}_api_url)
.then(data => data.json())
.then(data => { {{ $chart->id }}_create(data) });
@else
{{ $chart->id }}_create({!! $chart->formatDatasets() !!})
@endif
}
};
window.addEventListener("load", {{ $chart->id }}_load);
document.addEventListener("turbolinks:load", {{ $chart->id }}_load);

View File

@@ -0,0 +1,40 @@
<div id="{{ $chart->id }}_loader" style="
display: flex;
justify-content: center;
opacity: {{ $chart->loader ? '1' : '0' }};
align-items: center;
{{ $chart->height ? 'height: ' . $chart->height . 'px;' : '' }}
{{ $chart->width ? 'width: ' . $chart->width . 'px;' : '' }}
">
<svg width="50" height="50" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient x1="8.042%" y1="0%" x2="65.682%" y2="23.865%" id="a">
<stop stop-color="{{ $chart->loaderColor }}" stop-opacity="0" offset="0%"/>
<stop stop-color="{{ $chart->loaderColor }}" stop-opacity=".631" offset="63.146%"/>
<stop stop-color="{{ $chart->loaderColor }}" offset="100%"/>
</linearGradient>
</defs>
<g fill="none" fill-rule="evenodd">
<g transform="translate(1 1)">
<path d="M36 18c0-9.94-8.06-18-18-18" id="Oval-2" stroke="url(#a)" stroke-width="2">
<animateTransform
attributeName="transform"
type="rotate"
from="0 18 18"
to="360 18 18"
dur="0.9s"
repeatCount="indefinite" />
</path>
<circle fill="{{ $chart->loaderColor }}" cx="36" cy="18" r="1">
<animateTransform
attributeName="transform"
type="rotate"
from="0 18 18"
to="360 18 18"
dur="0.9s"
repeatCount="indefinite" />
</circle>
</g>
</g>
</svg>
</div>

View File

@@ -0,0 +1 @@
{{ $slot }}: {{ $url }}

View File

@@ -0,0 +1 @@
{{ $slot }}

View File

@@ -0,0 +1 @@
[{{ $slot }}]({{ $url }})

View File

@@ -0,0 +1,9 @@
{!! strip_tags($header) !!}
{!! strip_tags($slot) !!}
@isset($subcopy)
{!! strip_tags($subcopy) !!}
@endisset
{!! strip_tags($footer) !!}

View File

@@ -0,0 +1,27 @@
@component('mail::layout')
{{-- Header --}}
@slot('header')
@component('mail::header', ['url' => config('app.url')])
{{ config('app.name') }}
@endcomponent
@endslot
{{-- Body --}}
{{ $slot }}
{{-- Subcopy --}}
@isset($subcopy)
@slot('subcopy')
@component('mail::subcopy')
{{ $subcopy }}
@endcomponent
@endslot
@endisset
{{-- Footer --}}
@slot('footer')
@component('mail::footer')
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
@endcomponent
@endslot
@endcomponent

View File

@@ -0,0 +1 @@
{{ $slot }}

View File

@@ -0,0 +1 @@
{{ $slot }}

View File

@@ -0,0 +1 @@
[{{ $slot }}]({{ $url }})

View File

@@ -0,0 +1 @@
{{ $slot }}

View File

@@ -0,0 +1 @@
{{ $slot }}

View File

@@ -20,7 +20,6 @@ return array(
'App\\Console\\Commands\\UpdateMoonRental' => $baseDir . '/app/Console/Commands/Moons/UpdateMoonRental.php',
'App\\Console\\Kernel' => $baseDir . '/app/Console/Kernel.php',
'App\\Exceptions\\Handler' => $baseDir . '/app/Exceptions/Handler.php',
'App\\Http\\Controllers\\Ajax\\LiveSearch' => $baseDir . '/app/Http/Controllers/Ajax/LiveSearch.php',
'App\\Http\\Controllers\\Auth\\EsiScopeController' => $baseDir . '/app/Http/Controllers/Auth/EsiScopeController.php',
'App\\Http\\Controllers\\Auth\\LoginController' => $baseDir . '/app/Http/Controllers/Auth/LoginController.php',
'App\\Http\\Controllers\\Blacklist\\BlacklistController' => $baseDir . '/app/Http/Controllers/Blacklist/BlacklistController.php',
@@ -74,6 +73,7 @@ return array(
'App\\Library\\SRP\\SRPHelper' => $baseDir . '/app/Library/SRP/SRPHelper.php',
'App\\Library\\Structures\\StructureHelper' => $baseDir . '/app/Library/Structures/StructureHelper.php',
'App\\Library\\Taxes\\TaxesHelper' => $baseDir . '/app/Library/Taxes/TaxesHelper.php',
'App\\Library\\Wiki\\WikiHelper' => $baseDir . '/app/Library/Wiki/WikiHelper.php',
'App\\Models\\Admin\\AllowedLogin' => $baseDir . '/app/Models/Admin/AllowedLogin.php',
'App\\Models\\Blacklist\\BlacklistUser' => $baseDir . '/app/Models/Blacklist/BlacklistUser.php',
'App\\Models\\Config' => $baseDir . '/app/Models/Moon/Config.php',

View File

@@ -484,7 +484,6 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
'App\\Console\\Commands\\UpdateMoonRental' => __DIR__ . '/../..' . '/app/Console/Commands/Moons/UpdateMoonRental.php',
'App\\Console\\Kernel' => __DIR__ . '/../..' . '/app/Console/Kernel.php',
'App\\Exceptions\\Handler' => __DIR__ . '/../..' . '/app/Exceptions/Handler.php',
'App\\Http\\Controllers\\Ajax\\LiveSearch' => __DIR__ . '/../..' . '/app/Http/Controllers/Ajax/LiveSearch.php',
'App\\Http\\Controllers\\Auth\\EsiScopeController' => __DIR__ . '/../..' . '/app/Http/Controllers/Auth/EsiScopeController.php',
'App\\Http\\Controllers\\Auth\\LoginController' => __DIR__ . '/../..' . '/app/Http/Controllers/Auth/LoginController.php',
'App\\Http\\Controllers\\Blacklist\\BlacklistController' => __DIR__ . '/../..' . '/app/Http/Controllers/Blacklist/BlacklistController.php',
@@ -538,6 +537,7 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
'App\\Library\\SRP\\SRPHelper' => __DIR__ . '/../..' . '/app/Library/SRP/SRPHelper.php',
'App\\Library\\Structures\\StructureHelper' => __DIR__ . '/../..' . '/app/Library/Structures/StructureHelper.php',
'App\\Library\\Taxes\\TaxesHelper' => __DIR__ . '/../..' . '/app/Library/Taxes/TaxesHelper.php',
'App\\Library\\Wiki\\WikiHelper' => __DIR__ . '/../..' . '/app/Library/Wiki/WikiHelper.php',
'App\\Models\\Admin\\AllowedLogin' => __DIR__ . '/../..' . '/app/Models/Admin/AllowedLogin.php',
'App\\Models\\Blacklist\\BlacklistUser' => __DIR__ . '/../..' . '/app/Models/Blacklist/BlacklistUser.php',
'App\\Models\\Config' => __DIR__ . '/../..' . '/app/Models/Moon/Config.php',

View File

@@ -777,17 +777,17 @@
},
{
"name": "fzaninotto/faker",
"version": "v1.9.0",
"version_normalized": "1.9.0.0",
"version": "v1.9.1",
"version_normalized": "1.9.1.0",
"source": {
"type": "git",
"url": "https://github.com/fzaninotto/Faker.git",
"reference": "27a216cbe72327b2d6369fab721a5843be71e57d"
"reference": "fc10d778e4b84d5bd315dad194661e091d307c6f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/27a216cbe72327b2d6369fab721a5843be71e57d",
"reference": "27a216cbe72327b2d6369fab721a5843be71e57d",
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fc10d778e4b84d5bd315dad194661e091d307c6f",
"reference": "fc10d778e4b84d5bd315dad194661e091d307c6f",
"shasum": ""
},
"require": {
@@ -798,10 +798,12 @@
"phpunit/phpunit": "^4.8.35 || ^5.7",
"squizlabs/php_codesniffer": "^2.9.2"
},
"time": "2019-11-14T13:13:06+00:00",
"time": "2019-12-12T13:22:17+00:00",
"type": "library",
"extra": {
"branch-alias": []
"branch-alias": {
"dev-master": "1.9-dev"
}
},
"installation-source": "dist",
"autoload": {
@@ -1382,17 +1384,17 @@
},
{
"name": "laravel/horizon",
"version": "v3.4.3",
"version_normalized": "3.4.3.0",
"version": "v3.4.4",
"version_normalized": "3.4.4.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/horizon.git",
"reference": "37226dd66318014fac20351b4cc7ca209dd4ccb6"
"reference": "7c36d24b200b60a059ab20f5b53f5bb6f4d2da40"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/horizon/zipball/37226dd66318014fac20351b4cc7ca209dd4ccb6",
"reference": "37226dd66318014fac20351b4cc7ca209dd4ccb6",
"url": "https://api.github.com/repos/laravel/horizon/zipball/7c36d24b200b60a059ab20f5b53f5bb6f4d2da40",
"reference": "7c36d24b200b60a059ab20f5b53f5bb6f4d2da40",
"shasum": ""
},
"require": {
@@ -1400,9 +1402,9 @@
"ext-json": "*",
"ext-pcntl": "*",
"ext-posix": "*",
"illuminate/contracts": "~5.7.0|~5.8.0|^6.0|^7.0",
"illuminate/queue": "~5.7.0|~5.8.0|^6.0|^7.0",
"illuminate/support": "~5.7.0|~5.8.0|^6.0|^7.0",
"illuminate/contracts": "~5.7.0|~5.8.0|^6.0",
"illuminate/queue": "~5.7.0|~5.8.0|^6.0",
"illuminate/support": "~5.7.0|~5.8.0|^6.0",
"php": ">=7.1.0",
"predis/predis": "^1.1",
"ramsey/uuid": "^3.5",
@@ -1411,10 +1413,10 @@
},
"require-dev": {
"mockery/mockery": "^1.0",
"orchestra/testbench": "^3.7|^4.0|^5.0",
"orchestra/testbench": "^3.7|^4.0",
"phpunit/phpunit": "^7.0|^8.0"
},
"time": "2019-11-19T16:23:21+00:00",
"time": "2019-12-10T16:50:59+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -2566,30 +2568,31 @@
},
{
"name": "phpoption/phpoption",
"version": "1.6.0",
"version_normalized": "1.6.0.0",
"version": "1.7.1",
"version_normalized": "1.7.1.0",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/php-option.git",
"reference": "f4e7a6a1382183412246f0d361078c29fb85089e"
"reference": "100a25207566930efd926cf205542946aa692e01"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/schmittjoh/php-option/zipball/f4e7a6a1382183412246f0d361078c29fb85089e",
"reference": "f4e7a6a1382183412246f0d361078c29fb85089e",
"url": "https://api.github.com/repos/schmittjoh/php-option/zipball/100a25207566930efd926cf205542946aa692e01",
"reference": "100a25207566930efd926cf205542946aa692e01",
"shasum": ""
},
"require": {
"php": "^5.5.9 || ^7.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.3",
"phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0"
},
"time": "2019-11-30T20:20:49+00:00",
"time": "2019-12-14T13:46:39+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.6-dev"
"dev-master": "1.7-dev"
}
},
"installation-source": "dist",

View File

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# The problem is that we do not want to remove the configuration file, just disable it for a few tasks, then enable it
#
# For reference, see
#
# - https://docs.travis-ci.com/user/languages/php#Disabling-preinstalled-PHP-extensions
# - https://docs.travis-ci.com/user/languages/php#Custom-PHP-configuration
config="/home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini"
function xdebug-disable() {
if [[ -f $config ]]; then
mv $config "$config.bak"
fi
}
function xdebug-enable() {
if [[ -f "$config.bak" ]]; then
mv "$config.bak" $config
fi
}

View File

@@ -1,5 +1,15 @@
# CHANGELOG
## 2019-12-03, v1.9.1
- Add link to PHPStan extension to readme [\#1834](https://github.com/fzaninotto/Faker/pull/1834) ([finwe](https://github.com/finwe))
- Enhancement: Collect code coverage [\#1824](https://github.com/fzaninotto/Faker/pull/1824) ([localheinz](https://github.com/localheinz))
- Enhancement: Use all columns when running tests [\#1823](https://github.com/fzaninotto/Faker/pull/1823) ([localheinz](https://github.com/localheinz))
- Enhancement: Configure verbose output via phpunit.xml.dist [\#1822](https://github.com/fzaninotto/Faker/pull/1822) ([localheinz](https://github.com/localheinz))
- Curly braces for arrays is deprecated in PHP 7.4 [\#1843](https://github.com/fzaninotto/Faker/pull/1843) ([wimg](https://github.com/wimg))
- Fix: Reduce visibility of setUp\(\) and tearDown\(\) [\#1821](https://github.com/fzaninotto/Faker/pull/1821) ([localheinz](https://github.com/localheinz))
- Fix: Mark test classes as final [\#1820](https://github.com/fzaninotto/Faker/pull/1820) ([localheinz](https://github.com/localheinz))
- Fix: Remove unnecessary class-level DocBlocks [\#1819](https://github.com/fzaninotto/Faker/pull/1819) ([localheinz](https://github.com/localheinz))
## 2019-11-10, v1.9.0

View File

@@ -33,7 +33,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.9"
"dev-master": "1.9-dev"
}
},
"config": {

View File

@@ -1,5 +1,7 @@
# Faker
[![Code Coverage](https://codecov.io/gh/fzaninotto/Faker/branch/master/graph/badge.svg)](https://codecov.io/gh/fzaninotto/Faker)
Faker is a PHP library that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you.
Faker is heavily inspired by Perl's [Data::Faker](http://search.cpan.org/~jasonk/Data-Faker-0.07/), and by ruby's [Faker](https://rubygems.org/gems/faker).
@@ -53,7 +55,7 @@ composer require fzaninotto/faker
### Autoloading
Faker supports both `PSR-0` as `PSR-4` autoloaders.
Faker supports both `PSR-0` as `PSR-4` autoloaders.
```php
<?php
# When installed via composer
@@ -1789,6 +1791,7 @@ echo $faker->VAT; //23456789
* [`drupol/belgian-national-number-faker`](https://github.com/drupol/belgian-national-number-faker): Generate fake Belgian national numbers
* [`elgentos/masquerade`](https://github.com/elgentos/masquerade): Configuration-based, platform-agnostic, locale-compatible data faker tool (out-of-the-box support for Magento 2)
* [`ottaviano/faker-gravatar`](https://github.com/ottaviano/faker-gravatar): Generate avatars using [Gravatar](https://en.gravatar.com/site/implement/images/)
* [`finwe/phpstan-faker`](https://github.com/finwe/phpstan-faker): PHPStan extension for Faker methods
## License

View File

@@ -24,10 +24,10 @@ class Luhn
$length = strlen($number);
$sum = 0;
for ($i = $length - 1; $i >= 0; $i -= 2) {
$sum += $number{$i};
$sum += $number[$i];
}
for ($i = $length - 2; $i >= 0; $i -= 2) {
$sum += array_sum(str_split($number{$i} * 2));
$sum += array_sum(str_split($number[$i] * 2));
}
return $sum % 10;

View File

@@ -1,7 +1,5 @@
<?php
// data source
namespace Faker\Provider\en_NG;
class Person extends \Faker\Provider\Person

View File

@@ -15,9 +15,9 @@
"ext-pcntl": "*",
"ext-posix": "*",
"cakephp/chronos": "^1.0",
"illuminate/contracts": "~5.7.0|~5.8.0|^6.0|^7.0",
"illuminate/queue": "~5.7.0|~5.8.0|^6.0|^7.0",
"illuminate/support": "~5.7.0|~5.8.0|^6.0|^7.0",
"illuminate/contracts": "~5.7.0|~5.8.0|^6.0",
"illuminate/queue": "~5.7.0|~5.8.0|^6.0",
"illuminate/support": "~5.7.0|~5.8.0|^6.0",
"predis/predis": "^1.1",
"ramsey/uuid": "^3.5",
"symfony/process": "^4.2",
@@ -25,7 +25,7 @@
},
"require-dev": {
"mockery/mockery": "^1.0",
"orchestra/testbench": "^3.7|^4.0|^5.0",
"orchestra/testbench": "^3.7|^4.0",
"phpunit/phpunit": "^7.0|^8.0"
},
"autoload": {

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
{
"/app.js": "/app.js?id=f41217b645f8cd9ffacc",
"/app.js": "/app.js?id=dbc6b1d1957be6dae833",
"/app.css": "/app.css?id=b95d548aba488172f4b4",
"/app-dark.css": "/app-dark.css?id=b5b064c2f5a4b673a1c5"
}

View File

@@ -108,7 +108,8 @@
* @returns {string}
*/
prettyPrintJob(data) {
return data.command ? phpunserialize(data.command) : data;
return data.command && !data.command.includes('CallQueuedClosure')
? phpunserialize(data.command) : data;
}
}
}

View File

@@ -79,7 +79,10 @@ class AutoScaler
return $pools->mapWithKeys(function ($pool, $queue) use ($supervisor) {
$size = $this->queue->connection($supervisor->options->connection)->readyNow($queue);
return [$queue => ($size * $this->metrics->runtimeForQueue($queue))];
return [$queue => [
'size' => $size,
'time' => ($size * $this->metrics->runtimeForQueue($queue)),
]];
});
}
@@ -87,20 +90,24 @@ class AutoScaler
* Get the number of workers needed per queue for proper balance.
*
* @param \Laravel\Horizon\Supervisor $supervisor
* @param \Illuminate\Support\Collection $timeToClear
* @param \Illuminate\Support\Collection $queues
* @return \Illuminate\Support\Collection
*/
protected function numberOfWorkersPerQueue(Supervisor $supervisor, Collection $timeToClear)
protected function numberOfWorkersPerQueue(Supervisor $supervisor, Collection $queues)
{
$timeToClearAll = $timeToClear->sum();
$timeToClearAll = $queues->sum('time');
return $timeToClear->mapWithKeys(function ($timeToClear, $queue) use ($supervisor, $timeToClearAll) {
return $queues->mapWithKeys(function ($timeToClear, $queue) use ($supervisor, $timeToClearAll) {
if ($timeToClearAll > 0 &&
$supervisor->options->autoScaling()) {
return [$queue => (($timeToClear / $timeToClearAll) * $supervisor->options->maxProcesses)];
return [$queue => (($timeToClear['time'] / $timeToClearAll) * $supervisor->options->maxProcesses)];
} elseif ($timeToClearAll == 0 &&
$supervisor->options->autoScaling()) {
return [$queue => $supervisor->options->minProcesses];
return [
$queue => $timeToClear['size']
? $supervisor->options->maxProcesses
: $supervisor->options->minProcesses,
];
}
return [$queue => $supervisor->options->maxProcesses / count($supervisor->processPools)];

View File

@@ -259,18 +259,16 @@ class RedisJobRepository implements JobRepository
$time = str_replace(',', '.', microtime(true));
$pipe->hmset(
$payload->id(), [
'id' => $payload->id(),
'connection' => $connection,
'queue' => $queue,
'name' => $payload->decoded['displayName'],
'status' => 'pending',
'payload' => $payload->value,
'created_at' => $time,
'updated_at' => $time,
]
);
$pipe->hmset($payload->id(), [
'id' => $payload->id(),
'connection' => $connection,
'queue' => $queue,
'name' => $payload->decoded['displayName'],
'status' => 'pending',
'payload' => $payload->value,
'created_at' => $time,
'updated_at' => $time,
]);
$pipe->expireat(
$payload->id(), Chronos::now()->addMinutes($this->recentJobExpires)->getTimestamp()

View File

@@ -17,16 +17,22 @@
"php": "^5.5.9 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0"
"phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0",
"bamarni/composer-bin-plugin": "^1.3"
},
"autoload": {
"psr-4": {
"PhpOption\\": "src/PhpOption/"
}
},
"autoload-dev": {
"psr-4": {
"PhpOption\\Tests\\": "tests/PhpOption/Tests/"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.6-dev"
"dev-master": "1.7-dev"
}
}
}

View File

@@ -18,6 +18,11 @@
namespace PhpOption;
/**
* @template T
*
* @extends Option<T>
*/
final class LazyOption extends Option
{
/** @var callable */
@@ -26,14 +31,16 @@ final class LazyOption extends Option
/** @var array */
private $arguments;
/** @var Option|null */
/** @var Option<T>|null */
private $option;
/**
* @template S
*
* @param callable $callback
* @param array $arguments
*
* @return LazyOption
* @return LazyOption<S>
*/
public static function create($callback, array $arguments = [])
{
@@ -89,9 +96,6 @@ final class LazyOption extends Option
return $this->option()->orElse($else);
}
/**
* @deprecated Use forAll() instead.
*/
public function ifDefined($callable)
{
$this->option()->ifDefined($callable);
@@ -148,7 +152,7 @@ final class LazyOption extends Option
}
/**
* @return Option
* @return Option<T>
*/
private function option()
{

View File

@@ -20,10 +20,19 @@ namespace PhpOption;
use EmptyIterator;
/**
* @template T
*
* @extends Option<T>
*/
final class None extends Option
{
/** @var None<T> */
private static $instance;
/**
* @return None<T>
*/
public static function create()
{
if (null === self::$instance) {
@@ -68,9 +77,6 @@ final class None extends Option
return $else;
}
/**
* @deprecated Use forAll() instead.
*/
public function ifDefined($callable)
{
// Just do nothing in that case.

View File

@@ -18,12 +18,13 @@
namespace PhpOption;
use ArrayAccess;
use IteratorAggregate;
/**
* Base Option Class.
* @template T
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
* @implements IteratorAggregate<T>
*/
abstract class Option implements IteratorAggregate
{
@@ -34,11 +35,13 @@ abstract class Option implements IteratorAggregate
* convert them to an option. By default, we treat ``null`` as the None
* case, and everything else as Some.
*
* @param mixed $value The actual return value.
* @param mixed $noneValue The value which should be considered "None";
* null by default.
* @template S
*
* @return Option
* @param S $value The actual return value.
* @param S $noneValue The value which should be considered "None"; null by
* default.
*
* @return Option<S>
*/
public static function fromValue($value, $noneValue = null)
{
@@ -56,14 +59,16 @@ abstract class Option implements IteratorAggregate
* array, or the array's value at the given key is null, None is returned.
* Otherwise, Some is returned wrapping the value at the given key.
*
* @param mixed $array A potential array value.
* @param string $key The key to check.
* @template S
*
* @return Option
* @param array<string,S>|ArrayAccess<string,S>|null $array A potential array or \ArrayAccess value.
* @param string $key The key to check.
*
* @return Option<S>
*/
public static function fromArraysValue($array, $key)
{
if (!is_array($array) || !isset($array[$key])) {
if (!(is_array($array) || $array instanceof ArrayAccess) || !isset($array[$key])) {
return None::create();
}
@@ -77,12 +82,14 @@ abstract class Option implements IteratorAggregate
* the return value is not yet an option. By default, we treat ``null`` as
* None case, and everything else as Some.
*
* @template S
*
* @param callable $callback The callback to evaluate.
* @param array $arguments The arguments for the callback.
* @param mixed $noneValue The value which should be considered "None"; null
* by default.
* @param S $noneValue The value which should be considered "None";
* null by default.
*
* @return Option
* @return LazyOption<S>
*/
public static function fromReturn($callback, array $arguments = [], $noneValue = null)
{
@@ -105,11 +112,13 @@ abstract class Option implements IteratorAggregate
* returned from callback, it returns directly. On other case value passed
* to Option::fromValue() method.
*
* @param Option|callable|mixed $value
* @param mixed $noneValue Used when $value is mixed or
* callable, for None-check.
* @template S
*
* @return Option
* @param Option<S>|callable|S $value
* @param S $noneValue Used when $value is mixed or
* callable, for None-check.
*
* @return Option<S>|LazyOption<S>
*/
public static function ensure($value, $noneValue = null)
{
@@ -139,6 +148,8 @@ abstract class Option implements IteratorAggregate
* original callback and return the value inside a new Option, unless an
* Option is returned from the function, in which case, we use that.
*
* @template S
*
* @param callable $callback
* @param mixed $noneValue
*
@@ -171,16 +182,18 @@ abstract class Option implements IteratorAggregate
*
* @throws \RuntimeException If value is not available.
*
* @return mixed
* @return T
*/
abstract public function get();
/**
* Returns the value if available, or the default value if not.
*
* @param mixed $default
* @template S
*
* @return mixed
* @param S $default
*
* @return T|S
*/
abstract public function getOrElse($default);
@@ -190,9 +203,11 @@ abstract class Option implements IteratorAggregate
* This is preferable over ``getOrElse`` if the computation of the default
* value is expensive.
*
* @param callable $callable
* @template S
*
* @return mixed
* @param callable(): S $callable
*
* @return T|S
*/
abstract public function getOrCall($callable);
@@ -201,7 +216,7 @@ abstract class Option implements IteratorAggregate
*
* @param \Exception $ex
*
* @return mixed
* @return T
*/
abstract public function getOrThrow(\Exception $ex);
@@ -231,9 +246,9 @@ abstract class Option implements IteratorAggregate
* ->orElse(new LazyOption(array($repo, 'createSomething')));
* ```
*
* @param Option $else
* @param Option<T> $else
*
* @return Option
* @return Option<T>
*/
abstract public function orElse(self $else);
@@ -268,9 +283,9 @@ abstract class Option implements IteratorAggregate
* option is empty. This method is preferred for callables with side-effects, while map()
* is intended for callables without side-effects.
*
* @param callable $callable
* @param callable(T): void $callable
*
* @return Option
* @return Option<T>
*/
abstract public function forAll($callable);
@@ -284,9 +299,11 @@ abstract class Option implements IteratorAggregate
* (new Some("foo"))->map('strtoupper')->get(); // "FOO"
* ```
*
* @param callable $callable
* @template S
*
* @return Option
* @param callable(T): S $callable
*
* @return Option<S>
*/
abstract public function map($callable);
@@ -297,9 +314,11 @@ abstract class Option implements IteratorAggregate
* In contrast to ``map``, the return value of the callable is expected to
* be an Option itself; it is not automatically wrapped in Some().
*
* @param callable $callable must return an Option
* @template S
*
* @return Option
* @param callable(T): Option<S> $callable must return an Option
*
* @return Option<S>
*/
abstract public function flatMap($callable);
@@ -309,9 +328,9 @@ abstract class Option implements IteratorAggregate
* If the option is non-empty, the callable is applied, and if it returns true,
* the option itself is returned; otherwise, None is returned.
*
* @param callable $callable
* @param callable(T): bool $callable
*
* @return Option
* @return Option<T>
*/
abstract public function filter($callable);
@@ -321,9 +340,9 @@ abstract class Option implements IteratorAggregate
* If the option is non-empty, the callable is applied, and if it returns false,
* the option itself is returned; otherwise, None is returned.
*
* @param callable $callable
* @param callable(T): bool $callable
*
* @return Option
* @return Option<T>
*/
abstract public function filterNot($callable);
@@ -336,9 +355,9 @@ abstract class Option implements IteratorAggregate
*
* In other words, this will filter all but the passed value.
*
* @param mixed $value
* @param T $value
*
* @return Option
* @return Option<T>
*/
abstract public function select($value);
@@ -351,9 +370,9 @@ abstract class Option implements IteratorAggregate
*
* In other words, this will let all values through except the passed value.
*
* @param mixed $value
* @param T $value
*
* @return Option
* @return Option<T>
*/
abstract public function reject($value);
@@ -378,20 +397,24 @@ abstract class Option implements IteratorAggregate
* }
* ```
*
* @param mixed $initialValue
* @template S
*
* @param S $initialValue
* @param callable $callable function(initialValue, callable): result
*
* @return mixed
* @return S
*/
abstract public function foldLeft($initialValue, $callable);
/**
* foldLeft() but with reversed arguments for the callable.
*
* @param mixed $initialValue
* @template S
*
* @param S $initialValue
* @param callable $callable function(callable, initialValue): result
*
* @return mixed
* @return S
*/
abstract public function foldRight($initialValue, $callable);
}

View File

@@ -20,15 +20,29 @@ namespace PhpOption;
use ArrayIterator;
/**
* @template T
*
* @extends Option<T>
*/
final class Some extends Option
{
/** @var T */
private $value;
/**
* @param T $value
*/
public function __construct($value)
{
$this->value = $value;
}
/**
* @param T $value
*
* @return Some<T>
*/
public static function create($value)
{
return new self($value);
@@ -69,9 +83,6 @@ final class Some extends Option
return $this;
}
/**
* @deprecated Use forAll() instead.
*/
public function ifDefined($callable)
{
$callable($this->value);