Browse Source

Merge pull request #728 from jonathangreen/fix_codesniffer

Fix islandora for latest 3.6 coding standard update.
pull/734/head
Jared Whiklo 5 years ago committed by GitHub
parent
commit
3a94b6a9c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      includes/dublin_core.inc
  2. 12
      includes/mime_detect.inc
  3. 54
      includes/tuque_wrapper.inc
  4. 12
      includes/utilities.inc
  5. 20
      tests/includes/utilities.inc

11
includes/dublin_core.inc

@ -13,6 +13,11 @@
*/ */
class DublinCore { class DublinCore {
/**
* The DC represented as an array.
*
* @var array
*/
public $dc = array( public $dc = array(
'dc:title' => array(), 'dc:title' => array(),
'dc:creator' => array(), 'dc:creator' => array(),
@ -30,6 +35,12 @@ class DublinCore {
'dc:coverage' => array(), 'dc:coverage' => array(),
'dc:rights' => array(), 'dc:rights' => array(),
); );
/**
* Doesn't appear to be used? Deprecated perhaps.
*
* @var string
*/
public $owner; public $owner;
/** /**

12
includes/mime_detect.inc

@ -59,7 +59,19 @@ class MimeDetect {
* $this->get_extension('image/jpeg') will always return 'jpg'. * $this->get_extension('image/jpeg') will always return 'jpg'.
*/ */
protected $protectedMimeTypes = array(); protected $protectedMimeTypes = array();
/**
* This is populated internally from protectedMimeTypes.
*
* @var array
*/
protected $protectedFileExtensions; protected $protectedFileExtensions;
/**
* This is deprecated and shouldn't be used.
*
* @var array
*/
protected $extensionExceptions = array( protected $extensionExceptions = array(
// XXX: Deprecated... Only here due to old 'tif' => 'image/tif' mapping... // XXX: Deprecated... Only here due to old 'tif' => 'image/tif' mapping...
// The correct MIMEtype is 'image/tiff'. // The correct MIMEtype is 'image/tiff'.

54
includes/tuque_wrapper.inc

@ -80,8 +80,19 @@ function islandora_invoke_datastream_hooks($hook, array $models, $dsid) {
* Implementation of the FedoraRepository class. * Implementation of the FedoraRepository class.
*/ */
class IslandoraFedoraRepository extends FedoraRepository { class IslandoraFedoraRepository extends FedoraRepository {
/**
* {@inheritdoc}
*/
protected $queryClass = 'IslandoraRepositoryQuery'; protected $queryClass = 'IslandoraRepositoryQuery';
/**
* {@inheritdoc}
*/
protected $newObjectClass = 'IslandoraNewFedoraObject'; protected $newObjectClass = 'IslandoraNewFedoraObject';
/**
* {@inheritdoc}
*/
protected $objectClass = 'IslandoraFedoraObject'; protected $objectClass = 'IslandoraFedoraObject';
/** /**
@ -179,8 +190,19 @@ class IslandoraRepositoryQuery extends RepositoryQuery {}
* Implementation of NewFedoraObject class. * Implementation of NewFedoraObject class.
*/ */
class IslandoraNewFedoraObject extends NewFedoraObject { class IslandoraNewFedoraObject extends NewFedoraObject {
/**
* {@inheritdoc}
*/
protected $newFedoraDatastreamClass = 'IslandoraNewFedoraDatastream'; protected $newFedoraDatastreamClass = 'IslandoraNewFedoraDatastream';
/**
* {@inheritdoc}
*/
protected $fedoraDatastreamClass = 'IslandoraFedoraDatastream'; protected $fedoraDatastreamClass = 'IslandoraFedoraDatastream';
/**
* {@inheritdoc}
*/
protected $fedoraRelsExtClass = 'IslandoraFedoraRelsExt'; protected $fedoraRelsExtClass = 'IslandoraFedoraRelsExt';
} }
@ -188,8 +210,19 @@ class IslandoraNewFedoraObject extends NewFedoraObject {
* Implementation, magic functions for a FedoraObject class. * Implementation, magic functions for a FedoraObject class.
*/ */
class IslandoraFedoraObject extends FedoraObject { class IslandoraFedoraObject extends FedoraObject {
/**
* {@inheritdoc}
*/
protected $newFedoraDatastreamClass = 'IslandoraNewFedoraDatastream'; protected $newFedoraDatastreamClass = 'IslandoraNewFedoraDatastream';
/**
* {@inheritdoc}
*/
protected $fedoraDatastreamClass = 'IslandoraFedoraDatastream'; protected $fedoraDatastreamClass = 'IslandoraFedoraDatastream';
/**
* {@inheritdoc}
*/
protected $fedoraRelsExtClass = 'IslandoraFedoraRelsExt'; protected $fedoraRelsExtClass = 'IslandoraFedoraRelsExt';
/** /**
@ -568,7 +601,14 @@ class IslandoraSimpleCache extends SimpleCache {}
* Implementation of NewFedoraDatastream class. * Implementation of NewFedoraDatastream class.
*/ */
class IslandoraNewFedoraDatastream extends NewFedoraDatastream { class IslandoraNewFedoraDatastream extends NewFedoraDatastream {
/**
* {@inheritdoc}
*/
protected $fedoraRelsIntClass = 'IslandoraFedoraRelsInt'; protected $fedoraRelsIntClass = 'IslandoraFedoraRelsInt';
/**
* {@inheritdoc}
*/
protected $fedoraDatastreamVersionClass = 'IslandoraFedoraDatastreamVersion'; protected $fedoraDatastreamVersionClass = 'IslandoraFedoraDatastreamVersion';
} }
@ -576,7 +616,14 @@ class IslandoraNewFedoraDatastream extends NewFedoraDatastream {
* Implementation and magic functions for FedoraDatastream class. * Implementation and magic functions for FedoraDatastream class.
*/ */
class IslandoraFedoraDatastream extends FedoraDatastream { class IslandoraFedoraDatastream extends FedoraDatastream {
/**
* {@inheritdoc}
*/
protected $fedoraRelsIntClass = 'IslandoraFedoraRelsInt'; protected $fedoraRelsIntClass = 'IslandoraFedoraRelsInt';
/**
* {@inheritdoc}
*/
protected $fedoraDatastreamVersionClass = 'IslandoraFedoraDatastreamVersion'; protected $fedoraDatastreamVersionClass = 'IslandoraFedoraDatastreamVersion';
/** /**
@ -650,7 +697,14 @@ class IslandoraFedoraDatastream extends FedoraDatastream {
* Implementation of FedoraDatastreamVersion class. * Implementation of FedoraDatastreamVersion class.
*/ */
class IslandoraFedoraDatastreamVersion extends FedoraDatastreamVersion { class IslandoraFedoraDatastreamVersion extends FedoraDatastreamVersion {
/**
* {@inheritdoc}
*/
protected $fedoraRelsIntClass = 'IslandoraFedoraRelsInt'; protected $fedoraRelsIntClass = 'IslandoraFedoraRelsInt';
/**
* {@inheritdoc}
*/
protected $fedoraDatastreamVersionClass = 'IslandoraFedoraDatastreamVersion'; protected $fedoraDatastreamVersionClass = 'IslandoraFedoraDatastreamVersion';
} }

12
includes/utilities.inc

@ -267,9 +267,9 @@ function islandora_escape_pid_for_function($pid) {
* below are fine. * below are fine.
* *
* @code * @code
* 'islandora', * 'islandora',
* 'islandora:', * 'islandora:',
* 'islandora:1234', * 'islandora:1234',
* @endcode * @endcode
* *
* @return string * @return string
@ -291,9 +291,9 @@ function islandora_get_namespace($id) {
* below are fine. * below are fine.
* *
* @code * @code
* 'islandora', * 'islandora',
* 'islandora:', * 'islandora:',
* 'islandora:1234', * 'islandora:1234',
* @endcode * @endcode
* *
* @return bool * @return bool

20
tests/includes/utilities.inc

@ -19,12 +19,32 @@
*/ */
class IslandoraTestUtilities extends IslandoraTestUtilityClass { class IslandoraTestUtilities extends IslandoraTestUtilityClass {
/**
* The passed test configuration.
*
* @var array
*/
protected $configuration; protected $configuration;
/**
* Any additional parameters the method called may need to function.
*
* @var array
*/
protected $params; protected $params;
/**
* An array of IslandoraTestUtilityResults.
*
* @var array
*/
public $results = array(); public $results = array();
/**
* The repository used for the tests.
*
* @var FedoraRepository
*/
protected $repository; protected $repository;
/** /**

Loading…
Cancel
Save