Skip to content

Commit 08a28ab

Browse files
committed
Fixes, update readme
1 parent 78256a1 commit 08a28ab

File tree

5 files changed

+17
-62
lines changed

5 files changed

+17
-62
lines changed

.scrutinizer.yml

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,6 @@
11
filter:
22
excluded_paths:
33
- 'tests/*'
4-
checks:
5-
php:
6-
code_rating: true
7-
variable_existence: true
8-
useless_calls: true
9-
use_statement_alias_conflict: true
10-
unused_variables: true
11-
unused_properties: true
12-
unused_parameters: true
13-
unused_methods: true
14-
unreachable_code: true
15-
sql_injection_vulnerabilities: true
16-
security_vulnerabilities: true
17-
precedence_mistakes: true
18-
precedence_in_conditions: true
19-
parameter_non_unique: true
20-
no_property_on_interface: true
21-
no_non_implemented_abstract_methods: true
22-
deprecated_code_usage: true
23-
closure_use_not_conflicting: true
24-
closure_use_modifiable: true
25-
avoid_useless_overridden_methods: true
26-
avoid_conflicting_incrementers: true
27-
assignment_of_null_return: true
28-
verify_property_names: true
29-
verify_argument_usable_as_reference: true
30-
verify_access_scope_valid: true
31-
use_self_instead_of_fqcn: true
32-
too_many_arguments: true
33-
single_namespace_per_use: true
34-
return_doc_comment_if_not_inferrable: true
35-
return_doc_comments: true
36-
require_scope_for_methods: true
37-
require_scope_for_properties: true
38-
require_php_tag_first: true
39-
require_braces_around_control_structures: true
40-
psr2_control_structure_declaration: true
41-
psr2_switch_declaration: true
42-
psr2_class_declaration: true
43-
no_eval: true
44-
no_else_if_statements: true
45-
avoid_corrupting_byteorder_marks: true
46-
argument_type_checks: true
47-
php5_style_constructor: true
48-
parameter_doc_comments: true
49-
no_duplicate_arguments: true
50-
missing_arguments: true
51-
instanceof_class_exists: true
52-
foreach_traversable: true
53-
no_unnecessary_function_call_in_for_loop: true
4+
tools:
5+
external_code_coverage:
6+
timeout: 900 # Timeout in seconds.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Po
2+
[![Build Status](https://travis-ci.org/geekwright/Po.svg?branch=master)](https://travis-ci.org/geekwright/Po) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/geekwright/Po/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/geekwright/Po/?branch=master)
3+
24
__Po__ is a set of objects to assist in reading, manipulating and creating GNU gettext style PO files.
35

46
## Installing

src/PoEntry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function getAsString($type)
137137
*
138138
* @param string $type PoToken constant
139139
*
140-
* @return string|null
140+
* @return string[]|null
141141
*/
142142
public function getAsStringArray($type)
143143
{

src/PoFile.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ public function __construct($header = null, $entries = array(), $unkeyedEntries
6363
/**
6464
* Build the internal entries array key from id, context and plural id
6565
*
66-
* @param string $msgid the untranslated message of the entry
67-
* @param string $msgctxt the context of the entry, if any
68-
* @param string $msgid_plural the untranslated plural message of the entry, if any
66+
* @param string $msgid the untranslated message of the entry
67+
* @param string|null $msgctxt the context of the entry, if any
68+
* @param string|null $msgid_plural the untranslated plural message of the entry, if any
6969
*
7070
* @return string
7171
*/
@@ -221,9 +221,9 @@ public function mergeEntry(PoEntry $newEntry)
221221
/**
222222
* Get an entry based on key values - msgid, msgctxt and msgid_plural
223223
*
224-
* @param string $msgid the untranslated message of the entry
225-
* @param string $msgctxt the context of the entry, if any
226-
* @param string $msgid_plural the untranslated plural message of the entry, if any
224+
* @param string $msgid the untranslated message of the entry
225+
* @param string|null $msgctxt the context of the entry, if any
226+
* @param string|null $msgid_plural the untranslated plural message of the entry, if any
227227
*
228228
* @return PoEntry|null matching entry, or null if not found
229229
*/
@@ -335,8 +335,8 @@ public function dumpString()
335335
/**
336336
* Replace any current contents with entries from a file
337337
*
338-
* @param string $file po file/stream to read
339-
* @param resource $context context for stream if required
338+
* @param string $file po file/stream to read
339+
* @param resource|null $context context for stream if required
340340
*
341341
* @return void
342342
*

src/PoHeader.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function setHeader($key, $value)
117117
/**
118118
* Set the POT-Creation-Date header
119119
*
120-
* @param integer $time unix timestamp, null to use current
120+
* @param integer|null $time unix timestamp, null to use current
121121
*
122122
* @return void
123123
*/
@@ -129,7 +129,7 @@ public function setCreateDate($time = null)
129129
/**
130130
* Set the PO-Revision-Date header
131131
*
132-
* @param integer $time unix timestamp, null to use current
132+
* @param integer|null $time unix timestamp, null to use current
133133
*
134134
* @return void
135135
*/
@@ -141,7 +141,7 @@ public function setRevisionDate($time = null)
141141
/**
142142
* Format a timestamp following PO file conventions
143143
*
144-
* @param integer $time unix timestamp, null to use current
144+
* @param integer|null $time unix timestamp, null to use current
145145
*
146146
* @return string formatted timestamp
147147
*/

0 commit comments

Comments
 (0)