Completed
Push — master ( 7a0335...001456 )
by Arjay
10:38
created

src/AuditableServiceProvider.php (2 issues)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Yajra\Auditable;
4
5
use Illuminate\Database\Schema\Blueprint;
6
use Illuminate\Support\ServiceProvider;
7
8
class AuditableServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Register the service provider.
12
     *
13
     * @return void
14
     */
15
    public function register()
16
    {
17
        Blueprint::macro('auditable', function() {
18
            $this->unsignedInteger('created_by')->nullable()->index();
0 ignored issues
show
The method unsignedInteger() does not seem to exist on object<Yajra\Auditable\AuditableServiceProvider>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
19
            $this->unsignedInteger('updated_by')->nullable()->index();
0 ignored issues
show
The method unsignedInteger() does not seem to exist on object<Yajra\Auditable\AuditableServiceProvider>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
20
        });
21
22
        Blueprint::macro('dropAuditable', function() {
23
            $this->dropColumn(['created_by', 'updated_by']);
24
        });
25
    }
26
}
27