For example, the following method contains 22 lines of code, and it is impossible to publish it in a useful way.
It is only possible to publish it as…
chopped:
/**
* Update active sessions status except a specific one
*
* @param int $status
* @param int $userId
* @param string $sessionIdToExclude
* @param int $updateOlderThen
* @return int The number of affected rows.
*/
public function updateActiveSessionsStatus(
$status,
$userId,
$sessionIdToExclude,
$updateOlderThen = null
) {
return $this->getResource()->updateStatusByUserId(
$status,
$userId,
[\Magento\Security\Model\AdminSessionInfo::LOGGED_IN],
[$sessionIdToExclude],
This file has been truncated. show original
or splitted:
/**
* Update active sessions status except a specific one
*
* @param int $status
* @param int $userId
* @param string $sessionIdToExclude
* @param int $updateOlderThen
* @return int The number of affected rows.
*/
public function updateActiveSessionsStatus(
$status,
$userId,
$sessionIdToExclude,
$updateOlderThen = null
) {
return $this->getResource()->updateStatusByUserId(
$status,
$userId,
[\Magento\Security\Model\AdminSessionInfo::LOGGED_IN],
[$sessionIdToExclude],
$updateOlderThen
);
}
It would be nice to let the forum’s administrator to decide what should be the number of lines limitation instead of the currently 20.
riking
(Kane York)
10. April 2016 um 08:24
2
Meh, if you need to share that much code copy it into a backtick-fenced block and link to the source on the next line (with a onebox breaker, such as “Source: link”).
2 „Gefällt mir“