Get the reason why the move operation can't be performed.

@return string empty string if the operation CAN be performed
193526
protected function whyCantMove()
    {
        $destinationPageChecker = new Checker($this->getDestinationPage());
        $destinationPageID = $this->getDestinationPage()->getCollectionID();
        foreach ($this->getOriginalPages() as $originalPage) {
            if ($originalPage->getCollectionParentID() == $destinationPageID) {
                return t('"%1$s" is already the parent page of "%2$s".', $this->getDestinationPage()->getCollectionName(), $originalPage->getCollectionName());
            }
            $originalPageChecker = new Checker($originalPage);
            if (!$originalPageChecker->canMoveOrCopyPage()) {
                return t('You don\'t have the permission move the page "%s".', $originalPage->getCollectionName());
            }
            if ($originalPage->getCollectionID() == $destinationPageID) {
                return t('It\'s not possible to move the page "%s" under itself.', $originalPage->getCollectionName());
            }
            if (in_array($destinationPageID, $originalPage->getCollectionChildrenArray())) {
                return t('It\'s not possible to move the page "%s" under one of its child pages.', $originalPage->getCollectionName());
            }
            $originalPageType = $originalPage->getPageTypeObject();
            if (!$destinationPageChecker->canAddSubpage($originalPageType)) {
                return t('You do not have sufficient privileges to move the page "%1$s" under "%2$s".', $originalPage->getCollectionName(), $this->getDestinationPage()->getCollectionName());
            }
        }

        return '';
    }
941776
public function findError()
    {
        $requiredEnvironmentError = $this->ensureRequiredEnvironment();
        if ($requiredEnvironmentError !== null) {
            return $this->setErrorTitle($requiredEnvironmentError, 'Environment requirements not fulfilled');
        }

        $filePermissionsError = $this->checkFilePermissions();
        if ($filePermissionsError !== null) {
            return $this->setErrorTitle($filePermissionsError, 'Error with file system permissions');
        }

        return null;
    }
1231303
public function getReasonCode()
    {
        $code = null;

        if (isset($this->data->transactionResponse->messages)) {
            // In case of a successful transaction, a "messages" element is present
            $code = intval((string)$this->data->transactionResponse->messages->message->code);
        } elseif (isset($this->data->transactionResponse->errors)) {
            // In case of an unsuccessful transaction, an "errors" element is present
            $code = intval((string)$this->data->transactionResponse->errors->error->errorCode);
        } elseif (isset($this->data->messages->message)) {
            // In case of invalid request, the top-level message provides details.
            $code = (string)$this->data->messages->message->code;
        }

        return $code;
    }
988626
public function assemble() {
		if ($this->inputFiles->isEmpty()) {
			throw new OperationError('Nothing to assemble, you should add at least one item');
		}
		
		$result = '';
		
		foreach ($this->inputFiles as $path) {
			$content = file_get_contents($path);
			
			if ($content === false) {
				throw new OperationError('Unable to read the file: "' . $path . '"');
			}
			
			if ($this->fileInfo) {
				$result .= sprintf($this->fileInfoTemplate, $path);
				$result .= $this->delimiter;
			}
			
			$result .= $content;
			$result .= $this->delimiter;
		}
		
		return $result;
	}
775393
public function getTransfered()
    {
        $base = log($this->transfered, 1024);
        $suffixes = array(
            '',
            'K',
            'M',
            'G',
            'T',
        );
        return round(pow(1024, $base - floor($base)), 2) . ' ' . $suffixes[floor($base)];
    }
1009064
public function writeIfNotExists(): string
    {
        if ($this->targetFile->exists()) {
            return $this->targetFile->getPath();
        }

        return $this->write();
    }
1191342
public function toString()
    {
        if (!$this->getCommand()->getExecuted() && !$this->execute()) {
            return false;
        }
        return file_get_contents($this->getTmpFile()->getFileName());
    }
797350
public function getDispatchAction()
    {
        $args = $this->request->getAsArray('args');
        $arg = array_shift($args);
        if (preg_match('/^(\w+\.\w+)$/', $arg, $matches)) {
            $action = $matches[1];
            return $action;
        }
    }
