public function logIfNeeded($granted, EntryInterface $ace)
    {
        if (!$ace instanceof AuditableEntryInterface) {
            return;
        }

        if ($granted && $ace->isAuditSuccess()) {
            $this->doLog($granted, $ace);
        } elseif (!$granted && $ace->isAuditFailure()) {
            $this->doLog($granted, $ace);
        }
    }
public function logIfNeeded($granted, EntryInterface $ace)
    {
        if (!$ace instanceof AuditableEntryInterface) {
            return;
        }

        if ($granted && $ace->isAuditSuccess()) {
            $this->doLog($granted, $ace);
        } elseif (!$granted && $ace->isAuditFailure()) {
            $this->doLog($granted, $ace);
        }
    }
public function logIfNeeded ( $ granted , EntryInterface $ ace ) { if ( ! $ ace instanceof AuditableEntryInterface ) { return ; } if ( $ granted && $ ace -> isAuditSuccess ( ) ) { $ this -> doLog ( $ granted , $ ace ) ; } elseif ( ! $ granted && $ ace -> isAuditFailure ( ) ) { $ this -> doLog ( $ granted , $ ace ) ; } }
Performs some checks if logging was requested.

@param bool           $granted
@param EntryInterface $ace
Performs some checks if logging was requested .