From 921e50459c6d1ec85c968eaf94e340a90e9d1a3a Mon Sep 17 00:00:00 2001 From: Andrea R Soper Date: Mon, 1 Aug 2016 14:19:00 -0500 Subject: [PATCH] Fix some easy linting things. --- .../Context/FieldContext.php | 57 ++++++++++--------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/src/Palantirnet/PalantirBehatExtension/Context/FieldContext.php b/src/Palantirnet/PalantirBehatExtension/Context/FieldContext.php index af1a6af..2a8eb5f 100644 --- a/src/Palantirnet/PalantirBehatExtension/Context/FieldContext.php +++ b/src/Palantirnet/PalantirBehatExtension/Context/FieldContext.php @@ -1,7 +1,6 @@ getSession()->getPage()->find('css', $field); - if (NULL == $element->find('css', 'textarea.form-textarea')) { + if (null == $element->find('css', 'textarea.form-textarea')) { throw new Exception(sprintf("Couldn't find %s of type textarea.", $field)); } } @@ -88,13 +93,13 @@ public function assertTextarea($field, $expectedType) { /** * Verify the field is an input field of the given type. * - * @param $field - * @param $expectedType - * @throws Exception + * @param $field + * @param $expectedType + * @throws Exception */ public function assertInput($field, $expectedType) { $element = $this->getSession()->getPage()->find('css', $field); - if (NULL == $element || NULL == $element->find('css', 'input[type="' . $expectedType . '"]')) { + if (null == $element || null == $element->find('css', 'input[type="' . $expectedType . '"]')) { throw new Exception(sprintf("Couldn't find %s of type %s", $field, $expectedType)); } } @@ -102,13 +107,13 @@ public function assertInput($field, $expectedType) { /** * Verify the field is a select list. * - * @param $field - * @param $expectedType - * @throws Exception + * @param $field + * @param $expectedType + * @throws Exception */ public function assertSelect($field, $expectedType) { $element = $this->getSession()->getPage()->find('css', $field); - if (NULL == $element->find('css', 'select.form-select')) { + if (null == $element->find('css', 'select.form-select')) { throw new Exception(sprintf("Couldn't find %s of type select.", $field)); } // Verify that the select list is not part of a multivalue widget.