971324
public function isNullable()
    {
        if (null === $this->nullable) {
            return null;
        }

        return $this->nullable || 'null' === strtolower($this->getDefault() ?? '');
    }
830946
public function getSwapUsed()
    {
        if (count($this->_swapDevices) > 0) {
            $used = 0;
            foreach ($this->_swapDevices as $dev) {
                $used += $dev->getUsed();
            }

            return $used;
        } else {
            return null;
        }
    }
267837
private function isValid() {
		$data = $this->getTransient();
		$valid = array( 'key', 'cipher', 'iv', 'data' );
		if ( is_object( $data ) ) {
			$props = array_keys( get_object_vars( $data ) );
			$valid = array_diff( $valid, $props );
		}

		return empty( $valid );
	}
953685
public function getMsisdn()
    {
        $this->debug->debug(__FUNCTION__, 'isMobile: ' . $this->mDetect->isMobile());
        $this->debug->debug(__FUNCTION__, 'isTablet: ' . $this->mDetect->isTablet());
        try {
            if ($this->mDetect->isMobile() || $this->mDetect->isTablet()) {
                $msisdn = $this->MSISDN->getMsisdn();
                $this->debug->info(__FUNCTION__, 'MSISDN: ' . json_encode($msisdn));

                return $msisdn;
            }
        }
        catch (\Exception $e) {
            $message = 'Error File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Code: ' . $e->getCode() . ' - Message: ' . $e->getMessage();
            $this->debug->error(__FUNCTION__, $message);

            return NULL;
        }
        $this->debug->info(__FUNCTION__, 'MSISDN is Null');

        return NULL;
    }
772649
public function getCodigoTransmissao()
    {
        $conta = $this->getConta();
        if (strlen($conta) == 9) {
            $conta = substr($conta, 0, 7);
        }

        return Util::formatCnab('9', $this->getAgencia(), 4)
            . Util::formatCnab('9', substr($this->getCodigoCliente(), 0, 7), 8)
            . Util::formatCnab('9', $conta, 8);
    }
1220525
public function error()
    {
        $errorNo = $_FILES[$this->file]['error'] ?? NULL;

        if( $errorNo === NULL )
        {
            return $this->getLang['upload:unknownError'];
        }

        if( is_array($errorNo) )
        {
            $errno = 0;

            foreach( $errorNo as $no )
            {
                if( ! empty($no) )
                {
                    $errno = $no;
                    break;
                }
            }

            $errorNo = $errno;
        }

        $lang = $this->getLang;

        $this->errors =
        [
            '0'  => "scc",            
            '1'  => $lang['upload:1'],
            '2'  => $lang['upload:2'], 
            '3'  => $lang['upload:3'], 
            '4'  => $lang['upload:4'], 
            '6'  => $lang['upload:6'], 
            '7'  => $lang['upload:7'], 
            '8'  => $lang['upload:8'], 
            '9'  => $lang['upload:9'],
            '10' => $lang['upload:10']
        ];
       
        if( ! empty($this->manuelError) )
        {
            return $this->errors[$this->manuelError];
        }
        elseif( ! empty($this->extensionControl) )
        {
            return $this->extensionControl;
        }
        elseif( ! empty($this->errors[$errorNo]) )
        {
            if( $this->errors[$errorNo] === "scc" )
            {
                return false;
            }
            return $this->errors[$errorNo];
        }
        else
        {
            return $lang['upload:unknownError'];
        }
    }
1080696
public function getErrorsAsString()
    {
        $string = '';
        foreach ($this->getErrors() as $error) {
            $string .= sprintf(
                "%s: %s",
                $error['field'],
                $error['message']
            );
            if (isset($error['rejected'])) {
                $string .= sprintf(" ('%s' given)", $error['rejected']);
            }
            $string .= ";\n";
        }

        return trim($string);
    }
1134611
public function getCodigoTransmissao()
    {
        return Util::formatCnab('9', $this->getAgencia(), 4)
        . Util::formatCnab('9', '0000', 4)
        . Util::formatCnab('9', $this->getCodigoCliente(), 7);
    }
41857
public function getFrom()
    {
        if ($this->from) {
            return $this->from;
        }

        if ($this->alphaNumSender && strlen($this->alphaNumSender) > 0) {
            return $this->alphaNumSender;
        }
    }