[TASK] Use null comparison instead of is_null 50/55950/3
authorWouter Wolters <typo3@wouterwolters.nl>
Wed, 28 Feb 2018 20:25:50 +0000 (21:25 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 1 Mar 2018 13:21:59 +0000 (14:21 +0100)
Resolves: #84091
Releases: master
Change-Id: I61c24937b919ec54c6547c07d1c4460186725c96
Reviewed-on: https://review.typo3.org/55950
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
43 files changed:
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInline.php
typo3/sysext/backend/Classes/Form/Utility/FormEngineUtility.php
typo3/sysext/backend/Classes/Security/CategoryPermissionsAspect.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/View/BackendLayoutView.php
typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php
typo3/sysext/core/Classes/Configuration/Richtext.php
typo3/sysext/core/Classes/Core/Bootstrap.php
typo3/sysext/core/Classes/Service/MarkerBasedTemplateService.php
typo3/sysext/core/Classes/Type/File/ImageInfo.php
typo3/sysext/core/Classes/Utility/ArrayUtility.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php
typo3/sysext/extbase/Classes/Persistence/Generic/LazyObjectStorage.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php
typo3/sysext/extbase/Classes/Service/ImageService.php
typo3/sysext/extbase/Classes/Utility/DebuggerUtility.php
typo3/sysext/extbase/Classes/Utility/LocalizationUtility.php
typo3/sysext/extensionmanager/Classes/Domain/Model/Extension.php
typo3/sysext/extensionmanager/Classes/Domain/Model/Mirrors.php
typo3/sysext/extensionmanager/Classes/Report/ExtensionStatus.php
typo3/sysext/extensionmanager/Classes/Utility/Importer/ExtensionListUtility.php
typo3/sysext/extensionmanager/Classes/Utility/Repository/Helper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php
typo3/sysext/frontend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Utility/EidUtility.php
typo3/sysext/install/Classes/FolderStructure/AbstractNode.php
typo3/sysext/install/Classes/FolderStructure/DirectoryNode.php
typo3/sysext/install/Classes/FolderStructure/FileNode.php
typo3/sysext/install/Classes/FolderStructure/LinkNode.php
typo3/sysext/install/Classes/FolderStructure/RootNode.php
typo3/sysext/install/Classes/Http/RequestHandler.php
typo3/sysext/reports/Classes/Report/Status/WarningMessagePostProcessor.php
typo3/sysext/saltedpasswords/Classes/Salt/BlowfishSalt.php
typo3/sysext/saltedpasswords/Classes/Salt/Pbkdf2Salt.php
typo3/sysext/saltedpasswords/Classes/Salt/PhpassSalt.php
typo3/sysext/workspaces/Classes/Service/StagesService.php

index d489e05..374e555 100644 (file)
@@ -1631,7 +1631,7 @@ class EditDocumentController
             && $languageField
             && $transOrigPointerField
         ) {
-            if (is_null($pid)) {
+            if ($pid === null) {
                 $row = BackendUtility::getRecord($table, $uid, 'pid');
                 $pid = $row['pid'];
             }
index f8c474b..551f847 100644 (file)
@@ -218,25 +218,25 @@ abstract class AbstractFormElement extends AbstractNode
                 break;
             case 'datetime':
                 // compatibility with "eval" (type "input")
-                if ($itemValue !== '' && !is_null($itemValue)) {
+                if ($itemValue !== '' && $itemValue !== null) {
                     $itemValue = date('H:i d-m-Y', (int)$itemValue);
                 }
                 break;
             case 'time':
                 // compatibility with "eval" (type "input")
-                if ($itemValue !== '' && !is_null($itemValue)) {
+                if ($itemValue !== '' && $itemValue !== null) {
                     $itemValue = gmdate('H:i', (int)$itemValue);
                 }
                 break;
             case 'timesec':
                 // compatibility with "eval" (type "input")
-                if ($itemValue !== '' && !is_null($itemValue)) {
+                if ($itemValue !== '' && $itemValue !== null) {
                     $itemValue = gmdate('H:i:s', (int)$itemValue);
                 }
                 break;
             case 'year':
                 // compatibility with "eval" (type "input")
-                if ($itemValue !== '' && !is_null($itemValue)) {
+                if ($itemValue !== '' && $itemValue !== null) {
                     $itemValue = date('Y', (int)$itemValue);
                 }
                 break;
index b4d6794..d86db20 100644 (file)
@@ -93,13 +93,13 @@ class TcaInline extends AbstractDatabaseRecordProvider implements FormDataProvid
      */
     protected function addInlineFirstPid(array $result)
     {
-        if (is_null($result['inlineFirstPid'])) {
+        if ($result['inlineFirstPid'] === null) {
             $table = $result['tableName'];
             $row = $result['databaseRow'];
             // If the parent is a page, use the uid(!) of the (new?) page as pid for the child records:
             if ($table === 'pages') {
                 $liveVersionId = BackendUtility::getLiveVersionIdOfRecord('pages', $row['uid']);
-                $pid = is_null($liveVersionId) ? $row['uid'] : $liveVersionId;
+                $pid = $liveVersionId === null ? $row['uid'] : $liveVersionId;
             } elseif ($row['pid'] < 0) {
                 $prevRec = BackendUtility::getRecord($table, abs($row['pid']));
                 $pid = $prevRec['pid'];
index 703ae42..566eb87 100644 (file)
@@ -97,7 +97,7 @@ class FormEngineUtility
     public static function getTSconfigForTableRow($table, $row, $field = '')
     {
         static $cache;
-        if (is_null($cache)) {
+        if ($cache === null) {
             $cache = [];
         }
         $cacheIdentifier = $table . ':' . $row['uid'];
index 2bc60f7..58e5acd 100644 (file)
@@ -93,7 +93,7 @@ class CategoryPermissionsAspect
 
                 foreach ($categoryMountPoints as $categoryMountPoint) {
                     $treeNode = $this->lookUpCategoryMountPointInTreeNodes((int)$categoryMountPoint, $treeNodeCollection);
-                    if (!is_null($treeNode)) {
+                    if ($treeNode !== null) {
                         $securedTreeNodeCollection->append($treeNode);
                     }
                 }
@@ -128,7 +128,7 @@ class CategoryPermissionsAspect
 
                 /** @var TreeNode $node */
                 $node = $this->lookUpCategoryMountPointInTreeNodes($categoryMountPoint, $treeNode->getChildNodes());
-                if (!is_null($node)) {
+                if ($node !== null) {
                     $result = $node;
                     break;
                 }
index 804a70c..1d64951 100644 (file)
@@ -1352,7 +1352,7 @@ class BackendUtility
             }
         } else {
             // Find uploaddir automatically
-            if (is_null($uploaddir)) {
+            if ($uploaddir === null) {
                 $uploaddir = $GLOBALS['TCA'][$table]['columns'][$field]['config']['uploadfolder'];
             }
             $uploaddir = rtrim($uploaddir, '/');
@@ -2770,7 +2770,7 @@ class BackendUtility
         $beUser = static::getBackendUserAuthentication();
         $pageTS_modOptions = $beUser->getTSConfig($TSref, static::getPagesTSconfig($id));
         $BE_USER_modOptions = $beUser->getTSConfig($TSref);
-        if (is_null($BE_USER_modOptions['value'])) {
+        if ($BE_USER_modOptions['value'] === null) {
             unset($BE_USER_modOptions['value']);
         }
         ArrayUtility::mergeRecursiveWithOverrule($pageTS_modOptions, $BE_USER_modOptions);
@@ -4130,7 +4130,7 @@ class BackendUtility
     {
         $whereClause = '';
         if (self::isTableWorkspaceEnabled($table)) {
-            if (is_null($workspaceId)) {
+            if ($workspaceId === null) {
                 $workspaceId = static::getBackendUserAuthentication()->workspace;
             }
             $workspaceId = (int)$workspaceId;
index b72a644..ba22886 100644 (file)
@@ -344,7 +344,7 @@ class BackendLayoutView implements \TYPO3\CMS\Core\SingletonInterface
 
         $backendLayout = $this->getDataProviderCollection()->getBackendLayout($selectedCombinedIdentifier, $pageId);
         // If backend layout is not found available anymore, use default
-        if (is_null($backendLayout)) {
+        if ($backendLayout === null) {
             $selectedCombinedIdentifier = 'default';
             $backendLayout = $this->getDataProviderCollection()->getBackendLayout($selectedCombinedIdentifier, $pageId);
         }
index fb9630c..29b2200 100644 (file)
@@ -90,7 +90,7 @@ class Typo3DatabaseBackend extends AbstractBackend implements TaggableBackendInt
                 1236518298
             );
         }
-        if (is_null($lifetime)) {
+        if ($lifetime === null) {
             $lifetime = $this->defaultLifetime;
         }
         if ($lifetime === 0 || $lifetime > $this->maximumLifetime) {
index 50718ae..25cbd7c 100644 (file)
@@ -129,7 +129,7 @@ class Richtext
                 }
                 $typoScriptArray[$key . '.'] = $this->convertPlainArrayToTypoScriptArray($value);
             } else {
-                $typoScriptArray[$key] = is_null($value) ? '' : $value;
+                $typoScriptArray[$key] = $value === null ? '' : $value;
             }
         }
         return $typoScriptArray;
index 30ccd80..d0d6509 100644 (file)
@@ -97,7 +97,7 @@ class Bootstrap
      */
     public static function getInstance()
     {
-        if (is_null(static::$instance)) {
+        if (static::$instance === null) {
             $applicationContext = getenv('TYPO3_CONTEXT') ?: (getenv('REDIRECT_TYPO3_CONTEXT') ?: 'Production');
             self::$instance = new static($applicationContext);
             self::$instance->defineTypo3RequestTypes();
index e4bcafb..22d34ef 100644 (file)
@@ -351,15 +351,15 @@ class MarkerBasedTemplateService
     {
         $runtimeCache = $this->getRuntimeCache();
         // If not arrays then set them
-        if (is_null($markContentArray)) {
+        if ($markContentArray === null) {
             // Plain markers
             $markContentArray = [];
         }
-        if (is_null($subpartContentArray)) {
+        if ($subpartContentArray === null) {
             // Subparts being directly substituted
             $subpartContentArray = [];
         }
-        if (is_null($wrappedSubpartContentArray)) {
+        if ($wrappedSubpartContentArray === null) {
             // Subparts being wrapped
             $wrappedSubpartContentArray = [];
         }
index 356fabf..c758f80 100644 (file)
@@ -57,7 +57,7 @@ class ImageInfo extends FileInfo implements LoggerAwareInterface
      */
     protected function getImageSizes()
     {
-        if (is_null($this->imageSizes)) {
+        if ($this->imageSizes === null) {
             $this->imageSizes = getimagesize($this->getPathname());
 
             // Fallback to IM identify
index 00e8b5d..95c0ad9 100644 (file)
@@ -424,7 +424,7 @@ class ArrayUtility
                 }
             } elseif (is_int($value) || is_float($value)) {
                 $lines .= $value . ',' . LF;
-            } elseif (is_null($value)) {
+            } elseif ($value === null) {
                 $lines .= 'null' . ',' . LF;
             } elseif (is_bool($value)) {
                 $lines .= $value ? 'true' : 'false';
index b1f835a..ba84253 100644 (file)
@@ -4045,7 +4045,7 @@ class GeneralUtility
      */
     public static function presetApplicationContext(ApplicationContext $applicationContext)
     {
-        if (is_null(static::$applicationContext)) {
+        if (static::$applicationContext === null) {
             static::$applicationContext = $applicationContext;
         } else {
             throw new \RuntimeException('Trying to override applicationContext which has already been defined!', 1376084316);
index a6020c5..e3a9b0f 100644 (file)
@@ -767,7 +767,7 @@ class Backend implements \TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface
         $row = [
             $columnMap->getParentKeyFieldName() => (int)$parentUid,
             $columnMap->getChildKeyFieldName() => (int)$object->getUid(),
-            $columnMap->getChildSortByFieldName() => !is_null($sortingPosition) ? (int)$sortingPosition : 0
+            $columnMap->getChildSortByFieldName() => $sortingPosition !== null ? (int)$sortingPosition : 0
         ];
         $relationTableName = $columnMap->getRelationTableName();
         if ($columnMap->getRelationTablePageIdColumnName() !== null) {
index beac790..1a0287d 100644 (file)
@@ -174,7 +174,7 @@ class LazyObjectStorage extends \TYPO3\CMS\Extbase\Persistence\ObjectStorage imp
             $this->initialize();
             $numberOfElements = count($this->storage);
         }
-        if (is_null($numberOfElements)) {
+        if ($numberOfElements === null) {
             throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception('The number of elements could not be determined.', 1252514486);
         }
         return $numberOfElements;
index b07bcc5..a2e03e4 100644 (file)
@@ -699,7 +699,7 @@ class DataMapper implements \TYPO3\CMS\Core\SingletonInterface
         } elseif (is_int($input)) {
             $parameter = $input;
         } elseif ($input instanceof \DateTime) {
-            if (!is_null($columnMap) && !is_null($columnMap->getDateTimeStorageFormat())) {
+            if ($columnMap !== null && $columnMap->getDateTimeStorageFormat() !== null) {
                 $storageFormat = $columnMap->getDateTimeStorageFormat();
                 $timeZoneToStore = clone $input;
                 // set to UTC to store in database
index 6adeb6c..d5eead2 100644 (file)
@@ -119,7 +119,7 @@ class ImageService implements \TYPO3\CMS\Core\SingletonInterface
      */
     public function getImage($src, $image, $treatIdAsReference)
     {
-        if (is_null($image)) {
+        if ($image === null) {
             $image = $this->getImageFromSourceString($src, $treatIdAsReference);
         } elseif (is_callable([$image, 'getOriginalResource'])) {
             // We have a domain model, so we need to fetch the FAL resource object from there
index c080a65..14d136e 100644 (file)
@@ -109,7 +109,7 @@ class DebuggerUtility
             $dump = sprintf('%s (%s)', self::ansiEscapeWrap($value, '35', $ansiColors), gettype($value));
         } elseif (is_bool($value)) {
             $dump = $value ? self::ansiEscapeWrap('TRUE', '32', $ansiColors) : self::ansiEscapeWrap('FALSE', '32', $ansiColors);
-        } elseif (is_null($value) || is_resource($value)) {
+        } elseif ($value === null || is_resource($value)) {
             $dump = gettype($value);
         } elseif (is_array($value)) {
             $dump = self::renderArray($value, $level + 1, $plainText, $ansiColors);
index badf8a6..9ebcd36 100644 (file)
@@ -286,7 +286,7 @@ class LocalizationUtility
      */
     protected static function getConfigurationManager()
     {
-        if (!is_null(static::$configurationManager)) {
+        if (static::$configurationManager !== null) {
             return static::$configurationManager;
         }
         $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
index 7628d16..4e1fb57 100644 (file)
@@ -337,7 +337,7 @@ class Extension extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
     public function getDefaultState($state = null)
     {
         $defaultState = '';
-        if (is_null($state)) {
+        if ($state === null) {
             $defaultState = self::$defaultStates;
         } else {
             if (is_string($state)) {
index 64286ec..82eaf7b 100644 (file)
@@ -51,7 +51,7 @@ class Mirrors extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
      */
     public function setSelect($mirrorId = null)
     {
-        if (is_null($mirrorId)) {
+        if ($mirrorId === null) {
             $this->isRandomSelection = true;
         } else {
             if (is_int($mirrorId) && $mirrorId >= 1 && $mirrorId <= count($this->mirrors)) {
index 3ea1602..9407de8 100644 (file)
@@ -95,7 +95,7 @@ class ExtensionStatus implements \TYPO3\CMS\Reports\StatusProviderInterface
         /** @var $mainRepository \TYPO3\CMS\Extensionmanager\Domain\Model\Repository */
         $mainRepository = $this->repositoryRepository->findOneTypo3OrgRepository();
 
-        if (is_null($mainRepository) === true) {
+        if ($mainRepository === null) {
             $value = $this->languageService->getLL('report.status.mainRepository.notFound.value');
             $message = $this->languageService->getLL('report.status.mainRepository.notFound.message');
             $severity = \TYPO3\CMS\Reports\Status::ERROR;
index 3a959c1..8242e11 100644 (file)
@@ -143,7 +143,7 @@ class ExtensionListUtility implements \SplObserver
      */
     public function import($localExtensionListFile, $repositoryUid = null)
     {
-        if (!is_null($repositoryUid) && is_int($repositoryUid)) {
+        if ($repositoryUid !== null && is_int($repositoryUid)) {
             $this->repositoryUid = $repositoryUid;
         }
         $zlibStream = 'compress.zlib://';
@@ -192,11 +192,11 @@ class ExtensionListUtility implements \SplObserver
             0,
             (int)$subject->getAlldownloadcounter(),
             (int)$subject->getDownloadcounter(),
-            !is_null($subject->getTitle()) ? $subject->getTitle() : '',
+            $subject->getTitle() !== null ? $subject->getTitle() : '',
             $subject->getOwnerusername(),
-            !is_null($subject->getAuthorname()) ? $subject->getAuthorname() : '',
-            !is_null($subject->getAuthoremail()) ? $subject->getAuthoremail() : '',
-            !is_null($subject->getAuthorcompany()) ? $subject->getAuthorcompany() : '',
+            $subject->getAuthorname() !== null ? $subject->getAuthorname() : '',
+            $subject->getAuthoremail() !== null ? $subject->getAuthoremail() : '',
+            $subject->getAuthorcompany() !== null ? $subject->getAuthorcompany() : '',
             (int)$subject->getLastuploaddate(),
             $subject->getT3xfilemd5(),
             $this->repositoryUid,
index 6b21f0e..60c680d 100644 (file)
@@ -232,7 +232,7 @@ class Helper implements \TYPO3\CMS\Core\SingletonInterface
     public function getMirrors($forcedUpdateFromRemote = true)
     {
         $assignedMirror = $this->repository->getMirrors();
-        if ($forcedUpdateFromRemote || is_null($assignedMirror) || !is_object($assignedMirror)) {
+        if ($forcedUpdateFromRemote || $assignedMirror === null || !is_object($assignedMirror)) {
             if ($forcedUpdateFromRemote || !is_file($this->getLocalMirrorListFile())) {
                 $this->fetchMirrorListFile();
             }
index 574c1ab..f434629 100644 (file)
@@ -271,7 +271,7 @@ class SelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFie
             return true;
         }
         if ($this->hasArgument('multiple')) {
-            if (is_null($selectedValue) && $this->arguments['selectAllByDefault'] === true) {
+            if ($selectedValue === null && $this->arguments['selectAllByDefault'] === true) {
                 return true;
             }
             if (is_array($selectedValue) && in_array($value, $selectedValue)) {
index ec0139b..f6a76c7 100644 (file)
@@ -120,7 +120,7 @@ class ImageViewHelper extends AbstractTagBasedViewHelper
      */
     public function render()
     {
-        if ((is_null($this->arguments['src']) && is_null($this->arguments['image'])) || (!is_null($this->arguments['src']) && !is_null($this->arguments['image']))) {
+        if (($this->arguments['src'] === null && $this->arguments['image'] === null) || ($this->arguments['src'] !== null && $this->arguments['image'] !== null)) {
             throw new Exception('You must either specify a string src or a File object.', 1382284106);
         }
 
index 50774d9..fdd0dda 100644 (file)
@@ -103,7 +103,7 @@ class ImageViewHelper extends AbstractViewHelper
         $cropString = $arguments['crop'];
         $absolute = $arguments['absolute'];
 
-        if ((is_null($src) && is_null($image)) || (!is_null($src) && !is_null($image))) {
+        if (($src === null && $image === null) || ($src !== null && $image !== null)) {
             throw new Exception('You must either specify a string src or a File object.', 1460976233);
         }
 
index a2bb7fa..2e82dd8 100644 (file)
@@ -102,7 +102,7 @@ class ConditionMatcher extends AbstractConditionMatcher
     {
         $vars = explode(':', $var, 2);
         $val = $this->getVariableCommon($vars);
-        if (is_null($val)) {
+        if ($val === null) {
             $splitAgain = explode('|', $vars[1], 2);
             $k = trim($splitAgain[0]);
             if ($k) {
index 95d0423..be8481d 100644 (file)
@@ -7007,7 +7007,7 @@ class ContentObjectRenderer
                     // Handle float
                     $markerValues[$marker] = (float)$tempValue;
                 }
-            } elseif (is_null($tempValue)) {
+            } elseif ($tempValue === null) {
                 // It represents NULL
                 $markerValues[$marker] = 'NULL';
             } elseif (!empty($conf['markers.'][$dottedMarker]['commaSeparatedList'])) {
index 23a080e..029f25a 100644 (file)
@@ -1721,7 +1721,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
      */
     public function checkPageGroupAccess($row, $groupList = null)
     {
-        if (is_null($groupList)) {
+        if ($groupList === null) {
             $groupList = $this->gr_list;
         }
         if (!is_array($groupList)) {
index e85e5ce..e06c904 100644 (file)
@@ -104,7 +104,7 @@ class EidUtility
     {
         // Cached instance
         static $tsfe = null;
-        if (is_null($tsfe)) {
+        if ($tsfe === null) {
             $tsfe = GeneralUtility::makeInstance(TypoScriptFrontendController::class, null, 0, 0);
         }
         return $tsfe;
index ea34606..6220f62 100644 (file)
@@ -209,7 +209,7 @@ abstract class AbstractNode
      */
     protected function getRelativePathBelowSiteRoot($path = null)
     {
-        if (is_null($path)) {
+        if ($path === null) {
             $path = $this->getAbsolutePath();
         }
         $pathSiteWithoutTrailingSlash = substr(PATH_site, 0, -1);
index 037c749..4b7a28a 100644 (file)
@@ -36,7 +36,7 @@ class DirectoryNode extends AbstractNode implements NodeInterface
      */
     public function __construct(array $structure, NodeInterface $parent = null)
     {
-        if (is_null($parent)) {
+        if ($parent === null) {
             throw new Exception\InvalidArgumentException(
                 'Node must have parent',
                 1366222203
index 0e1855d..a8265ba 100644 (file)
@@ -40,7 +40,7 @@ class FileNode extends AbstractNode implements NodeInterface
      */
     public function __construct(array $structure, NodeInterface $parent = null)
     {
-        if (is_null($parent)) {
+        if ($parent === null) {
             throw new Exception\InvalidArgumentException(
                 'File node must have parent',
                 1366927513
@@ -129,7 +129,7 @@ class FileNode extends AbstractNode implements NodeInterface
             $resultCreateFile = $this->createFile();
             $result[] = $resultCreateFile;
             if ($resultCreateFile->getSeverity() === FlashMessage::OK
-                && !is_null($this->targetContent)
+                && $this->targetContent !== null
             ) {
                 $result[] = $this->setContent();
                 if (!$this->isPermissionCorrect()) {
@@ -250,7 +250,7 @@ class FileNode extends AbstractNode implements NodeInterface
             );
         }
         $result = false;
-        if (is_null($this->targetContent)) {
+        if ($this->targetContent === null) {
             $result = true;
         } else {
             $targetContentHash = md5($this->targetContent);
@@ -277,7 +277,7 @@ class FileNode extends AbstractNode implements NodeInterface
                 1367060201
             );
         }
-        if (is_null($this->targetContent)) {
+        if ($this->targetContent === null) {
             throw new Exception(
                 'Target content not defined for ' . $absolutePath,
                 1367060202
index fbf4287..93867e0 100644 (file)
@@ -35,7 +35,7 @@ class LinkNode extends AbstractNode implements NodeInterface
      */
     public function __construct(array $structure, NodeInterface $parent = null)
     {
-        if (is_null($parent)) {
+        if ($parent === null) {
             throw new Exception\InvalidArgumentException(
                 'Link node must have parent',
                 1380485700
index ddd109a..7f3ea39 100644 (file)
@@ -31,7 +31,7 @@ class RootNode extends DirectoryNode implements RootNodeInterface
      */
     public function __construct(array $structure, NodeInterface $parent = null)
     {
-        if (!is_null($parent)) {
+        if ($parent !== null) {
             throw new Exception\RootNodeException(
                 'Root node must not have parent',
                 1366140117
index f0db11a..1c7342a 100644 (file)
@@ -130,7 +130,7 @@ class RequestHandler implements RequestHandlerInterface
                     'success' => true,
                 ]);
             } else {
-                if (is_null($password) || empty($password)) {
+                if ($password === null || empty($password)) {
                     $messageQueue = (new FlashMessageQueue('install'))->enqueue(
                         new FlashMessage('Please enter the install tool password', '', FlashMessage::ERROR)
                     );
index 8eac17e..12598de 100644 (file)
@@ -41,7 +41,7 @@ class WarningMessagePostProcessor
         /** @var Registry $registry */
         $registry = GeneralUtility::makeInstance(Registry::class);
         $highestSeverity = $registry->get('tx_reports', 'status.highestSeverity', null);
-        if (!is_null($highestSeverity)) {
+        if ($highestSeverity !== null) {
             if ($highestSeverity > ReportStatus::OK) {
                 // Display a message that there's something wrong and that
                 // the admin should take a look at the detailed status report
index 9b0ee63..299a8c1 100644 (file)
@@ -211,7 +211,7 @@ class BlowfishSalt extends Md5Salt
         }
         // Check whether the iteration count used differs from the standard number.
         $countLog2 = $this->getCountLog2($saltedPW);
-        return !is_null($countLog2) && $countLog2 < $this->getHashCount();
+        return $countLog2 !== null && $countLog2 < $this->getHashCount();
     }
 
     /**
@@ -272,7 +272,7 @@ class BlowfishSalt extends Md5Salt
      */
     public function setHashCount(int $hashCount = null)
     {
-        self::$hashCount = !is_null($hashCount) && $hashCount >= $this->getMinHashCount() && $hashCount <= $this->getMaxHashCount() ? $hashCount : self::HASH_COUNT;
+        self::$hashCount = $hashCount !== null && $hashCount >= $this->getMinHashCount() && $hashCount <= $this->getMaxHashCount() ? $hashCount : self::HASH_COUNT;
     }
 
     /**
index 9388355..902409a 100644 (file)
@@ -294,7 +294,7 @@ class Pbkdf2Salt extends AbstractComposedSalt
         }
         // Check whether the iteration count used differs from the standard number.
         $iterationCount = $this->getIterationCount($saltedPW);
-        return !is_null($iterationCount) && $iterationCount < $this->getHashCount();
+        return $iterationCount !== null && $iterationCount < $this->getHashCount();
     }
 
     /**
@@ -355,7 +355,7 @@ class Pbkdf2Salt extends AbstractComposedSalt
      */
     public function setHashCount(int $hashCount = null)
     {
-        self::$hashCount = !is_null($hashCount) && $hashCount >= $this->getMinHashCount() && $hashCount <= $this->getMaxHashCount() ? $hashCount : self::HASH_COUNT;
+        self::$hashCount = $hashCount !== null && $hashCount >= $this->getMinHashCount() && $hashCount <= $this->getMaxHashCount() ? $hashCount : self::HASH_COUNT;
     }
 
     /**
index 2c20d38..4f6ca21 100644 (file)
@@ -371,7 +371,7 @@ class PhpassSalt extends AbstractComposedSalt
      */
     public function setHashCount(int $hashCount = null)
     {
-        self::$hashCount = !is_null($hashCount) && $hashCount >= $this->getMinHashCount() && $hashCount <= $this->getMaxHashCount() ? $hashCount : self::HASH_COUNT;
+        self::$hashCount = $hashCount !== null && $hashCount >= $this->getMinHashCount() && $hashCount <= $this->getMaxHashCount() ? $hashCount : self::HASH_COUNT;
     }
 
     /**
index 74efd55..a51c91b 100644 (file)
@@ -316,7 +316,7 @@ class StagesService implements \TYPO3\CMS\Core\SingletonInterface
         $workspaceStageRecs = $this->getStagesForWS();
         if (is_array($workspaceStageRecs) && !empty($workspaceStageRecs)) {
             reset($workspaceStageRecs);
-            while (!is_null(($workspaceStageRecKey = key($workspaceStageRecs)))) {
+            while (($workspaceStageRecKey = key($workspaceStageRecs)) !== null) {
                 $workspaceStageRec = current($workspaceStageRecs);
                 if ($workspaceStageRec['uid'] == $stageId) {
                     $nextStage = next($workspaceStageRecs);
@@ -383,7 +383,7 @@ class StagesService implements \TYPO3\CMS\Core\SingletonInterface
         $workspaceStageRecs = $this->getStagesForWS();
         if (is_array($workspaceStageRecs) && !empty($workspaceStageRecs)) {
             end($workspaceStageRecs);
-            while (!is_null(($workspaceStageRecKey = key($workspaceStageRecs)))) {
+            while (($workspaceStageRecKey = key($workspaceStageRecs)) !== null) {
                 $workspaceStageRec = current($workspaceStageRecs);
                 if ($workspaceStageRec['uid'] == $stageId) {
                     $prevStage = prev($workspaceStageRecs);