コード例 #1
0
 /**
  * Check the composer.lock file for security issues.
  *
  * @param  FileInterface $file
  * @return bool
  */
 public function canReview(FileInterface $file)
 {
     if ($file->getFileName() === 'composer.lock') {
         return true;
     }
     return false;
 }
コード例 #2
0
 /**
  * Determins if the given file should be revewed.
  *
  * @param  FileInterface $file
  * @return bool
  */
 public function canReviewFile(FileInterface $file)
 {
     return $file->getExtension() === 'php' && substr($file->getFileName(), -strlen('blade.php')) != 'blade.php';
 }
コード例 #3
0
 /**
  * Lint only the composer.json file.
  *
  * @param  FileInterface $file
  * @return bool
  */
 public function canReview(FileInterface $file)
 {
     // only if the filename is "composer.json"
     return $file->getFileName() === 'composer.json';
 }