Completed
Pull Request — master (#109)
by Patrick
10:35
created
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
 * Cron script
4
 *
5
 * This file describes runs actions needed by the system occasionally that take a long time
6
 *
7
 * PHP version 5 and 7
8
 *
9
 * @author Patrick Boyd / [email protected]
10
 * @copyright Copyright (c) 2015, Austin Artistic Reconstruction
11
 * @license http://www.apache.org/licenses/ Apache 2.0 License
12
 */
13
14
/**
15
 * This cron script recompiles the Browscap cache
16
 */
17
ini_set('memory_limit','-1');      // turn off memory limit for this script
18
set_time_limit(120);               // change to 2 minutes for this script
19
20
require('vendor/autoload.php');
21
22
use BrowscapPHP\Browscap;
23
24
date_default_timezone_set('America/Chicago');
25
26
$bc = new \BrowscapPHP\BrowscapUpdater('/var/php_cache/browser');
0 ignored issues
show
The call to BrowscapUpdater::__construct() has too many arguments starting with '/var/php_cache/browser'.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
27
$adapter = new \WurflCache\Adapter\File([\WurflCache\Adapter\File::DIR => '/var/php_cache/browser']);
28
$bc->setCache($adapter);
29
//$browscap = new Browscap('/var/php_cache/browser');
30
//$browscap->updateCache();
31
$bc->update();
32