@@ -39,7 +39,7 @@ |
||
| 39 | 39 | $clients = $clientRepository->findAllByPid($pid); |
| 40 | 40 | if ($clients) { |
| 41 | 41 | if (count($clients) != 1) { |
| 42 | - throw new \Exception('Invalid number of client records for pid: '.$pid); |
|
| 42 | + throw new \Exception('Invalid number of client records for pid: ' . $pid); |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -20,26 +20,26 @@ discard block |
||
| 20 | 20 | die('Access denied.'); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['EWW\Dpf\Tasks\TransferTask'] = array( |
|
| 23 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['EWW\Dpf\Tasks\TransferTask'] = array ( |
|
| 24 | 24 | 'extension' => $_EXTKEY, |
| 25 | 25 | 'title' => 'Qucosa-Dokumente ans Repository übertragen.', |
| 26 | 26 | 'description' => '', |
| 27 | 27 | ); |
| 28 | 28 | |
| 29 | 29 | if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers']) == false) { |
| 30 | - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'] = array(); |
|
| 30 | + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'] = array (); |
|
| 31 | 31 | } |
| 32 | 32 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'EWW\Dpf\Command\TransferCommandController'; |
| 33 | 33 | |
| 34 | 34 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( |
| 35 | 35 | 'EWW.' . $_EXTKEY, |
| 36 | 36 | 'Qucosaform', |
| 37 | - array( |
|
| 37 | + array ( |
|
| 38 | 38 | 'DocumentForm' => 'list,show,new,create,edit,update,delete,cancel', |
| 39 | 39 | 'AjaxDocumentForm' => 'group,fileGroup,field,deleteFile,primaryUpload,secondaryUpload,fillOut', |
| 40 | 40 | ), |
| 41 | 41 | // non-cacheable actions |
| 42 | - array( |
|
| 42 | + array ( |
|
| 43 | 43 | 'DocumentForm' => 'list,show,new,create,edit,update,delete,cancel,ajaxGroup,ajaxFileGroup,ajaxField', |
| 44 | 44 | 'AjaxDocumentForm' => 'group,fileGroup,field,deleteFile,primaryUpload,secondaryUpload,fillOut', |
| 45 | 45 | ) |
@@ -48,11 +48,11 @@ discard block |
||
| 48 | 48 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( |
| 49 | 49 | 'EWW.' . $_EXTKEY, |
| 50 | 50 | 'Frontendsearch', |
| 51 | - array( |
|
| 51 | + array ( |
|
| 52 | 52 | 'SearchFE' => 'search,extendedSearch,showSearchForm', |
| 53 | 53 | ), |
| 54 | 54 | // non-cacheable actions |
| 55 | - array( |
|
| 55 | + array ( |
|
| 56 | 56 | 'SearchFE' => 'search,extendedSearch' |
| 57 | 57 | ) |
| 58 | 58 | ); |
@@ -60,11 +60,11 @@ discard block |
||
| 60 | 60 | \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( |
| 61 | 61 | 'EWW.' . $_EXTKEY, |
| 62 | 62 | 'Getfile', |
| 63 | - array( |
|
| 63 | + array ( |
|
| 64 | 64 | 'GetFile' => 'attachment', |
| 65 | 65 | ), |
| 66 | 66 | // non-cacheable actions |
| 67 | - array( |
|
| 67 | + array ( |
|
| 68 | 68 | 'GetFile' => 'attachment', |
| 69 | 69 | ) |
| 70 | 70 | ); |
@@ -30,12 +30,12 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | public $uri, |
| 32 | 32 | $method = Http::GET, |
| 33 | - $headers = array(), |
|
| 33 | + $headers = array (), |
|
| 34 | 34 | $raw_headers = '', |
| 35 | 35 | $strict_ssl = false, |
| 36 | 36 | $content_type, |
| 37 | 37 | $expected_type, |
| 38 | - $additional_curl_opts = array(), |
|
| 38 | + $additional_curl_opts = array (), |
|
| 39 | 39 | $auto_parse = true, |
| 40 | 40 | $serialize_payload_method = self::SERIALIZE_PAYLOAD_SMART, |
| 41 | 41 | $username, |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $error_callback, |
| 47 | 47 | $follow_redirects = false, |
| 48 | 48 | $max_redirects = self::MAX_REDIRECTS_DEFAULT, |
| 49 | - $payload_serializers = array(); |
|
| 49 | + $payload_serializers = array (); |
|
| 50 | 50 | |
| 51 | 51 | // Options |
| 52 | 52 | // private $_options = array( |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | public function contentType($mime) |
| 413 | 413 | { |
| 414 | 414 | if (empty($mime)) return $this; |
| 415 | - $this->content_type = Mime::getFullMime($mime); |
|
| 415 | + $this->content_type = Mime::getFullMime($mime); |
|
| 416 | 416 | if ($this->isUpload()) { |
| 417 | 417 | $this->neverSerializePayload(); |
| 418 | 418 | } |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | { |
| 462 | 462 | $this->addOnCurlOption(CURLOPT_PROXY, "{$proxy_host}:{$proxy_port}"); |
| 463 | 463 | $this->addOnCurlOption(CURLOPT_PROXYTYPE, $proxy_type); |
| 464 | - if (in_array($auth_type, array(CURLAUTH_BASIC,CURLAUTH_NTLM))) { |
|
| 464 | + if (in_array($auth_type, array (CURLAUTH_BASIC, CURLAUTH_NTLM))) { |
|
| 465 | 465 | $this->addOnCurlOption(CURLOPT_PROXYAUTH, $auth_type) |
| 466 | 466 | ->addOnCurlOption(CURLOPT_PROXYUSERPWD, "{$auth_username}:{$auth_password}"); |
| 467 | 467 | } |
@@ -754,7 +754,7 @@ discard block |
||
| 754 | 754 | // recusion. Do not use this syntax elsewhere. |
| 755 | 755 | // It goes against the whole readability |
| 756 | 756 | // and transparency idea. |
| 757 | - self::$_template = new Request(array('method' => Http::GET)); |
|
| 757 | + self::$_template = new Request(array ('method' => Http::GET)); |
|
| 758 | 758 | |
| 759 | 759 | // This is more like it... |
| 760 | 760 | self::$_template |
@@ -844,11 +844,11 @@ discard block |
||
| 844 | 844 | if (!file_exists($this->client_cert)) |
| 845 | 845 | throw new \Exception('Could not read Client Certificate'); |
| 846 | 846 | |
| 847 | - curl_setopt($ch, CURLOPT_SSLCERTTYPE, $this->client_encoding); |
|
| 848 | - curl_setopt($ch, CURLOPT_SSLKEYTYPE, $this->client_encoding); |
|
| 849 | - curl_setopt($ch, CURLOPT_SSLCERT, $this->client_cert); |
|
| 850 | - curl_setopt($ch, CURLOPT_SSLKEY, $this->client_key); |
|
| 851 | - curl_setopt($ch, CURLOPT_SSLKEYPASSWD, $this->client_passphrase); |
|
| 847 | + curl_setopt($ch, CURLOPT_SSLCERTTYPE, $this->client_encoding); |
|
| 848 | + curl_setopt($ch, CURLOPT_SSLKEYTYPE, $this->client_encoding); |
|
| 849 | + curl_setopt($ch, CURLOPT_SSLCERT, $this->client_cert); |
|
| 850 | + curl_setopt($ch, CURLOPT_SSLKEY, $this->client_key); |
|
| 851 | + curl_setopt($ch, CURLOPT_SSLKEYPASSWD, $this->client_passphrase); |
|
| 852 | 852 | // curl_setopt($ch, CURLOPT_SSLCERTPASSWD, $this->client_cert_passphrase); |
| 853 | 853 | } |
| 854 | 854 | |
@@ -884,7 +884,7 @@ discard block |
||
| 884 | 884 | } |
| 885 | 885 | } |
| 886 | 886 | |
| 887 | - $headers = array(); |
|
| 887 | + $headers = array (); |
|
| 888 | 888 | // https://github.com/nategood/httpful/issues/37 |
| 889 | 889 | // Except header removes any HTTP 1.1 Continue from response headers |
| 890 | 890 | $headers[] = 'Expect:'; |
@@ -917,9 +917,9 @@ discard block |
||
| 917 | 917 | } |
| 918 | 918 | |
| 919 | 919 | $url = \parse_url($this->uri); |
| 920 | - $path = (isset($url['path']) ? $url['path'] : '/').(isset($url['query']) ? '?'.$url['query'] : ''); |
|
| 920 | + $path = (isset($url['path']) ? $url['path'] : '/') . (isset($url['query']) ? '?' . $url['query'] : ''); |
|
| 921 | 921 | $this->raw_headers = "{$this->method} $path HTTP/1.1\r\n"; |
| 922 | - $host = (isset($url['host']) ? $url['host'] : 'localhost').(isset($url['port']) ? ':'.$url['port'] : ''); |
|
| 922 | + $host = (isset($url['host']) ? $url['host'] : 'localhost') . (isset($url['port']) ? ':' . $url['port'] : ''); |
|
| 923 | 923 | $this->raw_headers .= "Host: $host\r\n"; |
| 924 | 924 | $this->raw_headers .= \implode("\r\n", $headers); |
| 925 | 925 | $this->raw_headers .= "\r\n"; |
@@ -978,7 +978,7 @@ discard block |
||
| 978 | 978 | $user_agent .= '?.?.?'; |
| 979 | 979 | } |
| 980 | 980 | |
| 981 | - $user_agent .= ' PHP/'. PHP_VERSION . ' (' . PHP_OS . ')'; |
|
| 981 | + $user_agent .= ' PHP/' . PHP_VERSION . ' (' . PHP_OS . ')'; |
|
| 982 | 982 | |
| 983 | 983 | if (isset($_SERVER['SERVER_SOFTWARE'])) { |
| 984 | 984 | $user_agent .= ' ' . \preg_replace('~PHP/[\d\.]+~U', '', |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | public function parse($body) |
| 16 | 16 | { |
| 17 | - $parsed = array(); |
|
| 17 | + $parsed = array (); |
|
| 18 | 18 | parse_str($body, $parsed); |
| 19 | 19 | return $parsed; |
| 20 | 20 | } |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | class MimeHandlerAdapter |
| 12 | 12 | { |
| 13 | - public function __construct(array $args = array()) |
|
| 13 | + public function __construct(array $args = array ()) |
|
| 14 | 14 | { |
| 15 | 15 | $this->init($args); |
| 16 | 16 | } |
@@ -43,12 +43,12 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | protected function stripBom($body) |
| 45 | 45 | { |
| 46 | - if ( substr($body,0,3) === "\xef\xbb\xbf" ) // UTF-8 |
|
| 47 | - $body = substr($body,3); |
|
| 48 | - else if ( substr($body,0,4) === "\xff\xfe\x00\x00" || substr($body,0,4) === "\x00\x00\xfe\xff" ) // UTF-32 |
|
| 49 | - $body = substr($body,4); |
|
| 50 | - else if ( substr($body,0,2) === "\xff\xfe" || substr($body,0,2) === "\xfe\xff" ) // UTF-16 |
|
| 51 | - $body = substr($body,2); |
|
| 46 | + if (substr($body, 0, 3) === "\xef\xbb\xbf") // UTF-8 |
|
| 47 | + $body = substr($body, 3); |
|
| 48 | + else if (substr($body, 0, 4) === "\xff\xfe\x00\x00" || substr($body, 0, 4) === "\x00\x00\xfe\xff") // UTF-32 |
|
| 49 | + $body = substr($body, 4); |
|
| 50 | + else if (substr($body, 0, 2) === "\xff\xfe" || substr($body, 0, 2) === "\xfe\xff") // UTF-16 |
|
| 51 | + $body = substr($body, 2); |
|
| 52 | 52 | return $body; |
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | \ No newline at end of file |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | if (empty($body)) |
| 18 | 18 | return null; |
| 19 | 19 | |
| 20 | - $parsed = array(); |
|
| 20 | + $parsed = array (); |
|
| 21 | 21 | $fp = fopen('data://text/plain;base64,' . base64_encode($body), 'r'); |
| 22 | 22 | while (($r = fgetcsv($fp)) !== FALSE) { |
| 23 | 23 | $parsed[] = $r; |
@@ -34,10 +34,10 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function serialize($payload) |
| 36 | 36 | { |
| 37 | - $fp = fopen('php://temp/maxmemory:'. (6*1024*1024), 'r+'); |
|
| 37 | + $fp = fopen('php://temp/maxmemory:' . (6 * 1024 * 1024), 'r+'); |
|
| 38 | 38 | $i = 0; |
| 39 | 39 | foreach ($payload as $fields) { |
| 40 | - if($i++ == 0) { |
|
| 40 | + if ($i++ == 0) { |
|
| 41 | 41 | fputcsv($fp, array_keys($fields)); |
| 42 | 42 | } |
| 43 | 43 | fputcsv($fp, $fields); |
@@ -23,10 +23,10 @@ discard block |
||
| 23 | 23 | /** |
| 24 | 24 | * @param array $conf sets configuration options |
| 25 | 25 | */ |
| 26 | - public function __construct(array $conf = array()) |
|
| 26 | + public function __construct(array $conf = array ()) |
|
| 27 | 27 | { |
| 28 | - $this->namespace = isset($conf['namespace']) ? $conf['namespace'] : ''; |
|
| 29 | - $this->libxml_opts = isset($conf['libxml_opts']) ? $conf['libxml_opts'] : 0; |
|
| 28 | + $this->namespace = isset($conf['namespace']) ? $conf['namespace'] : ''; |
|
| 29 | + $this->libxml_opts = isset($conf['libxml_opts']) ? $conf['libxml_opts'] : 0; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | { |
| 66 | 66 | $xml = new \XMLWriter; |
| 67 | 67 | $xml->openMemory(); |
| 68 | - $xml->startDocument('1.0','ISO-8859-1'); |
|
| 68 | + $xml->startDocument('1.0', 'ISO-8859-1'); |
|
| 69 | 69 | $this->serialize_node($xml, $payload); |
| 70 | 70 | return $xml->outputMemory(true); |
| 71 | 71 | } |
@@ -75,11 +75,11 @@ discard block |
||
| 75 | 75 | * @param mixed $node to serialize |
| 76 | 76 | * @author Ted Zellers |
| 77 | 77 | */ |
| 78 | - public function serialize_node(&$xmlw, $node){ |
|
| 79 | - if (!is_array($node)){ |
|
| 78 | + public function serialize_node(&$xmlw, $node) { |
|
| 79 | + if (!is_array($node)) { |
|
| 80 | 80 | $xmlw->text($node); |
| 81 | 81 | } else { |
| 82 | - foreach ($node as $k => $v){ |
|
| 82 | + foreach ($node as $k => $v) { |
|
| 83 | 83 | $xmlw->startElement($k); |
| 84 | 84 | $this->serialize_node($xmlw, $v); |
| 85 | 85 | $xmlw->endElement(); |
@@ -112,11 +112,11 @@ discard block |
||
| 112 | 112 | $node->appendChild($arrNode); |
| 113 | 113 | $this->_future_serializeArrayAsXml($value, $arrNode, $dom); |
| 114 | 114 | } else if (is_bool($value)) { |
| 115 | - $node->appendChild($dom->createTextNode($value?'TRUE':'FALSE')); |
|
| 115 | + $node->appendChild($dom->createTextNode($value ? 'TRUE' : 'FALSE')); |
|
| 116 | 116 | } else { |
| 117 | 117 | $node->appendChild($dom->createTextNode($value)); |
| 118 | 118 | } |
| 119 | - return array($node, $dom); |
|
| 119 | + return array ($node, $dom); |
|
| 120 | 120 | } |
| 121 | 121 | /** |
| 122 | 122 | * @author Zack Douglas <[email protected]> |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $parent->appendChild($el); |
| 133 | 133 | $this->_future_serializeAsXml($v, $el, $dom); |
| 134 | 134 | } |
| 135 | - return array($parent, $dom); |
|
| 135 | + return array ($parent, $dom); |
|
| 136 | 136 | } |
| 137 | 137 | /** |
| 138 | 138 | * @author Zack Douglas <[email protected]> |
@@ -147,6 +147,6 @@ discard block |
||
| 147 | 147 | $this->_future_serializeAsXml($pr->getValue($value), $el, $dom); |
| 148 | 148 | } |
| 149 | 149 | } |
| 150 | - return array($parent, $dom); |
|
| 150 | + return array ($parent, $dom); |
|
| 151 | 151 | } |
| 152 | 152 | } |
| 153 | 153 | \ No newline at end of file |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * @param Request $request |
| 31 | 31 | * @param array $meta_data |
| 32 | 32 | */ |
| 33 | - public function __construct($body, $headers, Request $request, array $meta_data = array()) |
|
| 33 | + public function __construct($body, $headers, Request $request, array $meta_data = array ()) |
|
| 34 | 34 | { |
| 35 | 35 | $this->request = $request; |
| 36 | 36 | $this->raw_headers = $headers; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | $this->_interpretHeaders(); |
| 44 | 44 | |
| 45 | - $this->body = $this->_parse($body); |
|
| 45 | + $this->body = $this->_parse($body); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | public function _parseHeaders($headers) |
| 116 | 116 | { |
| 117 | 117 | $headers = preg_split("/(\r|\n)+/", $headers, -1, \PREG_SPLIT_NO_EMPTY); |
| 118 | - $parse_headers = array(); |
|
| 118 | + $parse_headers = array (); |
|
| 119 | 119 | for ($i = 1; $i < count($headers); $i++) { |
| 120 | 120 | list($key, $raw_value) = explode(':', $headers[$i], 2); |
| 121 | 121 | $key = trim($key); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | * Map short name for a mime type |
| 24 | 24 | * to a full proper mime type |
| 25 | 25 | */ |
| 26 | - public static $mimes = array( |
|
| 26 | + public static $mimes = array ( |
|
| 27 | 27 | 'json' => self::JSON, |
| 28 | 28 | 'xml' => self::XML, |
| 29 | 29 | 'form' => self::FORM, |