Skip to content

Commit 7f12ceb

Browse files
committed
Updated doc blocks to add missing pieces and rebuild the documentation
1 parent 4460f1b commit 7f12ceb

13 files changed

+86
-9
lines changed

XBRL-Constants.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,8 +984,17 @@ function( $qname ) { return XBRL::endsWith( $qname->localName, 'Link' ); }
984984
* Severity values
985985
* -----------------------------------------------------------------------------
986986
*/
987+
/**
988+
* @var string Returns 'OK'
989+
*/
987990
public static $severityOK = ASSERTION_SEVERITY_OK;
991+
/**
992+
* @var string Returns 'ERROR'
993+
*/
988994
public static $severityERROR = ASSERTION_SEVERITY_ERROR;
995+
/**
996+
* @var string Returns 'WARNING'
997+
*/
989998
public static $severityWARNING = ASSERTION_SEVERITY_WARNING;
990999

9911000
/* -----------------------------------------------------------------------------

XBRL-Global.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ public function getTaxonomyWithPrefix( $prefix )
320320
/**
321321
* Create a path to the parallel folder for a url
322322
* @param string $url
323+
* @param string $cacheLocation
323324
* @return string
324325
*/
325326
public static function createPathFromUrl( $url, $cacheLocation )

XBRL-Instance.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5723,11 +5723,15 @@ private function validateTypedMembers( $component, $contextId, $types, $componen
57235723
// 3.1.4.4.3 (1) Should be checked when reading the context
57245724
// 3.1.4.4.3 (2) Should be checked when validaing the fact value
57255725

5726-
$typeElement = $types->getElement( $type );
5726+
// Need to map the local prefix to the source taxonomy prefix
5727+
$parts = explode( ":", $type );
5728+
$parts[0] = $this->normalizePrefix( $parts[0] );
5729+
$typeElement = $types->getElement( implode( ":", $parts ) );
57275730
if ( ! $typeElement ||
57285731
! count( $typeElement['types'] )
57295732
)
57305733
{
5734+
$x = 1;
57315735
$this->log()->dimension_validation(
57325736
"3.1.4.4.3",
57335737
"The type element of the member MUST be defined by the schema document",

XBRL-Package.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ public static function fromZip( ZipArchive $zipArchive, $className )
140140
}
141141

142142
/**
143+
* A reference to the archive hosting the package
143144
* @var ZipArchive $zipArchive
144145
*/
145146
private $zipArchive;
@@ -267,6 +268,7 @@ public function isPackage() {}
267268
/**
268269
* Returns true if the taxonomy in the package is compiled
269270
* @param string $compiledDir Path to the compiled taxonomies folder
271+
* @param string $basename Specifies an explicit basename. Otherwise the basename of the schema name is used.
270272
* @return bool
271273
*/
272274
public function isCompiled( $compiledDir, $basename = null )
@@ -615,8 +617,7 @@ protected function getTargetNamespace( $schemaName, $content, $throwException =
615617

616618
/**
617619
* Processes the schema document in a consistent way
618-
* @param \XBRL_Global A reference to the global context
619-
* @param string $schemaName Name of the schema represented by $content
620+
* @param \XBRL_Global $context A reference to the global context
620621
* @param bytes $content Expected to be an XML schema
621622
* @param bool $throwException True if an exception should be thrown on error or false is returned otherwise
622623
* @return bool
@@ -678,6 +679,9 @@ protected function processSchemaDocument( $context, $content, $throwException =
678679

679680
/**
680681
* Implements a Url map that allows a simple xsd name to map to a path that can be found in the cache
682+
* @param string $schemaNamespace
683+
* @param string $schemaFile
684+
* @throws Exception
681685
*/
682686
protected function setUrlMap( $schemaNamespace = null, $schemaFile = null )
683687
{
@@ -719,7 +723,7 @@ protected function setUrlMap( $schemaNamespace = null, $schemaFile = null )
719723

720724
/**
721725
* Returns the schema file base name without the extension
722-
* @param string $extension
726+
* @param string $replacementExtension
723727
* @return string
724728
*/
725729
public function getSchemaFileBasename( $replacementExtension = "")

XBRL-SEC-JSON-Package.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,11 @@ public function getFile( $path )
221221
return parent::getFile( $this->getActualUri( $path ) );
222222
}
223223

224+
/**
225+
* Returns a localized version of the schema file path
226+
* @param string $uri
227+
* @return string
228+
*/
224229
public function getActualUri( $uri )
225230
{
226231
return basename( $uri );

XBRL-SEC-XML-Package.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private function isValidMetaFile()
147147

148148
/**
149149
* Grab the values from the XML
150-
* @param SimpleXMLElement $element
150+
* @param SimpleXMLElement $elements
151151
*/
152152
private function processElement( $elements )
153153
{

XBRL-TaxonomyPackage.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class XBRL_TaxonomyPackage extends XBRL_Package
7171
const metaFolderName = "META-INF";
7272

7373
/**
74-
*
74+
* A reference to the catalog in the package
7575
* @var SimpleXMLElement
7676
*/
7777
private $catalog;
@@ -598,6 +598,11 @@ protected function determineSchemaFile()
598598
}
599599
}
600600

601+
/**
602+
* Returns a localized version of the schema file path
603+
* @param string $uri
604+
* @return string
605+
*/
601606
protected function getActualUri( $uri )
602607
{
603608
foreach ( $this->rewriteURIs as $prefix => $rewriteUri )

XBRL.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@
4545

4646
if ( ! function_exists("__") )
4747
{
48+
/**
49+
* A polyfill for the getText __() function
50+
* @param string $message
51+
* @param string $domain
52+
* @return string
53+
*/
4854
function __( $message, $domain )
4955
{
5056
return "$message\n";
@@ -5950,6 +5956,8 @@ public function getGenericLabel( $searchRole, $searchLabel = null, $searchLang =
59505956
* such as 'fact' for 'variable' or 'formula' for 'variableset'
59515957
* If null then any resource of the type $resourceType will be returned.
59525958
* @param Function $callback (optional) A callback to process results (see below)
5959+
* @param string $roleUri
5960+
* @param string $label
59535961
* @return boolean|array[]
59545962
*
59555963
* Callback will return true if no further processing is required. The arguments passed to the callback are:
@@ -17558,6 +17566,11 @@ public static function findDimensionMember( $nodes, $label )
1755817566
return false;
1755917567
}
1756017568

17569+
/**
17570+
* Strips out and resolves ./ and ../ parts of the string
17571+
* @param string $path
17572+
* @return mixed
17573+
*/
1756117574
public static function normalizePath($path)
1756217575
{
1756317576
// Test this function using these paths

documentation.zip

343 KB
Binary file not shown.

examples/Case Study DK/Observer.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,31 @@
22

33
/**
44
* An log observer used to capture taxonomy validation messages so they can be reported by the app
5+
* _ _ _ _ _
6+
* | | _ _ __ _ _ _(_) __| (_) |_ _ _
7+
* | | | | | |/ _` | | | | |/ _` | | __| | | |
8+
* | |__| |_| | (_| | |_| | | (_| | | |_| |_| |
9+
* |_____\__, |\__, |\__,_|_|\__,_|_|\__|\__, |
10+
* |___/ |_| |___/
511
*
612
* @author Bill Seddon
713
* @version 1.0
814
* @Copyright (C) 2018 Lyquidity Solutions Limited
915
* @License: GPL 3.0
1016
*
1117
*/
18+
1219
namespace lyquidity\dfb;
1320

1421
/**
1522
* Implementation of a log observer
1623
*/
1724
class Observer extends \Log_observer
1825
{
19-
// A list of any issue found
26+
/**
27+
* A list of any issue found
28+
* @var array
29+
*/
2030
private $issues = array();
2131

2232
/**
@@ -45,7 +55,7 @@ public function notify( $event )
4555

4656
/**
4757
* Add extra entries into the session
48-
* @param string $section
58+
* @param string $name
4959
* @param array $data
5060
*/
5161
public function addItem( $name, $data )

0 commit comments

Comments
 (0)