diff --git a/.travis.yml b/.travis.yml
index 9dd1ee89..a27b8e32 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,6 @@
language: php
php:
- - 5.3
- 5.4
- 5.5
- 5.6
@@ -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
diff --git a/README.md b/README.md
index 5116aa13..2dfc27cc 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,9 @@
+
[![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.
@@ -35,7 +41,6 @@ $> php composer.phar install
src/Drupal/Driver/Cores/*.php
+ */doc/*
+ */drush/*
+ */spec/*
+ */vendor/*
+ */README.md
+
diff --git a/src/Drupal/Driver/Cores/AbstractCore.php b/src/Drupal/Driver/Cores/AbstractCore.php
index 02654184..7de69196 100644
--- a/src/Drupal/Driver/Cores/AbstractCore.php
+++ b/src/Drupal/Driver/Cores/AbstractCore.php
@@ -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.
*/
diff --git a/src/Drupal/Driver/Cores/CoreInterface.php b/src/Drupal/Driver/Cores/CoreInterface.php
index 7c786582..bb5b124c 100644
--- a/src/Drupal/Driver/Cores/CoreInterface.php
+++ b/src/Drupal/Driver/Cores/CoreInterface.php
@@ -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
diff --git a/src/Drupal/Driver/Cores/Drupal6.php b/src/Drupal/Driver/Cores/Drupal6.php
index f004bae5..d07c4657 100644
--- a/src/Drupal/Driver/Cores/Drupal6.php
+++ b/src/Drupal/Driver/Cores/Drupal6.php
@@ -268,7 +268,7 @@ public function validateDrupalSite() {
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'];
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
- $_SERVER['REQUEST_METHOD'] = NULL;
+ $_SERVER['REQUEST_METHOD'] = NULL;
$_SERVER['SERVER_SOFTWARE'] = NULL;
$_SERVER['HTTP_USER_AGENT'] = NULL;
@@ -316,7 +316,7 @@ protected function expandEntityProperties(\stdClass $entity) {
* @return array
* An array of vocabulary objects
*/
- protected function taxonomyVocabularyLoadMultiple($vids = array()) {
+ protected function taxonomyVocabularyLoadMultiple(array $vids = array()) {
$vocabularies = taxonomy_get_vocabularies();
if ($vids) {
return array_intersect_key($vocabularies, array_flip($vids));
@@ -429,13 +429,6 @@ public function getExtensionPathList() {
return $paths;
}
- /**
- * {@inheritdoc}
- */
- protected function expandEntityFields($entity_type, \stdClass $entity) {
- return parent::expandEntityFields($entity_type, $entity);
- }
-
/**
* {@inheritdoc}
*/
diff --git a/src/Drupal/Driver/Cores/Drupal7.php b/src/Drupal/Driver/Cores/Drupal7.php
index 3aa402c1..ac3050a3 100644
--- a/src/Drupal/Driver/Cores/Drupal7.php
+++ b/src/Drupal/Driver/Cores/Drupal7.php
@@ -238,7 +238,7 @@ public function validateDrupalSite() {
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'];
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
- $_SERVER['REQUEST_METHOD'] = NULL;
+ $_SERVER['REQUEST_METHOD'] = NULL;
$_SERVER['SERVER_SOFTWARE'] = NULL;
$_SERVER['HTTP_USER_AGENT'] = NULL;
diff --git a/src/Drupal/Driver/Cores/Drupal8.php b/src/Drupal/Driver/Cores/Drupal8.php
index c1cd9ab0..6e667297 100644
--- a/src/Drupal/Driver/Cores/Drupal8.php
+++ b/src/Drupal/Driver/Cores/Drupal8.php
@@ -291,7 +291,7 @@ public function validateDrupalSite() {
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'];
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
- $_SERVER['REQUEST_METHOD'] = NULL;
+ $_SERVER['REQUEST_METHOD'] = NULL;
$_SERVER['SERVER_SOFTWARE'] = NULL;
$_SERVER['HTTP_USER_AGENT'] = NULL;
diff --git a/src/Drupal/Driver/DrushDriver.php b/src/Drupal/Driver/DrushDriver.php
index a51ec519..b2e1b1ae 100644
--- a/src/Drupal/Driver/DrushDriver.php
+++ b/src/Drupal/Driver/DrushDriver.php
@@ -36,6 +36,8 @@ class DrushDriver extends BaseDriver {
/**
* Track bootstrapping.
+ *
+ * @var bool
*/
private $bootstrapped = FALSE;
@@ -196,6 +198,7 @@ public function clearStaticCaches() {
*
* @param string $output
* The output from Drush.
+ *
* @return object
* The decoded JSON object.
*/
@@ -247,7 +250,11 @@ public function isField($entity_type, $field_name) {
// Drush Driver to work with certain built-in Drush capabilities (e.g.
// creating users) even if the Behat Drush Endpoint is not available.
try {
- $result = $this->drush('behat', array('is-field', escapeshellarg(json_encode(array($entity_type, $field_name)))), array());
+ $arguments = array(
+ 'is-field',
+ escapeshellarg(json_encode(array($entity_type, $field_name))),
+ );
+ $result = $this->drush('behat', $arguments, array());
return strpos($result, "true\n") !== FALSE;
}
catch (\Exception $e) {
diff --git a/src/Drupal/Driver/Exception/Exception.php b/src/Drupal/Driver/Exception/Exception.php
index b8b76a87..67b5cc84 100644
--- a/src/Drupal/Driver/Exception/Exception.php
+++ b/src/Drupal/Driver/Exception/Exception.php
@@ -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.
diff --git a/src/Drupal/Driver/Exception/UnsupportedDriverActionException.php b/src/Drupal/Driver/Exception/UnsupportedDriverActionException.php
index 7e2ce40d..9fac49b4 100644
--- a/src/Drupal/Driver/Exception/UnsupportedDriverActionException.php
+++ b/src/Drupal/Driver/Exception/UnsupportedDriverActionException.php
@@ -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.