Commit 00e612b7 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Updated to Laravel 5.8

parent bff880f5
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
namespace App\Jobs; namespace App\Jobs;
use Carbon;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Foundation\Bus\Dispatchable;
...@@ -42,7 +41,6 @@ class ConvertCountFile implements ShouldQueue ...@@ -42,7 +41,6 @@ class ConvertCountFile implements ShouldQueue
$error = false; $error = false;
try { try {
$fh = fopen($this->files["logFile"], "r"); $fh = fopen($this->files["logFile"], "r");
$currentLogTime = Carbon::now()->hour(0)->minute(0)->second(0)->addMinutes(5);
while ($fh !== false && ($line = fgets($fh)) !== false) { while ($fh !== false && ($line = fgets($fh)) !== false) {
$logTime = []; $logTime = [];
$interface = ""; $interface = "";
...@@ -57,22 +55,22 @@ class ConvertCountFile implements ShouldQueue ...@@ -57,22 +55,22 @@ class ConvertCountFile implements ShouldQueue
$thatTime = \DateTime::createFromFormat('H:i:s', $logTime); $thatTime = \DateTime::createFromFormat('H:i:s', $logTime);
$thatTime->sub(new \DateInterval("PT" . ($thatTime->format('i') % 5) . "M")); $thatTime->sub(new \DateInterval("PT" . ($thatTime->format('i') % 5) . "M"));
if(empty($result["time"][$thatTime->format('H:i')])){ if (empty($result["time"][$thatTime->format('H:i')])) {
$result["time"][$thatTime->format('H:i')] = [ $result["time"][$thatTime->format('H:i')] = [
"insgesamt" => [ "insgesamt" => [
"all" => 0, "all" => 0,
], ],
]; ];
} }
if(empty($result["time"][$thatTime->format('H:i')]["all"])){ if (empty($result["time"][$thatTime->format('H:i')]["all"])) {
$result["time"][$thatTime->format('H:i')]["all"] = 1; $result["time"][$thatTime->format('H:i')]["all"] = 1;
}else{ } else {
$result["time"][$thatTime->format('H:i')]["all"]++; $result["time"][$thatTime->format('H:i')]["all"]++;
} }
if (!empty($interface)) { if (!empty($interface)) {
if(empty($result["time"][$thatTime->format('H:i')][$interface])){ if (empty($result["time"][$thatTime->format('H:i')][$interface])) {
$result["time"][$thatTime->format('H:i')][$interface] = 1; $result["time"][$thatTime->format('H:i')][$interface] = 1;
}else{ } else {
$result["time"][$thatTime->format('H:i')][$interface]++; $result["time"][$thatTime->format('H:i')][$interface]++;
} }
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace App\Mail; namespace App\Mail;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable; use Illuminate\Contracts\Mail\Mailable;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
class Kontakt extends Mailable class Kontakt extends Mailable
...@@ -18,7 +18,7 @@ class Kontakt extends Mailable ...@@ -18,7 +18,7 @@ class Kontakt extends Mailable
public function __construct($name, $from, $subject, $message) public function __construct($name, $from, $subject, $message)
{ {
$this->name = $name; $this->name = $name;
$this->reply = $from; $this->reply = $from;
$this->subject = $subject; $this->subject = $subject;
$this->message = $message; $this->message = $message;
} }
......
...@@ -12,7 +12,7 @@ class Quicktips ...@@ -12,7 +12,7 @@ class Quicktips
private $quicktipUrl = "/1.1/quicktips.xml"; private $quicktipUrl = "/1.1/quicktips.xml";
private $results = []; private $results = [];
const QUICKTIP_NAME = "quicktips"; const QUICKTIP_NAME = "quicktips";
const CACHE_DURATION = 60; const CACHE_DURATION = 60 * 60;
private $hash; private $hash;
......
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
], ],
"license": "MIT", "license": "MIT",
"require": { "require": {
"laravel/framework": "5.8.*",
"php": "^7.1.3", "php": "^7.1.3",
"facebook/webdriver": "^1.6",
"fideloper/proxy": "^4.0", "fideloper/proxy": "^4.0",
"laravel/tinker": "^1.0",
"facebook/webdriver": "^1.6",
"globalcitizen/php-iban": "^2.6", "globalcitizen/php-iban": "^2.6",
"jenssegers/agent": "^2.6", "jenssegers/agent": "^2.6",
"laravel/framework": "5.7.*",
"laravel/tinker": "^1.0",
"mcamara/laravel-localization": "^1.3", "mcamara/laravel-localization": "^1.3",
"mews/captcha": "^2.2", "mews/captcha": "^2.2",
"monospice/laravel-redis-sentinel-drivers": "^2.6", "monospice/laravel-redis-sentinel-drivers": "^2.6",
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
"filp/whoops": "^2.0", "filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4", "fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0", "mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0", "nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^7.0" "phpunit/phpunit": "^7.5"
}, },
"config": { "config": {
"optimize-autoloader": true, "optimize-autoloader": true,
...@@ -68,4 +68,4 @@ ...@@ -68,4 +68,4 @@
"@php artisan key:generate --ansi" "@php artisan key:generate --ansi"
] ]
} }
} }
\ No newline at end of file
...@@ -2088,7 +2088,7 @@ ...@@ -2088,7 +2088,7 @@
"cross-spawn": { "cross-spawn": {
"version": "6.0.5", "version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=",
"dev": true, "dev": true,
"requires": { "requires": {
"nice-try": "^1.0.4", "nice-try": "^1.0.4",
...@@ -5758,7 +5758,7 @@ ...@@ -5758,7 +5758,7 @@
"nice-try": { "nice-try": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "integrity": "sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y=",
"dev": true "dev": true
}, },
"no-case": { "no-case": {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment