Skip to content

Commit a46820e

Browse files
author
Toby Allen
committed
use str::of instead of str()
1 parent 6c745ce commit a46820e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Console/CheckSQLGrammerDate.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
use Illuminate\Console\Command;
7-
7+
use Illuminate\Support\Str;
88
/**
99
* There is an international date format Y-m-d that is supposed to be universal, however the MSSQL implementation is flawed
1010
* and is not universal and incorrect interprets it as Y-d-m which is beyond idiotic.
@@ -65,17 +65,17 @@ public function handle()
6565
{
6666
$filetocheck = base_path('vendor\laravel\framework\src\Illuminate\Database\Query\Grammars\SqlServerGrammar.php');
6767
if (file_exists($filetocheck)){
68-
$file_txt = Str(file_get_contents($filetocheck));
68+
$file_txt = Str::of(file_get_contents($filetocheck));
6969
$datestr = 'return \'Y-m-d H:i:s.v\';';
7070
if ($file_txt->contains($datestr)){
7171
if ($this->option('update')){
7272
$UpdatedFile_txt = $file_txt->replace($datestr, 'return \'Ymd H:i:s.v\';');
7373
file_put_contents($filetocheck,$UpdatedFile_txt);
7474

7575
$this->comment("
76-
**********************************
76+
**********************************
7777
Incorrect Date Format value found
78-
**********************************
78+
**********************************
7979
File on disk: $filetocheck");
8080
$this->info('
8181
------------------

0 commit comments

Comments
 (0)