diff --git a/Dewdrop/ActivityLog/Handler/Event/ManyToManyMessage.php b/Dewdrop/ActivityLog/Handler/Event/ManyToManyMessage.php index d4e53b3c..9d93d740 100644 --- a/Dewdrop/ActivityLog/Handler/Event/ManyToManyMessage.php +++ b/Dewdrop/ActivityLog/Handler/Event/ManyToManyMessage.php @@ -163,7 +163,7 @@ private function joinListItems(array $shortcodes) { if (1 === count($shortcodes)) { return current($shortcodes); - } else if (2 === count($shortcodes)) { + } elseif (2 === count($shortcodes)) { return implode(' and ', $shortcodes); } else { $lastItem = array_pop($shortcodes); diff --git a/Dewdrop/ActivityLog/Handler/NullHandler.php b/Dewdrop/ActivityLog/Handler/NullHandler.php index 9b3ad1b3..6f51669a 100644 --- a/Dewdrop/ActivityLog/Handler/NullHandler.php +++ b/Dewdrop/ActivityLog/Handler/NullHandler.php @@ -21,12 +21,10 @@ public function setActivityLog(ActivityLog $activityLog) public function write($summary, $message) { - } public function log($summary, $message) { - } public function getName() diff --git a/Dewdrop/ActivityLog/Handler/TableHandler.php b/Dewdrop/ActivityLog/Handler/TableHandler.php index a98860ac..4f11db7b 100644 --- a/Dewdrop/ActivityLog/Handler/TableHandler.php +++ b/Dewdrop/ActivityLog/Handler/TableHandler.php @@ -57,7 +57,6 @@ public function __construct(Table $table, ActivityLog $activityLog = null, Infle public function init() { - } public function getTable() diff --git a/Dewdrop/Admin/Component/ComponentAbstract.php b/Dewdrop/Admin/Component/ComponentAbstract.php index d78627e9..7c7698a7 100644 --- a/Dewdrop/Admin/Component/ComponentAbstract.php +++ b/Dewdrop/Admin/Component/ComponentAbstract.php @@ -161,7 +161,6 @@ abstract public function init(); */ public function preDispatch() { - } /** @@ -372,7 +371,6 @@ public function getName() { if (!$this->name) { $this->name = $this->env->inflectComponentName(basename($this->getPath())); - } return $this->name; diff --git a/Dewdrop/Admin/Env/Wp.php b/Dewdrop/Admin/Env/Wp.php index 88024013..503ffb2c 100644 --- a/Dewdrop/Admin/Env/Wp.php +++ b/Dewdrop/Admin/Env/Wp.php @@ -295,7 +295,7 @@ function () use ($component) { /** * Registering a component in WordPress means registering a handler - * for a hook. Typically, add_object_page is used, but that implies + * for a hook. Typically, add_menu_page is used, but that implies * an entry in the top-level admin menu. Because we want to support * components that don't appear in the menu, we check the display-menu * permission here and then use add_submenu_page() with no slug to @@ -334,15 +334,15 @@ function () use ($component) { } /** - * A mock wrapper for WP's add_object_page() function. Allows calls + * A mock wrapper for WP's add_menu_page() function. Allows calls * during testing without error. * * @return void */ protected function addObjectPage() { - if (function_exists('add_object_page')) { - call_user_func_array('add_object_page', func_get_args()); + if (function_exists('add_menu_page')) { + call_user_func_array('add_menu_page', func_get_args()); } } diff --git a/Dewdrop/Admin/Page/PageAbstract.php b/Dewdrop/Admin/Page/PageAbstract.php index 40cf6750..ecae23c3 100644 --- a/Dewdrop/Admin/Page/PageAbstract.php +++ b/Dewdrop/Admin/Page/PageAbstract.php @@ -163,7 +163,6 @@ public function shouldProcess() */ public function process(ResponseHelper $response) { - } /** @@ -173,7 +172,6 @@ public function process(ResponseHelper $response) */ public function render() { - } /** diff --git a/Dewdrop/Admin/Page/Stock/ImportMapFields.php b/Dewdrop/Admin/Page/Stock/ImportMapFields.php index 2167aba4..6bd8f6ab 100644 --- a/Dewdrop/Admin/Page/Stock/ImportMapFields.php +++ b/Dewdrop/Admin/Page/Stock/ImportMapFields.php @@ -294,13 +294,14 @@ private function getFieldValue($id, $mode, array $importRow) case 'value': return $this->request->getPost($id); case 'column': - $column = $this->request->getPost($id . ':column'); + $column = $this->request->getPost($id . ':column'); if (isset($importRow[$column])) { return $importRow[$column]; } else { return null; } + // break intentionally omitted case 'blank': default: return null; diff --git a/Dewdrop/Admin/Page/Stock/NotificationEdit.php b/Dewdrop/Admin/Page/Stock/NotificationEdit.php index 559a32c2..2791e493 100644 --- a/Dewdrop/Admin/Page/Stock/NotificationEdit.php +++ b/Dewdrop/Admin/Page/Stock/NotificationEdit.php @@ -81,7 +81,6 @@ public function init() public function process(ResponseHelper $responseHelper) { if ($this->request->isPost()) { - } } diff --git a/Dewdrop/Admin/Page/Stock/Upload.php b/Dewdrop/Admin/Page/Stock/Upload.php index 81958ecd..8d491256 100644 --- a/Dewdrop/Admin/Page/Stock/Upload.php +++ b/Dewdrop/Admin/Page/Stock/Upload.php @@ -42,7 +42,7 @@ public function process(ResponseHelper $response) if (!$this->request->isPost()) { $this->error = 'Upload request must be POST.'; return; - } else if (!count($_FILES)) { + } elseif (!count($_FILES)) { $this->error = 'No file uploads were present. Check form encoding or upload_max_filesize.'; return; } else { diff --git a/Dewdrop/Admin/PageFactory/Custom.php b/Dewdrop/Admin/PageFactory/Custom.php index 4a6d4c8f..73d9aae5 100644 --- a/Dewdrop/Admin/PageFactory/Custom.php +++ b/Dewdrop/Admin/PageFactory/Custom.php @@ -8,7 +8,6 @@ * @license https://github.com/DeltaSystems/dewdrop/LICENSE */ -namespace Dewdrop\Admin\Component\ComponentAbstract; namespace Dewdrop\Admin\PageFactory; use Dewdrop\Admin\Component\ComponentAbstract; diff --git a/Dewdrop/Admin/PageFactory/Files.php b/Dewdrop/Admin/PageFactory/Files.php index b8b0db34..0631ef8b 100644 --- a/Dewdrop/Admin/PageFactory/Files.php +++ b/Dewdrop/Admin/PageFactory/Files.php @@ -162,4 +162,3 @@ public function listAvailablePages() return $pages; } } - diff --git a/Dewdrop/Bootstrap/Standalone.php b/Dewdrop/Bootstrap/Standalone.php index 21b13b2f..0abb8e14 100644 --- a/Dewdrop/Bootstrap/Standalone.php +++ b/Dewdrop/Bootstrap/Standalone.php @@ -33,7 +33,6 @@ public function __construct() public function init() { - } /** diff --git a/Dewdrop/Cli/Command/Lint.php b/Dewdrop/Cli/Command/Lint.php index 30a40a90..00f51588 100644 --- a/Dewdrop/Cli/Command/Lint.php +++ b/Dewdrop/Cli/Command/Lint.php @@ -51,6 +51,5 @@ public function init() */ public function execute() { - } } diff --git a/Dewdrop/Db/Driver/DriverInterface.php b/Dewdrop/Db/Driver/DriverInterface.php index d1ffd469..43b45611 100644 --- a/Dewdrop/Db/Driver/DriverInterface.php +++ b/Dewdrop/Db/Driver/DriverInterface.php @@ -297,7 +297,7 @@ public function generateCreateIndexStatement($tableName, array $columnNames); /** * Generate an SQL statement to analyze a table. - * + * * @param string $tableName * @return string */ diff --git a/Dewdrop/Db/Driver/Mock.php b/Dewdrop/Db/Driver/Mock.php index 1fd681e8..673fd2fb 100644 --- a/Dewdrop/Db/Driver/Mock.php +++ b/Dewdrop/Db/Driver/Mock.php @@ -245,7 +245,6 @@ public function describeTable($tableName) */ public function beginTransaction() { - } /** @@ -253,7 +252,6 @@ public function beginTransaction() */ public function commit() { - } /** @@ -263,7 +261,6 @@ public function commit() */ public function rollback() { - } /** @@ -300,7 +297,6 @@ public function mapNativeTypeToGenericType($nativeType, $length) */ public function prepareSelectForTotalRowCalculation(Select $select) { - } /** @@ -338,7 +334,6 @@ public function getCaseInsensitiveLikeOperator() */ public function truncateTimeStampToDate($timestamp) { - } /** diff --git a/Dewdrop/Db/Driver/Wpdb.php b/Dewdrop/Db/Driver/Wpdb.php index 5e838dac..e61497fc 100644 --- a/Dewdrop/Db/Driver/Wpdb.php +++ b/Dewdrop/Db/Driver/Wpdb.php @@ -614,7 +614,7 @@ public function truncateTimeStampToDate($timestamp) */ public function quoteInternal($input) { - return "'" . $this->wpdb->escape($input) . "'"; + return "'" . esc_sql($input) . "'"; } /** diff --git a/Dewdrop/Db/Row.php b/Dewdrop/Db/Row.php index d9765658..88767a1d 100644 --- a/Dewdrop/Db/Row.php +++ b/Dewdrop/Db/Row.php @@ -153,7 +153,6 @@ public function __construct(Table $table, array $data = array()) */ public function init() { - } /** diff --git a/Dewdrop/Db/Select.php b/Dewdrop/Db/Select.php index 3b7c29b3..a7df29d1 100644 --- a/Dewdrop/Db/Select.php +++ b/Dewdrop/Db/Select.php @@ -996,7 +996,6 @@ protected function tableCols($correlationName, $cols, $afterCorrelationName = nu } if ($columnValues) { - // should we attempt to prepend or insert these values? if ($afterCorrelationName === true || is_string($afterCorrelationName)) { $tmpColumns = $this->parts[self::COLUMNS]; diff --git a/Dewdrop/Db/Select/Filter/FilterInterface.php b/Dewdrop/Db/Select/Filter/FilterInterface.php index 3adc2e96..b53e4a06 100644 --- a/Dewdrop/Db/Select/Filter/FilterInterface.php +++ b/Dewdrop/Db/Select/Filter/FilterInterface.php @@ -26,4 +26,4 @@ interface FilterInterface * @return Select */ public function apply(Select $select, $conditionSetName, array $queryVars); -} \ No newline at end of file +} diff --git a/Dewdrop/Db/Select/Filter/Numeric.php b/Dewdrop/Db/Select/Filter/Numeric.php index 9b65940b..8442d09b 100644 --- a/Dewdrop/Db/Select/Filter/Numeric.php +++ b/Dewdrop/Db/Select/Filter/Numeric.php @@ -75,6 +75,7 @@ public function apply(Select $select, $conditionSetName, array $queryVars) ) ); } + // break intentionally omitted case static::OP_IS_LESS_THAN: if ('' === $op1) { return $select; diff --git a/Dewdrop/Fields/FieldInterface.php b/Dewdrop/Fields/FieldInterface.php index a4945876..f45fcf46 100644 --- a/Dewdrop/Fields/FieldInterface.php +++ b/Dewdrop/Fields/FieldInterface.php @@ -72,7 +72,7 @@ public function getId(); /** * Get the name used to represent this field in result sets. - * + * * @return string */ public function getName(); diff --git a/Dewdrop/Fields/Listing/BulkActions.php b/Dewdrop/Fields/Listing/BulkActions.php index c282ce9c..d0ff8cbd 100644 --- a/Dewdrop/Fields/Listing/BulkActions.php +++ b/Dewdrop/Fields/Listing/BulkActions.php @@ -242,7 +242,6 @@ public function process() break; } } - } return $result; diff --git a/Dewdrop/Fields/Listing/BulkActions/Result.php b/Dewdrop/Fields/Listing/BulkActions/Result.php index 42194e21..963fb82f 100644 --- a/Dewdrop/Fields/Listing/BulkActions/Result.php +++ b/Dewdrop/Fields/Listing/BulkActions/Result.php @@ -54,7 +54,6 @@ public function __construct($result, $message) $this->result = $result; $this->message = $message; - } /** diff --git a/Dewdrop/Fields/RowEditor.php b/Dewdrop/Fields/RowEditor.php index 3208fef7..c1758a18 100644 --- a/Dewdrop/Fields/RowEditor.php +++ b/Dewdrop/Fields/RowEditor.php @@ -243,7 +243,6 @@ public function linkRowsToFields() $modelName, $link->link($this->getModel($modelName)) ); - } } diff --git a/Dewdrop/Fields/Template/Link.php b/Dewdrop/Fields/Template/Link.php index 1389737a..8ed200f1 100644 --- a/Dewdrop/Fields/Template/Link.php +++ b/Dewdrop/Fields/Template/Link.php @@ -90,7 +90,6 @@ function ($content, TableCell $helper, array $rowData, $rowIndex, $columnIndex) return $node; } - } ); } diff --git a/Dewdrop/Paths.php b/Dewdrop/Paths.php index 94f08b9e..f7dfb2d0 100644 --- a/Dewdrop/Paths.php +++ b/Dewdrop/Paths.php @@ -169,7 +169,7 @@ public function getCommands() /** * Get the data folder where Dewdrop can write data on the server. - * + * * @return string */ public function getData() diff --git a/Dewdrop/Pimple.php b/Dewdrop/Pimple.php index 8afcc240..664ffaab 100644 --- a/Dewdrop/Pimple.php +++ b/Dewdrop/Pimple.php @@ -41,7 +41,6 @@ private function __construct() */ private function __clone() { - } /** diff --git a/Dewdrop/Silex/Env.php b/Dewdrop/Silex/Env.php index 04bc8076..190968f7 100644 --- a/Dewdrop/Silex/Env.php +++ b/Dewdrop/Silex/Env.php @@ -63,7 +63,6 @@ public function bootstrapCli() public function initializeCli() { - } public function initializePimple(Pimple $pimple) diff --git a/Dewdrop/Silex/Service/ControllerInjector.php b/Dewdrop/Silex/Service/ControllerInjector.php index 013f6688..b7eebfb4 100644 --- a/Dewdrop/Silex/Service/ControllerInjector.php +++ b/Dewdrop/Silex/Service/ControllerInjector.php @@ -108,4 +108,4 @@ public function register(Application $app) public function boot(Application $app) { } -} \ No newline at end of file +} diff --git a/Dewdrop/Test/DomAssertions.php b/Dewdrop/Test/DomAssertions.php index fee694ca..39fa41bc 100644 --- a/Dewdrop/Test/DomAssertions.php +++ b/Dewdrop/Test/DomAssertions.php @@ -66,5 +66,4 @@ public function queryDom($selector, $html) $query = new DomQuery($html); return $query->execute($selector); } - } diff --git a/Dewdrop/Upload/FileHandler.php b/Dewdrop/Upload/FileHandler.php index 94871597..993cec6d 100644 --- a/Dewdrop/Upload/FileHandler.php +++ b/Dewdrop/Upload/FileHandler.php @@ -106,7 +106,7 @@ public function getValidatorChain() $uploadFileValidator = new UploadFileValidator(); $this->validatorChain->attach($uploadFileValidator); - if(!empty($this->allowedMimeTypes)) { + if (!empty($this->allowedMimeTypes)) { $mimeTypeValidator = new MimeTypeValidator(); $mimeTypeValidator->addMimeType($this->allowedMimeTypes); $this->validatorChain->attach($mimeTypeValidator); diff --git a/Dewdrop/Upload/Filter/ScaleImage.php b/Dewdrop/Upload/Filter/ScaleImage.php index a68c8776..f39b7f10 100644 --- a/Dewdrop/Upload/Filter/ScaleImage.php +++ b/Dewdrop/Upload/Filter/ScaleImage.php @@ -61,7 +61,7 @@ public function filter($value) if ($originalWidth > $originalHeight) { $image->scaleImage($this->width, 0); - } else if ($originalHeight > $originalWidth) { + } elseif ($originalHeight > $originalWidth) { $image->scaleImage(0, $this->height); } else { $image->scaleImage($this->width, $this->height); diff --git a/Dewdrop/View/Helper/BootstrapForm.php b/Dewdrop/View/Helper/BootstrapForm.php index 7b33c4f7..8d7a77f4 100644 --- a/Dewdrop/View/Helper/BootstrapForm.php +++ b/Dewdrop/View/Helper/BootstrapForm.php @@ -365,4 +365,3 @@ protected function controlRequiresLabel($output) || false !== stripos($output, 'import-edit-control'); } } - diff --git a/Dewdrop/View/Helper/Pagination.php b/Dewdrop/View/Helper/Pagination.php index 3173c2f3..d44dbe58 100644 --- a/Dewdrop/View/Helper/Pagination.php +++ b/Dewdrop/View/Helper/Pagination.php @@ -34,7 +34,6 @@ public function direct($rowCount, $pageSize, $page, $title = 'Records') $out = ''; if ($rowCount > $pageSize) { - $out .= "
Page {$page} of {$pageCount}
" . '