File DatabaseBlockStore.php
has 1440 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Class for DatabaseBlock objects to interact with the database
*
* This program is free software; you can redistribute it and/or modify
Function newLoad
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
private function newLoad(
$specificTarget,
$specificType,
$fromPrimary,
$vagueTarget = null
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
DatabaseBlockStore
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class DatabaseBlockStore {
/** The old schema */
public const SCHEMA_IPBLOCKS = 'ipblocks';
/** The new schema */
public const SCHEMA_BLOCK = 'block';
Method getQueryInfo
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getQueryInfo( $schema ) {
if ( $this->readStage === SCHEMA_COMPAT_READ_OLD ) {
$commentQuery = $this->commentStore->getJoin( 'ipb_reason' );
if ( $schema === self::SCHEMA_IPBLOCKS ) {
return [
Method newLoad
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function newLoad(
$specificTarget,
$specificType,
$fromPrimary,
$vagueTarget = null
Method acquireTarget
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function acquireTarget(
DatabaseBlock $block,
IDatabase $dbw,
$expectedTargetCount
) {
Method updateBlock
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateBlock( DatabaseBlock $block ) {
$this->logger->debug( 'Updating block; timestamp ' . $block->getTimestamp() );
$block->assertWiki( $this->wikiId );
Method getArrayForBlockUpdate
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getArrayForBlockUpdate(
DatabaseBlock $block,
IDatabase $dbw,
$schema
): array {
Method doAutoblock
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function doAutoblock( DatabaseBlock $parentBlock, $autoblockIP ) {
// If autoblocks are disabled, go away.
if ( !$parentBlock->isAutoblocking() ) {
return false;
}
Function updateBlock
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function updateBlock( DatabaseBlock $block ) {
$this->logger->debug( 'Updating block; timestamp ' . $block->getTimestamp() );
$block->assertWiki( $this->wikiId );
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getArrayForAutoblockUpdate
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getArrayForAutoblockUpdate( DatabaseBlock $block, $schema ): array {
$blocker = $block->getBlocker();
if ( !$blocker ) {
throw new RuntimeException( __METHOD__ . ': this block does not have a blocker' );
}
Method updateTarget
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateTarget( DatabaseBlock $block, $newTarget ) {
$dbw = $this->getPrimaryDB();
$blockId = $block->getId( $this->wikiId );
if ( !$blockId ) {
throw new InvalidArgumentException(
Method newFromRow
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function newFromRow( IReadableDatabase $db, $row ) {
if ( isset( $row->ipb_id ) ) {
return new DatabaseBlock( [
'address' => $row->ipb_address,
'wiki' => $this->wikiId,
Method newListFromIPs
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function newListFromIPs( array $addresses, $applySoftBlocks, $fromPrimary = false ) {
if ( $addresses === [] ) {
return [];
}
Method deleteBlocksMatchingConds
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function deleteBlocksMatchingConds( array $conds, $limit = null ) {
$dbw = $this->getPrimaryDB();
$affected = 0;
if ( $this->writeStage & SCHEMA_COMPAT_WRITE_OLD ) {
$oldConds = self::mapCondsToOldSchema( $conds );
Method deleteBlock
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function deleteBlock( DatabaseBlock $block ): bool {
if ( $this->readOnlyMode->isReadOnly( $this->wikiId ) ) {
return false;
}
Function newListFromIPs
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function newListFromIPs( array $addresses, $applySoftBlocks, $fromPrimary = false ) {
if ( $addresses === [] ) {
return [];
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function acquireTarget
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private function acquireTarget(
DatabaseBlock $block,
IDatabase $dbw,
$expectedTargetCount
) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function attemptInsert
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private function attemptInsert(
DatabaseBlock $block,
IDatabase $dbw,
$expectedTargetCount
) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method attemptInsert
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function attemptInsert(
DatabaseBlock $block,
IDatabase $dbw,
$expectedTargetCount
) {
Method __construct
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
ServiceOptions $options,
LoggerInterface $logger,
ActorStoreFactory $actorStoreFactory,
BlockRestrictionStore $blockRestrictionStore,
CommentStore $commentStore,
Method getRangeCond
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getRangeCond( $start, $end, $schema ) {
// Per T16634, we want to include relevant active range blocks; for
// range blocks, we want to include larger ranges which enclose the given
// range. We know that all blocks must be smaller than $wgBlockCIDRLimit,
// so we can improve performance by filtering on a LIKE clause
Method purgeExpiredBlocks
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function purgeExpiredBlocks() {
if ( $this->readOnlyMode->isReadOnly( $this->wikiId ) ) {
return;
}
Function doAutoblock
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function doAutoblock( DatabaseBlock $parentBlock, $autoblockIP ) {
// If autoblocks are disabled, go away.
if ( !$parentBlock->isAutoblocking() ) {
return false;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function deleteBlocksMatchingConds
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function deleteBlocksMatchingConds( array $conds, $limit = null ) {
$dbw = $this->getPrimaryDB();
$affected = 0;
if ( $this->writeStage & SCHEMA_COMPAT_WRITE_OLD ) {
$oldConds = self::mapCondsToOldSchema( $conds );
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function insertBlock
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function insertBlock(
DatabaseBlock $block,
$expectedTargetCount = 0
) {
$block->assertWiki( $this->wikiId );
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method insertBlock
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function insertBlock(
DatabaseBlock $block,
$expectedTargetCount = 0
) {
$block->assertWiki( $this->wikiId );
Method updateTimestamp
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateTimestamp( DatabaseBlock $block ) {
$block->assertWiki( $this->wikiId );
if ( $block->getType() !== Block::TYPE_AUTO ) {
return;
}
Method performRetroactiveAutoblock
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function performRetroactiveAutoblock( DatabaseBlock $block ): array {
if ( !$this->options->get( MainConfigNames::PutIPinRC ) ) {
// No IPs in the recent changes table to autoblock
return [];
}
Method purgeExpiredConflicts
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function purgeExpiredConflicts(
DatabaseBlock $block,
IDatabase $dbw
) {
$ipblocksIDs = [];
Method deleteBlockRows
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function deleteBlockRows( $rows ) {
$ids = [];
$deltasByTarget = [];
foreach ( $rows as $row ) {
$ids[] = (int)$row->bl_id;
Method __construct
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(
ServiceOptions $options,
LoggerInterface $logger,
ActorStoreFactory $actorStoreFactory,
BlockRestrictionStore $blockRestrictionStore,
Method newListFromConds
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function newListFromConds( $conds, $fromPrimary = false, $includeExpired = false ) {
$db = $fromPrimary ? $this->getPrimaryDB() : $this->getReplicaDB();
if ( $this->readStage === SCHEMA_COMPAT_READ_OLD ) {
$conds = self::mapCondsToOldSchema( $conds );
if ( !$includeExpired ) {
Method newFromID
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function newFromID( $id ) {
$dbr = $this->getReplicaDB();
if ( $this->readStage === SCHEMA_COMPAT_READ_OLD ) {
$blockQuery = $this->getQueryInfo( self::SCHEMA_IPBLOCKS );
$res = $dbr->selectRow(
Function getQueryInfo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getQueryInfo( $schema ) {
if ( $this->readStage === SCHEMA_COMPAT_READ_OLD ) {
$commentQuery = $this->commentStore->getJoin( 'ipb_reason' );
if ( $schema === self::SCHEMA_IPBLOCKS ) {
return [
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function updateTarget
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function updateTarget( DatabaseBlock $block, $newTarget ) {
$dbw = $this->getPrimaryDB();
$blockId = $block->getId( $this->wikiId );
if ( !$blockId ) {
throw new InvalidArgumentException(
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function newListFromConds
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function newListFromConds( $conds, $fromPrimary = false, $includeExpired = false ) {
$db = $fromPrimary ? $this->getPrimaryDB() : $this->getReplicaDB();
if ( $this->readStage === SCHEMA_COMPAT_READ_OLD ) {
$conds = self::mapCondsToOldSchema( $conds );
if ( !$includeExpired ) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function chooseMostSpecificBlock
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function chooseMostSpecificBlock( array $blocks ) {
if ( count( $blocks ) === 1 ) {
return $blocks[0];
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getArrayForAutoblockUpdate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function getArrayForAutoblockUpdate( DatabaseBlock $block, $schema ): array {
$blocker = $block->getBlocker();
if ( !$blocker ) {
throw new RuntimeException( __METHOD__ . ': this block does not have a blocker' );
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this method. Open
return $status
? $status['id']
: false;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return [];
Avoid too many return
statements within this method. Open
return [ $id ];
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ( $schema === self::SCHEMA_IPBLOCKS ) {
$blockArray = [
'ipb_by_actor' => $blockerActor,
'ipb_create_account' => $block->isCreateAccountBlocked(),
'ipb_deleted' => (int)$block->getHideName(), // typecast required for SQLite
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 148.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
} else {
$blockArray = [
'bl_by_actor' => $blockerActor,
'bl_create_account' => $block->isCreateAccountBlocked(),
'bl_deleted' => (int)$block->getHideName(), // typecast required for SQLite
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 148.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ( $this->writeStage & SCHEMA_COMPAT_WRITE_OLD ) {
$dbw->newUpdateQueryBuilder()
->update( 'ipblocks' )
->set(
[
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 90.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ( $this->writeStage & SCHEMA_COMPAT_WRITE_NEW ) {
$dbw->newUpdateQueryBuilder()
->update( 'block' )
->set(
[
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 90.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76