Skip to content

Commit

Permalink
PhpDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
niksamokhvalov committed Nov 3, 2015
1 parent 074d98e commit e7d4c60
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
10 changes: 10 additions & 0 deletions src/Finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,21 @@ protected function getFromCache($filter = [], $shard = null)
}
}

/**
* Registration of the tag cache.
*
* @param string $tag
*/
protected function registerCacheTag($tag)
{
Application::getInstance()->getTaggedCache()->registerTag($tag);
}

/**
* Deletes all cache by tag.
*
* @param string $tag
*/
protected static function deleteCacheByTag($tag)
{
$cache = Application::getInstance()->getTaggedCache();
Expand Down
14 changes: 4 additions & 10 deletions src/Iblock/IblockTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,10 @@ protected static function validateCode($type, $code, $iblockId = null)
throw new \Exception('EMPTY_CODE');
}

$rsSimilarIblock = IblockTable::getList([
'filter' => [
'IBLOCK_TYPE_ID' => $type,
'CODE' => $code,
'!ID' => $iblockId
],
'select' => [
'ID'
]
]);
$rsSimilarIblock = IblockTable::query()
->setFilter(['IBLOCK_TYPE_ID' => $type, 'CODE' => $code, '!ID' => $iblockId])
->setSelect(['ID'])
->exec();

if ($rsSimilarIblock->getSelectedRowsCount() > 0)
{
Expand Down

0 comments on commit e7d4c60

Please sign in to comment.