Skip to content

Commit

Permalink
Use $this instead of 'Ref to self' (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
svenluijten authored Sep 27, 2020
1 parent a49380f commit e697991
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/Thybag/Service/QueryObjectService.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function __construct ($list_name, \Thybag\SharePointAPI $api) {
* @param $col column to test
* @param $test comparison type (=,!+,<,>)
* @param $value to test with
* @return Ref to self
* @return $this
*/
public function where ($col, $test, $val) {
return $this->addQueryLine('where', $col, $test, $val);
Expand All @@ -81,7 +81,7 @@ public function where ($col, $test, $val) {
* @param $col column to test
* @param $test comparison type (=,!+,<,>)
* @param $value to test with
* @return Ref to self
* @return $this
*/
public function and_where ($col, $test, $val) {
return $this->addQueryLine('and', $col, $test, $val);
Expand All @@ -94,7 +94,7 @@ public function and_where ($col, $test, $val) {
* @param $col column to test
* @param $test comparison type (=,!+,<,>)
* @param $value to test with
* @return Ref to self
* @return $this
*/
public function or_where ($col, $test, $val) {
return $this->addQueryLine('or', $col, $test, $val);
Expand All @@ -106,7 +106,7 @@ public function or_where ($col, $test, $val) {
* This can be used when a user needs to perform queries to complex to be defined using the standard methods
*
* @param $caml - RAW CAML
* @return Ref to self
* @return $this
* @throws \Exception - Thrown if standard where states are already in use.
*/
public function raw_where ($caml) {
Expand All @@ -121,7 +121,7 @@ public function raw_where ($caml) {
* Specify maximum amount of items to return. (if not set, default is used.)
*
* @param $limit number of items to return
* @return Ref to self
* @return $this
*/
public function limit ($limit) {
$this->limit = $limit;
Expand All @@ -133,7 +133,7 @@ public function limit ($limit) {
* Specify view to use when returning data.
*
* @param $view Name/GUID
* @return Ref to self
* @return $this
*/
public function using ($view) {
$this->view = $view;
Expand All @@ -145,8 +145,8 @@ public function using ($view) {
* Specify view to use when returning data.
*
* @param String $options "XML string of query options."
* @return Ref to self
*/
* @return $this
*/
public function options($options){
$this->options = $options;
return $this;
Expand All @@ -158,7 +158,7 @@ public function options($options){
*
* @param $sort_on column to sort on
* @param $order Sort direction
* @return Ref to self
* @return $this
*/
public function sort ($sort_on, $order = 'desc') {
$queryString = '<FieldRef Name="' .$sort_on . '" Ascending="' . $this->api->getSortFromValue($order) . '" />';
Expand All @@ -172,7 +172,7 @@ public function sort ($sort_on, $order = 'desc') {
* array of fields to include in results
*
* @param $fields array
* @return Ref to self
* @return $this
*/
public function fields (array $fields) {
$this->fields = $fields;
Expand All @@ -185,7 +185,7 @@ public function columns ($fields) { return $this->fields($fields); }
* Attempt to include all fields row has within result
*
* @param $exclude_hidden to to false to include hidden fields
* @return Ref to self
* @return $this
*/
public function all_fields($exclude_hidden = true){
$fields = $this->api->readListMeta($this->list_name, $exclude_hidden);
Expand Down Expand Up @@ -218,7 +218,7 @@ public function get ($options = NULL) {
* @param $col column to test
* @param $test comparison type (=,!+,<,>,like)
* @param $value value to test with
* @return Ref to self
* @return $this
* @throws \Exception Thrown if $test is unrecognized
*/
private function addQueryLine ($rel, $col, $test, $value) {
Expand Down

0 comments on commit e697991

Please sign in to comment.