Completed
Push — travis-lint ( 7b579f...ee177b )
by Sam
08:37
created
admin/code/ModelAdmin.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -117,6 +117,9 @@
 block discarded – undo
117 117
 		Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/ModelAdmin.js');
118 118
 	}
119 119
 
120
+	/**
121
+	 * @param string $action
122
+	 */
120 123
 	public function Link($action = null) {
121 124
 		if(!$action) $action = $this->sanitiseClassName($this->modelClass);
122 125
 		return parent::Link($action);
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 use SilverStripe\ORM\SS_List;
8 8
 use SilverStripe\ORM\ArrayList;
9 9
 use SilverStripe\ORM\DataObjectInterface;
10
-use SilverStripe\View\Requirements;
11 10
 use InvalidArgumentException;
12 11
 
13 12
 /**
Please login to merge, or discard this patch.
tests/core/startup/ErrorControlChainTest.php 1 patch
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	/**
25 25
 	 * Modify method visibility to public for testing
26 26
 	 *
27
-	 * @param mixed $errors
27
+	 * @param string $errors
28 28
 	 */
29 29
 	public function setDisplayErrors($errors)
30 30
 	{
@@ -33,6 +33,10 @@  discard block
 block discarded – undo
33 33
 	}
34 34
 
35 35
 	// Change function visibility to be testable directly
36
+
37
+	/**
38
+	 * @param string $memstring
39
+	 */
36 40
 	public function translateMemstring($memstring) {
37 41
 		return parent::translateMemstring($memstring);
38 42
 	}
Please login to merge, or discard this patch.
admin/code/CMSMenu.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 *                          left.
100 100
 	 * @param array $attributes an array of attributes to include on the link.
101 101
 	 *
102
-	 * @return boolean The result of the operation.
102
+	 * @return boolean|null The result of the operation.
103 103
 	 */
104 104
 	public static function add_link($code, $menuTitle, $url, $priority = -1, $attributes = null) {
105 105
 		return self::add_menu_item($code, $menuTitle, $url, null, $priority, $attributes);
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 *                    have the rights to access some other part of the admin area.
120 120
 	 * @param int $priority
121 121
 	 * @param array $attributes an array of attributes to include on the link.
122
-	 * @return bool Success
122
+	 * @return boolean|null Success
123 123
 	 */
124 124
 	public static function add_menu_item($code, $menuTitle, $url, $controllerClass = null, $priority = -1,
125 125
 											$attributes = null) {
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 	 *                    have the rights to access some other part of the admin area.
251 251
 	 * @param int $priority
252 252
 	 * @param array $attributes an array of attributes to include on the link.
253
-	 * @return bool Success
253
+	 * @return boolean|null Success
254 254
 	 */
255 255
 	public static function replace_menu_item($code, $menuTitle, $url, $controllerClass = null, $priority = -1,
256 256
 												$attributes = null) {
Please login to merge, or discard this patch.
admin/code/LeftAndMain.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use SilverStripe\Filesystem\ImageManipulation;
6 6
 use SilverStripe\Filesystem\Storage\AssetContainer;
7 7
 use SilverStripe\Filesystem\Storage\AssetStore;
8
-
9 8
 use Injector;
10 9
 use AssetField;
11 10
 use File;
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 	/**
253 253
 	 * Gets the combined configuration of all LeafAndMain subclasses required by the client app.
254 254
 	 *
255
-	 * @return array
255
+	 * @return string
256 256
 	 *
257 257
 	 * WARNING: Experimental API
258 258
 	 */
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
 	 *
692 692
 	 * @param string $url
693 693
 	 * @param int $code
694
-	 * @return HTTPResponse|string
694
+	 * @return string|null
695 695
 	 */
696 696
 	public function redirect($url, $code=302) {
697 697
 		if($this->getRequest()->isAjax()) {
@@ -969,7 +969,7 @@  discard block
 block discarded – undo
969 969
 	 * {@link SSViewer::get_templates_by_class()}
970 970
 	 *
971 971
 	 * @param string $suffix
972
-	 * @return array
972
+	 * @return string
973 973
 	 */
974 974
 	public function getTemplatesWithSuffix($suffix) {
975 975
 		$templates = SSViewer::get_templates_by_class(get_class($this), $suffix, __CLASS__);
@@ -2039,7 +2039,7 @@  discard block
 block discarded – undo
2039 2039
 	}
2040 2040
 
2041 2041
 	/**
2042
-	 * @return String
2042
+	 * @return DBField
2043 2043
 	 */
2044 2044
 	public function Locale() {
2045 2045
 		return DBField::create_field('Locale', i18n::get_locale());
Please login to merge, or discard this patch.
ORM/Connect/MySQLSchemaManager.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -115,6 +115,9 @@
 block discarded – undo
115 115
 		$this->query("ALTER TABLE \"$tableName\" $alterations");
116 116
 	}
117 117
 
118
+	/**
119
+	 * @param string $tableName
120
+	 */
118 121
 	public function isView($tableName) {
119 122
 		$info = $this->query("SHOW /*!50002 FULL*/ TABLES LIKE '$tableName'")->record();
120 123
 		return $info && strtoupper($info['Table_type']) == 'VIEW';
Please login to merge, or discard this patch.
ORM/DatabaseAdmin.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	/**
108 108
 	 * Gets the url to return to after build
109 109
 	 *
110
-	 * @return string|null
110
+	 * @return string
111 111
 	 */
112 112
 	protected function getReturnURL() {
113 113
 		$url = $this->request->getVar('returnURL');
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 	/**
153 153
 	 * Returns the timestamp of the time that the database was last built
154 154
 	 *
155
-	 * @return string Returns the timestamp of the time that the database was
155
+	 * @return integer|null Returns the timestamp of the time that the database was
156 156
 	 *                last built
157 157
 	 */
158 158
 	public static function lastBuilt() {
Please login to merge, or discard this patch.
ORM/DataExtension.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -78,9 +78,15 @@
 block discarded – undo
78 78
 	public function can($member) {
79 79
 	}
80 80
 
81
+	/**
82
+	 * @param \SilverStripe\Security\Member|null $member
83
+	 */
81 84
 	public function canEdit($member) {
82 85
 	}
83 86
 
87
+	/**
88
+	 * @param \SilverStripe\Security\Member|null $member
89
+	 */
84 90
 	public function canDelete($member) {
85 91
 	}
86 92
 
Please login to merge, or discard this patch.
ORM/DataList.php 1 patch
Doc Comments   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 * Returns a new DataList instance with the specified query parameter assigned
158 158
 	 *
159 159
 	 * @param string|array $keyOrArray Either the single key to set, or an array of key value pairs to set
160
-	 * @param mixed $val If $keyOrArray is not an array, this is the value to set
160
+	 * @param string $val If $keyOrArray is not an array, this is the value to set
161 161
 	 * @return DataList
162 162
 	 */
163 163
 	public function setDataQueryParam($keyOrArray, $val = null) {
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
 	 * Check if the given field specification could be interpreted as an unquoted relation name
521 521
 	 *
522 522
 	 * @param string $field
523
-	 * @return bool
523
+	 * @return integer
524 524
 	 */
525 525
 	protected function isValidRelationName($field) {
526 526
 		return preg_match('/^[A-Z0-9._]+$/i', $field);
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
 	 * @param int $order A numerical index to control the order that joins are added to the query; lower order values
636 636
 	 * will cause the query to appear first. The default is 20, and joins created automatically by the
637 637
 	 * ORM have a value of 10.
638
-	 * @param array $parameters Any additional parameters if the join is a parameterised subquery
638
+	 * @param string[] $parameters Any additional parameters if the join is a parameterised subquery
639 639
 	 * @return DataList
640 640
 	 */
641 641
 	public function innerJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) {
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
 	 * @param int $order A numerical index to control the order that joins are added to the query; lower order values
654 654
 	 * will cause the query to appear first. The default is 20, and joins created automatically by the
655 655
 	 * ORM have a value of 10.
656
-	 * @param array $parameters Any additional parameters if the join is a parameterised subquery
656
+	 * @param string[] $parameters Any additional parameters if the join is a parameterised subquery
657 657
 	 * @return DataList
658 658
 	 */
659 659
 	public function leftJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) {
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
 	 * Return the maximum value of the given field in this DataList
781 781
 	 *
782 782
 	 * @param string $fieldName
783
-	 * @return mixed
783
+	 * @return string
784 784
 	 */
785 785
 	public function max($fieldName) {
786 786
 		return $this->dataQuery->max($fieldName);
@@ -790,7 +790,7 @@  discard block
 block discarded – undo
790 790
 	 * Return the minimum value of the given field in this DataList
791 791
 	 *
792 792
 	 * @param string $fieldName
793
-	 * @return mixed
793
+	 * @return string
794 794
 	 */
795 795
 	public function min($fieldName) {
796 796
 		return $this->dataQuery->min($fieldName);
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
 	 * Return the average value of the given field in this DataList
801 801
 	 *
802 802
 	 * @param string $fieldName
803
-	 * @return mixed
803
+	 * @return string
804 804
 	 */
805 805
 	public function avg($fieldName) {
806 806
 		return $this->dataQuery->avg($fieldName);
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
 	 * Return the sum of the values of the given field in this DataList
811 811
 	 *
812 812
 	 * @param string $fieldName
813
-	 * @return mixed
813
+	 * @return string
814 814
 	 */
815 815
 	public function sum($fieldName) {
816 816
 		return $this->dataQuery->sum($fieldName);
@@ -862,7 +862,7 @@  discard block
 block discarded – undo
862 862
 	/**
863 863
 	 * Restrict the columns to fetch into this DataList
864 864
 	 *
865
-	 * @param array $queriedColumns
865
+	 * @param string[] $queriedColumns
866 866
 	 * @return DataList
867 867
 	 */
868 868
 	public function setQueriedColumns($queriedColumns) {
@@ -1135,7 +1135,7 @@  discard block
 block discarded – undo
1135 1135
 	/**
1136 1136
 	 * Returns item stored in list with index $key
1137 1137
 	 *
1138
-	 * @param mixed $key
1138
+	 * @param integer $key
1139 1139
 	 * @return DataObject
1140 1140
 	 */
1141 1141
 	public function offsetGet($key) {
Please login to merge, or discard this patch.
ORM/FieldType/DBClassName.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -186,6 +186,9 @@
 block discarded – undo
186 186
 		return $classNames;
187 187
 	}
188 188
 
189
+	/**
190
+	 * @param \DBClassNameTest_ObjectSubClass $record
191
+	 */
189 192
 	public function setValue($value, $record = null, $markChanged = true) {
190 193
 		parent::setValue($value, $record, $markChanged);
191 194
 
Please login to merge, or discard this patch.