Skip to content

Commit

Permalink
Merge pull request #140 from jhedstrom/139-update-coding-standards
Browse files Browse the repository at this point in the history
Fixes for updated coding standards.
  • Loading branch information
jhedstrom authored Nov 10, 2017
2 parents 74d4ef1 + dffdcc9 commit 3ad9449
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 14 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: php

php:
- 5.3
- 5.4
- 5.5
- 5.6
Expand All @@ -13,10 +12,9 @@ install:

script:
- find ./src -name "*.php" -print0 | xargs -0 -n1 -P8 php -l
- phpunit
- vendor/bin/phpunit
- vendor/bin/phpspec run -f pretty --no-interaction
# Don't test coding on php 5.3.
- test ${TRAVIS_PHP_VERSION} == "5.3" || ./vendor/bin/phpcs --standard=./phpcs-ruleset.xml --ignore=./vendor --ignore=./doc --ignore=./spec --ignore=./drush .
- ./vendor/bin/phpcs --standard=./phpcs-ruleset.xml .

# Enable Travis containers.
sudo: false
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<?php
/**
* @file
*/
?>
[![Build Status](https://travis-ci.org/jhedstrom/DrupalDriver.svg?branch=master)](https://travis-ci.org/jhedstrom/DrupalDriver)

Provides a collection of light-weight drivers with a common interface for interacting with [Drupal](http://drupal.org). These are generally intended for testing, and are not meant to be API-complete.
Expand Down Expand Up @@ -35,7 +41,6 @@ $> php composer.phar install
<?php

use Drupal\Driver\DrupalDriver;
use Drupal\Driver\Cores\Drupal8;

require 'vendor/autoload.php';

Expand Down
6 changes: 6 additions & 0 deletions phpcs-ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@
<exclude-pattern>src/Drupal/Driver/Cores/*.php</exclude-pattern>
</rule>

<exclude-pattern>*/doc/*</exclude-pattern>
<exclude-pattern >*/drush/*</exclude-pattern>
<exclude-pattern>*/spec/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/README.md</exclude-pattern>

</ruleset>
2 changes: 2 additions & 0 deletions src/Drupal/Driver/Cores/AbstractCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public function getFieldHandler($entity, $entity_type, $field_name) {
/**
* Expands properties on the given entity object to the expected structure.
*
* @param string $entity_type
* The entity type ID.
* @param \stdClass $entity
* Entity object.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Drupal/Driver/Cores/CoreInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ public function roleDelete($role_name);
/**
* Get FieldHandler class.
*
* @param object $entity
* The entity object.
* @param string $entity_type
* Entity type machine name.
* @param string $field_name
Expand Down
7 changes: 0 additions & 7 deletions src/Drupal/Driver/Cores/Drupal6.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,13 +429,6 @@ public function getExtensionPathList() {
return $paths;
}

/**
* {@inheritdoc}
*/
protected function expandEntityFields($entity_type, \stdClass $entity) {
return parent::expandEntityFields($entity_type, $entity);
}

/**
* {@inheritdoc}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Drupal/Driver/Exception/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ abstract class Exception extends \Exception {
*
* @param string $message
* The exception message.
* @param DriverInterface $driver
* @param \Drupal\Driver\DriverInterface $driver
* The driver where the exception occurred.
* @param int $code
* Optional exception code. Defaults to 0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class UnsupportedDriverActionException extends Exception {
*
* @param string $template
* What is unsupported?
* @param DriverInterface $driver
* @param \Drupal\Driver\DriverInterface $driver
* Driver instance.
* @param int $code
* The exception code.
Expand Down

0 comments on commit 3ad9449

Please sign in to comment.