Skip to content

Commit

Permalink
Prefix certain global functions so PHP can optimize them (see contao/…
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Sep 25, 2017
1 parent 22fceac commit cc148e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public function get($format, array $options = [])

$supported = ['svg', 'svgz'];

if (!in_array($format, $supported, true)) {
if (!\in_array($format, $supported, true)) {
throw new InvalidArgumentException(sprintf(
'Saving image in "%s" format is not supported, please use one of the following extensions: "%s"',
$format,
Expand Down
2 changes: 1 addition & 1 deletion src/Imagine.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function load($string)
*/
public function read($resource)
{
if (!is_resource($resource)) {
if (!\is_resource($resource)) {
throw new InvalidArgumentException('Variable does not contain a stream resource');
}

Expand Down
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
};

// PhpStorm fix (see https://www.drupal.org/node/2597814)
if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
if (!\defined('PHPUNIT_COMPOSER_INSTALL')) {
define('PHPUNIT_COMPOSER_INSTALL', __DIR__.'/../vendor/autoload.php');
}

Expand Down

0 comments on commit cc148e3

Please sign in to comment.