mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-22 04:46:04 +03:00
parent
a4edb34deb
commit
7dbd72cebf
20
.travis.yml
20
.travis.yml
@ -45,21 +45,9 @@ jobs:
|
||||
after_script:
|
||||
- wget https://scrutinizer-ci.com/ocular.phar
|
||||
- php ocular.phar code-coverage:upload --format=php-clover clover.xml
|
||||
- stage: Pull request coding standard
|
||||
if: type = pull_request
|
||||
|
||||
- stage: Coding standard
|
||||
php: 7.1
|
||||
install: travis_retry composer install --prefer-dist
|
||||
script:
|
||||
- |
|
||||
if [ $TRAVIS_BRANCH != "master" ]; then
|
||||
git remote set-branches --add origin $TRAVIS_BRANCH;
|
||||
git fetch origin $TRAVIS_BRANCH;
|
||||
fi
|
||||
- git merge-base origin/$TRAVIS_BRANCH $TRAVIS_PULL_REQUEST_SHA || git fetch origin +refs/pull/$TRAVIS_PULL_REQUEST/merge --unshallow
|
||||
- wget https://github.com/diff-sniffer/git/releases/download/0.1.0/git-phpcs.phar
|
||||
- php git-phpcs.phar origin/$TRAVIS_BRANCH...$TRAVIS_PULL_REQUEST_SHA
|
||||
# - stage: Coding standard
|
||||
# if: NOT type = pull_request
|
||||
# php: 7.1
|
||||
# install: travis_retry composer install --prefer-dist
|
||||
# script:
|
||||
# - ./vendor/bin/phpcs
|
||||
- ./vendor/bin/phpcs
|
||||
|
@ -65,7 +65,7 @@ values. Int can represent values between -(2^31) and 2^31 - 1. ';
|
||||
}
|
||||
$int = intval($num);
|
||||
// int cast with == used for performance reasons
|
||||
// @codingStandardsIgnoreLine
|
||||
// phpcs:ignore
|
||||
if ($int != $num) {
|
||||
throw new Error(
|
||||
'Int cannot represent non-integer value: ' .
|
||||
|
@ -255,7 +255,7 @@ class AST
|
||||
}
|
||||
if (is_float($serialized)) {
|
||||
// int cast with == used for performance reasons
|
||||
// @codingStandardsIgnoreLine
|
||||
// phpcs:ignore
|
||||
if ((int) $serialized == $serialized) {
|
||||
return new IntValueNode(['value' => $serialized]);
|
||||
}
|
||||
|
@ -9,6 +9,9 @@ use Psr\Http\Message\StreamInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
use function strtolower;
|
||||
|
||||
/**
|
||||
* phpcs:ignoreFile -- this is not a core file
|
||||
*/
|
||||
class PsrRequestStub implements ServerRequestInterface
|
||||
{
|
||||
public $queryParams = [];
|
||||
|
@ -7,6 +7,9 @@ namespace GraphQL\Tests\Server\Psr7;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
||||
/**
|
||||
* phpcs:ignoreFile -- this is not a core file
|
||||
*/
|
||||
class PsrResponseStub implements ResponseInterface
|
||||
{
|
||||
public $headers = [];
|
||||
|
@ -8,6 +8,9 @@ use Psr\Http\Message\StreamInterface;
|
||||
use function strlen;
|
||||
use const SEEK_SET;
|
||||
|
||||
/**
|
||||
* phpcs:ignoreFile -- this is not a core file
|
||||
*/
|
||||
class PsrStreamStub implements StreamInterface
|
||||
{
|
||||
public $content;
|
||||
|
@ -148,7 +148,7 @@ class StarWarsData
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $id
|
||||
* @param string $id
|
||||
* @return mixed|null
|
||||
*/
|
||||
public static function getHuman($id)
|
||||
@ -159,7 +159,7 @@ class StarWarsData
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $id
|
||||
* @param string $id
|
||||
* @return mixed|null
|
||||
*/
|
||||
public static function getDroid($id)
|
||||
|
Loading…
Reference in New Issue
Block a user