Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Commit

Permalink
moved version to a constant to avoid duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Mar 9, 2017
1 parent 56bded6 commit 8707499
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion SensioLabs/Security/Crawler/CurlCrawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace SensioLabs\Security\Crawler;

use SensioLabs\Security\Exception\RuntimeException;
use SensioLabs\Security\SecurityChecker;

/**
* @internal
Expand Down Expand Up @@ -49,7 +50,7 @@ protected function doCheck($lock, $certFile)
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($curl, CURLOPT_CAINFO, $certFile);
curl_setopt($curl, CURLOPT_USERAGENT, 'SecurityChecker-CLI/4 CURL PHP');
curl_setopt($curl, CURLOPT_USERAGENT, sprintf('SecurityChecker-CLI/%s CURL PHP', SecurityChecker::VERSION));

$response = curl_exec($curl);

Expand Down
3 changes: 2 additions & 1 deletion SensioLabs/Security/Crawler/FileGetContentsCrawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace SensioLabs\Security\Crawler;

use SensioLabs\Security\Exception\RuntimeException;
use SensioLabs\Security\SecurityChecker;

/**
* @internal
Expand All @@ -33,7 +34,7 @@ protected function doCheck($lock, $certFile)
'follow_location' => true,
'max_redirects' => 3,
'timeout' => $this->timeout,
'user_agent' => 'SecurityChecker-CLI/4 FGC PHP',
'user_agent' => sprintf('SecurityChecker-CLI/%s FGC PHP', SecurityChecker::VERSION),
),
'ssl' => array(
'cafile' => $certFile,
Expand Down
2 changes: 2 additions & 0 deletions SensioLabs/Security/SecurityChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

class SecurityChecker
{
const VERSION = '4';

private $vulnerabilityCount;
private $crawler;

Expand Down
2 changes: 1 addition & 1 deletion security-checker
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ use Symfony\Component\Console\Application;
use SensioLabs\Security\Command\SecurityCheckerCommand;
use SensioLabs\Security\SecurityChecker;

$console = new Application('SensioLabs Security Checker', '4.0');
$console = new Application('SensioLabs Security Checker', SecurityChecker::VERSION);
$console->add(new SecurityCheckerCommand(new SecurityChecker()));
$console->run();

0 comments on commit 8707499

Please sign in to comment.