Apply PSR-12 code style (#3886)
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / bulk / processing / user / DeleteUserBulkProcessingAction.class.php
index e5d6d98393203012152759992aa2b64acec331c7..14b3aa04917e12054a458fbc38d7f6d21c267a74 100644 (file)
@@ -1,45 +1,50 @@
 <?php
+
 namespace wcf\system\bulk\processing\user;
+
+use wcf\data\DatabaseObjectList;
 use wcf\data\user\UserAction;
 use wcf\data\user\UserList;
-use wcf\data\DatabaseObjectList;
 use wcf\system\WCF;
 
 /**
  * Bulk processing action implementation for deleting users.
- * 
- * @author     Matthias Schmidt
- * @copyright  2001-2019 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    WoltLabSuite\Core\System\Bulk\Processing\User
- * @since      3.0
+ *
+ * @author  Matthias Schmidt
+ * @copyright   2001-2019 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\System\Bulk\Processing\User
+ * @since   3.0
  */
-class DeleteUserBulkProcessingAction extends AbstractUserBulkProcessingAction {
-       /**
-        * @inheritDoc
-        */
-       public function executeAction(DatabaseObjectList $objectList) {
-               if (!($objectList instanceof UserList)) {
-                       throw new \InvalidArgumentException("Object list is no instance of '".UserList::class."', instance of '".get_class($objectList)."' given.");
-               }
-               
-               $users = $this->getAccessibleUsers($objectList);
-               
-               if (!empty($users)) {
-                       $userAction = new UserAction($users, 'delete');
-                       $userAction->executeAction();
-               }
-       }
-       
-       /**
-        * @inheritDoc
-        */
-       public function getObjectList() {
-               $userList = parent::getObjectList();
-               
-               // deny self deletion
-               $userList->getConditionBuilder()->add('user_table.userID <> ?', [WCF::getUser()->userID]);
-               
-               return $userList;
-       }
+class DeleteUserBulkProcessingAction extends AbstractUserBulkProcessingAction
+{
+    /**
+     * @inheritDoc
+     */
+    public function executeAction(DatabaseObjectList $objectList)
+    {
+        if (!($objectList instanceof UserList)) {
+            throw new \InvalidArgumentException("Object list is no instance of '" . UserList::class . "', instance of '" . \get_class($objectList) . "' given.");
+        }
+
+        $users = $this->getAccessibleUsers($objectList);
+
+        if (!empty($users)) {
+            $userAction = new UserAction($users, 'delete');
+            $userAction->executeAction();
+        }
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function getObjectList()
+    {
+        $userList = parent::getObjectList();
+
+        // deny self deletion
+        $userList->getConditionBuilder()->add('user_table.userID <> ?', [WCF::getUser()->userID]);
+
+        return $userList;
+    }
 }